Heigler Rocha
That’s actually what I want Now can get rid of conditions
Great. Another possible approach is to call render_to_string directly on your python code to handle such dynamic includes
max 17
Anyone knows ?
can u share urls.py file?
Smile
can u share urls.py file?
path('v1/projects/<str:title>', ProjectRud.as_view()),
Эндейл
**ValueError at / The QuerySet value for an exact lookup must be limited to one result using slicing.** how can i fix this error?
Линар
def get_context_data(self, **kwargs): context = super(AuctionDetailview, self).get_context_data(**kwargs) return context eror :super() takes 1 positional argument but 2 were given what is the problem? please help
Cheshtaaaaaaa
i am using the default user model as one to one relationship in my own model but that is giving some errors
Alina
I am trying to create super user on elastic beanstalk postgres and get failed deploy. Somebody knows how to figure out it?
Alina
02_createsuperuser: command: "source /var/app/venv/*/bin/activate && echo from accounts.models import Account; Account.objects.create_superuser('first_name', 'last_name', 'your-email@gmail.com', 'yourusername', 'password') | python manage.py shell" leader_only: true
Smile
Hello. Question about DRF: How to pass two different queryset models in ModelViewSet so as not to write two identical classes with the same logic? class ProjectVieSet(ModelViewSet): queryset = Project.objects.all() # need also Profile model serializer_class = ProjectSerializer lookup_field = 'title'
🧚‍♂️
Hello We have uploaded the project , I am trying to check the work in postman , it gives this error : OperationalError at /account/register/ Error 8 connecting to redis:6379. nodename nor servname provided, or not known. Do I need to run redis in docker now?
Akbar
Who knows how to create a telegram bot using django and telebot , can you post a link to a video or website?? thank you in advance
J A X O N
how i can fix Cannot filter a query once a slice has been taken.
J A X O N
that is my code
J A X O N
def shop(requests): catagory= Catagory.objects.all() products=Product.objects.all()[0:6] active_catagory=requests.GET.get('catagory' , '') if active_catagory != '' and active_catagory is not None: products=products.filter(catagory__slug=active_catagory) context = { 'products': products, 'catagorys': catagory, 'active_catagory':active_catagory, }
J A X O N
7 inst
J A X O N
ooo thnx i fixt
Isa
Could you recommend some course or youtube videos about django orm for beginers?
Doragonsureiyā
Could you recommend some course or youtube videos about django orm for beginers?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Owolabi
How can I integrate user withdrawal with stripe on django app
Owolabi
I know creating a transfer object could be used for this purpose but how can I generate the destination id. Thanks guys
Ameer
How deployed my django with nginx server
Aleksandr
How deployed my django with nginx server
I do as it is written in this article: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-debian-11#configure-nginx-to-proxy-pass-to-gunicorn
Sajid
i want to implement firebase with django rest api to send notifications. I m not getting any enough information. Can anyone help me by suggesting blog, officical doc or you tube video??
Necro0
i am getting an error
Necro0
could anyone please help me?
Doragonsureiyā
could anyone please help me?
No one can help you until you explain your difficulties.
Necro0
okay
Necro0
actually i got an error saying, "LINE 1: ....ts_user"."emalil","accounts_user"."username" FROM "accounts_...
Necro0
relation "accounts_user" does not exist (i was trying to integrate custom user model system (abstractuser))
Necro0
bro all done
Necro0
well actually i dropped the db the error was occurred because my project was using the default account creation system earlier and i tried implementing the custom user one so it caused the error, i deleted the db and make a fresh one and it threw me the same errors again so then i deleted everything that was migrated and did migration and migrate for the separate apps but the problem was still there, it threw me another error related session issues, actually it was caused bcuz someway the session wasn't deleted and it caused the problem so i did some fake migrate with session zeror and migrate it again with fake initial and now finally it fixed the issue and saved my life lol
Necro0
thanks for being there❤️
Sathya
Hello guys ..! Have just read the basic requirements before learning Django , could someone please tell me a good resource to learn django !?
Doragonsureiyā
Hello guys ..! Have just read the basic requirements before learning Django , could someone please tell me a good resource to learn django !?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
IZUKU
how can i make a model and views through which if a person click on yes and submit it on html then some predefined data ll get stored automatically in database
IZUKU
Take a look at these perhaps
thats whole documentation :(
Phill
thats whole documentation :(
Yes, but that's how we all learnt
IZUKU
Phill
For starters, good books have chapters anyway, you could look for a chapter that gives you the explanation you need
Moheez
Please share some full JWT authentication articles with me
Aleksandr
Please help solve the problem. When going to a certain page, I require authorization (login_required in urls.py), and after successful authorization, I want to redirect that page. Redirection to the authorization page occurs, and after logging in, the user remains authorized on the authorization page. Link to code and log: https://pastebin.com/n6rANZmR
William
Please share some full JWT authentication articles with me
There is a package with good docs for that. djangorestframework-simplejwt. Refer to the DRF docs to get the exact resource url
0x01
I’ve just deployed my app in cpanel but my staticfiles (media and css ) aren’t working. Please help
Mirco
I’ve just deployed my app in cpanel but my staticfiles (media and css ) aren’t working. Please help
If you read the official doc, you can see you need to run collectstatic command
0x01
I have done that still not working
Bilal Ahmed
Mirco
I have done that still not working
Never used with cPanel, we have a few info and no magic ball, so
Y
Hello. Please, I want to know how update django project that is deploy on pythonanywhere?
Y
I modified project locally and pushed it on github, so I want update it on pythonanywhere. Somebody can help me please?
Ameer
How can I call api to auto fill my django html registration form
govind
How can I call api to auto fill my django html registration form
call api in view function or class for register form showing get method . then pass api data as data to register template
Himanshu
i am facing this problem
Himanshu
django.core.exceptions.ImproperlyConfigured: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form RegisterUserForm needs updating.
Himanshu
This is my cade... class RegisterUserForm(UserCreationForm): email = forms.EmailField() first_name= forms.CharField(max_length=50) last_name= forms.CharField(max_length=50 ) class Meta: model = User fields = ['username','first_name','last_name','email', 'password1', 'password2',]
Rustam
Good part of the day everyone. Has anyone ever worked with audio in python? I want to generate a list of wave values from an audio.
Rustam
Anyone can help with that?
Александр
Hi! I'm trying to check the user's permissions using PermissionRequiredMixin in a class-based view. In header I pass BasicAuthorization. But getting into PermissionRequiredMixin.has_permission() in request.user is UserAnonymous and accordingly I get an authorization error. I can't figure out what I'm doing wrong?
Idi alamin
Is there anyone free i would like to seek help for beautiful soup and selenium for my course project
Y
Use git pull and reload
Thanks you my brother
Doragonsureiyā
Is there anyone free i would like to seek help for beautiful soup and selenium for my course project
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Y
Use git pull and reload
Do you have some documentation link for me please?