title: Pass a variable ( a flag ) from urls.py to views.py in django
body: <p>I currently have a 'blog' app which will display blogposts by different users depending on the username. This is what my urls.py looks like.</p>
  
  <pre><code>urlpatterns = patterns('blog.views',
                url(r'^(?P&lt;blog_author&gt;[^/]+)/$', 'entries',  name='blog'),
                url(r'^(?P&lt;blog_author&gt;[^/]+)/(?P&lt;entry_slug&gt;[^/]+)/$', 'blog_entry', name='blog_entry'),
            )
  </code></pre>
  
  <p>So, <code>blog/authorname/</code> would list out all the blogpost entries by that particular author and <code>blog/authorname/foo-post/</code> will render a particular blog post. What I am trying to do is to permanently redirect blogposts of alumni members to <code>blog/alumni/authorname</code> and <code>blog/alumni/authorname/foo-post/</code> respectively. I have added a field in my user model which will indicate whether a user is an alumni or not. </p>
  
  <p>The views function is basically the same for both normal users and alumni. Here is what I have been trying to do so far: Inside the <code>entries</code> view function, I added some lines that would do the checking of alumni member. If a certain blog author is an alumni, will <code>HttpResponsePermanentRedirect</code> to <code>blogs/alumni/alumni_author/</code> and since the rendering part is the same, call the same <code>entries</code> view function. So basically, my <code>entries</code> function is trying to do <b>checking member types</b>, <b>rendering view for both normal and alumni members</b>. </p>