|
|
A tree based django CMS application
The goal of this project is to create a simple Django application to administrate hierarchical data. The project is made of two applications:
- The core hierachical application, that let you link data to a tree structure.
- A multilingual page application that use this tree.
Key features:
- Organize your data with a hierarchical tree application
- Create your pages or any other objects and link them to the tree
- Django admin application integration
- Multilingual support in pages application
- Multiple inherited template support for pages
API documentation
take a look at HierarchicalAPI
Test it
To test this CMS checkout the code with subversion :
svn checkout http://django-page-cms.googlecode.com/svn/trunk/ django-page-cms
And then, run the development server :
manage.py syncdb manage.py runserver
Sqlite3 is the default database. You can log in the admin with the user name admin and password admin.
Install in legacy project
First, copy the pages directory into your project directory.
Add pages to your installed apps :
INSTALLED_APPS = (
...
'pages',
)Install urls
Please take a look in the urls.py of the default project and copy desired urls in your proper file.
You must also set the DEFAULT_PAGE_TEMPLATE variable in your settings if you want that the page.views.details function works.
You can also add the PAGE_TEMPLATES variable in your settings if you want template customization:
PAGE_TEMPLATES = (('nice.html','nice one'), ('cool.html','cool one'))Cool.html and nice.html must exists in your template directory. If you don't set PAGE_TEMPLATES, the app will run fine anyway.
Retrieve localized content in templates
To retrieve localized page content you can use the show_content template tag. This template tag use the request object so you have to put it in the context of your views.
<h2>{% show_content current_page 'title' %}</h2>
<p>{% show_content current_page 'body' %}</p>Compatibility
The pages, and hierachical apps have been developed using the Django revision 7020. Python 2.5 is needed because of the new decorator syntax.
Author
- Batiste Bieler : http://batiste.dosimple.ch/blog/
- ...
