divio/django-cms-tutorial — pull request #30 by amfarrell (2014-06-06 00:04:20+00:00)
Title: polls url include must be before cms url include

In Step 3, we tell users to add the following line to their project's
urls.py:
url(r'^polls/', include('polls.urls', namespace='polls')),

However, if they add it to the end, then django-cms will first modify the path
of the url from '/en/polls/' to '/en/polls/$'.
See https://github.com/divio/django-cms/blob/develop/cms/views.py#L40
This only manifests itself as an opaque 404, frustrating someone who is
following along with the tutorial and does not know why the newly-added
polls application fails to show up. I personally found this confusing until I
dove into the source of django's url routing with pdb, walked up a stack frame,
and found the referenced line of django-cms.