2👍
I can offer you no better solution than to wait for the 2.4 release which will use Django’s built-in i18n_urlpatterns to handle this, which should fix the issue you have, for now, your answer is the only way to go.
👤ojii
0👍
I bet there is a better way to do it but now I loop through titles on the page object.
for title in page.title_set.all():
print title.language, title.slug
It works, but I do not like it…
- [Answered ]-Test that fails if exception is rised?
- [Answered ]-Emailing to new top-level domains (TLDs) in django
- [Answered ]-How to use slug to form urls
- [Answered ]-Django Crispy forms doesn't save when custom layout is added
- [Answered ]-After change class function doesn't work
0👍
Maybe you could use the sitemap strategy. django cms has it’s own sitemap class that runs this code:
class CMSSitemap(Sitemap):
changefreq = "monthly"
priority = 0.5
def items(self):
all_titles = Title.objects.public().filter(
Q(redirect='') | Q(redirect__isnull=True),
page__login_required=False,
page__site=Site.objects.get_current(),
).order_by('page__path')
return all_titles
- [Answered ]-Django HTML for loop not showing corresponding values
- [Answered ]-Is it possible for a function to reference the class on which it's called?
Source:stackexchange.com