S
S
Sergey Gornostaev2016-02-12 07:12:23
Django
Sergey Gornostaev, 2016-02-12 07:12:23

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.
72f4be847bcd48cc9bd40b9ea07f1d92.png
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

2 answer(s)
S
Sergey Gornostaev, 2017-06-21
@sergey-gornostaev

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.

D
Dmitry Voronkov, 2016-02-16
@DmitryVoronkov

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 question

Ask a Question

731 491 924 answers to any question