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

  • SEARCH
  • Home
  • 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 7737541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:01:40+00:00 2026-06-01T08:01:40+00:00

I have this kind of setup : Overridden BaseRunserverCommand that adds another option (–token)

  • 0

I have this kind of setup :

  1. Overridden BaseRunserverCommand that adds another option (–token) that would get a string token.
  2. Store it in the app called “vault” as a global variable
  3. Then continue executing the BaseRunserverCommand

Now later when I try to get the value of this global variable after the server started, I am unable to see the value. Is this going out of scope? How to store this one time token that is entered before the django starts?

  • 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-06-01T08:01:42+00:00Added an answer on June 1, 2026 at 8:01 am

    Judging by the name of the command line option, this sounds like a configuration variable — why not put it in settings.py like all the other configurations?

    If it’s a secure value that you don’t want checked in to version control, one pattern I’ve seen is to put secure or environment-sensitive (i.e. only makes sense in production or development) configurations in a local_settings.py file which is not checked in to version control, then add to the end of your settings.py:

    try:
        from local_settings import *
    except ImportError:
        # if you require a local_settings to be present,
        # you could let this exception rise, or raise a
        # more specific exception here
        pass
    

    (Note that some people like to invert the import relationship and then use --settings on the command line with runserver — this works, too, but requires that you always remember to use --settings.)

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

Sidebar

Related Questions

I have this kind of setup in my Visual Studio 2008 solution: One WCF
I currently have this kind of setup: :procedures, has_many => :steps Steps are tied
Good day to all. I have this setup: One page with text/whatever, that also
So I have this kind of setup class Base { public: Base(); virtual void
I have this kind of code in some applications (from microsoft) [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage( Microsoft.Naming,
I have this kind of node in my xml document: <parent ...> <a .../>
I have this kind of code below, how can I bind the visibility of
I have this kind of table, it has many rows and each row has
I used to have this kind of simple JSON data and I could successfully
I have ask this kind of question before, but it seems my previous question

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.