title: How to load the data using Ajax in Django template?
body: <p>Using Ajax in Django is a open Issue. I have tried to understand it by reading blogs and forums, but it didn't work for me. I am posting a very simple question related to it.</p>
  
  <p>Method defined in views.py: (just a sample)</p>
  
  <pre><code>def widget_data(request):
      ####
      extra_context = {
          'data': username
          'part': company
          }
      return direct_to_template(request,'test/widgets.html',
                                extra_context)
  </code></pre>
  
  <p>I want to load <code>extra_context</code> to rendered template using <code>Ajax</code>. </p>
  
  <p>Following things will happen in <code>widget.html</code> template i.e. </p>
  
  <p>When a moderator will type a URL at the address bar to open a page it will load two widgets i.e. one for loading all the registered username and other one for their company name . user are continuously registering to the sites and adding company name to their profile. When a new user will registered to the site both widget should load automatically using Ajax. </p>
  
  <p>I have no idea about the topic of Ajax. 
  How to do this?
   How should i even start this?</p>
  
  <p>I have read these following links :
  <a href="http://www.b-list.org/weblog/2006/jul/31/django-tips-simple-ajax-example-part-1/" rel="nofollow">Tutorial 1</a>
  <a href="http://webcloud.se/log/AJAX-in-Django-with-jQuery/" rel="nofollow">Tutorial 2</a></p>
  
  <p>I know that the answer will be too long and too messy but any help will be appreciative.</p>