title: Recursive URL Patterns CMS Style
body: <p>Whenever I learn a new language/framework, I always make a content management system...</p>
  
  <p>I'm learning Python &amp; Django and I'm stuck with making a URL pattern that will pick the right page.</p>
  
  <p>For example, for a single-level URL pattern, I have:</p>
  
  <pre><code>url(r'^(?P&lt;segment&gt;[-\w]+)/$', views.page_by_slug, name='pg_slug'),
  </code></pre>
  
  <p>Which works great for urls like:</p>
  
  <pre><code>http://localhost:8000/page/
  </code></pre>
  
  <p>Now, I'm not sure if I can get Django's URL system to bring back a list of slugs ala:</p>
  
  <pre><code>http://localhost:8000/parent/child/grandchild/
  </code></pre>
  
  <p>would return parent, child, grandchild.</p>
  
  <p>So is this something that Django does already? Or do I modify my original URL pattern to allow slashes and extract the URL data there?</p>
  
  <p>Thanks for the help in advance.</p>