TheWorldIsGoingMobile/django-dev-cms
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Django-dev-cms is a small and minimalist cms designed, as the name says, for developers who have a basic knowledge of the django template engine, his tags and filters, some kind of html and a little bit of css. It reads templates and stylesheets (css) direct from the database, instead of from the filesystem. It requires mptt (https://github.com/django-mptt/django-mptt/), so install it before install django-dev-cms. To install django-dev-cms, download and unzip the dev-cms folder in a place inside the PYTHON PATH, a folder called devcms, for example. To use django-dev-cms, follow the next simple steps: 1) In settings.py modify the following keys: TEMPLATE_LOADERS = ( 'devcms.db_loader.load_template_source', ... ) ... INSTALLED_APPS = ( ... 'mptt', 'devcms', ) 2) In urls.py add the following url patterns: urlpatterns = patterns('', ... # Read stylesheets (css) from database (r'(.*)\.css$', 'devcms.views.load_css'), ... # Try to find a cms page. It must be the last pattern (r'(.*)', 'devcms.views.direct_to_cms'), ) 3) Go to the admin area and create templates (pages) and stylesheets. 4) In the templates, you can use the markup/endmarkup tags to mark blocks of textile, markdown or restructuredtext text to be translated to html. Example: {% load devcms_tags %} ... {% markup textile %} h1. This is a header in textile !/static/img/mypicture.jpg! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam varius est at purus eleifend commodo. Quisque et orci id est interdum viverra. Ut lacinia nunc elit. Integer gravida quam tellus, in sollicitudin ligula. {% endmarkup %}