Export a Django CMS page or a model view to a DOCX document
Project description
1 Django CMS Export Page
- Version:
0.1.0
- Source:
- Keywords:
django cms export docx
- PythonVersion:
3.4
Export a Django CMS page or a model view to a DOCX document
2 Features
Adds a menu entry in the CMS toolbar to export the current page
Ability to export a custom model, including placeholder fields
3 Installation
3.1 Requirements
Python 3.4 or above
setuptools 30.3.0 or above
Django 1.11 or above
Django CMS 3.4.6 or above
3.2 Install
pip install djangocms-export-page
4 Usage
In your Django settings:
INSTALLED_APPS = [
...
'djangocms_export_page',
...
]
4.1 CMS Page
CMS Page don’t need any extra configuration to work.
If a Plugin has a ForeignKey that would behave like children, add the following to the CMSPlugin model class:
_export_page = {
'children': 'items'
}
where items is a iterable attribute of the model class.
And for on the ForeignKey Django model class:
_export_page = {
'fields': ['name', ... ]
}
4.2 Django Model
If you need to export a Django model included in a AppHook, add the following to the model class:
_export_page = {
'sections': [{
'name': 'Meta',
'fields': ['title', ... ]
}, {
'name': 'Body',
'fields': ['content']
}],
}
It’s better to put the PlaceholderField (here content) in a separate section.
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
Built Distribution
Hashes for djangocms-export-page-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cee0b0bb41816f35e145b57aeac57dfc51670242ca50e7b306868220c3906830 |
|
MD5 | dbbb57913df5e30800e976f1ac5567d6 |
|
BLAKE2b-256 | 749d287fa119a74295f5b72a581a676eb7f4c8b2ecd5fff53302c29b24894b2a |
Hashes for djangocms_export_page-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e910061ebc514e5561ec945fbbca6ade2ecb4544945c244d99029b3ef8951ba2 |
|
MD5 | 24da7155ef011bbd34bb4d6aefe4a8d2 |
|
BLAKE2b-256 | ffeca8697077630660771c24ca4621b70cbb79f38194eb7706a1bf583ebb7074 |