I have a url mapping that looks like this:
url(r\'^(?P[a-z][a-z])/$\', MyTemplateView.as_view()),
There are only a few values that
Why only get_context_data?
get_context_data
Just set up your get handler to do a redirect if necessary.
get
def get(self, request, lang): if lang == 'fr': return http.HttpResponseRedirect('../en') return super(MyTemplateView, self).get(request, lang)