do you have {% csrf_token % } in your forms?

On Thu, Mar 20, 2014 at 7:36 PM, Aryak Sengupta <aryaksengu...@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 :
>
>
>    1. Creating a *users* class in the models.py with username and
>    password as the fields (both are CharField)
>
>    2. 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
>
>    3. 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+unsubscr...@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<https://groups.google.com/d/msgid/django-users/4f18d65c-8e85-434f-b584-0ab7017f6cf9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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+unsubscr...@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.

Reply via email to