django-registration + csrf token

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

django-registration + csrf token

Suprnaturall
Hi All !

Do any of you use this app https://bitbucket.org/ubernostrum/django-registration/overview with the csrf middleware ?

Instead of re-write myself the registar, check via email, lost password, login and co i tried to use this app, but it don't work and i have this message :
Forbidden (403)
CSRF verification failed. Request aborted.

I added to the login form {{ csrf_token }} but it's seems that it is not implemented,

any ideas ?

Thanks for all :)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: django-registration + csrf token

Brett Hutley-3
You need to add it to the registration_form.html as well.

Make sure you have  'django.middleware.csrf.CsrfViewMiddleware', in the MIDDLEWARE_CLASSES tuple in the settings.py file.

Cheers, Brett

On 9 Sep 2011, at 16:47, nicolas HERSOG wrote:

> Hi All !
>
> Do any of you use this app https://bitbucket.org/ubernostrum/django-registration/overview with the csrf middleware ?
>
> Instead of re-write myself the registar, check via email, lost password, login and co i tried to use this app, but it don't work and i have this message :
> Forbidden (403)
> CSRF verification failed. Request aborted.
>
> I added to the login form {{ csrf_token }} but it's seems that it is not implemented,
>
> any ideas ?
>
> Thanks for all :)
>
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to [hidden email].
> To unsubscribe from this group, send email to [hidden email].
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Brett Hutley - Stimuli Limited
work: [hidden email]  http://stimuli.co
home: [hidden email]  http://bretthutley.com




--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Reply | Threaded
Open this post in threaded view
|

Re: django-registration + csrf token

DrBloodmoney
On Fri, Sep 9, 2011 at 12:02 PM, Brett Hutley <[hidden email]> wrote:

> You need to add it to the registration_form.html as well.
>
> Make sure you have  'django.middleware.csrf.CsrfViewMiddleware', in the MIDDLEWARE_CLASSES tuple in the settings.py file.
>
> Cheers, Brett
>
> On 9 Sep 2011, at 16:47, nicolas HERSOG wrote:
>
>> Hi All !
>>
>> Do any of you use this app https://bitbucket.org/ubernostrum/django-registration/overview with the csrf middleware ?
>>
>> Instead of re-write myself the registar, check via email, lost password, login and co i tried to use this app, but it don't work and i have this message :
>> Forbidden (403)
>> CSRF verification failed. Request aborted.
>>
>> I added to the login form {{ csrf_token }} but it's seems that it is not implemented,
>>
>> any ideas ?
>>
>> Thanks for all :)

Instead of:
{{ csrf_token }}

try:
{% csrf_token %}

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Reply | Threaded
Open this post in threaded view
|

Re: django-registration + csrf token

Suprnaturall
omg, I'm so ashamed...
I use {% csrf_token %} and it works,
Thx :)

Nicolas

On Sun, Sep 11, 2011 at 2:52 PM, DrBloodmoney <[hidden email]> wrote:
On Fri, Sep 9, 2011 at 12:02 PM, Brett Hutley <[hidden email]> wrote:
> You need to add it to the registration_form.html as well.
>
> Make sure you have  'django.middleware.csrf.CsrfViewMiddleware', in the MIDDLEWARE_CLASSES tuple in the settings.py file.
>
> Cheers, Brett
>
> On 9 Sep 2011, at 16:47, nicolas HERSOG wrote:
>
>> Hi All !
>>
>> Do any of you use this app https://bitbucket.org/ubernostrum/django-registration/overview with the csrf middleware ?
>>
>> Instead of re-write myself the registar, check via email, lost password, login and co i tried to use this app, but it don't work and i have this message :
>> Forbidden (403)
>> CSRF verification failed. Request aborted.
>>
>> I added to the login form {{ csrf_token }} but it's seems that it is not implemented,
>>
>> any ideas ?
>>
>> Thanks for all :)

Instead of:
{{ csrf_token }}

try:
{% csrf_token %}

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.