title: How to access a python module variable using a string [ django ]
body: <p>I have a django application, with a module called <strong>"app"</strong><br>
  Now this module has a file called <strong>"urls.py"</strong> which has a variable called <strong>"HOME_URL</strong>"</p>
  
  <p>What I'm trying to do ?</p>
  
  <pre><code>app_label = "app"
  url = __import__(app_label).urls.HOME_URL
  print url
  </code></pre>
  
  <p>That obviously doesn't work, but I hope you got what I'm trying to do, If not please comment I will edit the question to contain more info.</p>