Changes between Version 2 and Version 3 of django_apache_and_mod_wsgi
- Timestamp:
- Aug 19, 2007, 3:52:30 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
django_apache_and_mod_wsgi
v2 v3 45 45 This suppose that you create a folder named apache in your django project in this folder your should add the following files: 46 46 47 08/16/2007 04:12 PM 1,082 apache_django_wsgi.conf48 08/16/2007 04:31 PM 557 dj_survey.wsgi49 08/16/2007 04:31 PM 4,362 settings_production.py50 08/16/2007 04:09 PM 712 urls_production.py51 08/16/2007 04:33 PM 0 __init__.py47 * 08/16/2007 04:12 PM 1,082 apache_django_wsgi.conf 48 * 08/16/2007 04:31 PM 557 dj_survey.wsgi 49 * 08/16/2007 04:31 PM 4,362 settings_production.py 50 * 08/16/2007 04:09 PM 712 urls_production.py 51 * 08/16/2007 04:33 PM 0 !__init!__.py 52 52 53 __Note__: There is a file called " __init__.py" in <PATH TO YOUR DJANGO PROJECT>/apache. In this case <PATH TO YOUR DJANGO PROJECT> is equal to c:\<LONG PATH>\dj_project53 __Note__: There is a file called "!__init!__.py" in <PATH TO YOUR DJANGO PROJECT>/apache. In this case <PATH TO YOUR DJANGO PROJECT> is equal to c:\<LONG PATH>\dj_project 54 54 55 55 Like in the httpd.conf you should pay attention to the separator. You should use "/" and not "\" … … 92 92 {{{ 93 93 import os, sys 94 sys.path.append('C:\\yml\\_myScript_\\dj_things\\web_development\\workspace') 95 sys.path.append('C:\\yml\\_myScript_\\dj_things\\web_development\\workspace\\dj_project') 94 95 #Calculate the path based on the location of the WSGI script. 96 apache_configuration= os.path.dirname(os.path.dirname(__file__)) 97 project = os.path.dirname(apache_configuration) 98 workspace = os.path.dirname(project) 99 sys.path.append(project) 100 sys.path.append(workspace) 101 102 #Add the path to 3rd party django application and to django itself to the PYTHONPATH. 96 103 sys.path.append('C:\\yml\\_myScript_\\dj_things\\web_development\\svn_views\\django_src\\trunk') 97 104 sys.path.append('C:\\yml\\_myScript_\\dj_things\\web_development\\svn_views\\django-registration') 105 98 106 os.environ['DJANGO_SETTINGS_MODULE'] = 'dj_project.apache.settings_production' 99 107 import django.core.handlers.wsgi … … 128 136 129 137 == Test == 130 Retstart apache and now you should be able enjoy your application serve by apache.138 Retstart apache and now you should be able enjoy your application serve by Apache and mod_wsgi. 131 139 132 140 == References ==