Thursday, May 31, 2018

Re: Multisite strategy

Il giorno mer 23 mag 2018 alle ore 17:02 Daniel Germano Travieso
<danielgtravieso@gmail.com> ha scritto:
>
> Hello!
> The Sites Framework is exactly what you need (and the proper internationalization/localization for the languages).
> Just set up your 3 sites the Django way (creating the propper settings.py for each site)
> Then you can run each site using `manage.py runserver <port> --settings <specific_settings>.py`
>
> You can access each different site in development by going to localhost:<port>
>
> As a suggestion, to avoid overhead in the creation of a site that is only responsible for the choice of the site and language, I would assing one of the two sites to be the default one, but the first action the user takes when accessing the site is to choose location and language, but it is a personal thing and your way can and will work fine!
>
> Hope it helps!


Thank you!

Is it possible to change the current site at runtime?


>
> []'s
> Daniel Germano Travieso
> Engenharia da Computação Turma: 013
> Unicamp
>
> On Tue, May 22, 2018 at 3:31 AM, Carlo Ascani <carlo.ratm@gmail.com> wrote:
>>
>> Hi all,
>>
>> I'd like to implement something like this:
>>
>> One Django project to serve 3 sites:
>> 1. `domain.com` which is the "master" site, containing just a landing page
>> 2. `de.domain.com` which is the "German" site
>> 3. `en.domain.com` which is the "UK" site
>>
>> `de` and `en` refers the location, not the language (e.g. `de.domain.com/en/` is the German site in English)
>>
>> If you go to `domain.com` you can choose the language and the country, and you are just redirected to the right place.
>>
>> Is `contrib.site` suitable for that scenario?
>> I was thinking at 3 different sites.
>> If so, how can I use them locally while in development?
>>
>> Any other suggestions?
>>
>> Best,
>> Carlo
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3b068855-78e7-4742-890d-1fc8a545b4f4%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABF8kZM%2BD-4Cou6s0bHJC15MeXLjeEaVrLBLdDTHd5%3DG1%3DupPA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Carlo Ascani aka carloratm

http://carlo.ratm.gitlab.io
carloratm@freenode

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABVJJr8ONoKEWyYa-_43JMb%3DhnzRa_d6JzNfK29G58SkiwJQAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment