Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Django flatpages app

Project description

# MP-Flatpages

Django flatpages app.

### Installation

Install with pip:

```
$ pip install django-mp-flatpages
```

Add flatpages to urls.py:

```
urlpatterns = [

path('', include('flatpages.urls'))

]
```

Add flatpages to settings.py:
```
from flatpages import DefaultFlatPagesConfig
from flatpages.constants import EDITOR_CKEDITOR_UPLOADER


class FlatPagesConfig(DefaultFlatPagesConfig):

wising_editor = EDITOR_CKEDITOR_UPLOADER

wising_editors = {
'editor_name': 'path.to.widget.class'
}

default_template = 'custom_template.html'


INSTALLED_APPS = [
'settings.FlatPagesConfig'
]
```

Run migrations:
```
python manage.py migrate
```

### Custom template

To rewrite default template you can create templates/flatpages/default.html template in your app
or set `default_template` in your app config.

### App compatible with

* django-modeltranslation

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django-mp-flatpages-3.8.tar.gz (6.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page