home added and assigned right template
This commit is contained in:
parent
031ce0b5f3
commit
10d3e236ee
12 changed files with 156 additions and 42 deletions
|
|
@ -1,3 +1,3 @@
|
|||
{% extends "base_ungleich.html" %}
|
||||
{% extends "base_glarus.html" %}
|
||||
{% block base_content %}
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -5,4 +5,5 @@ urlpatterns = [
|
|||
url(r'^$',views.PostListViewUngleich.as_view()),
|
||||
# url(r'^$',views.PostListView.as_view()),
|
||||
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$',views.details)
|
||||
|
||||
]
|
||||
|
|
@ -42,6 +42,11 @@ class PostListViewUngleich(PostListView):
|
|||
|
||||
|
||||
def details(request, year, month, day, slug):
|
||||
post = Post.objects.translated(get_language(), slug=slug).first()
|
||||
#should be this way
|
||||
language = get_language()
|
||||
#but currently the posts are not trasnlated
|
||||
# language = 'en-us'
|
||||
post = Post.objects.translated(language, slug=slug).first()
|
||||
context = {'post': post}
|
||||
return render(request, 'ungleich/djangocms_blog/post_detail.html', context=context)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue