Default language, no news text

This commit is contained in:
Oleg Lavrovsky 2017-05-31 10:36:09 +02:00
parent 28060b72f6
commit f936d4c3e5
2 changed files with 2 additions and 1 deletions

View File

@ -215,6 +215,7 @@ class HomePage(Page):
def newsfeed(self):
# Get list of latest news
curlang = translation.get_language()
if not curlang in ['de', 'fr']: curlang = 'de' # Default language
parent = BlogPage.objects.filter(slug='news-%s' % curlang)
if not parent: return []
entries = EntryPage.objects.live().descendant_of(parent[0])

View File

@ -24,7 +24,7 @@
</div>
</div>
{% empty %}
No news today
<!-- No news today -->
{% endfor %}
</div>
</div>