mitar avatar mitar committed eb546b9

Added documentation.

Comments (0)

Files changed (3)

+############################################
+Trac wiki engine integration with Django CMS
+############################################
+
+A plugin for ``cmsplugin-markup`` which adds Trac wiki engine support to Django CMS.
+It enables you to have content in Trac wiki syntax. It also supports Trac macros and
+it is also integrated with ``django-filer`` and ``cmsplugin-blog``. You can easily
+(with GUI) add files and images to the content, or any other text-enabled plugin content.
+
+************
+Installation
+************
+
+You should just install it somewhere Django can find it, add ``cmsplugin_markup`` to ``INSTALLED_APPS``
+and add ``cmsplugin_markup_tracwiki`` to ``CMS_MARKUP_OPTIONS``. You should of course also have
+Trac installed and an otherwise working Django CMS installation. Plugin was tested with 0.12 Trac
+version.
+
+At the moment it requires ``cmsplugin-markup`` plugin with my changes, available
+`here <https://bitbucket.org/mitar/cmsplugin-markup/>`_.
+
+***********
+Wiki Syntax
+***********
+
+You should check out the `wiki syntax documentation <http://trac.edgewall.org/wiki/WikiFormatting>`_
+for introducion to Trac wiki engine. As this integration uses this engine directly, everything
+supported there is also available in Django CMS. (If something is missing or not working properly,
+please let me know.)
+
+There are some differences:
+
+- not all known wiki macros are enabled by default (like ``Image``) as they are not needed or reasonable
+- wiki namespace is not available (as there is no wiki)
+
+There are three new namespaces available:
+
+- ``cms`` to access Django CMS pages (using optional reverse ID to identify them) or anything else
+  in Django namespace, accessible by `reverse`
+- ``filer`` to access django-filer files (using original filename, current name, SHA-1 hash or stored file path)
+- ``blog`` to access cmsplugin-blog entries (using slug)
+
+Examples::
+
+    [cms:page-with-name Page with reverse ID name]
+    [cms:admin:index Admin main page]
+    [filer:original-filename.png File]
+    [blog:my-first-entry First blog entry]
+
+There are two macros which bridges the gap to Django template tags:
+
+- ``url`` macro which wrapps Django's ``url`` template tag
+- ``now`` macro which wrapps Django's ``now`` template tag (an example of a dynamic macro)
+
+There is a special ``CMSPlugin`` macro which renders a Django CMS plugin which was inserted
+into the wiki markup. Probably you should not use it manually.
+
+Additional macros or other features can be added on request. Or you can just clone
+the repository and implement them yourself and send me a pull request.

cmsplugin_markup_tracwiki/macros.py

     For more information on how to use it and of its syntax please refer to
     [http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url Django documentation].
 
-    Using it with `as` does not really do anything useful.
+    Using it with `as` probably does not do anything really useful.
 
     Examples:
 
+from setuptools import setup
+
+VERSION = '0.1'
+PACKAGE = 'cmsplugin_markup_tracwiki'
+
+setup(
+    name = 'cmsplugin-markup-tracwiki',
+    version = VERSION,
+    description = 'Trac wiki engine integration with Django CMS as a plugin for cmsplugin-markup.',
+    author = 'Mitar',
+    author_email = 'mitar.markup@tnode.com',
+    url = 'http://mitar.tnode.com/',
+    license = 'GPLv3',
+    packages = [PACKAGE],
+    include_package_data = True,
+    install_requires = [
+        'Django>=1.2',
+        'trac>=0.12',
+        'cmsplugin-markup>=0.1',
+    ],
+    zip_safe = False
+)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.