15.2 Enabling Flatpages

The flatpages contributed app is not enabled in Django projects by default. It depends on the sites contributed app, which is also not enabled by default.

As we saw in Chapter 1: Starting a New Django Project, to add an app to a project, we need to add the location of the app to our INSTALLED_APPS list in the /suorganizer/settings.py file. For apps we create, we provide the name of the app. For contributed apps, we provide a Python namespaced string. The existing list of apps, shown in Example 15.1, is thus a list of contributed apps that we are currently using as well as our blog, organizer, and contact apps.

Example 15.1: Project Code

suorganizer/settings.py in 109b027153

34      'django.contrib.admin' ...

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.