Пример #1
0
# -*- coding: utf-8 -*-
from i18nurl import reverse_i18n

# At startup print some urls

print 'French', reverse_i18n('home', 'fr')
print 'English', reverse_i18n('home', 'en')
print 'German', reverse_i18n('home', 'de')
Пример #2
0
 def get_redirect_url(self, **kwargs):
     """Redirect user to the right page."""
     return reverse_i18n('home', language=get_language())