django - How to manually set sys.path? -
till making change on django production server (yes, really bad :p ). wanna go git process, , creating local test server before deployement. so, downloaded python files, , ran :
python manage.py runserver hoping , prayed... not enough, got nice error :
django.core.exceptions.improperlyconfigured: wsgi application 'issc.issc.wsgi.application' not loaded; error importing module: 'no module named issc.wsgi' i read in documentation [manage.py] created automatically , sets several key parts :
in addition, manage.py automatically created in each django project. manage.py thin wrapper around django-admin.py takes care of several things before delegating django-admin.py: puts project’s package on sys.path. sets django_settings_module environment variable points project’s settings.py file. calls django.setup() initialize various internals of django. my question : how can manually set these variables ? because in case downloaded files on arbitrary directory, not enough. eveything here, missing link everything....
if want manually set address of config file, can set django_settings_module following:
export django_settings_module='settings_to_load'
you can set environmental variables way , should work. recommend use virtualenv @ least.
Comments
Post a Comment