Does it matter where the Django project exists on the system?

Besides deploying a Django project in the root directory of a website, is there any specific benefit to running Django projects from one place, for example. / var / django-projects / ** xxxxx-project / vs. (in a shared hosting environment) that launches each Django project in a domain folder, for example. ** / Host / mydomain.com / xxxxx project?

+1
source share
3 answers

It doesn’t matter - choose an organization that suits your needs.

Django, , . :

  • Django django.
  • , , django, , wsgi .
  • VirtualHost , httpd.conf.
+2

, , , .

, , , . , , .

+1

, , , , DocumentRoot .

, WSGI script , Django, , Apache, Apache. , Alias, URL- , Apache.

, :

http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango

and have the WSGI script file in your own folder, which has no source code at all, or have the WSGI script file in a completely different directory outside the Django project, which again contains only script files of other files that Apache will technically be allowed to serve.

The basic rule does not paste the source code (except for the WSGI script) into any directory for which:

Allow from all

was defined using the Apache configuration.

Of course, because of this, it is partially assumed that you are using mod_wsgi. :-)

+1
source

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


All Articles