Re: Form to login

2015-11-05 Thread Dariusz Mysior
Thank's I have it! W dniu środa, 4 listopada 2015 06:51:02 UTC+1 użytkownik Dariusz Mysior napisał: > > I try do login view and I find it on > > https://docs.djangoproject.com/en/1.8/topics/auth/default/ > > from django.contrib.auth import authenticate, login > > def my_view(request): > user

Re: Form to login

2015-11-04 Thread victor menezes
Looks like you are not making anything very custom on you view so maybe would be easier/better to use the buitin views from django auth. on your urls.py you can do: from django.contrib.auth import views as auth_views urlpatterns = [ ... url(r'^login/', auth_views.login), ] On your sett

Re: Form to login

2015-11-03 Thread Dheerendra Rathor
Django do have built-in forms. Take a look here https://docs.djangoproject.com/en/1.8/topics/auth/default/#module-django.contrib.auth.forms On Wed, 4 Nov 2015 at 11:21 Dariusz Mysior wrote: > I try do login view and I find it on > > https://docs.djangoproject.com/en/1.8/topics/auth/default/ > >

Form to login

2015-11-03 Thread Dariusz Mysior
I try do login view and I find it on https://docs.djangoproject.com/en/1.8/topics/auth/default/ from django.contrib.auth import authenticate, login def my_view(request): username = request.POST['username'] password = request.POST['password'] user = authenticate(username=username, pa