Best Practice - Multilingual Django

I'm currently looking for a “best practice” way to create a specific framework for my Django installation with multiple sites and subdomains.

I thought of the following:

/ static / Global - global js - global css, - etc .. / specific - specific js - etc.

/ Django - contains all the specific django files / Programs - contains all the applications / site 1 -.py files - specific applications (link to / django / apps / app) - other files related to the specific site / site 2 -.py files - specific applications (link to / django / apps / app) - other files related to a specific site /subdomain.site2 -.py files - specific applications (link to / django / apps / app) - other files of a specific site

I think the foregoing is quite reasonable to keep the entire site, and to a lesser extent also subdomains are separated from each other. I know this is “best practice”, but some (critical) recommendations will be appreciated;)

+3
source share
1 answer

I think it depends on how you are going to create and deploy your multi-domain "site". Django has a site structure: http://docs.djangoproject.com/en/dev/ref/contrib/sites/ which can allow you to implement the "news exchange" that you talked about.

django , , ( mod_wsgi , , virtualhost ), , /.

django django (1 ) virtualenv ( , ), python virtualenv.

, , :

project1

- coreapps/projectspecificapps...

- /

- /

- settings.py

- urls.py

- manage.py

project2

- coreapps/projectspecificapps..

- /

- /

- settings.py

- urls.py

- manage.py

, , APP python (, virtualenv).

/... . django django (, , wsgi?), , wsgi), , ..... "-, - .

http://www.b-list.org/weblog/2006/sep/10/django-tips-laying-out-application/

Django /

, , : http://djangopackages.com/

+1

Source: https://habr.com/ru/post/1779198/


All Articles