LogIn Class Based View

2022-05-26 Thread 'dtdave' via Django users
I have this function based view which works perfectly but I would like to convert to a class based view but am stuck on how to do this: This is my fbv: def loginView(request): if request.method == 'POST': form = LoginForm(request.POST) if form.is_valid(): cd = form

What do they mean, exactly

2022-05-26 Thread Dennoh njogu
I was reading the django docs and i have been confused by the explanation as shown in the snippet. [image: Screenshot from 2022-04-29 01-36-59.png] in the first snippet of code does it mean that both conditions will have to be met as in the case of "and" in logical operators? Second snippet, do

Re: LogIn Class Based View

2022-05-26 Thread Vishesh Mangla
I think it's good, function based views offer you more flexibility. If you are not liking your code it's because your function should be split up into smaller functions, or use a class without it being a view. On Fri, 27 May 2022, 01:07 'dtdave' via Django users, < django-users@googlegroups.com> w

Re: LogIn Class Based View

2022-05-26 Thread Vishesh Mangla
Sorry, on looking again I realized that CBV already does this. https://ccbv.co.uk/projects/Django/4.0/django.contrib.auth.views/LoginView/ https://openclassrooms.com/en/courses/7107341-intermediate-django/7263527-create-a-login-page-with-class-based-views Btw, On Fri, May 27, 2022 at 2:26 AM Vish

Re: LogIn Class Based View

2022-05-26 Thread Vishesh Mangla
Sorry, on looking again I realized that CBV already does this. https://ccbv.co.uk/projects/Django/4.0/django.contrib.auth.views/LoginView/ https://openclassrooms.com/en/courses/7107341-intermediate-django/7263527-create-a-login-page-with-class-based-views https://stackoverflow.com/questions/56761

Re: LogIn Class Based View

2022-05-26 Thread Vishesh Mangla
https://ccbv.co.uk/projects/Django/4.0/django.contrib.auth.views/LoginView/ https://openclassrooms.com/en/courses/7107341-intermediate-django/7263527-create-a-login-page-with-class-based-views https://stackoverflow.com/questions/56761409/how-to-make-a-login-view-for-django-custom-user On Fri, May