-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org
iQEcBAEBCgAGBQJTKv9RAAoJELMiOgVOfjkQQrAIAK+BD5aUB2AegdNMUbko+SGJ
VjPvI4wQQ7Bg9a4zGDAKOpt7MaksgShmklT2zDdhMVc4rxpc8e9QXtMCd+8jyjoL
DJLn6NR8CkenOC7WvgW1qo4GMq9o5K6crym4uPaI/EreRwe1J43W6MFqgaF0w1sC
bWF5XgmXENWIHfHmqwL1UNFbNRgwbl784i8vSxtv5waYTp5rYMwItLHCBTapStq4
6u1DDDhCWKvIhoqJ2nf2HYlwqZNf6+KXYcdEdchTJKQynrNYSeYdyPwPIarO0Xdd
XqO4QtcXuJv/qoE90uo4bVVwsx2xveJ2mMpBzOYCGkYSSE8K0toddEjZwuZ3F5Y=
=yE4+
-----END PGP SIGNATURE-----
You may be missing some middleware, eg:
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.sessions',
Maybe your browser is rejecting cookies.
François
On Mar 20, 2014, at 10:43 AM, Aryak Sengupta <aryaksengupta@gmail.com> wrote:
> Yes I do.... Where am I going wrong then?
>
> On 20 Mar 2014 20:06, "Robin Lery" <robinlery@gmail.com> wrote:
> do you have {% csrf_token % } in your forms?
>
>
> On Thu, Mar 20, 2014 at 7:36 PM, Aryak Sengupta <aryaksengupta@gmail.com> wrote:
> I am new to Django (but not new to python) and I am looking forward to create a customized page using django. I have read about django's inbuilt authentication system but I want build it from scratch So here are the few ideas I am stumbling upon :
>
> • Creating a users class in the models.py with username and password as the fields (both are CharField)
>
> • Creating two views one named LoginView, which will depict the initial login page (such as a form imported from a module named forms.py) and another view named LoggedInView which will show only the username of the logged user
>
> • Mapping them into corresponding URLs
> I tried creating it with above mentioned thoughts but I got stuck with an error as follows:
>
> Forbidden (403)
> CSRF verification failed. Request aborted.
> Help
>
> Reason given for failure:
> CSRF cookie not set.
>
> I couldn't figure out why possibly I am getting this error for incorporating such a simple(and basic) functionality.
>
> I want to understand the best way/approach to go about this (for implementing this functionality). I am not worrying about the error for the time being since I didn't spend much time thinking about it (So I am not posting any code). I want to get my approach right first. I want to be flawless while implementing such basic and elementary stuffs.
>
> --
> 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+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4f18d65c-8e85-434f-b584-0ab7017f6cf9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2B4-nGq8taHb%2B9%2Bz3%3DxJq-Qitnuf0%3D127O9esk8LZygSQLeSZA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALTbq1zEC9RPPKmVvTOYqXQ5AgVghzDWd0og2FoeKBJOMyfe1A%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment