1👍
Jacob Kaplan Moss’ Django Deployment Workshop assets have some nice examples. You’ll probably still need to do some legwork on your end to automate things to your taste but there may be some stuff in there you can use as a starting point.
1👍
One way is to use Apache’s mod_wsgi. After installing, you create a wsgi file and point Apache’s config to it.
Sample wsgi file:
import os
import sys
sys.path.append('/path/to/settings.py')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mydjangoapp.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Add this to your apache config (on Linux it is in /etc/apache2/sites-available/default):
<VirtualHost *:1234>
ServerName my.host.name.com
WSGIScriptAlias / /path/to/wsgi/file/django.wsgi
</VirtualHost>
(assuming the port is 1234)
- [Answered ]-How to retrieve values from Django ForeignKey -> ManyToMany fields?
- [Answered ]-Django app view – how to get an entry from the django database in the url and to obtain more information from the database for the view?
- [Answered ]-Tox and django_toolbar: ImportError
- [Answered ]-How do you filter for rows in a table where the count is highest in Django?
Source:stackexchange.com