Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

first pass at notification template doc

git-svn-id: http://django-notification.googlecode.com/svn/trunk@114 590c3fc9-4838-0410-bb95-17a0c9b37ca9
  • Loading branch information...
commit 532cc72df97b43ca0865a5ebbd1f88c8bb33fc4f 1 parent ad8c99d
@jtauber jtauber authored
Showing with 24 additions and 2 deletions.
  1. +24 −2 docs/usage.txt
View
26 docs/usage.txt
@@ -3,9 +3,10 @@
Usage
=====
-Integrating notification support into your app is a simple two-step process.
+Integrating notification support into your app is a simple three-step process.
* create your notice types
+ * create your notice templates
* send notifications
Creating Notice Types
@@ -41,10 +42,31 @@ Here is an example::
Notice that the code is wrapped in a try clause so if django-notification is
not installed, your app will proceed anyway.
+
Notification templates
======================
-TODO: write this section.
+There are four different templates that need to be written for the actual content of the notices:
+
+ * ``short.txt`` is a very short, text-only version of the notice (suitable for things like email subjects)
+ * ``full.txt`` is a longer, text-only version of the notice (suitable for things like email bodies)
+ * ``notice.html`` is a short, html version of the notice, displayed in a user's notice list on the website
+ * ``full.html`` is a long, html version of the notice (not currently used for anything)
+
+Each of these should be put in a directory on the template path called ``notification/`notice_type_label`/``.
+
+For example, ``notification/friends_invite/notice.html`` might contain::
+
+ {% load i18n %}{% url invitations as invitation_page %}{% url profile_detail username=invitation.from_user.username as user_url %}
+ {% blocktrans with invitation.from_user as invitation_from_user %}<a href="{{ user_url }}">{{ invitation_from_user }}</a> has requested to add you as a friend (see <a href="{{ invitation_page }}">invitations</a>){% endblocktrans %}
+
+and ``notification/friends_full.txt`` might contain::
+
+ {% load i18n %}{% url invitations as invitation_page %}{% blocktrans with invitation.from_user as invitation_from_user %}{{ invitation_from_user }} has requested to add you as a friend. You can accept their invitation at:
+
+ http://{{ current_site }}{{ invitation_page }}
+ {% endblocktrans %}
+
Sending Notification
====================
Please sign in to comment.
Something went wrong with that request. Please try again.