Tweaks to multilingual tutorial

This commit is contained in:
Karl Hobley 2014-07-15 10:49:12 +01:00
parent a4c847c35d
commit f8a24ae255

View file

@ -70,10 +70,11 @@ Heres an example of how this could be implemented (with English as the main lang
"""
This returns the language code for this page.
"""
# Look through ancestors of this pages for its language homepage
# Look through ancestors of this page for its language homepage
# The language homepage is located at depth 3
language_homepage = self.get_ancestors(inclusive=True).get(depth=3)
# The slug of language homepages should always be set to the language code
return language_homepage.slug