Anonymous avatar Anonymous committed 29e9817

Updated README with some helpful hints for template integration. Added an untested sample base.html.

Comments (0)

Files changed (2)

  * ``DISQUS_USER_API_KEY``: Your user API key from Disqus.  This is free, and you can learn how to get it from  `Disqus's API Page <http://2ze.us/ME>`_ or you can try http://disqus.com/api/get_my_key/ when you're logged into Disqus.  You only need this one if you're going to be converting comments from ``django.contrib.comments`` to Disqus.
  * ``DISQUS_FORUM_SHORTNAME``: set this to ``True`` if you want to see markers on the map
 
+Template Integration
+====================
+
+There are several template blocks that ``django-articles`` expects your ``base.html`` file to contain:
+
+* ``title``
+* ``meta-keywords``
+* ``meta-description``
+* ``extra-head``
+* ``content``
+* ``footer``
+
 Tag Auto-Completion
 ===================
 

articles/templates/base.html

+{% load article_tags %}
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<meta name="language" content="en-US" />
+<meta name="keywords" content="{% block meta-keywords %}{% endblock %}" />
+<meta name="description" content="{% block meta-description %}{% endblock %}" />
+
+<title>My Site - {% block title %}Welcome{% endblock %}</title>
+{% block extra-head %}{% endblock %}
+</head>
+<body>
+<h1>My Site</h1>
+{% block content %}{% endblock %}
+{% block sidebar %}
+    {% block recent_articles %}
+    <li>
+        <h2>Recent Articles</h2>
+        {% get_articles 10 as recent %}
+        {% for article in recent %}
+        {% if forloop.first %}<ul>{% endif %}
+            <li><a href="{{ article.get_absolute_url }}" title="Read this article">{{ article.title }}</a></li>
+        {% if forloop.last %}</ul>{% endif %}
+        {% endfor %}
+    </li>
+    {% endblock %}
+
+    {% block article_tags %}
+    <li>
+        <h2>Tag Cloud</h2>
+        {% tag_cloud %}
+    </li>
+    {% endblock %}
+{% endblock %}
+
+{% block footer %}
+<p>Copyright &copy; {% now "Y" %} Me. All rights reserved.</p>
+{% endblock %}
+</body>
+</html>
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.