title: Django Queryset Repr Error
body: <p>So I've made the switch from Flask to Django to try the latter out. So far I really like the models in Django, but I've run into a bit of a problem that I cannot figure out.</p>
  
  <p>So I'm making a blog application and when I run the following, I get this error:</p>
  
  <blockquote>
    <p>Unable to get repr for class 'django.db.models.query.QuerySet'</p>
  </blockquote>
  
  <p>Here is the code that generates this error, it happens on the line where I try to pull all of the Category class...</p>
  
  <pre><code>class HomeView(TemplateView):
      template_name = "home.html"
      context_object_name = 'nav_elements'
  
      def get_context_data(self, **kwargs):
          nav_elements = {}
          if OASIS_BLOG in INSTALLED_APPS:
              nav_elements[OASIS_BLOG[5:]] = self.get_categories() 
          return nav_elements
  
      @staticmethod
      def get_categories():
          from apps.OASIS_Blog.models import Category
          cats = Category.objects.all()
          catdict = {}
          for cat in cats:
              if not cat.parent_category:
                  if not catdict.get(cat.name):
                      catdict[cat.name] = []
                  else:
                      pass
              else:
                  if cat.parent_category.name in catdict.keys():
                      catdict[cat.parent_category.name].append('\t' + cat.name)        
                  else:
                      catdict[cat.parent_category.name] = ['\t' + cat.name]    
          return catdict
  </code></pre>
  
  <p>And here is the Category model...</p>
  
  <pre><code>class Category(models.Model):
      name = models.CharField(max_length=64, blank=False)
      parent_category = models.ForeignKey('self', null=True, blank=True)
  
      def __unicode__(self):
          return u'{0}{1}'.format(
              self.name, 
              "" if not self.parent_category else " - {0}".format(
                  self.parent_category
              ) 
          )
  
      class Meta:
          app_label = 'OASIS_Blog'
          verbose_name_plural = "categories"
  </code></pre>
  
  <p>I have no idea why this is happening, and my attempt to find a solution in debugging or poking around forums and documentation has not turned up anything that suggests to me a solution. Does anyone have any clue as to what is going on here?</p>