Django model fallback not working
I am using django modeltranslation to create a multilingual site.
The drainage fields are also translated. Suppose you have a slug field page model that is registered for translation. Every page has a URL that ends up with its slime. By printing out the slug in the template, the backup job works well. So assuming only English slug is installed, if active language is German it will print url with English slug. This is normal.
When searching for this page in a view, use something like
get_object_or_404(Page, slug = slug)
raises 404 if no german slug is set and does not back down to english.
How can I make backup work also on requests?
Thank you for your help.
+3
source to share
No one has answered this question yet
See similar questions:
or similar: