title: Multiple django apps using same url pattern
body: <p>I'd like to run two apps with the same url patterns. I would like to avoid having an app-specific slug like domain.com/pages/something-here or domain.com/blog/something-there.</p>
  
  <p>I tried this:</p>
  
  <pre><code># urls.py
  urlpatterns = patterns('',
      url(r'^$', 'my.homepage.view'),
      url(r'^admin/', include(admin.site.urls)),
      url(r'^', include('pages.urls')),
      url(r'^', include('blog.urls')),
  )
  
  # pages/urls.py
  urlpatterns = patterns('',
      url(r'^(.+)/$', views.page),
  )
  
  # blog/urls.py
  urlpatterns = patterns('',
      url(r'^(.+)/$', views.post),
  )
  </code></pre>
  
  <p>My code doesn't work, whichever include comes first (here, pages.urls) works ok, other urls (for blog) throw 404.</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>EDIT:</strong> I did it like this: created glue.py in the same directory as settings.py. It will handle my homepage and this dispatcher view:</p>
  
  <pre><code>def dispatcher(request, slug):
      try:
          page = get_object_or_404(Page, slug=slug)
          return render(request, 'pages/page.html', {'page': page})
      except:
          post = get_object_or_404(Post, slug=slug)
          return render(request, 'blog/post.html', {'post': post})
  </code></pre>
  
  <p>I don't know if it's ok. I hope there is a better way.</p>
  
  <p>Thanks for the comments.</p>