In Django-CMS, how to redirect a page on a condition?
I'm using Django 1.3 with Django-CMS
I have a multilanguage page, with urls
/en/hello/world /it/ciao/mondoBoth urls point to same page, different translations.
At present, if an user write
/it/hello/world the italian page is presentedI do not want two urls for the same exact content, I'd like to redirect to
/it/ciao/mondoI tried to use in a middleware
get_pag开发者_如何学Goe_from_request (after importing it from cms.utils.page_resolver ) to check that the page absolute url is equal to the requested url but it always return NoneHow can I achieve what I want (or have get_page_from_request return something ? )
精彩评论