Commit 7a42dfd9 authored by christophe siraut's avatar christophe siraut
Browse files

ajout d'une protection Cross Site Request Forgery

parent 5d432a26
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<ul> <ul>
<li>Provide username and password: <li>Provide username and password:
<form action="" method="post"> <form action="" method="post">{% csrf_token %}
<label for="username"></label> <label for="username"></label>
<input type="text" name="username" value="" id="username"> <input type="text" name="username" value="" id="username">
<label for="password"></label> <label for="password"></label>
...@@ -42,6 +42,7 @@ urlpatterns = patterns('', ...@@ -42,6 +42,7 @@ urlpatterns = patterns('',
(r'^user/login/$', login), (r'^user/login/$', login),
(r'^user/logout/$', logout, {'template_name': 'index.html'}), (r'^user/logout/$', logout, {'template_name': 'index.html'}),
(r'^user/register', 'nuage.sondage.userviews.register'), (r'^user/register', 'nuage.sondage.userviews.register'),
(r'^user/success$', 'django.views.generic.simple.direct_to_template', {'template': 'registration/success.html'}),
) )
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment