python - Django Flatpages DB Tables Not Created -



python - Django Flatpages DB Tables Not Created -

ubuntu 14.04 python 3.4.0 django 1.7

i followed 4 step directions set flatpages, when ran python3 manage.py migrate, none of db tables flatpages created. other tables created, not ones needed flatpages. i'm pretty puzzled this, 'cause isn't complicated. added right stuff settings.py --

site_id = 1 # added flatpages # application definition installed_apps = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', # added 'django.contrib.flatpages.urls', # added flatpages ) middleware_classes = ( 'django.contrib.sessions.middleware.sessionmiddleware', 'django.middleware.common.commonmiddleware', 'django.middleware.csrf.csrfviewmiddleware', 'django.contrib.auth.middleware.authenticationmiddleware', 'django.contrib.auth.middleware.sessionauthenticationmiddleware', 'django.contrib.messages.middleware.messagemiddleware', 'django.middleware.clickjacking.xframeoptionsmiddleware', 'django.contrib.flatpages.middleware.flatpagefallbackmiddleware', #added )

...and urls.py (though don't think impact db table creation) --

from django.conf.urls import patterns, include, url django.views.generic import templateview django.contrib import admin urlpatterns = patterns('', # examples: url(r'^$', 'pets.views.home', name='home'), url(r'^pages/', include('django.contrib.flatpages.urls')), url(r'^robots\.txt$', templateview.as_view(template_name='robots.txt', content_type='text/plain')), url(r'^admin/', include(admin.site.urls)), )

...am having brain fart or something? don't see why won't work, it's not creating db tables needed flatpages. isn't 1st time creating django, 1st time trying out flatpages.

yes, brain fart: you've added urls module installed_apps, rather app itself.

'django.contrib.flatpages', # added flatpages

python django django-flatpages

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -