title: django settings per application - best practice?
body: <p>this is somewhat related to this question<br>
  <a href="https://stackoverflow.com/questions/11238514/why-is-djangos-settings-object-a-lazyobject">Why is django&#39;s settings object a LazyObject?</a></p>
  
  <p>In my django project i have several applications. Each application can have its own non-trivial settings file.</p>
  
  <pre><code>proj/
      proj/
           settings.py
      app/
           settings.py
           views.py
  </code></pre>
  
  <p>What is the general best practice here?<br>
  should app/settings.py do   </p>
  
  <pre><code>from django.conf import settings
  APP_SETTING= lambda: settings.getattr('APP_SETTING', 'custom_value')
  PROJ_SETTING= lambda: settings.PROJ_SETTING
  </code></pre>
  
  <p>and then in app/views.py do</p>
  
  <pre><code>import .settings 
  X = settings.APP_SETTING
  Y = settings.PROJ_SETTING
  </code></pre>
  
  <p>or should I be modifying the django lazy settings object in app/settings.py as per the django coding style?</p>
  
  <pre><code>from django.conf import settings
  # not even sure how I would check for a default value that was specified in proj/settings.py
  settings.configure(APP_SETTING='custom_value')
  </code></pre>
  
  <p>and then each app/views.py just consumes proj/settings.py via django.conf settings?</p>
  
  <pre><code>from django.conf import settings
  X = settings.APP_SETTING
  Y = settings.PROJ_SETTING
  </code></pre>
  
  <p>There are obviously quite a few other permutations but I think my intent is clear.<br>
  Thanks in advance.</p>