For multilanguage pages, use english as default language

So we search both for <url>.html, and <url>/en.html. This is consistent
with how we access non-english languages.
This commit is contained in:
Magnus Hagander
2011-11-08 14:40:42 +01:00
parent c5d0dbdc84
commit 9e710e5456

View File

@ -79,7 +79,10 @@ def fallback(request, url):
try:
t = loader.get_template('pages/%s.html' % url)
except TemplateDoesNotExist, e:
raise Http404('Page not found.')
try:
t = loader.get_template('pages/%s/en.html' % url)
except TemplateDoesNotExist, e:
raise Http404('Page not found.')
# Guestimate the nav section by looking at the URL and taking the first
# piece of it.