From 084bfddfdc1b8c7812e3f6bd0d97fac29d1ebada Mon Sep 17 00:00:00 2001 From: leidel Date: Mon, 20 Oct 2008 23:33:34 +0000 Subject: [PATCH] More doc changes for Pinax git-svn-id: https://django-dbtemplates.googlecode.com/svn/trunk@55 cfb8ba98-e953-0410-9cff-959ffddf5974 committer: leidel --HG-- extra : convert_revision : 3728341b249c354b0316b39b38d8fbf89a55ddb5 --- docs/index.txt | 55 ++++++----------------------------------------- docs/overview.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 49 deletions(-) create mode 100644 docs/overview.txt diff --git a/docs/index.txt b/docs/index.txt index 1965871..d49a8b4 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -1,55 +1,12 @@ -=================================== -Database template loader for Django -=================================== +================== +django-dbtemplates +================== This is a basic database template loader for Django which uses a m2m relationship to provide a site centric template loading. -How to use it in your own Django application -============================================ +Contents: -0. Get the source from the subversion repository -1. Follow the instructions in the INSTALL file -2. Edit the settings.py of your Django project: +.. toctree:: - Add ``dbtemplates`` to the ``INSTALLED_APPS`` of your django project - - Check if ``django.contrib.sites`` and ``django.contrib.admin`` are in - ``INSTALLED_APPS`` and add if necessary. - - It should look something like this:: - - INSTALLED_APPS = ( - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.admin', - 'django.contrib.flatpages', - 'dbtemplates', - 'myapp.blog', - ) - - Add ``dbtemplates.loader.load_template_source`` to the - ``TEMPLATE_LOADERS`` list in the settings.py of your Django project - - It should look something like this:: - - TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.load_template_source', - 'django.template.loaders.app_directories.load_template_source', - 'dbtemplates.loader.load_template_source', - ) - -3. Sync your database via shell (hint: "./manage.py syncdb" within project dir) -4. Restart your Django server -5. Go to the admin interface and add templates by filling the ``name`` field - with filename like identifiers, for example "blog/entry_list.html" -6. Use it with ``Flatpages``, ``Generic views`` and your own custom views - -Support -======= - -Please leave your questions and messages on the designated Google Code site: - -http://code.google.com/p/django-dbtemplates/ + overview.txt diff --git a/docs/overview.txt b/docs/overview.txt new file mode 100644 index 0000000..18a2595 --- /dev/null +++ b/docs/overview.txt @@ -0,0 +1,52 @@ +=================================== +Database template loader for Django +=================================== + +How to use it in your own Django application +============================================ + +0. Get the source from the subversion repository +1. Follow the instructions in the INSTALL file +2. Edit the settings.py of your Django project: + + Add ``dbtemplates`` to the ``INSTALLED_APPS`` of your django project + + Check if ``django.contrib.sites`` and ``django.contrib.admin`` are in + ``INSTALLED_APPS`` and add if necessary. + + It should look something like this:: + + INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.admin', + 'django.contrib.flatpages', + 'dbtemplates', + 'myapp.blog', + ) + + Add ``dbtemplates.loader.load_template_source`` to the + ``TEMPLATE_LOADERS`` list in the settings.py of your Django project + + It should look something like this:: + + TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.load_template_source', + 'django.template.loaders.app_directories.load_template_source', + 'dbtemplates.loader.load_template_source', + ) + +3. Sync your database via shell (hint: "./manage.py syncdb" within project dir) +4. Restart your Django server +5. Go to the admin interface and add templates by filling the ``name`` field + with filename like identifiers, for example "blog/entry_list.html" +6. Use it with ``Flatpages``, ``Generic views`` and your own custom views + +Support +======= + +Please leave your questions and messages on the designated Google Code site: + +http://code.google.com/p/django-dbtemplates/