Default language, no news text
This commit is contained in:
parent
28060b72f6
commit
f936d4c3e5
2 changed files with 2 additions and 1 deletions
|
@ -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])
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
No news today
|
||||
<!-- No news today -->
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue