Answer the question
In order to leave comments, you need to log in
How to display different pages for different cities?
Django CMS has a convenient language segmentation that allows you to fill one page in the admin panel with different data for different languages.
There is a task to display different data on the page for different cities. I would like something similar to segmentation by language. But no matter how I searched, I couldn't find anything like it.
The only thing that came to mind so far is to raise GeoIP to Nginx, set up a redirect to subdomains like <city_name>.domain.com and use the django sites framework. But it's not as elegant as we'd like.
Answer the question
In order to leave comments, you need to log in
Can't do it the way I wanted. And I did not find other ready-made solutions for content geosegmentation. I had to write my own plugin - djangocms-geoplaceholder . Perhaps it will be useful to someone else.
I would take Django Geo IP . There just is a list of countries and cities and you can "resolve" the content.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question