summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Sarlo <bruno@bruno-laptop.(none)>2009-08-09 20:30:34 -0300
committerBruno Sarlo <bruno@bruno-laptop.(none)>2009-08-09 20:30:34 -0300
commitd93c8261fe3a16fd9232aab7fbed8718a41439cf (patch)
tree4c88a9dcfae2f58bfc10bfffa249ed383c042f6b
parent29828442db7d97354d84be133fad6401d2c53223 (diff)
downloadaskbot-d93c8261fe3a16fd9232aab7fbed8718a41439cf.tar.gz
askbot-d93c8261fe3a16fd9232aab7fbed8718a41439cf.tar.bz2
askbot-d93c8261fe3a16fd9232aab7fbed8718a41439cf.zip
Added revers urls for links to work with i18n.
-rw-r--r--locale/es/LC_MESSAGES/django.po2
-rw-r--r--templates/header.html22
-rw-r--r--urls.py6
3 files changed, 15 insertions, 15 deletions
diff --git a/locale/es/LC_MESSAGES/django.po b/locale/es/LC_MESSAGES/django.po
index 8dfa7959..bcbf65bf 100644
--- a/locale/es/LC_MESSAGES/django.po
+++ b/locale/es/LC_MESSAGES/django.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-08-08 20:34-0300\n"
+"POT-Creation-Date: 2009-08-09 01:12-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: Bruno Sarlo <bsarlo@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/templates/header.html b/templates/header.html
index c3f5cc89..5751bed0 100644
--- a/templates/header.html
+++ b/templates/header.html
@@ -7,12 +7,12 @@
<!--<div id="header">-->
{% if request.user.is_authenticated %}
<a href="/users/{{ request.user.id }}/{{ request.user.username }}/">{{ request.user.username }}</a> {% get_score_badge request.user %}
- <a href="/logout/">{% trans "logout" %}</a>
+ <a href="{% url logout %}">{% trans "logout" %}</a>
{% else %}
- <a href="/account/signin">{% trans "login" %}</a>
+ <a href="{% url user_signin %}">{% trans "login" %}</a>
{% endif %}
- <a href="/about">{% trans "about" %}</a>
- <a href="/faq">{% trans "faq" %}</a>
+ <a href="{% url about %}">{% trans "about" %}</a>
+ <a href="{% url faq %}">{% trans "faq" %}</a>
<!--</div>-->
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
@@ -27,15 +27,15 @@
<td width="77%" valign="bottom">
<div class="nav">
<div class="focus">
- <a id="nav_ask" href="/questions/ask/" class="special">{% trans "ask a question" %}</a>
+ <a id="nav_ask" href="{% url ask %}" class="special">{% trans "ask a question" %}</a>
</div>
- <a id="nav_questions" href="/questions/" >{% trans "questions" %}</a>
- <a id="nav_tags" href="/tags/">{% trans "tags" %}</a>
- <a id="nav_users" href="/users/">{% trans "users" %}</a>
- <!--<a id="nav_books" href="/books/">{% trans "books" %}</a>-->
- <a id="nav_badges" href="/badges/">{% trans "badges" %}</a>
- <a id="nav_unanswered" href="/questions/unanswered/">{% trans "unanswered questions" %}</a>
+ <a id="nav_questions" href="{% url questions %}" >{% trans "questions" %}</a>
+ <a id="nav_tags" href="{% url tags %}">{% trans "tags" %}</a>
+ <a id="nav_users" href="{% url users %}">{% trans "users" %}</a>
+ <!--<a id="nav_books" href="{% url books %}">{% trans "books" %}</a>-->
+ <a id="nav_badges" href="{% url badges %}">{% trans "badges" %}</a>
+ <a id="nav_unanswered" href="{% url unanswered %}">{% trans "unanswered questions" %}</a>
{% comment %}<!-- i think this needs to be removed -e.f. -->
{% if request.user.is_authenticated %}
diff --git a/urls.py b/urls.py
index eb28cf69..4bc90bb9 100644
--- a/urls.py
+++ b/urls.py
@@ -47,9 +47,9 @@ urlpatterns = patterns('',
url(r'^answers/(?P<answer_id>\d+)/comments/(?P<comment_id>\d+)/delete/$', app.delete_answer_comment, name='delete_answer_comment'),
#place general question item in the end of other operations
url(r'^questions/(?P<id>\d+)//*', app.question, name='question'),
- (r'^tags/$', app.tags),
- (r'^tags/(?P<tag>[^/]+)/$', app.tag),
- (r'^users/$',app.users),
+ url(r'^tags/$', app.tags, name='tags'),
+ url(r'^tags/(?P<tag>[^/]+)/$', app.tag),
+ url(r'^users/$',app.users, name='users'),
url(r'^users/(?P<id>\d+)/edit/$', app.edit_user, name='edit_user'),
url(r'^users/(?P<id>\d+)//*', app.user, name='user'),
url(r'^badges/$',app.badges, name='badges'),