Browse files

Mention comments/base.html template in README

  • Loading branch information...
1 parent 9a3afba commit 017b16531640744cae3cdd8857c0fd56b4393ef9 @vdboor vdboor committed Jul 18, 2012
Showing with 34 additions and 5 deletions.
  1. +34 −5 README.rst
39 README.rst
@@ -2,10 +2,14 @@ Introduction
The *django-fluent-comments* module enhances the default appearance
-of the *django.contrib.comments* application to be directly usable in web sites.
+of the django.contrib.comments_ application to be directly usable in web sites.
+The features are:
-The application is designed to be plug&play.
-It leverages django-crispy-forms_ to handle the form layout.
+* Ajax-based preview and posting of comments
+* Configurable form layouts using django-crispy-forms_.
+The application is designed to be plug&play;
+installing it should already give a better comment layout.
@@ -45,6 +49,30 @@ The database can be created afterwards::
./ syncdb
./ runserver
+Template for non-ajax pages
+The templates which django.contrib.comments_ renders, use a single base template for all layouts.
+This template is empty by default since it's only serves as a placeholder.
+To complete the configuration of the comments module, create a ``comments/base.html`` file
+that maps the template blocks onto your website base template. For example::
+ {% extends "mysite/base.html" %}{% load i18n %}
+ {% block headtitle %}{% block title %}{% trans "Responses for page" %}{% endblock %}{% endblock %}
+ {% block main %}
+ <div id="comments-wrapper">
+ {% block content %}{% endblock %}
+ </div>
+ {% endblock %}
+In this example, the base template has a ``headtitle`` and ``main`` block,
+which contain the ``content`` and ``title`` blocks that django.contrib.comments_ needs to see.
+This application also outputs an ``extrahead`` block for a meta-refresh tag.
+The ``extrahead`` block can be included in the site base template directly,
+so it doesn't have to be included in the ``comments/base.html`` file.
CSS form layout
@@ -95,7 +123,8 @@ please let us know as well because we will look into it.
Pull requests are welcome too. :-)
-.. _django-threadedcomments:
+.. _django.contrib.comments:
.. _django-crispy-forms:
-.. _`Uni-form`:
+.. _django-threadedcomments:
.. _`Bootstrap`:
+.. _`Uni-form`:

0 comments on commit 017b165

Please sign in to comment.