python - My settings.py file in Django is getting too long. How do I split it into two? -


how do that? split 2 files?

although solution not complex ones above, fit simple needs: have imports in settings.py file:

try:     settings_local import * except importerror:     pass  try:     settings_production import * except importerror:     pass 

and have settings_local.py file in local development folder (which don't upload server) , overwrite local settings. have settings_production.py server keep settings needed production environment.

you can use technique import other settings files well.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -