Closed liboan closed 7 years ago
Is there a way to prevent users from accessing /pcari/landing
"default" view? e.g have the default URL be /pcari/landing/?lang=en
, and they can switch to /pcari/landing/?lang=tl
if they want.
A suggestion: https://docs.djangoproject.com/en/1.11/topics/i18n/translation/#language-prefix-in-url-patterns
Basically, with this version, the views.py URL endpoints will be prepended with the language code, so like /en/pcari/landing
That way you only need to cache the english and filipino versions, and not a redundant third one
Yes, I agree- I want to branch it off from master separately tomorrow
I'm now caching each view three times; e.g.
/pcari/landing/
,/pcari/landing/?lang=en
,/pcari/landing/?lang=tl
because it occurred to me that a user may navigate to a page by a url and not put in the get params (or, navigate to/pcari/landing/
at the very beginning, then hit back). Thoughts?