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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-mp-flatpages-3.4.tar.gz.
File metadata
- Download URL: django-mp-flatpages-3.4.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cab170d88bef0533c1396df6863b71c69702a4ad9ee0bcefcf453744b8f887f
|
|
| MD5 |
af437ebcac0b8ed353b488dab0a57eb2
|
|
| BLAKE2b-256 |
6ed72d796df766ab72e21ab62661165e9eed2aece2ab7172c89e63c390307e49
|