Skip to main content

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 += i18n_patterns(
url(r'^', include('flatpages.urls'))
)
```

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

INSTALLED_APPS = [
'flatpages',
]

# OPTIONAL, default: None
# CHOICES: EDITOR_CKEDITOR, EDITOR_CKEDITOR_UPLOADER, EDITOR_MARTOR
FLATPAGE_DEFAULT_EDITOR = EDITOR_CKEDITOR_UPLOADER

# OPTIONAL, default: dict of editors
FLATPAGE_EDITORS = {
'editor_name': 'path.to.widget.class'
}

# OPTIONAL, default: 'flatpages/default.html'
FLATPAGE_DEFAULT_TEMPLATE = 'path/to/template.html'
```

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

### Template

You should create templates/flatpages/default.html template in your app.

### Requirements

App require this packages:
* 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.

Source Distribution

django-mp-flatpages-3.6.tar.gz (6.6 kB view hashes)

Uploaded Source

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