aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <contact@yaroslavps.com>2018-06-25 02:50:14 +0300
committerYaroslav de la Peña Smirnov <contact@yaroslavps.com>2018-06-25 02:50:14 +0300
commitc9832e71790c7d93fcf3c512de8327dda3748e70 (patch)
tree0caa26ecdc8f8566f9b6a189ae7717bd4d67fb97
parent8fd79ffe610d4fce69913fd167d437322347c3d4 (diff)
downloadw3blog-c9832e71790c7d93fcf3c512de8327dda3748e70.tar.gz
w3blog-c9832e71790c7d93fcf3c512de8327dda3748e70.zip
0.3-postlang.2
-rwxr-xr-xsetup.py2
-rwxr-xr-xweblog/templates/weblog/post.html5
-rwxr-xr-xweblog/views.py1
3 files changed, 5 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 7b7557d..3880a4e 100755
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-weblog',
- version='0.3-postlang.1',
+ version='0.3-postlang.2',
packages=find_packages(),
include_package_data=True,
license='BSD License',
diff --git a/weblog/templates/weblog/post.html b/weblog/templates/weblog/post.html
index 364e17c..d602223 100755
--- a/weblog/templates/weblog/post.html
+++ b/weblog/templates/weblog/post.html
@@ -13,7 +13,7 @@
{% endif %}
{% if post_categories %}
<hr>
- <p>{% trans 'Categories' context 'Post categories' %}:
+ <p>{% trans 'Categories' context 'Post categories' %}:
{% for post_category in post_categories %}
<a class="label label-info" href="{% url 'weblog:CategoryIndex' category_slug=post_category.slug %}">{{ post_category.name }}</a>
{% endfor %}
@@ -64,4 +64,5 @@
{% endif %}
{% endif %}
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
+
diff --git a/weblog/views.py b/weblog/views.py
index f28f201..d2bdb2d 100755
--- a/weblog/views.py
+++ b/weblog/views.py
@@ -218,6 +218,7 @@ def PostView(request, category_slug, post_slug, language=None):
if len(orig_lang) < 2:
orig_lang = settings.LANGUAGE_CODE[0:2]
context_dict['languages'] = [orig_lang,]
+ context_dict['all_languages'] = settings.LANGUAGES
for post_translation in post_translations:
context_dict['languages'].append(post_translation.language)
if language and language == post_translation.language[0:2]: