LOGIN FORM

2010-09-28 Thread Saad Sharif
Hi all, I want to create a simple login form in django..Please help I am a complete beginner My Code: {% csrf_token %} username password login Error Message (when I press login button) : Forbidden (403) CSRF verification failed. Request aborted. Help Reason given for failure

login form

2011-07-09 Thread Harjot Gill
@ All i have created a login form in django. but after filling the username and password when click on submit, it shows the following error : Forbidden (403) CSRF verification failed. Request aborted. please help me. -- You received this message because you are subscribed to the Google Groups

Login form

2020-10-05 Thread Moses Omoto
How to I create a login form to authenticate users in django web application using django 3.1 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to dj

Re: LOGIN FORM

2010-09-29 Thread aa56280
Do you have 'django.middleware.csrf.CsrfViewMiddleware' specified in your settings? On Sep 28, 2:55 pm, Saad Sharif wrote: > Hi all, >            I want to create  a simple login form in django..Please > help I am a complete beginner > > My Code: > dojoType=&quo

Re: login form

2011-07-09 Thread Jonas Geiregat
> @ All > i have created a login form in django. > but after filling the username and password when click on submit, it > shows the following error : > > Forbidden (403) > > CSRF verification failed. Request aborted. This has been asked many times before on this list

Re: login form

2011-07-09 Thread Barış Bilgiç
Put {% csrf_token %} in your form and please read https://docs.djangoproject.com/en/1.3/ref/contrib/csrf/ to learn why. For example {% csrf_token %} {% for field in form %} {% include "formfields.html" %} {% endfor %} 2011/7/9 Harjot Gill > @ All > i have created a logi

User login form

2008-02-05 Thread eraoul
thenticating users. Extend this to get a form that accepts username/password logins. Any suggestions on how to "extend this"? A related problem may be the following: I currently have several different pages on my site that include this "login" form. I want to make su

Re: Login form

2020-10-05 Thread jose AVOM
yo can use django.contrib.auth, tu use User Class Le lundi 5 octobre 2020 à 14:39:29 UTC+1, mosesomoto a écrit : > How to I create a login form to authenticate users in django web > application using django 3.1 > -- You received this message because you are subscribed to the Goog

Re: Login form

2020-10-05 Thread Omkar Parab
Check my video https://youtu.be/uws1ThBRBLQ On Mon, Oct 5, 2020, 7:07 PM Moses Omoto wrote: > How to I create a login form to authenticate users in django web > application using django 3.1 > > -- > You received this message because you are subscribed to the Google Groups

Re: Login form

2020-10-05 Thread Kasper Laudrup
On 05/10/2020 10.39, Moses Omoto wrote: How to I create a login form to authenticate users in django web application using django 3.1 https://simpleisbetterthancomplex.com/tutorial/2016/06/27/how-to-use-djangos-built-in-login-system.html Kind regards, Kasper Laudrup -- You received this

Re: Login form

2020-10-11 Thread Dvs Khamele
Hi do you hire contract based python/django freelancer? We can help you in this and related tasks at fair prices. Reply or send email to divy...@pythonmate.com Best Regards, Divyesh Khamele, Pythonmate On Mon, 5 Oct 2020, 7:08 pm Moses Omoto, wrote: > How to I create a login form

Re: User login form

2008-02-06 Thread eraoul
back in successfully, but that redirect seems to be broken. When I login, it seems that every-other login request will go to the correct redirect, and the alternate ones will go to the /accounts/ login/ page where the login form is displayed; this is also where I redirect to if the login is unsuccess

Re: User login form

2008-02-06 Thread eraoul
Sorry if I'm a pest... but does anybody out there have any idea how to do logins? I can write my own newforms login form... no problem. But how do I hook it up to django's own authentication view in django.contrib.auth.views? That code seems to use an oldforms UserAuthentication form, w

Prepopulate username in login form

2009-02-24 Thread Ross Dakin
Would anyone else be interested in this? http://dpaste.com/hold/1272/ Ross --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To

django register and login form

2011-05-28 Thread electrocoder
how do make django register and login form -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-user

RequestContext to a login form

2007-06-14 Thread JP
giving the full link), in this case it redirects to my login page, but, does't fill the form wrapper in the template so my login template appears with no login form. Thanks for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed

using a global login form

2006-12-04 Thread Milan Andric
Hello, I'm having the same problem as this thread: http://groups-beta.google.com/group/django-users/browse_thread/thread/b711b5c4579535c8/ Where to call set_test_cookie? Since a POST to authenticate can come from any page, I need to call set_test_cookie on any page. I'm using the django.contri

Testing Django User Login Form

2021-04-18 Thread lone...@gmail.com
Hello all, I am not sure what I am doing incorrectly with the below test case information. I am simply trying to test the default authentication form of django 3.1. This test should be a good/True login test. Here is the Test case:- class TestForms(TestCase): def test_

Help regarding Login form in Django

2008-10-30 Thread sadeesh Arumugam
Hi Friends, Anybody please send me a sample login form in django. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegro

Re: django register and login form

2011-05-28 Thread Amanjeev Sethi
ngo register and login form > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubs

Re: RequestContext to a login form

2007-06-14 Thread JP
ect.com/documentation/authentication/ > > and works fine, except when someone tries to access the page directly > (giving the full link), in this case it redirects to my login page, > but, does't fill the form wrapper in the > template so my login template appears with no login fo

Re: using a global login form

2006-12-05 Thread Guillermo Fernandez Castellanos
Hi, For every page login form, check: http://brehaut.net/blog/2006/08/21/django-user-logins/ No need to use the login view. Use the authenticate function instead. Hope it helps, G On 12/4/06, Milan Andric <[EMAIL PROTECTED]> wrote: > > Hello, > > I'm having the same

Re: Testing Django User Login Form

2021-04-22 Thread David Nugent
Try creating a request using RequestFactory and use that to input the credentials. I don't think the way you are creating the form is valid. rf = RequestFactory() request = rf.post('/some_mock_url', dict(username='abc', password='password')) form = AuthenticationForm(request) -- You received thi

Re: Testing Django User Login Form

2021-04-23 Thread lone...@gmail.com
Thank you for the reply! I will totally try this tonight! On Thursday, April 22, 2021 at 7:31:40 PM UTC-4 David Nugent wrote: > Try creating a request using RequestFactory and use that to input the > credentials. I don't think the way you are creating the form is valid. > > rf = RequestFactory(

Re: Help regarding Login form in Django

2008-10-30 Thread Low Kian Seong
On Fri, Oct 31, 2008 at 1:50 PM, sadeesh Arumugam <[EMAIL PROTECTED]> wrote: > Hi Friends, > Anybody please send me a sample login form in django. > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Built-in login form via inclusion tag

2011-05-13 Thread Gabe
Hi, what I am trying to do is to put a login box which will use django.contrib.auth.views.login. According to documentation I`ve crated inclusion tag which works, but it only views form sumbit button not a whole form. This form is from tutorialand looks like this: {% load url from future %} {

Login form on every page and session weirdness

2009-01-13 Thread Brandon Taylor
Hi everyone, I have a login form on every page and want to leverage the AuthenticationForm from contrib.auth. So, I thought I would have a middleware tier to process the request and check for a GET or POST and create the appropriate form, either bound or un-bound. Here is my middleware: from

Newbie admin site issue--login form action incorrect

2008-09-05 Thread Chris
I am working through the online book and documentation and hit a snag at the admin site. I set up the admin.py with my model admin class, and then added the following to urls.py patterns (r'^admin/(.*)', admin.site.root), (using the 1.0 release of Django). The issue is with the way my web

Re: Built-in login form via inclusion tag

2011-05-14 Thread Gabe
Any advice? Do I have to do new form? Gabe On 13 Maj, 14:55, Gabe wrote: > Hi, > > what I am trying to do is to put a login box which will use > django.contrib.auth.views.login. According to documentation I`ve > crated inclusion tag which works, but it only views form sumbit button > not a whole

Re: Built-in login form via inclusion tag

2011-05-19 Thread Kirill Spitsin
> On 13 Maj, 14:55, Gabe wrote: ... > > It seems like it don`t know enything about form variable. How can I > > give it to it via inclusion tag? You should return template context with `form` variable:: from django.contrib.auth.forms import AuthenticationForm @register.inclusion_tag("yo

Integrating Login form, registration form and model form

2024-02-13 Thread Janet Anastacia
I am trying to create a Django app such that when a user signs up, she goes to login then sees the form containing the data of the model in my apo.Kindly give me the steps with code example for me to achieve this On Mon, Feb 12, 2024, 12:53 AM Alexander Lyabah wrote: > Hello Django Community, >

Re: Login form on every page and session weirdness

2009-01-13 Thread Brandon Taylor
into pickling errors. On Jan 13, 11:43 am, Brandon Taylor wrote: > Hi everyone, > > I have a login form on every page and want to leverage the > AuthenticationForm from contrib.auth. So, I thought I would have a > middleware tier to process the request and check for a GET or POST and >

db selection from login form (a multi db app)

2019-05-12 Thread Taimoor Qureshi
Im quiet new to django. and working on a project of Accounting app in which i want separate db for each fiscal year. so at the time of login their will be a drop-down field of fiscal year for all values their will be a corresponded db. any clue how to implement? roadmap? TIA -- You received

Login form on every page, and dealing with test cookie

2006-09-25 Thread Cashman Andrus
I'm building a site with a username/password login form on ever page. (You know, up in the top right corner, and the form gets replaced with "Welcome username, options, logout" links when logged in.) Pretty straightforward, except for an issue with test cookies. When using thi

Re: db selection from login form (a multi db app)

2019-05-12 Thread acheraime
Why would you need a db/fiscal year? Sent from my iPhone > On May 12, 2019, at 4:53 PM, Taimoor Qureshi > wrote: > > Im quiet new to django. and working on a project of Accounting app in which i > want separate db for each fiscal year. so at the time of login their will be > a drop-down fiel

am trying to add a login form to my django

2020-06-16 Thread AFRO TEOP
someone to help in this -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit http

Help regarding Login form in client side (front end) in Django.

2008-10-30 Thread sadeesh Arumugam
Hi Friends, I want to create a login form in client side, anybody please send me the Sample login page for the client side coding.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Login form error not showing up for wrong username/password combo

2017-12-01 Thread Tom Tanner
I have this code in my login form. {% for field in login_form %} {{ field }} {% if field.errors %} {{ field.errors.as_text|cut:"* "|escape }} {% endif %} {% endfor %} The user must enter a valid email address in the "username" field. If the user enters a string n

Re: am trying to add a login form to my django

2020-06-16 Thread Kasper Laudrup
Hi Afro, On 16/06/2020 12.49, AFRO TEOP wrote: > someone to help in this > https://learndjango.com/tutorials/django-login-and-logout-tutorial Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from th

Re: Help regarding Login form in client side (front end) in Django.

2008-10-30 Thread Steve Holden
sadeesh Arumugam wrote: > Hi Friends, > > I want to create a login form in client side, anybody please send me > the Sample login page for the client side coding.. > Are you reading the answers to your questions before sending them out again?

a problem about the custom login form with a verify code filed.

2011-06-26 Thread Korobase
I want to add a verify code field in the login form. So, I write a authentication_form which added a charField to generate a verify code and the verify code saved to the request.session. But When I send login form request,I find in my authentication_form, I can't campare the session's v

a problem about the custom login form with a verify code filed.

2011-06-26 Thread Korobase
I want to add a verify code field in the login form. So, I write a authentication_form which added a charField to generate a verify code and the verify code saved to the request.session. But When I send login form request,I find in my authentication_form, I can't campare the session's v

After posting an ajax login form successfully, randomly user is still anonymous

2014-04-29 Thread PyMan
Hello to everyone. I'm experiecing a weird problem. I have an ajax form used to log users in, with username and a password and I use the jquery ajax form plugin. The django view is more or less like many others you can see everywhere: given the right username and password I call the "authentica

How do I limit my login form to just email and password?

2017-11-25 Thread Tom Tanner
My `models.py` has this: class MyUser(AbstractBaseUser): email= models.CharField(max_length=254, unique=True) USERNAME_FIELD= "email" My `forms.py` has this: class LoginForm(AuthenticationForm): email= forms.EmailField(label=_("Email"), max_length=254) class Meta: model= MyUser fields= ("

Re: Login form error not showing up for wrong username/password combo

2017-12-02 Thread Constantine Covtushenko
ould print at the top of your form something like this: *{{ form.non_field_errors }}* Regards, Constantine C. On Sat, Dec 2, 2017 at 12:38 AM, Tom Tanner wrote: > I have this code in my login form. > {% for field in login_form %} > {{ field }} > {% if field.errors %} >{{

Re: Login form error not showing up for wrong username/password combo

2017-12-03 Thread Tom Tanner
ec 2, 2017 at 12:38 AM, Tom Tanner > wrote: > >> I have this code in my login form. >> {% for field in login_form %} >> {{ field }} >> {% if field.errors %} >>{{ field.errors.as_text|cut:"* "|escape }} >> {% endif %} >> {%

How to create a login form with two more forms in it

2019-05-13 Thread laurine ogutu
Hi i have tried to create a login form where a teacher and student can login. Once the teacher clicks the teachers button, they can give their details. Once a student clicks the student button, they can give their details different from the teachers. I have a problem getting it done. Kindly help

Re: After posting an ajax login form successfully, randomly user is still anonymous

2014-05-13 Thread PyMan
Anyone? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups

Re: How do I limit my login form to just email and password?

2017-11-26 Thread Matemática A3K
On Sun, Nov 26, 2017 at 12:55 AM, Tom Tanner wrote: > My `models.py` has this: > class MyUser(AbstractBaseUser): > email= models.CharField(max_length=254, unique=True) > USERNAME_FIELD= "email" > > My `forms.py` has this: > class LoginForm(AuthenticationForm): > email= forms.EmailField(label=_

Re: How do I limit my login form to just email and password?

2017-11-26 Thread mohammad k
cess_url = reverse_lazy('home') def get(self, request, *args, **kwargs): """When The Get Request Incoming.""" if request.user.is_authenticated: return redirect(self.success_url) return render(request, self.template_n

Re: How do I limit my login form to just email and password?

2017-11-26 Thread Tom Tanner
Adding `exclude=["username"]` does nothing. Same if I replace "username" with "email" or "user". On Sunday, November 26, 2017 at 2:44:44 PM UTC-5, Matemática A3K wrote: > > > > On Sun, Nov 26, 2017 at 12:55 AM, Tom Tanner > wrote: > >> My `models.py` has this: >> class MyUser(AbstractBaseUser):

Re: How do I limit my login form to just email and password?

2017-11-26 Thread Matemática A3K
On Sun, Nov 26, 2017 at 8:57 PM, Tom Tanner wrote: > Adding `exclude=["username"]` does nothing. Same if I replace "username" > with "email" or "user". > it's one or another, you either use 'include' or 'exclude' > > On Sunday, November 26, 2017 at 2:44:44 PM UTC-5, Matemática A3K wrote: >> >>

Re: How to create a login form with two more forms in it

2019-05-13 Thread MUHAMMAD AFZAL
You could solve this problem in templates itself by placing form in different positions or using advanced frameworks like bootstrap of react. And in views code, write it separately and Connect it through urls. On May 13, 2019 5:03 PM, "laurine ogutu" wrote: Hi i have tried to crea

Re: How to create a login form with two more forms in it

2019-05-13 Thread salimon jamiu olashile
s like bootstrap of react. > > And in views code, write it separately and Connect it through urls. > > On May 13, 2019 5:03 PM, "laurine ogutu" wrote: > > Hi i have tried to create a login form where a teacher and student can > login. Once the teacher clicks the

Re: How to create a login form with two more forms in it

2019-05-13 Thread Najmath Ummer
9 PM, MUHAMMAD AFZAL > wrote: > >> You could solve this problem in templates itself by placing form in >> different positions or using advanced frameworks like bootstrap of react. >> >> And in views code, write it separately and Connect it through urls. >> >>

Re: How to create a login form with two more forms in it

2019-05-15 Thread arun ashok
y the form divs according to the buttons On Monday, May 13, 2019 at 5:04:13 PM UTC+5:30, laurine ogutu wrote: > > Hi i have tried to create a login form where a teacher and student can > login. Once the teacher clicks the teachers button, they can give their > details. Once a s

Re: How to create a login form with two more forms in it

2019-05-23 Thread laurine ogutu
lick,add the forms in different > div's,use java script to hide or display the form divs according to the > buttons > On Monday, May 13, 2019 at 5:04:13 PM UTC+5:30, laurine ogutu wrote: >> >> Hi i have tried to create a login form where a teacher and student can >>

RE: How can i use double login form in a django app redireting to

2013-01-07 Thread Babatunde Akinyanmi
two different pages MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > My problem is how to authencate the first login form > that wil redirect user to the registration page using the > scratch card > info(pin, serial no) becaus

How do I create a script to fill in django admin login form and submit?

2013-08-13 Thread 7equivalents
Here is what I'm doing. I have written a script the runs and monitors a serial connection for incoming data. The data comes from an RFID tag reader. I have that working. What I'd like to do is use this rfid tag number to fill in the password feild and submit the django Admin login

How can i use double login form in a django app redireting to two different pages

2013-01-07 Thread Okorie Emmanuel
Am new to django and i want to develop an e-registration portal. User is require to login with details from a scratch card(pin and serial no) and is redirected to a registration page to create an account and thus can view account infor using another login form this time django user login(auth). My

Re: How do I create a script to fill in django admin login form and submit?

2013-08-14 Thread Kelvin Wong
The data comes from an RFID tag > reader. I have that working. What I'd like to do is use this rfid tag > number to fill in the password feild and submit the django Admin login form. > I'm still a novice and Any advise is appreciated... Thanks! > -- You received this messa

Re: How do I create a script to fill in django admin login form and submit?

2013-08-14 Thread Elena Williams
like to do is use this rfid tag > number to fill in the password feild and submit the django Admin login form. > I'm still a novice and Any advise is appreciated... Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Django users&

Re: How do I create a script to fill in django admin login form and submit?

2013-08-18 Thread 7equivalents
am'} r = requests.post(url, payload) I get a 403. My questions are: (1) Is the the code above the correct way to fill in and submit the django user login form? (2) What should I do next to troubleshoot the problem? -- You received this message because you are subscribed to the Google Groups &

Re: How do I create a script to fill in django admin login form and submit?

2013-08-18 Thread 7equivalents
Ok, I've gotten further. I have confirmed the problem was related to the csrf token. This is my new code: client = requests.session() # Retrieve the CSRF token first client.get(URL) # sets the cookie csrftoken = client.cookies['csrftoken'] login_data = dict(Username='jim', Password='beam, csrf

Re: How do I create a script to fill in django admin login form and submit?

2013-08-18 Thread 7equivalents
Ok, I've gotten further. I have confirmed the problem was related to the csrf token. This is my new code: client = requests.session() # Retrieve the CSRF token first client.get(URL) # sets the cookie csrftoken = client.cookies['csrftoken'] login_data = dict(Username='jim', Password='beam, csrf

Re: How do I create a script to fill in django admin login form and submit?

2013-08-18 Thread Kelvin Wong
You were missing a key. The following works on my machine. K --- import requests login_url = "http://192.168.0.21/admin/login/"; client = requests.session() client.get(login_url) csrftoken = client.cookies['csrftoken'] login_data = {'username':'jim', 'password':'beam', 'this_is_the_login

Re: How do I create a script to fill in django admin login form and submit?

2013-08-20 Thread 7equivalents
I feel as if I'm getting closer, yet haven't successfully logged in yet. I have added in the missing key. I went to the django.contrib.auth.forms to find the name of the form that gets submitted in the login page. It seems to be called AuthenticationForm. import requests login_url = "http://19

Re: How do I create a script to fill in django admin login form and submit?

2013-08-21 Thread 7equivalents
) function. Also when I look at the contrib.auth forms. it appears the form is name AuthenticationForm. But when I open the actual admin login page with my browser and view source it appears to be called login-form. I would thing trying to login as a user from the shell would be a common occurrence,

Re: How do I create a script to fill in django admin login form and submit?

2013-08-21 Thread 7equivalents
inexperince has shown through. How did you know that that was the name of the form? When I went to django.contrib.auth.forms, it seemed the form name was AuthenticationForm, and when I used view source in a browser it looked like the form was named login-form. How could one know the form was named 'this_is_t

Re: How do I create a script to fill in django admin login form and submit?

2013-08-21 Thread Kelvin Wong
l.com wrote: > > How did you know that that was the name of the form? When I went to > django.contrib.auth.forms, it seemed the form name was AuthenticationForm, > and when I used view source in a browser it looked like the form was named > login-form. How could one kno

Re: How do I create a script to fill in django admin login form and submit?

2013-08-21 Thread 7equivalents
Thank you so much! You really helped me. I went back and checked the source code sent to my browser and did indeed see, name = "this_is_the_login_form'. I was using the "ID" rather than the "name". My weakness in html kicked me this time, thanks for lending a hand! > > > > -- You received

Re: How can i use double login form in a django app redireting to two different pages

2013-01-07 Thread Aaron C. de Bruyn
ser > is require to login with details from a scratch card(pin and serial > no) and is redirected to a registration page to create an account and > thus can view account infor using another login form this time django > user login(auth). My problem is how to authencate the first login

Re: How can i use double login form in a django app redireting to two different pages

2013-01-07 Thread Mario Gudelj
ard(pin and serial > no) and is redirected to a registration page to create an account and > thus can view account infor using another login form this time django > user login(auth). My problem is how to authencate the first login form > that wil redirect user to the registration page using

Why does Django say my login form is invalid? How can I find out why Django thinks it is?

2017-11-28 Thread Tom Tanner
st.POST) if login_form.is_valid(): print "Login form valid" return redirect(home_slug()) # else: # print "Login invalid" else: login_form= LoginForm() return render(request, template, {"login_form": login_form}) `login_register.html`: {% csrf_tok

Re: Why does Django say my login form is invalid? How can I find out why Django thinks it is?

2017-11-28 Thread Matemática A3K
> class LoginForm(AuthenticationForm): > username= forms.EmailField(label=_("Email"), max_length=254) > > > class Meta: > model= User > > > fields= ("username",) > > If you use "fields = ("username")" you are restricting the fields to just that field, and the authentication form needs also pa

Re: Why does Django say my login form is invalid? How can I find out why Django thinks it is?

2017-11-29 Thread Tom Tanner
What would I need to change? I tried changing the ... fields= ("username",) ... to ... fields= ("username","email",) or... fields= ("email",) Nothing seemed to change. the `login_form.is_valid()` still is `False`. Sorry if the question is dumb, I'm still learning Django thru working with it.

Re: Why does Django say my login form is invalid? How can I find out why Django thinks it is?

2017-11-29 Thread Matemática A3K
On Thu, Nov 30, 2017 at 12:35 AM, Tom Tanner wrote: > What would I need to change? > > I tried changing the ... > fields= ("username",) > > ... to ... > fields= ("username","email",) > or... > fields= ("email",) > > Nothing seemed to change. the `login_form.is_valid()` still is `False`. > > Sorry

Re: Why does Django say my login form is invalid? How can I find out why Django thinks it is?

2017-11-29 Thread Tom Tanner
I removed that line, but nothing changed. On Wednesday, November 29, 2017 at 11:58:28 PM UTC-5, Matemática A3K wrote: > > > > On Thu, Nov 30, 2017 at 12:35 AM, Tom Tanner > wrote: > >> What would I need to change? >> >> I tried changing the ... >> fields= ("username",) >> >> ... to ... >> fields

Re: Why does Django say my login form is invalid? How can I find out why Django thinks it is?

2017-11-30 Thread Matemática A3K
quot;: login_form = AuthenticationForm(request, data=request.POST) if login_form.is_valid(): print("Login form valid") # return redirect(home_slug()) # else: # print "Login invalid" else: login_form = AuthenticationForm()

Re: Why does Django say my login form is invalid? How can I find out why Django thinks it is?

2017-11-30 Thread ankita gupta
; `views.py`: > def login_register(request, template="pages/login_register.html"): > if request.method=="POST": > login_form= LoginForm(request.POST) > if login_form.is_valid(): >print "Login form valid" >return redirect(home_slug())