Reputation: 325
Several configuration files exist. If these files have different names How do I change the settings file every time I run this command? "python manage.py runserver"
Upvotes: 0
Views: 2736
Reputation: 819
Its so simple
read Main Django Tutorial, its all about setting django configuration
a shortcut for using in runserver
command is --settings=
and this also works with uwsgi
but if you intend to change setting without re-running the server django-constance is the answer
Upvotes: 1
Reputation: 1
you can add to manage.py file
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project_name.settings_name')
After that run py manage.py ----
Upvotes: 0