-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org
iQEcBAEBCgAGBQJTKwH9AAoJELMiOgVOfjkQX0MH/1SVWu2UNORJvzeLg1dF9Dkc
j+RR6PgcxQmJzN8xTE+pbnJ79ZXJiHUszf9LUB/ybbcqNnXbFXaqB+bR3CLdB+/L
cw2AcqYCEg9ZvYaaTEu8+RN+6u5gyOzhPm7CjKUqrFKOF5p44e6RI8RUn/jYIW93
YU00EzX1g9YtRwBH5rrm4sRMQ1UCO+muyDuLX+GIYzqhBn2ExR8ZE07/kG1TJJU1
UiZmInqIl82FGfaWqjBIJmgiKnFIX0Y1jM7raDB/AXB/fxNRuSyXZAyojhkXF2tt
BsUzcoaMlkhHPLxKv5f779ldvt2iWIxzgzcEuu870WuZ37qhyK8CKPT8t/k+YFs=
=Cu2e
-----END PGP SIGNATURE-----
See https://docs.djangoproject.com/en/1.6/topics/http/sessions/
On Mar 20, 2014, at 10:50 AM, Aryak Sengupta <aryaksengupta@gmail.com> wrote:
> Can you please elaborate....
>
> On 20 Mar 2014 20:17, "François Schiettecatte" <fschiettecatte@gmail.com> wrote:
> 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.
>
>
> --
> 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/CALTbq1xzxJ8LmH6gkLSMcFZ5Ec0X-XW7q1N0v0YpnX_qoJVWtg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment