title: How to write a basic try/except in a Django Generic Class View
body: <p>I'd like to write an except clause that redirects the user if there isn't something in a queryset. Any suggestions welcome. I'm a Python noob, which I get is the issue here.</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>def get_queryset(self):
      try:
          var = Model.objects.filter(user=self.request.user, done=False)
      except:
          pass
  
      return var
  </code></pre>
  
  <p>I want to do something like this:</p>
  
  <pre><code>def get_queryset(self):
      try:
          var = Model.objects.filter(user=self.request.user, done=False)
      except:
          redirect('add_view')
  
      return var
  </code></pre>