Merge lp:~ltp-devs/loco-team-portal/django-1-3-upgrade into lp:loco-team-portal

Proposed by Chris Johnston
Status: Merged
Approved by: Adnane Belmadiaf
Approved revision: 593
Merged at revision: 589
Proposed branch: lp:~ltp-devs/loco-team-portal/django-1-3-upgrade
Merge into: lp:loco-team-portal
Diff against target: 352 lines (+48/-33)
21 files modified
loco_directory/local_settings.py.sample (+10/-4)
loco_directory/media/js/comments.js (+1/-1)
loco_directory/settings.py (+14/-5)
loco_directory/templates/base.html (+2/-2)
loco_directory/templates/events/global_event_delete_confirm.html (+1/-1)
loco_directory/templates/events/global_event_new.html (+2/-2)
loco_directory/templates/events/global_event_update.html (+1/-1)
loco_directory/templates/events/team_event_comment_new.inc.html (+1/-1)
loco_directory/templates/events/team_event_delete_confirm.html (+1/-1)
loco_directory/templates/events/team_event_new.html (+1/-1)
loco_directory/templates/events/team_event_register.html (+2/-2)
loco_directory/templates/events/team_event_update.html (+2/-2)
loco_directory/templates/meetings/agenda_item_delete_confirm.html (+1/-1)
loco_directory/templates/meetings/team_meeting_delete_confirm.html (+1/-1)
loco_directory/templates/meetings/team_meeting_new.html (+1/-1)
loco_directory/templates/meetings/team_meeting_update.html (+1/-1)
loco_directory/templates/teams/team_update.html (+1/-1)
loco_directory/templates/venues/venue_update.html (+2/-2)
loco_directory/urls.py (+1/-1)
requirements/dev.txt (+1/-1)
requirements/prod.txt (+1/-1)
To merge this branch: bzr merge lp:~ltp-devs/loco-team-portal/django-1-3-upgrade
Reviewer Review Type Date Requested Status
LoCo Team Portal Developers Pending
Review via email: mp+141273@code.launchpad.net

Commit message

Update LTP to use django 1.3

Description of the change

Update LTP to use django 1.3

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loco_directory/local_settings.py.sample'
2--- loco_directory/local_settings.py.sample 2012-11-16 20:27:29 +0000
3+++ loco_directory/local_settings.py.sample 2012-12-26 17:25:24 +0000
4@@ -1,7 +1,13 @@
5-DATABASE_ENGINE = 'sqlite3' # Change to postgresql_psycopg2 for postgres
6-DATABASE_NAME = 'loco_directory.db' # sqlite3 file or database name
7-#DATABASE_USER = ''
8-#DATABASE_PASSWORD = ''
9+DATABASES = {
10+ 'default': {
11+ 'ENGINE': 'django.db.backends.sqlite3',
12+ 'NAME': 'ltp.db',
13+ 'USER': '',
14+ 'PASSWORD': '',
15+ 'HOST': '',
16+ 'PORT': '',
17+ },
18+}
19
20 SECRET_KEY = ''
21
22
23=== modified file 'loco_directory/media/js/comments.js'
24--- loco_directory/media/js/comments.js 2012-09-08 21:45:10 +0000
25+++ loco_directory/media/js/comments.js 2012-12-26 17:25:24 +0000
26@@ -39,7 +39,7 @@
27 function updateText(e) {
28 $(this).hide();
29 orig_comment = $.trim($(this).parent().parent().children("div.comment-comment").text());
30- $(this).parent().parent().children("div.comment-comment").addClass("selected").html('<form ><textarea class="edit">' + orig_comment + ' </textarea> </form><a href="#" class="save">Save</a> or <a href="#" class="revert">Cancel</a>').unbind('click', updateText);
31+ $(this).parent().parent().children("div.comment-comment").addClass("selected").html('<form >{% csrf_token %}<textarea class="edit">' + orig_comment + ' </textarea> </form><a href="#" class="save">Save</a> or <a href="#" class="revert">Cancel</a>').unbind('click', updateText);
32 e.preventDefault();
33 }
34
35
36=== modified file 'loco_directory/settings.py'
37--- loco_directory/settings.py 2012-12-15 03:12:04 +0000
38+++ loco_directory/settings.py 2012-12-26 17:25:24 +0000
39@@ -53,8 +53,16 @@
40 MANAGERS = ADMINS
41 LP_PROJECT_NAME = 'loco-directory'
42
43-DATABASE_ENGINE = 'sqlite3'
44-DATABASE_NAME = 'loco_directory.db'
45+DATABASES = {
46+ 'default': {
47+ 'ENGINE': 'django.db.backends.postgresql_psycopg2',
48+ 'NAME': 'ltp',
49+ 'USER': 'postgres',
50+ 'PASSWORD': '',
51+ 'HOST': 'localhost',
52+ 'PORT': '',
53+ },
54+}
55
56 # Local time zone for this installation. Choices can be found here:
57 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
58@@ -90,13 +98,13 @@
59 # Make this unique, and don't share it with anybody.
60 SECRET_KEY = ''
61
62-# List of callables that know how to import templates from various sources.
63 TEMPLATE_LOADERS = (
64- 'django.template.loaders.filesystem.load_template_source',
65- 'django.template.loaders.app_directories.load_template_source',
66+ 'django.template.loaders.filesystem.Loader',
67+ 'django.template.loaders.app_directories.Loader',
68 )
69
70 MIDDLEWARE_CLASSES = (
71+ 'django.middleware.csrf.CsrfViewMiddleware',
72 'django.middleware.common.CommonMiddleware',
73 'django.contrib.sessions.middleware.SessionMiddleware',
74 'django.contrib.auth.middleware.AuthenticationMiddleware',
75@@ -108,6 +116,7 @@
76 "django.core.context_processors.debug",
77 "django.core.context_processors.i18n",
78 "django.core.context_processors.media",
79+ "django.core.context_processors.csrf",
80 "common.context_processors.loco_version",
81 "common.context_processors.google_api_key",
82 "common.context_processors.flickr_api_key",
83
84=== modified file 'loco_directory/templates/base.html'
85--- loco_directory/templates/base.html 2012-12-15 03:12:04 +0000
86+++ loco_directory/templates/base.html 2012-12-26 17:25:24 +0000
87@@ -52,7 +52,7 @@
88 {% endblock %}
89
90 {% block search_box %}
91-<form id="site_search_form" action="{% url common.views.site_search %}" method="get">
92+<form id="site_search_form" action="{% url common.views.site_search %}" method="get">{% csrf_token %}
93 {{ search_form.q }}
94 <input type="image" src="/media/img/search.png" title="{% trans "Search" %}" alt="{% trans "Search" %}" />
95 </form>
96@@ -75,7 +75,7 @@
97 {% block footer %}
98 <div style="height: 40px;">
99 <div class="lang_switcher">
100- <form name="lang-switcher" style="text-align:right;" action="/language/" method="get">
101+ <form name="lang-switcher" style="text-align:right;" action="/language/" method="get">{% csrf_token %}
102 <input name="next" type="hidden" value="{{ request.path }}" />
103 <select name="lang" onchange="document.forms['lang-switcher'].submit()">
104 {% for lang in languages %}
105
106=== modified file 'loco_directory/templates/events/global_event_delete_confirm.html'
107--- loco_directory/templates/events/global_event_delete_confirm.html 2012-06-07 04:19:26 +0000
108+++ loco_directory/templates/events/global_event_delete_confirm.html 2012-12-26 17:25:24 +0000
109@@ -10,7 +10,7 @@
110 {% block content %}
111 <div class="row">
112 <section class="span-9">
113- <form action="." method="post">
114+ <form action="." method="post">{% csrf_token %}
115 <fieldset>
116 <h3>{% trans "Delete global Event" %}</h3>
117 <label>{% blocktrans with global_event_object.name as eventname %}Do you really want to delete the Global Event: {{eventname}}?{% endblocktrans %}</label>
118
119=== modified file 'loco_directory/templates/events/global_event_new.html'
120--- loco_directory/templates/events/global_event_new.html 2012-06-07 04:19:26 +0000
121+++ loco_directory/templates/events/global_event_new.html 2012-12-26 17:25:24 +0000
122@@ -20,12 +20,12 @@
123 {% block content %}
124 <div class="row">
125 <section class="span-9">
126- <form action="." method="post">
127+ <form action="." method="post">{% csrf_token %}
128 <fieldset>
129 <h3>{% trans "Add new Global Event" %}</h3>
130 {{ form.as_template }}
131 </fieldset>
132- {% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}
133+ {% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}
134 <input type="submit" name="submit" value="{% trans "Submit" %}" class="submit-button" />
135 </form>
136 </section>
137
138=== modified file 'loco_directory/templates/events/global_event_update.html'
139--- loco_directory/templates/events/global_event_update.html 2012-06-07 04:19:26 +0000
140+++ loco_directory/templates/events/global_event_update.html 2012-12-26 17:25:24 +0000
141@@ -18,7 +18,7 @@
142 {% block content %}
143 <div class="row">
144 <section class="span-9">
145- <form action="." method="post">
146+ <form action="." method="post">{% csrf_token %}
147 <fieldset>
148 <h3>{% trans "Update Global Event" %}</h3>
149 {{ form.as_template }}
150
151=== modified file 'loco_directory/templates/events/team_event_comment_new.inc.html'
152--- loco_directory/templates/events/team_event_comment_new.inc.html 2012-10-30 12:30:02 +0000
153+++ loco_directory/templates/events/team_event_comment_new.inc.html 2012-12-26 17:25:24 +0000
154@@ -7,7 +7,7 @@
155 <img alt="" class="photo fn" src="{% if comment.commenter_profile.mugshot %}{{ comment.commenter_profile.mugshot }}{% else %}{{MEDIA_URL}}img/default-mugshot.png{% endif %}">
156 </a>
157 </div>
158- <form action="." method="post">
159+ <form action="." method="post">{% csrf_token %}
160 <textarea required id="id_comment" rows="10" cols="40" name="comment"></textarea>
161 <input type="submit" name="submit" value="{% trans "Submit" %}" class="submit-button" />
162 </form>
163
164=== modified file 'loco_directory/templates/events/team_event_delete_confirm.html'
165--- loco_directory/templates/events/team_event_delete_confirm.html 2012-06-07 04:19:26 +0000
166+++ loco_directory/templates/events/team_event_delete_confirm.html 2012-12-26 17:25:24 +0000
167@@ -10,7 +10,7 @@
168 {% block content %}
169 <div class="row">
170 <section class="span-9">
171- <form action="." method="post">
172+ <form action="." method="post">{% csrf_token %}
173 <fieldset>
174 <h3>{% trans "Delete Team Event" %}</h3>
175 <label>{% blocktrans with team_event_object.name as eventname %}Do you really want to delete the Team Event: {{eventname}}?{% endblocktrans %}</label>
176
177=== modified file 'loco_directory/templates/events/team_event_new.html'
178--- loco_directory/templates/events/team_event_new.html 2012-06-07 04:19:26 +0000
179+++ loco_directory/templates/events/team_event_new.html 2012-12-26 17:25:24 +0000
180@@ -26,7 +26,7 @@
181 {% block content %}
182 <div class="row">
183 <section class="span-9">
184- <form action="." method="post">
185+ <form action="." method="post">{% csrf_token %}
186 <fieldset>
187 <h3>{% trans "Add new Team Event for " %}{{ team_object.name}}<span class="supporting">{% trans 'is required' %}</span></h3>
188 {{ form.as_template }}
189
190=== modified file 'loco_directory/templates/events/team_event_register.html'
191--- loco_directory/templates/events/team_event_register.html 2012-06-07 04:19:26 +0000
192+++ loco_directory/templates/events/team_event_register.html 2012-12-26 17:25:24 +0000
193@@ -10,7 +10,7 @@
194 {% block content %}
195 <div class="row">
196 <section class="span-9">
197- <form action="." method="post">
198+ <form action="." method="post">{% csrf_token %}
199 <fieldset>
200 <h3>{% trans "Register for event " %}</h3>
201 {% if is_past_event %}
202@@ -18,7 +18,7 @@
203 {% endif %}
204 {{ form.as_template }}
205 </fieldset>
206- {% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}
207+ {% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}
208 <input type="submit" name="submit" value="{% trans "Submit" %}" class="submit-button" />
209 </form>
210 </section>
211
212=== modified file 'loco_directory/templates/events/team_event_update.html'
213--- loco_directory/templates/events/team_event_update.html 2012-06-07 04:19:26 +0000
214+++ loco_directory/templates/events/team_event_update.html 2012-12-26 17:25:24 +0000
215@@ -18,12 +18,12 @@
216 {% block content %}
217 <div class="row">
218 <section class="span-9">
219- <form action="." method="post">
220+ <form action="." method="post">{% csrf_token %}
221 <fieldset>
222 <h3>{% trans "Update Team Event" %}</h3>
223 {{ form.as_template }}
224 </fieldset>
225- {% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}
226+ {% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}
227 <input type="submit" name="submit" value="{% trans "Submit" %}" class="submit-button" />
228 </form>
229 </section>
230
231=== modified file 'loco_directory/templates/meetings/agenda_item_delete_confirm.html'
232--- loco_directory/templates/meetings/agenda_item_delete_confirm.html 2012-06-07 04:19:26 +0000
233+++ loco_directory/templates/meetings/agenda_item_delete_confirm.html 2012-12-26 17:25:24 +0000
234@@ -15,7 +15,7 @@
235 {% block content %}
236 <div class="row">
237 <section class="span-9">
238- <form action="." method="post">
239+ <form action="." method="post">{% csrf_token %}
240 <fieldset>
241 <h3>{% trans "Delete Agenda Item" %}</h3>
242 {% if agenda_item_object.children.all %}
243
244=== modified file 'loco_directory/templates/meetings/team_meeting_delete_confirm.html'
245--- loco_directory/templates/meetings/team_meeting_delete_confirm.html 2012-06-07 04:19:26 +0000
246+++ loco_directory/templates/meetings/team_meeting_delete_confirm.html 2012-12-26 17:25:24 +0000
247@@ -10,7 +10,7 @@
248 {% block content %}
249 <div class="row">
250 <section class="span-9">
251- <form action="." method="post">
252+ <form action="." method="post">{% csrf_token %}
253 <fieldset>
254 <h3>{% trans "Delete Team Meeting" %}</h3>
255 <label>{% blocktrans with team_meeting_object.name as meetingname %}Do you really want to delete the Team Meeting: {{meetingname}}?{% endblocktrans %}</label>
256
257=== modified file 'loco_directory/templates/meetings/team_meeting_new.html'
258--- loco_directory/templates/meetings/team_meeting_new.html 2012-06-07 04:19:26 +0000
259+++ loco_directory/templates/meetings/team_meeting_new.html 2012-12-26 17:25:24 +0000
260@@ -18,7 +18,7 @@
261 {% block content %}
262 <div class="row">
263 <section class="span-9">
264- <form action="." method="post">
265+ <form action="." method="post">{% csrf_token %}
266 <fieldset>
267 <h3>{% trans "Add new Team Meeting for " %}{{ team_object.name}}</h3>
268 {{ form.as_template }}
269
270=== modified file 'loco_directory/templates/meetings/team_meeting_update.html'
271--- loco_directory/templates/meetings/team_meeting_update.html 2012-06-07 04:19:26 +0000
272+++ loco_directory/templates/meetings/team_meeting_update.html 2012-12-26 17:25:24 +0000
273@@ -18,7 +18,7 @@
274 {% block content %}
275 <div class="row">
276 <section class="span-9">
277- <form action="." method="post">
278+ <form action="." method="post">{% csrf_token %}
279 <fieldset>
280 <h3>{% trans "Update Team Meeting" %}</h3>
281 {{ form.as_template }}
282
283=== modified file 'loco_directory/templates/teams/team_update.html'
284--- loco_directory/templates/teams/team_update.html 2012-06-07 04:19:26 +0000
285+++ loco_directory/templates/teams/team_update.html 2012-12-26 17:25:24 +0000
286@@ -31,7 +31,7 @@
287 </p>
288 {% endif %}
289
290- <form action="{{ request.path_info }}" method="POST">
291+ <form action="{{ request.path_info }}" method="POST">{% csrf_token %}
292 <fieldset>
293 <h3>{% trans "Update the information below" %}</h3>
294 {{ form.as_template }}
295
296=== modified file 'loco_directory/templates/venues/venue_update.html'
297--- loco_directory/templates/venues/venue_update.html 2012-06-07 04:19:26 +0000
298+++ loco_directory/templates/venues/venue_update.html 2012-12-26 17:25:24 +0000
299@@ -25,12 +25,12 @@
300 {% block content %}
301 <div class="row">
302 <section class="span-9">
303- <form action="." method="post" style="width:auto;">
304+ <form action="." method="post" style="width:auto;">{% csrf_token %}
305 <fieldset>
306 <h3>{% if venue_object %}{% trans "Update Venue" %}{% else %}{% trans "New Venue" %}{% endif %}</h3>
307 {{ form.as_template }}
308 </fieldset>
309- {% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}
310+ {% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}
311 <input type="submit" name="submit" value="Submit" class="submit-button" />
312 </form>
313 </section>
314
315=== modified file 'loco_directory/urls.py'
316--- loco_directory/urls.py 2012-12-13 22:48:12 +0000
317+++ loco_directory/urls.py 2012-12-26 17:25:24 +0000
318@@ -26,7 +26,7 @@
319 url(r'^about-loco/setup/$', 'common.views.loco_setup', name='loco_setup'),
320 url(r'^about-loco/$', 'common.views.about_loco', name='about_loco'),
321 url(r'^using-locodir/$', 'common.views.using_locodir', name='using_locodir'),
322- url(r'^admin/(.*)', admin.site.root),
323+ (r'^admin/', include(admin.site.urls)),
324 url(r'^data/xml', 'teams.views.xml_team_data', name='xml_team_data'),
325 url(r'^teams/', include('teams.urls')),
326 url(r'^planet/', include('articles.urls')),
327
328=== modified file 'requirements/dev.txt'
329--- requirements/dev.txt 2012-11-26 00:02:28 +0000
330+++ requirements/dev.txt 2012-12-26 17:25:24 +0000
331@@ -6,7 +6,7 @@
332 # include patches applied by the package maintainers.
333 #
334
335-Django==1.1.3
336+Django==1.3.3
337 South==0.7.3
338 distribute==0.6.10
339 django-openid-auth==0.4
340
341=== modified file 'requirements/prod.txt'
342--- requirements/prod.txt 2012-11-16 18:33:47 +0000
343+++ requirements/prod.txt 2012-12-26 17:25:24 +0000
344@@ -6,7 +6,7 @@
345 # include patches applied by the package maintainers.
346 #
347
348-Django==1.1.3
349+Django==1.3.3
350 South==0.7.3
351 bzr==2.6b2
352 distribute==0.6.10

Subscribers

People subscribed via source and target branches