Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6878213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:41:45+00:00 2026-05-27T04:41:45+00:00

I have a settings.py file and a dev_settings.py file that I use to override

  • 0

I have a settings.py file and a dev_settings.py file that I use to override some values for dev purposes. Everytime I run the ./manage.py command, I have to specify --settings=whatever.local_settings. This becomes very tedious to do every time and I am trying to find a way to force manage.py to load my dev_settings.py file every by default so that I don’t have to type that long argument every time I want to run a command.

I have tried setting DJANGO_SETTINGS_MODULE, however, it appears that manage.py overrides this option.

Is it possible to make this happen or am I doomed to always specify that argument?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:41:45+00:00Added an answer on May 27, 2026 at 4:41 am

    manage.py sets path to settings for you, that’s why it’s ignoring DJANGO_SETTINGS_MODULE (it’s basically just script that wraps around django-admin.py).

    There are 2 easy ways to fix your problem:

    1. set DJANGO_SETTINGS_MODULE and use django-admin.py to run all commands instead of manage.py. This is even better if you use vitualenv.

    2. copy manage.py and name it local.py (that’s the name in my case) and rename all settings mentions to dev_settings.

    For example:

    #!/usr/bin/env python
    from django.core.management import execute_manager
    import imp
    
    try:
        import settings_local
    except ImportError:
        import sys
        sys.stderr.write("Error: Can't find the file 'settings_local.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
        sys.exit(1)
    
    if __name__ == "__main__":
        execute_manager(settings_local)
    

    You can run all commands by ./local.py now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some settings that I'd like to store in an external file of
I have a settings.php file with parametric variables and a functions.php with well, some
I have some settings I need in a Javascript file -- servers to connect
I usually have a config-file with some global variables for database connectivity settings (such
I usually have a config-file with some global variables for database connectivity settings (such
I have a settings file in my Winforms application called Settings.settings with a partial
I have a .net Windows Service developed in VB.net. I have a settings file
Ever since deleting the original settings.settings file I have had endless problems getting the
I have various settings in my ccnet.config file and wish to pass them to
I have defined a local mirror for all repositories in the settings.xml file: <mirror>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.