title: JSON Serializing Django Models with simplejson
body: <p>I'd like to use simplejson to serialize a Django model. Django's serializer doesn't support dictionaries... and simplejson doesn't support Django Querysets. This is quite a conundrum.</p>
  
  <p>In the model there's sponsors that have a Foreign Key to sponsor level, I'm trying to group all the sponsors that belong to a certain sponsor level together. Here's the code that generates the list:</p>
  
  <pre><code>from django.shortcuts import get_list_or_404
  from special_event.models import Sponsor, SponsorLevel
  
  sponsor_dict = {}
  
  roadie_sponsors = get_list_or_404(Sponsor, level__category = SponsorLevel.ROADIE_CHOICE)
  
  for item in roadie_sponsors:
      try:
          sponsor_dict[item.level.name].append(item)
      except KeyError:
          sponsor_dict[item.level.name] = [item]
  </code></pre>
  
  <p>Here's what <code>sponsor_dict</code> looks like once it's "made"</p>
  
  <pre><code>{
      'Fan': [&lt;Sponsor: Fan Sponsor&gt;], 
      'VIP': [&lt;Sponsor: VIP Sponsor&gt;],
      'Groupie': [&lt;Sponsor: Groupie Sponsor&gt;],
      'Silver': [&lt;Sponsor: Silver Sponsor&gt;],
      'Bronze': [&lt;Sponsor: Another Bronze Sponsor&gt;, &lt;Sponsor: Bronze Sponsor&gt;]
  }
  </code></pre>
  
  <p>I only added one sponsor in each level, except for bronze, just to show how it works. All I want to do is get it "all" into JSON so jQuery can interpret it easily. Can Django's other serializers (like XML or YAML) accomplish this? Can I "extend" the Django JSON Serializer to handle dictionaries or "extend" simplejson to handle Django QuerySet objects?</p>