TEJAS
wait I'll give my code
TEJAS
See login_view
Muflone
you will be warned for pasting the code in the group chat
Muflone
in your project, is the view called? do you have errors?
TEJAS
Yes there is no errors But the else part in the login_view is getting executed always
TEJAS
That's why I think authentication is not working properly
Muflone
use a pastebin service and show the template login.html
Muflone
also it's not clear why you redirect to /demo/ instead of login
TEJAS
also it's not clear why you redirect to /demo/ instead of login
Demo is just the page to show wether the user is logged in
TEJAS
Demo is the page where user will go if the login is successful
Muflone
ok, show the page where you ask the credentials
TEJAS
Muflone
the page which is submitting this view
TEJAS
Ok
TEJAS
Wait
Muflone
use the pastebin
TEJAS
use the pastebin
Okay I'll see about this
You
Hi i want mysql or postgersql to introduce a good educational resource with Django
Doragonsureiyā
Hi i want mysql or postgersql to introduce a good educational resource with Django
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
DemonOfRohit
Can we have both authenticated and non authenticated methods in class based views in Django Rest? Like this class SomeView(APIView): def get(self, request): # Here don't require authentication pass def post(self, request): # Here require authentication pass
DemonOfRohit
yeah, define permission class in class and set blank in function.
Can you explain what you mean by "set blank in function"? Can you share an example?
DemonOfRohit
permission_class=[]
If you mean something like this, it is not working class SomeView(APIView): permission_classes = [IsAuthenticated] def get(self, request): permission_classes = [] return Response({'msg': "unprotected view"})
Alex
Can you share your codebase
DemonOfRohit
Unfortunately I can't share the code
Alex
def get_permissions(self): if self.request.method == 'GET': return [] return super().get_permissions()
Dambek
Hi, how I can create formset?
Charly
Hi, how I can create formset?
Always refer to documentation for the kind of questions: https://docs.djangoproject.com/en/4.2/topics/forms/formsets/
Bandar
I know Django uses is there anyway to use asgi server in Django for real time chat
Bandar
I usually use graphical as my api I have tried endless tries to integrate channels with graphical ended up with un resolvable package conflicts
Bandar
Anyone can know how will be much appreciated!
Bandar
😵‍💫 just thinking about fastapi i would have saved time
Murat
Hello guys can i tried modifying admin by creating User model which can help me create super user is this a good idea
Hello! Recomend this story https://medium.com/django-unleashed/improve-django-admin-dedb1b1ef11f
Murat
https://medium.com/django-unleashed/unlocking-the-power-of-django-must-have-packages-for-developers-5b5465fcaad9 And this stories
Shivani
Please help me..... How I make .exe installable file from django project
Shivani
Pls reply
Shivani
But it's my task
Shivani
What I do then...
Nithin
What was the file name for using API
Alex
What I do then...
Create a django api, build a frontend which can be exported as .exe, use it to consume api
Alex
What was the file name for using API
what do you mean by file name?
Nithin
what do you mean by file name?
For example forms we can use forms.py but api how
Alex
For example forms we can use forms.py but api how
If I am getting what you mean by forms here, you are searching for serializers.
M. Hossein
I want to create a custom exception handler in DRF. How to know if incoming exception is 500 error since when error is not related to django, response in exception handler is none?
M. Hossein
Use rest_framework custom middleware for this
Would you please explain this further?
bansh
Would you please explain this further?
https://www.django-rest-framework.org/api-guide/exceptions/
M. Hossein
https://www.django-rest-framework.org/api-guide/exceptions/
I know. The problem is when error is not related to DRF, like a ValueError is raised, response in None in exception handler and there is no way to know the status code
bansh
Is it not completely but only for your understanding purpose
bansh
And it use in you custom exception rest_famework in settings files
M. Hossein
I will try this Thanks a lot
Damir U.
Hi, can you help pls, i have oracle db with variety of schemas, i want to make this db default for django project, how can i set schema option in database settings- to be sure that administrative django tables will be migrated to the particular schema?
Damir U.
The DB name is the schema
Sorry, i mean tablespace, in oracle schem equal to user
Asukhan
hi everyone! guys, please tell me, is the "request.session" individual to every user, who visits the website?
Asukhan
so, every anonymous user will have his own session, that will be stored somewhere in his PC, yeah? I mean, like a cache etc p.s. I am sorry if I am asking a stupid questions
Asukhan
ah, then it's a nice thing, thanks a lot for helping 🙏
PyDanny21
Hello guys, I'm new here and django beginner
Александр
Hi guys. I’ve been sitting for 2 days, I can’t make a cart on the site, there are videos on the Internet for the old version of Django.😢😢
Blackscorche
Finally django is sticking in my head 😂
Александр
and I don't know js((
Blackscorche
Александр
Tell me where I can see how to make a basket?
Александр
Hello guys, I'm new here and django beginner
You have a very difficult path ahead of you. But if you don't give up, you'll gain a set of skills that will help you realize a lot. I believe in you, brother.
Blackscorche
Tell me where I can see how to make a basket?
I'm sorry but I too am a beginer
Александр
I did it through “cart”, but it doesn’t work for me (the session does not end, is not added, and when I click the button it immediately goes to the cart)
Blackscorche
((
But why don't you use the old version bro