title: django global variable
body: <p>In views.py</p>
  
  <p>When I try this one to access a global variable from other <code>def</code>:</p>
  
  <pre><code>def start(request):
      global num
      num=5
      return HttpResponse("num= %d" %num) # returns 5 no problem....
  
  def other(request):
      num=num+1
      return HttpResponse("num= %d" %num)
  </code></pre>
  
  <p><code>def other</code>  does not return 6, but it should be 6 right ? How can I access a variable globally in my view ? </p>