Skip to main content

Django flatpages with advanced features

Project description

Build Maintainability Test Coverage https://codecov.io/gh/snake-soft/django-advanced-pages/branch/main/graph/badge.svg?token=X9MJQJBAEH https://img.shields.io/badge/License-GPLv3-blue.svg

Django advanced pages

With this you can enhance the Django flatpages app by some features.

Features

  • Categorize pages

  • Original Django flatpages are not touched

  • Priorize the pages

  • Categorize the pages

  • Admin loads the enhanced model instead of the flatpages

Installation

Install using pip:

pip install django-advanced-pages

You need to load both, advanced and original pages because this package uses onetoone field to enhance the original Django Flatpages app:

# settings.py
INSTALLED_APPS = [
    # ...
    'django.contrib.flatpages',
    'pages.apps.PagesConfig',
    # ...
]

You can pass the pages to the template like this:

from pages.models import Page, Category
'pages': {
   'company': Page.objects.filter(category=Category.COMPANY),
   'legal': Page.objects.filter(category=Category.LEGAL),
},

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-advanced-pages-0.8.6.tar.gz (18.8 kB view hashes)

Uploaded Source

Built Distribution

django_advanced_pages-0.8.6-py3-none-any.whl (19.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page