Mr.feel
Mr.feel

Reputation: 325

[django]how can i change Settings.py?

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

Answers (2)

Ebrahim Karimi
Ebrahim Karimi

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

kalpataru sahoo
kalpataru sahoo

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

Related Questions