title: Imported var on python/Django it's empty
body: <p>I'm new with Django and I'm trying to access a varible from other file. But I don't get his value. I don't use DJango auth system, I log in to an IDP and the IDP send back the tokenId, uid plus some more data.</p>
  
  <p>On the fileA.py I have:</p>
  
  <pre><code>.........
  tokenId = ''
  .........
  def validateToken(tokenId):
        ...............
        returns True or False
  
  def login(request):
       .............
       global tokenId
       tokenId = value/returned/from/server
       return HttpResponseRedirect('/loggedin')
  </code></pre>
  
  <p>And when the user it's redirected, the code goes to fileB.py:</p>
  
  <pre><code>from fileA import validateToken, tokenId
  .........
  def menu(request):
      if validateToken(tokenId):
         return render_to_response('menu/menu.html')
      else:
         return render_to_response('menu/access_error.html')
  </code></pre>
  
  <p>If I do debug I discover that tokenId it's empty... but in fileA tokenId has his value assigned and I can use it to do the logout and works. So I don't understand why when I call tokenId from other file it has no value...</p>
  
  <p>I tried to do the check on fileA:</p>
  
  <pre><code>def validateToken(): #I don't pass the var because it's global on fileA
      .........
      returns True or False
  </code></pre>
  
  <p>And on fileB I do:</p>
  
  <pre><code>from fileA import validateToken
  .........
  def menu(request):
      if validateToken():
         return render_to_response('menu/menu.html')
      else:
         return render_to_response('menu/access_error.html')
  </code></pre>
  
  <p>But it gives an error of: [NameError] name 'tokenId' it's not defined.</p>
  
  <p>But it's defined! :/</p>
  
  <p>What I'm doing wrong? Thanks and regards.</p>