P
P
Pan Propan2015-12-26 22:48:35
Django
Pan Propan, 2015-12-26 22:48:35

Django 1.9 Flatpages, how to set URLS?

Installed as stated here
when running migrate swears at URLS, an error is displayed

File "/home/nariman/landing/landing/urls.py", line 23, in
url(r'^pages/', include('django.contrib.flatpages.urls')),
NameError: name 'include' is not defined

Urls contains only 2 entries
urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^pages/', include('django.contrib.flatpages.urls')),
    ]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kazmiruk, 2015-12-26
@mgis

Add before urlpatterns
from django.conf.urls import include

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question