Skip to main content

Django application to manage documents in ReStructuredText

Project description

Introduction

Sveetchies-documents is a Django application to manage text documents. It work almost like a Wiki except the collaborative way.

Features

  • Usage of the ReStructuredText docutils parser;

  • Rich editor djangocodemirror;

  • Ergonomic form with django-crispy-forms;

  • Usage of autobreadcrumbs in Pages templates;

  • Usage of the Django cache system for the parser rendering;

  • Management board ready to use;

  • Two kind of documents :

    • Page : For full page documents with children pages in a sitemap tree;

    • Insert : For documents to insert as fragment in your templates;

  • Templatetags to use documents in your templates;

  • Fully internationalized;

Requires

Internationalization and localization

This application make usage of the Django internationalization system, see the Django documentation about this if you want to add a new language translation.

Install

In your project

Settings

First, register the application and his dependancies in your project settings like this :

INSTALLED_APPS = (
    ...
    'mptt',
    'crispy_forms',
    'autobreadcrumbs',
    'djangocodemirror',
    'sveedocuments',
    ...
)

Then you have to add the context processor of autobreadcrumbs in your settings :

TEMPLATE_CONTEXT_PROCESSORS = (
    ...
    'autobreadcrumbs.context_processors.AutoBreadcrumbsContext',
    ...
)
Application settings

All default app settings is located in the settings_local.py file of sveedocuments, you can modify them in your project settings.

Urls

You have to add the application urls to your project, for this the easy way is to include the shipped urls like this :

urlpatterns = patterns('',
    ...
    (r'^documents/', include('sveedocuments.urls')),
    ...
)

If needed you can change the mounting directory documents/ to another. For more possibilities you can define your own urls for sveedocuments views. (More details to come)

Database synchronization

The application is now installed in your project, you just need to add his tables to your database, you have to do this with the django-admin command line :

django-admin syncdb

Known Problems and Fixes

There is a minor bug in Django with ReStructuredText when the django.contrib.admindocs is enabled in your project and some application directives or roles are used with the parser. See the bug entry for more details.

Nevertheless it does not happen using a default configuration so you don’t have to worry about this, as long as the exception described in the bug entry is not raised.

If it happens you have two choices, the first one (not recommended) is to patch the django/contrib/admindocs/utils.py file in your Django installation, just comment the line below :

docutils.parsers.rst.roles.DEFAULT_INTERPRETED_ROLE = 'cmsreference'

The second choice, is simply to disable django.contrib.admindocs by removing it from settings.INSTALLED_APPS and your urls.py project. But this is only if you don’t need of admindocs.

Project details


Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page