title: Slug and generic views
body: <p>i have an app called blog and blog and Post and Categories model.</p>
  
  <pre><code>url(r'^(?P&lt;slug&gt;[-\w]+)/$', ListView.as_view(
                      queryset=Post.objects.filter(category=4)[:5],
                      template_name='blog.html')),
  </code></pre>
  
  <p>i can see above code like this</p>
  
  <p>127.0.0.1/categories/php/</p>
  
  <p>with above url , i can see the 5 articles with category 4 . What i want i that making it dynamic.. For example, python is category 3</p>
  
  <pre><code>queryset=Post.objects.filter(category='P&lt;pk&gt;\d')[:5]
  </code></pre>
  
  <p>i tried this but does not working. Any other way?</p>