My favorites | Sign in
Project Logo
                
People details
Project owners:
  punteney

Simple pages is an application for building out pages on a site through the Django admin interface. If you are familiar with the django.contrib.flatpages app simple pages uses the same concept(and some of the same code) and builds out from there.

Features

Requirements

A relatively recent version django-svn.

Documentation

Additional documentation

Quick Install

View more indepth installation instructions here

  1. Currently to get the code you'll have to check it out from the repository here.
  2. Checkout the above code and place "simplepages" on you python path.
  3. Add 'simplepages' to your projects settings.py file
  4. Add this "simplepages.middleware.PageFallbackMiddleware" as the last item in your settings.py MIDDLEWARE_CLASSES config
  5. Run the manage.py syncdb to create the necessary database tables
  6. You should now be able to go into your Sites admin and create Site Sections and pages for within those site sections.
  7. To view the page just browse to the url you entered when creating the page.

At this point the basic system should be working but a little more configuration has to be done to get the html editor, the edit this page, and the prepopulating the url with the section url to work.

  1. Copy the three javascript files in simplepages/media/admin/js to either your admin_media folder. Two of these files are new js files, but the "CollapsedFieldsets.js" will overwrite the existing one to fix this bug.
  2. In your projects urls.py file add in the following url:
(r'^simplepages/', include('simplepages.urls')),
  1. At this point the html editor and the prepopulating for the urls should be working. One more step is required for the edit this page functionality to appear on the site. Paste the below (also included in the sample_base.html template) into the bottom of your base.html template.
  2. {% if user.is_staff %}
        {# Determining if we should load the javascript for displaying admin links #}
        <script type="text/javascript" src="{{ MEDIA_URL }}/admin/js/browse_edit.js" defer="true"></script>
    {% endif %}

Make sure to update the location to point to your admin media folder if it's not the 'admin' subdirectory of your media_url.

Everything should be setup and working now. If the rich text editor, the edit page or the prepopulate aren't working it's most likely due to incorrect paths to the javascript files so they aren't being loaded.

What Simple pages doesn't do









Hosted by Google Code