Django 1.4 Deployment and and os.environ.setdefault -
in new django 1.4 project layout, have declaration of os.environ.setdefault on manage.py , wsgi.py inside project folder. difference between two?
also, if have settings structure:
mysite |-- mysite | |-- settings | |-- base.py | |-- dev.py | |-- production.py | wsgi.py |-- myapp |-- manage.py which os.environ.setdefault should edit? 1 in manage.py or 1 in wsgi.py?
os.environ.setdefault("django_settings_module", "mysite.settings") also, in file should detect current env? , how do so?
so manage.py never executed once deployed, development and/or executing commands against project wsgi.py you're interested in.
you can check looking @ file has: if __name__ == "__main__": should tell file meant executed directly command line.
Comments
Post a Comment