title: Defining Constants in Django
body: <p>I want to have some constants in a Django Projects. For example, let's say a constant called <code>MIN_TIME_TEST</code>.</p>
  
  <p>I would like to be able to access this constant in two places: from within my Python code, and from within any Templates.</p>
  
  <p>What's the best way to go about doing this?</p>
  
  <p><strong>EDIT:</strong>
  To clarify, I know about Template Context Processors and about just putting things in settings.py or some other file and just importing.</p>
  
  <p>My question is, how do I combine the two approaches without violating the "Don't Repeat Yourself" rule? Based on the answers so far, here's my approach:</p>
  
  <p>I'd like to create a file called global_constants.py, which will have a list of constants (things like <code>MIN_TIME_TEST = 5</code>). I can <code>import</code> this file into any module to get the constants. </p>
  
  <p>But now, I want to create the context processor which returns all of these constants. How can I go about doing this automatically, without having to list them again in a dictionary, like in John Mee's answer?</p>