Ticket #15058: 15058.diff
File 15058.diff, 1.4 KB (added by , 14 years ago) |
---|
-
docs/howto/deployment/modwsgi.txt
42 42 43 43 os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' 44 44 45 sys.path.append('/path/to') 46 sys.path.append('/path/to/mysite') 47 45 48 import django.core.handlers.wsgi 46 49 application = django.core.handlers.wsgi.WSGIHandler() 47 50 48 If your project is not on your ``PYTHONPATH`` by default you can add:: 51 The first directory added to ``sys.path`` allows Python to import your 52 application, starting with your settings modules. The second directory is 53 necessary if you have left out the name of your project in your imports, 54 which is recommended for pluggable apps. 49 55 50 path = '/path/to/mysite' 51 if path not in sys.path: 52 sys.path.append(path) 56 If these directories are already on your ``PYTHONPATH`` by default, you can 57 omit these lines. 53 58 54 just below the ``import sys`` line to place your project on the path. Remember to 55 replace 'mysite.settings' with your correct settings file, and '/path/to/mysite' 56 with your own project's location.59 Remember to replace 'mysite.settings' with your correct settings file, and 60 '/path/to/mysite' with your own project's location. The example above assumes 61 that you have run 'django-admin.py startproject mysite' in '/path/to'. 57 62 58 63 .. _serving-media-files: 59 64