Author: jtauber
Date: Mon Oct 20 16:26:23 2008
New Revision: 114

Modified:
    trunk/docs/usage.txt

Log:
first pass at notification template doc

Modified: trunk/docs/usage.txt
==============================================================================
--- trunk/docs/usage.txt        (original)
+++ trunk/docs/usage.txt        Mon Oct 20 16:26:23 2008
@@ -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 @@
  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
  ====================

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to