title: Recommended way of accessing BASE_DIR in Django
body: <p>I am coding an automated menu module in Django that will list all the packages in BASE_DIR that have a urls.py file. For this I obviously need to access BASE_DIR, but I haven't been able to find a standard way of doing this. I could just do:</p>
  
  <pre><code>from myproject import settings
  
  do_stuff(settings.BASE_DIR)
  </code></pre>
  
  <p>but I'd rather not hardcode it to myproject since this menu module could also be used for other applications. Is there a better solution?</p>