Developer-friendly, simple CMS for Django, "flatpages on steroids".
Project description
Developer-friendly, simple CMS for Django, “flatpages on steroids”.
Features
edit pages in Admin using syntax highlighting - HTML, CSS, JavaScript, Django template language
edit pages as files using your favourite text editor or IDE
on demand synchronization of pages between database and file system using Django commands
integration with Django’s template system
attach custom server-side logic to a page through configurable Page Processors
sitemap.xml
Installation
Install package using pip:
pip install django-powerpages
Add 'powerpages' to INSTALLED_APPS in your settings module:
INSTALLED_APPS = (
...
'powerpages',
)
Define POWER_PAGES setting:
POWER_PAGES = {
# absolute path to directory, where page files are located:
'SYNC_DIRECTORY': '/path/to/directory/'
}
Include app’s URLs at the end of your urlconf:
urlpatterns = [
...
url(r'', include('powerpages.urls', namespace='powerpages')),
]
Run migrations:
python manage.py migrate
Usage
Admin screenshots:
Synchronization
Export pages from database to file system is done by website_dump command. All pages are saved as structure of files and directories inside settings.POWER_PAGES['SYNC_DIRECTORY'].
python manage.py website_dump
Example structure of output directory:
_index_.page
about-us/_index_.page
about-us/contact.page
download.page
robots.txt
Each of dumped files has the following structure:
{
... page fields as JSON
}
## TEMPLATE SOURCE: ##
... template content (plain text)
Import pages from directory into database is done using website_load command.
python manage.py website_load
Both website commands accept a variety of options to tweak their behaviour. For the full list of options, use --help.
TODO: complete the documentation
Requirements
Python: 2.7, 3.4, 3.5
Django: 1.9, 1.10
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 django_powerpages-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e18e4ad608c0634087deadcb5cc93fd6e27098b20ddff131f02a82c8e967f2e |
|
MD5 | e0186cab9b841a745144e0155c37b375 |
|
BLAKE2b-256 | dd52039e7c23d345ad12314033023ffb9a33752cafcad472aa76ba7b2992d2f3 |