damned-lies r1335 - in trunk: . stats templates/people
- From: claudep svn gnome org
- To: svn-commits-list gnome org
- Subject: damned-lies r1335 - in trunk: . stats templates/people
- Date: Sat, 10 Jan 2009 19:19:34 +0000 (UTC)
Author: claudep
Date: Sat Jan 10 19:19:34 2009
New Revision: 1335
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1335&view=rev
Log:
2009-01-10 Claude Paroz <claude 2xlibre net>
* settings_sample.py: Middleware ordering matters. Session should be first.
* stats/models.py: One less function call...
* urls.py: Import view for language setting.
* templates/people/person_detail.html: Add form to change language for a
registered user.
Fixes bug #475527.
Modified:
trunk/ChangeLog
trunk/settings_sample.py
trunk/stats/models.py
trunk/templates/people/person_detail.html
trunk/urls.py
Modified: trunk/settings_sample.py
==============================================================================
--- trunk/settings_sample.py (original)
+++ trunk/settings_sample.py Sat Jan 10 19:19:34 2009
@@ -96,9 +96,9 @@
)
MIDDLEWARE_CLASSES = (
+ 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.transaction.TransactionMiddleware',
)
Modified: trunk/stats/models.py
==============================================================================
--- trunk/stats/models.py (original)
+++ trunk/stats/models.py Sat Jan 10 19:19:34 2009
@@ -188,7 +188,7 @@
def get_vcs_url(self):
if self.module.vcs_type in ('hg', 'git'):
- return utils.url_join(self.module.vcs_root)
+ return self.module.vcs_root
elif self.vcs_subpath:
return utils.url_join(self.module.vcs_root, self.module.name, self.vcs_subpath)
elif self.is_head():
Modified: trunk/templates/people/person_detail.html
==============================================================================
--- trunk/templates/people/person_detail.html (original)
+++ trunk/templates/people/person_detail.html Sat Jan 10 19:19:34 2009
@@ -4,6 +4,20 @@
{% load stats_extras %}
{% block subcontent %}
+<br clear="right" />
+<div style="float:right; text-align:right;">
+<form action="/i18n/setlang/" method="post">
+{% trans "Site Language:" %} <select name="language">
+{% for lang in LANGUAGES %}
+ {% ifequal lang.0 LANGUAGE_CODE %}
+ <option value="{{ lang.0 }}" selected="selected">{% trans lang.1 %}</option>
+ {% else %}
+ <option value="{{ lang.0 }}" >{% trans lang.1 %}</option>
+ {% endifequal %}
+{% endfor %}
+</select><br />
+<input type="submit" value="{% trans "Choose" %}" />
+</form></div>
{% if person.maintains_modules.all %}
<h2>{% trans "Maintains:" %}</h2>
Modified: trunk/urls.py
==============================================================================
--- trunk/urls.py (original)
+++ trunk/urls.py Sat Jan 10 19:19:34 2009
@@ -16,6 +16,7 @@
(r'^users/', include('people.urls')),
(r'^languages/', include('languages.urls')),
(r'^vertimus/', include('vertimus.urls')),
+ (r'^i18n/', include('django.conf.urls.i18n')),
(r'^admin/(.*)', admin.site.root),
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]