I follow Apress: Django Practical Projects , and I came across something that confuses me a bit.
When I configure url.py to point to flatpages, it works fine if I do this:
...
(r'', include('django.contrib.flatpages.urls')),
...
But that will not work. If I do this:
from django.contrib import flatpages
...
(r'', include(flatpages.urls)),
...
This tells me that:
An object'module' has no attribute 'URL'
My knowledge of both Django and Python is quite limited, so this may be really obvious, but it would be nice to understand what is happening :)
thank
source
share