0
I recommend to check the documentation about this topic, you will find a lot of important notes too. You can use inbuilt login view β django.contrib.auth.views.login to handle authentication stuff for you but you have to prepare the template.
If the given POST variable is empty, you didnβt submitted the variable in your form so check your html code in tools like Firebug
1
It seems to be you are trying to perform an authentication in your view. You can use @login_required
decorator. More info at
https://docs.djangoproject.com/en/dev/topics/auth/default/#the-login-required-decorator
0
Iβm not sure I understand what it is youβre trying to do. If youβre trying to get details of the user in your django view then you can use request.user. eg
def your_view(request):
#...
user = request.user
return render(request, 'your_page.html')
Have a look at the user auth docs.
- [Answer]-ImproperlyConfigured at / β /static/ isn't a storage module
- [Answer]-Limit inlines to edit mode in Django's ModelAdmin