The current wsgi does not support virtualenvs (in some distributions, the
dependencies may conflict with the distribution's python packages/dependencies
and would require a virtualenv even in production).
Also, making an apache web configuration is not always trivial especialy
with ssl.
This "make_web_conf" command creates a wsgi with automatic virtualenvironment
detection (if there is a virtualenvironment), and creates an apache
(normal or ssl) configuration
TODO(ygbo)::
- add nginx support to generate nginx configuration files.
- add gunicorn support.
- add uwsgi support.
implements bp web-conf-generation-script
Change-Id: I6397ba01df88b540bbdca4bf21ba90be6843022a
14 lines
370 B
Python
14 lines
370 B
Python
#!/usr/bin/env python
|
|
import os
|
|
import sys
|
|
{% if ACTIVATE_THIS %}
|
|
|
|
activate_this = '{{ ACTIVATE_THIS }}'
|
|
execfile(activate_this, dict(__file__=activate_this))
|
|
{% endif %}
|
|
sys.path.insert(0, '{{ PROJECT_ROOT }}')
|
|
os.environ['DJANGO_SETTINGS_MODULE'] = '{{ DJANGO_SETTINGS_MODULE }}'
|
|
|
|
import django.core.handlers.wsgi
|
|
application = django.core.handlers.wsgi.WSGIHandler()
|