Merge lp:~lukasz-czyzykowski/twitbuntu/csrf-error-fix into lp:twitbuntu

Proposed by Łukasz Czyżykowski
Status: Merged
Approved by: Łukasz Czyżykowski
Approved revision: 22
Merged at revision: 23
Proposed branch: lp:~lukasz-czyzykowski/twitbuntu/csrf-error-fix
Merge into: lp:twitbuntu
Diff against target: 44 lines (+12/-0)
3 files modified
settings.py (+10/-0)
templates/home.html (+1/-0)
templates/registration/login.html (+1/-0)
To merge this branch: bzr merge lp:~lukasz-czyzykowski/twitbuntu/csrf-error-fix
Reviewer Review Type Date Requested Status
Łukasz Czyżykowski Approve
Review via email: mp+34899@code.launchpad.net

Commit message

Fixed CSRF error caused by change in Django 1.2

To post a comment you must log in.
Revision history for this message
Łukasz Czyżykowski (lukasz-czyzykowski) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'settings.py'
--- settings.py 2009-09-02 14:04:07 +0000
+++ settings.py 2010-09-08 19:48:45 +0000
@@ -61,6 +61,16 @@
61 'django.middleware.common.CommonMiddleware',61 'django.middleware.common.CommonMiddleware',
62 'django.contrib.sessions.middleware.SessionMiddleware',62 'django.contrib.sessions.middleware.SessionMiddleware',
63 'django.contrib.auth.middleware.AuthenticationMiddleware',63 'django.contrib.auth.middleware.AuthenticationMiddleware',
64 'django.middleware.csrf.CsrfViewMiddleware',
65)
66
67TEMPLATE_CONTEXT_PROCESSORS = (
68 'django.core.context_processors.csrf',
69 "django.contrib.auth.context_processors.auth",
70 "django.core.context_processors.debug",
71 "django.core.context_processors.i18n",
72 "django.core.context_processors.media",
73 "django.contrib.messages.context_processors.messages"
64)74)
6575
66ROOT_URLCONF = 'twitbuntu.urls'76ROOT_URLCONF = 'twitbuntu.urls'
6777
=== modified file 'templates/home.html'
--- templates/home.html 2010-04-09 15:13:48 +0000
+++ templates/home.html 2010-09-08 19:48:45 +0000
@@ -3,6 +3,7 @@
33
4{% block content %}4{% block content %}
5 <form action="" method="post">5 <form action="" method="post">
6 {% csrf_token %}
6 <table>7 <table>
7 {{ form }}8 {{ form }}
8 <tr><td colspan="2"><input type="submit" value="{% trans 'Update' %}"/></td></tr>9 <tr><td colspan="2"><input type="submit" value="{% trans 'Update' %}"/></td></tr>
910
=== modified file 'templates/registration/login.html'
--- templates/registration/login.html 2010-04-09 15:13:48 +0000
+++ templates/registration/login.html 2010-09-08 19:48:45 +0000
@@ -6,6 +6,7 @@
6{% endif %}6{% endif %}
77
8<form method="post" action="{% url django.contrib.auth.views.login %}">8<form method="post" action="{% url django.contrib.auth.views.login %}">
9{% csrf_token %}
9<table>10<table>
10<tr>11<tr>
11 <td>{{ form.username.label_tag }}</td>12 <td>{{ form.username.label_tag }}</td>

Subscribers

People subscribed via source and target branches

to all changes: