]> git.parisson.com Git - django-postman.git/commitdiff
upload docs
authorPatrick Samson <pk.samson@gmail.com>
Fri, 24 Dec 2010 17:57:59 +0000 (18:57 +0100)
committerPatrick Samson <pk.samson@gmail.com>
Fri, 24 Dec 2010 17:57:59 +0000 (18:57 +0100)
15 files changed:
.hgignore [new file with mode: 0644]
docs/Makefile [new file with mode: 0644]
docs/conf.py [new file with mode: 0644]
docs/faq.rst [new file with mode: 0644]
docs/features.rst [new file with mode: 0644]
docs/index.rst [new file with mode: 0644]
docs/make.bat [new file with mode: 0644]
docs/management.rst [new file with mode: 0644]
docs/moderation.rst [new file with mode: 0644]
docs/quickstart.rst [new file with mode: 0644]
docs/tags-filters.rst [new file with mode: 0644]
docs/views.rst [new file with mode: 0644]
postman/locale/en/LC_MESSAGES/django.po [new file with mode: 0644]
postman/locale/fr/LC_MESSAGES/django.mo [new file with mode: 0644]
postman/locale/fr/LC_MESSAGES/django.po [new file with mode: 0644]

diff --git a/.hgignore b/.hgignore
new file mode 100644 (file)
index 0000000..1d7e91a
--- /dev/null
+++ b/.hgignore
@@ -0,0 +1,2 @@
+glob:*.pyc\r
+glob:docs/_*\r
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644 (file)
index 0000000..c0d7836
--- /dev/null
@@ -0,0 +1,89 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+       @echo "Please use \`make <target>' where <target> is one of"
+       @echo "  html      to make standalone HTML files"
+       @echo "  dirhtml   to make HTML files named index.html in directories"
+       @echo "  pickle    to make pickle files"
+       @echo "  json      to make JSON files"
+       @echo "  htmlhelp  to make HTML files and a HTML help project"
+       @echo "  qthelp    to make HTML files and a qthelp project"
+       @echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+       @echo "  changes   to make an overview of all changed/added/deprecated items"
+       @echo "  linkcheck to check all external links for integrity"
+       @echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+       -rm -rf $(BUILDDIR)/*
+
+html:
+       $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+       @echo
+       @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+       $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+       @echo
+       @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+pickle:
+       $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+       @echo
+       @echo "Build finished; now you can process the pickle files."
+
+json:
+       $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+       @echo
+       @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+       $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+       @echo
+       @echo "Build finished; now you can run HTML Help Workshop with the" \
+             ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+       $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+       @echo
+       @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+             ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+       @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/django-postman.qhcp"
+       @echo "To view the help file:"
+       @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django-postman.qhc"
+
+latex:
+       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+       @echo
+       @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+       @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+             "run these through (pdf)latex."
+
+changes:
+       $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+       @echo
+       @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+       $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+       @echo
+       @echo "Link check complete; look for any errors in the above output " \
+             "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+       $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+       @echo "Testing of doctests in the sources finished, look at the " \
+             "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644 (file)
index 0000000..4a9c0eb
--- /dev/null
@@ -0,0 +1,194 @@
+# -*- coding: utf-8 -*-\r
+#\r
+# django-postman documentation build configuration file, created by\r
+# sphinx-quickstart on Fri Nov 26 09:32:49 2010.\r
+#\r
+# This file is execfile()d with the current directory set to its containing dir.\r
+#\r
+# Note that not all possible configuration values are present in this\r
+# autogenerated file.\r
+#\r
+# All configuration values have a default; values that are commented out\r
+# serve to show the default.\r
+\r
+import sys, os\r
+\r
+# If extensions (or modules to document with autodoc) are in another directory,\r
+# add these directories to sys.path here. If the directory is relative to the\r
+# documentation root, use os.path.abspath to make it absolute, like shown here.\r
+#sys.path.append(os.path.abspath('.'))\r
+\r
+# -- General configuration -----------------------------------------------------\r
+\r
+# Add any Sphinx extension module names here, as strings. They can be extensions\r
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\r
+extensions = []\r
+\r
+# Add any paths that contain templates here, relative to this directory.\r
+templates_path = ['_templates']\r
+\r
+# The suffix of source filenames.\r
+source_suffix = '.rst'\r
+\r
+# The encoding of source files.\r
+#source_encoding = 'utf-8'\r
+\r
+# The master toctree document.\r
+master_doc = 'index'\r
+\r
+# General information about the project.\r
+project = u'django-postman'\r
+copyright = u'2010, Patrick Samson'\r
+\r
+# The version info for the project you're documenting, acts as replacement for\r
+# |version| and |release|, also used in various other places throughout the\r
+# built documents.\r
+#\r
+# The short X.Y version.\r
+version = '1.0'\r
+# The full version, including alpha/beta/rc tags.\r
+release = '1.0'\r
+\r
+# The language for content autogenerated by Sphinx. Refer to documentation\r
+# for a list of supported languages.\r
+#language = None\r
+\r
+# There are two options for replacing |today|: either, you set today to some\r
+# non-false value, then it is used:\r
+#today = ''\r
+# Else, today_fmt is used as the format for a strftime call.\r
+#today_fmt = '%B %d, %Y'\r
+\r
+# List of documents that shouldn't be included in the build.\r
+#unused_docs = []\r
+\r
+# List of directories, relative to source directory, that shouldn't be searched\r
+# for source files.\r
+exclude_trees = ['_build']\r
+\r
+# The reST default role (used for this markup: `text`) to use for all documents.\r
+#default_role = None\r
+\r
+# If true, '()' will be appended to :func: etc. cross-reference text.\r
+#add_function_parentheses = True\r
+\r
+# If true, the current module name will be prepended to all description\r
+# unit titles (such as .. function::).\r
+#add_module_names = True\r
+\r
+# If true, sectionauthor and moduleauthor directives will be shown in the\r
+# output. They are ignored by default.\r
+#show_authors = False\r
+\r
+# The name of the Pygments (syntax highlighting) style to use.\r
+pygments_style = 'sphinx'\r
+\r
+# A list of ignored prefixes for module index sorting.\r
+#modindex_common_prefix = []\r
+\r
+\r
+# -- Options for HTML output ---------------------------------------------------\r
+\r
+# The theme to use for HTML and HTML Help pages.  Major themes that come with\r
+# Sphinx are currently 'default' and 'sphinxdoc'.\r
+html_theme = 'default'\r
+\r
+# Theme options are theme-specific and customize the look and feel of a theme\r
+# further.  For a list of options available for each theme, see the\r
+# documentation.\r
+#html_theme_options = {}\r
+\r
+# Add any paths that contain custom themes here, relative to this directory.\r
+#html_theme_path = []\r
+\r
+# The name for this set of Sphinx documents.  If None, it defaults to\r
+# "<project> v<release> documentation".\r
+#html_title = None\r
+\r
+# A shorter title for the navigation bar.  Default is the same as html_title.\r
+#html_short_title = None\r
+\r
+# The name of an image file (relative to this directory) to place at the top\r
+# of the sidebar.\r
+#html_logo = None\r
+\r
+# The name of an image file (within the static path) to use as favicon of the\r
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\r
+# pixels large.\r
+#html_favicon = None\r
+\r
+# Add any paths that contain custom static files (such as style sheets) here,\r
+# relative to this directory. They are copied after the builtin static files,\r
+# so a file named "default.css" will overwrite the builtin "default.css".\r
+html_static_path = ['_static']\r
+\r
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\r
+# using the given strftime format.\r
+#html_last_updated_fmt = '%b %d, %Y'\r
+\r
+# If true, SmartyPants will be used to convert quotes and dashes to\r
+# typographically correct entities.\r
+#html_use_smartypants = True\r
+\r
+# Custom sidebar templates, maps document names to template names.\r
+#html_sidebars = {}\r
+\r
+# Additional templates that should be rendered to pages, maps page names to\r
+# template names.\r
+#html_additional_pages = {}\r
+\r
+# If false, no module index is generated.\r
+#html_use_modindex = True\r
+\r
+# If false, no index is generated.\r
+#html_use_index = True\r
+\r
+# If true, the index is split into individual pages for each letter.\r
+#html_split_index = False\r
+\r
+# If true, links to the reST sources are added to the pages.\r
+#html_show_sourcelink = True\r
+\r
+# If true, an OpenSearch description file will be output, and all pages will\r
+# contain a <link> tag referring to it.  The value of this option must be the\r
+# base URL from which the finished HTML is served.\r
+#html_use_opensearch = ''\r
+\r
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").\r
+#html_file_suffix = ''\r
+\r
+# Output file base name for HTML help builder.\r
+htmlhelp_basename = 'django-postmandoc'\r
+\r
+\r
+# -- Options for LaTeX output --------------------------------------------------\r
+\r
+# The paper size ('letter' or 'a4').\r
+#latex_paper_size = 'letter'\r
+\r
+# The font size ('10pt', '11pt' or '12pt').\r
+#latex_font_size = '10pt'\r
+\r
+# Grouping the document tree into LaTeX files. List of tuples\r
+# (source start file, target name, title, author, documentclass [howto/manual]).\r
+latex_documents = [\r
+  ('index', 'django-postman.tex', u'django-postman Documentation',\r
+   u'Patrick Samson', 'manual'),\r
+]\r
+\r
+# The name of an image file (relative to this directory) to place at the top of\r
+# the title page.\r
+#latex_logo = None\r
+\r
+# For "manual" documents, if this is true, then toplevel headings are parts,\r
+# not chapters.\r
+#latex_use_parts = False\r
+\r
+# Additional stuff for the LaTeX preamble.\r
+#latex_preamble = ''\r
+\r
+# Documents to append as an appendix to all manuals.\r
+#latex_appendices = []\r
+\r
+# If false, no module index is generated.\r
+#latex_use_modindex = True\r
diff --git a/docs/faq.rst b/docs/faq.rst
new file mode 100644 (file)
index 0000000..bab1fe0
--- /dev/null
@@ -0,0 +1,11 @@
+Frequently-asked questions\r
+==========================\r
+\r
+General\r
+-------\r
+\r
+**I don't want to bother with the moderation feature, how to bypass it?**\r
+    Set the configuration option::\r
+    \r
+        POSTMAN_AUTO_MODERATE_AS = True\r
+    
\ No newline at end of file
diff --git a/docs/features.rst b/docs/features.rst
new file mode 100644 (file)
index 0000000..112a5c6
--- /dev/null
@@ -0,0 +1,271 @@
+Features\r
+========\r
+\r
+Direct write to\r
+---------------\r
+\r
+In the pages of your site, you can put links containing the recipient name(s).\r
+\r
+Example::\r
+\r
+    <a href="{% url postman_write username %}">write to {{ username }}</a>\r
+\r
+Separate multiple usernames with a ``:`` character.\r
+\r
+Example::\r
+\r
+    <a href="{% url postman_write 'adm1:adm2:adm3' %}">write to admins</a>\r
+\r
+Prefilled fields\r
+----------------\r
+\r
+You may prefill the contents of some fields by providing a query string in the link.\r
+\r
+Example::\r
+\r
+    <a href="{% url postman_write %}?subject=details request&body=give me details about ...">\r
+    ask for details\r
+    </a>\r
+\r
+Recipients Min/Max \r
+------------------\r
+\r
+If you need to constraint the maximum number of recipients in the forms,\r
+you can pass the optional ``max`` parameter to the view.\r
+There is no parameter for a minimum number, but you can code a custom form\r
+and pass a ``min`` parameter to the recipient field (see Advanced Usage below for details).\r
+\r
+Views supporting the parameter are: ``write``, ``reply``.\r
+\r
+But this parameter does not apply to the default ``AnonymousWriteForm`` for visitors:\r
+The maximum is enforced to 1 (see Advanced Usage below for knowing how),\r
+in order to keep the features available to anonymous users to a strict minimum.\r
+\r
+Example::\r
+\r
+    urlpatterns = patterns('postman.views',\r
+        # ...\r
+        url(r'^write/(?:(?P<recipients>[\w.@+-:]+)/)?$', 'write',\r
+            {'max': 3}, name='postman_write'),\r
+        # ...\r
+    )\r
+\r
+Advanced usage\r
+~~~~~~~~~~~~~~\r
+If you define your own custom form, you may specify a ``min`` parameter and a ``max`` parameter\r
+to the recipients field.\r
+\r
+For example::\r
+\r
+    from postman.forms import WriteForm\r
+    class MyWriteForm(WriteForm):\r
+        recipients = CommaSeparatedUserField(label="Recipients", min=2, max=5)\r
+\r
+If you do not want the fixed ``max`` parameter of the recipients field in your custom form,\r
+to be superseded by the parameter passed to the view, set the ``can_overwrite_limits`` \r
+form attribute to ``False``.\r
+\r
+For example::\r
+\r
+    class MyThreeAnonymousWriteForm(MyBaseAnonymousWriteForm):\r
+        can_overwrite_limits = False\r
+        recipients = CommaSeparatedUserField(label="Recipients", max=3)\r
+\r
+See also:\r
+\r
+* the ``POSTMAN_DISALLOW_MULTIRECIPIENTS`` setting in :ref:`optional_settings`\r
+\r
+User filter\r
+-----------\r
+\r
+If there are some situations where a user should not be a recipient, you can write a filter\r
+and pass it to the view.\r
+\r
+Views supporting a user filter are: ``write``, ``reply``.\r
+\r
+Example::\r
+\r
+    def my_user_filter(user):\r
+        if user.get_profile().is_absent:\r
+            return "is away"\r
+        return None\r
+\r
+    urlpatterns = patterns('postman.views',\r
+        # ...\r
+        url(r'^write/(?:(?P<recipients>[\w.@+-:]+)/)?$', 'write',\r
+            {'user_filter': my_user_filter}, name='postman_write'),\r
+        # ...\r
+    )\r
+\r
+The filter will be called for each recipient, for validation.\r
+\r
+*Input*:\r
+\r
+* ``user``: a User instance, as the recipient of the message\r
+\r
+*Output*:\r
+\r
+If the recipient is allowed, just return ``None``.\r
+\r
+To forbid the message, use one of these means:\r
+\r
+* return ``False`` or ``''``, if you do not want to give a reason for the refusal.\r
+  The error message will be: "Some usernames are rejected: foo, bar."\r
+\r
+* return a string, as a reason for the refusal.\r
+  The error message will be: "Some usernames are rejected: foo (reason), bar (reason)."\r
+\r
+* raise a ``ValidationError`` with an error message to your liking.\r
+\r
+Advanced usage\r
+~~~~~~~~~~~~~~\r
+\r
+If you define your own custom form, you may specify a user filter inside.\r
+\r
+For example::\r
+\r
+    def my_user_filter(user):\r
+        # ...\r
+        return None\r
+\r
+    from postman.forms import WriteForm\r
+    class MyWriteForm(WriteForm):\r
+        recipients = CommaSeparatedUserField(label="Recipients", user_filter=my_user_filter)\r
+\r
+Exchange filter\r
+---------------\r
+\r
+If there are some situations where an exchange should not take place, you can write a filter\r
+and pass it to the view.\r
+Typical usages would be: blacklists, users that do not want solicitation from visitors.\r
+\r
+Views supporting an exchange filter are: ``write``, ``reply``.\r
+\r
+An example, with the django-relationships application::\r
+\r
+    def my_exchange_filter(sender, recipient, recipients_list):\r
+        if recipient.relationships.exists(sender, RelationshipStatus.objects.blocking()):\r
+            return "has blacklisted you"\r
+        return None\r
+\r
+    urlpatterns = patterns('postman.views',\r
+        # ...\r
+        url(r'^write/(?:(?P<recipients>[\w.@+-:]+)/)?$', 'write',\r
+            {'exchange_filter': my_exchange_filter}, name='postman_write'),\r
+        # ...\r
+    )\r
+\r
+The filter will be called for each couple, to validate that the exchange is possible.\r
+\r
+*Inputs*:\r
+\r
+* ``sender``: a User instance, as the sender of the message, or None if the writer is not authenticated\r
+* ``recipient``: a User instance, as the recipient of the message\r
+* ``recipients_list``: the full list of recipients.\r
+  Provided as a convenient additional element of decision.\r
+\r
+*Output*:\r
+\r
+If the exchange is allowed, just return ``None``.\r
+\r
+To forbid the exchange, use one of these means:\r
+\r
+* return ``False`` or ``''``, if you do not want to give a reason for the refusal.\r
+  The error message will be: "Writing to some users is not possible: foo, bar."\r
+\r
+* return a string, as a reason for the refusal.\r
+  The error message will be: "Writing to some users is not possible: foo (reason), bar (reason)."\r
+\r
+* raise a ``ValidationError`` with an error message to your liking.\r
+\r
+Advanced usage\r
+~~~~~~~~~~~~~~\r
+\r
+If you define your own custom form, you may specify an exchange filter inside.\r
+\r
+For example::\r
+\r
+    def my_exchange_filter(sender, recipient, recipients_list):\r
+        # ...\r
+        return None\r
+\r
+    from postman.forms import WriteForm\r
+    class MyWriteForm(WriteForm):\r
+        exchange_filter = staticmethod(my_exchange_filter)\r
+\r
+Auto-complete field\r
+-------------------\r
+\r
+An auto-complete functionality may be useful on the recipients field.\r
+\r
+To activate the option, set at least the ``arg_default`` key in the\r
+``POSTMAN_AUTOCOMPLETER_APP`` dictionary.  If the default ajax_select application is used,\r
+define a matching entry in the ``AJAX_LOOKUP_CHANNELS`` dictionary.\r
+\r
+Example::\r
+\r
+    AJAX_LOOKUP_CHANNELS = {\r
+        'postman_users': dict(model='auth.user', search_field='username'),\r
+    }\r
+    POSTMAN_AUTOCOMPLETER_APP = {\r
+        'arg_default': 'postman_users',\r
+    }\r
+\r
+Support for multiple recipients is not turned on by default by django-ajax-selects.\r
+To allow this capability, you have to pass the option ``multiple: true``.\r
+\r
+Make your own templates, based on these two files, given as implementation examples:\r
+\r
+* postman/templates/autocomplete_postman_multiple.html\r
+* postman/templates/autocomplete_postman_single.html\r
+\r
+These examples include a correction necessary for the support of the 'multiple' option\r
+(in version 1.1.4 of django-ajax-selects).\r
+\r
+Customization\r
+~~~~~~~~~~~~~\r
+\r
+You may attach a specific channel, different from the default one, to a particular view.\r
+\r
+Views supporting an auto-complete parameter are: ``write``, ``reply``.\r
+\r
+For the ``write`` view, the parameter is named ``autocomplete_channels`` (note the plural).\r
+It supports two variations:\r
+\r
+* a 2-tuple of channels names: the first one for authenticated users, the second for visitors.\r
+  Specify ``None`` if you let the default channel name for one of the tuple parts.\r
+* a single channel name: the same for users and visitors\r
+\r
+For the ``reply`` view, the parameter is named ``autocomplete_channel`` (note the singular).\r
+The value is the channel name.\r
+\r
+Example::\r
+\r
+    urlpatterns = patterns('postman.views',\r
+        # ...\r
+        url(r'^write/(?:(?P<recipients>[\w.@+-:]+)/)?$', 'write',\r
+            {'autocomplete_channels': (None,'anonymous_ac')}, name='postman_write'),\r
+        url(r'^reply/(?P<message_id>[\d]+)/$', 'reply',\r
+            {'autocomplete_channel': 'reply_ac'}, name='postman_reply'),\r
+        # ...\r
+    )\r
+\r
+Example::\r
+\r
+    urlpatterns = patterns('postman.views',\r
+        # ...\r
+        url(r'^write/(?:(?P<recipients>[\w.@+-:]+)/)?$', 'write',\r
+            {'autocomplete_channels': 'write_ac'}, name='postman_write'),\r
+        # ...\r
+    )\r
+\r
+Advanced usage\r
+~~~~~~~~~~~~~~\r
+\r
+If you define your own custom form, you may specify an autocomplete channel inside.\r
+\r
+For example::\r
+\r
+    from postman.forms import WriteForm\r
+    class MyWriteForm(WriteForm):\r
+        recipients = CommaSeparatedUserField(label="Recipients", channel='my_channel')\r
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644 (file)
index 0000000..2814047
--- /dev/null
@@ -0,0 +1,104 @@
+.. django-postman documentation master file, created by\r
+   sphinx-quickstart on Fri Nov 26 09:32:49 2010.\r
+   You can adapt this file completely to your liking, but it should at least\r
+   contain the root `toctree` directive.\r
+\r
+Welcome to django-postman's documentation!\r
+==========================================\r
+\r
+This is an application for `Django <http://www.djangoproject.com>`_-powered websites.\r
+\r
+Basically, the purpose is to allow authenticated users of a site to exchange private **messages**\r
+within the site.  In this documentation, the word *user* is to be understood as an instance of a User,\r
+in the django.contrib.auth context.\r
+\r
+So it is mainly for a User-to-User exchange.\r
+But it may be beneficial for a subscriber to receive inquiries from any visitor, ie even if non authenticated.\r
+For instance, a subscriber as a service provider wants an ask-me-details form on a presentation page\r
+to facilitate possible business contacts.\r
+In this case, the visitor is presented a compose message form with an additional field to give\r
+an email address for the reply. The email is obfuscated to the recipient.\r
+\r
+What is a message ? Roughly a piece of text, about a subject, sent by a sender to a recipient.\r
+Each user has access to a collection of messages, stored in folders:\r
+\r
+    | ``Inbox`` for incoming messages\r
+    | ``Sent`` for sent messages\r
+    | ``Archives`` for archived messages\r
+    | ``Trash`` for messages marked as deleted\r
+\r
+In folders, messages can be presented in two modes:\r
+\r
+* by **thread**, for a compact view: the original message and its replies are grouped in a set\r
+  to constitute one sole entry.\r
+  The lastest message (based on the time) is the representative of the set.\r
+* by **message**, for an expanded view: each message is considered by itself.\r
+\r
+Here is a summary of features:\r
+\r
+* A non-User (email is undisclosed) can write to a User and get a reply\r
+  (can be disabled by configuration)\r
+* Exchanges can be moderated (with auto-accept and auto-reject plug-ins)\r
+* Optional recipient filter plug-ins\r
+* Optional exchange filtering plug-ins (blacklists)\r
+* Multi-recipient writing is possible (can be disabled by configuration)\r
+  with min/max constraints\r
+* Messages are managed in threads\r
+* Messages in folders are sortable by sender|recipient|subject|date\r
+* 'Archives' folder in addition to classic Inbox, Sent and Trash folders\r
+* A Quick-Reply form to only ask for a response text\r
+* A cleanup management command to clear the old deleted messages\r
+\r
+It has support for optional additional applications:\r
+\r
+* Autocomplete recipient field (default is 'django-ajax-selects'),\r
+  with multiple recipient management\r
+* New message notification (default is 'django-notification')\r
+* Asynchronous mailer (default is 'django-mailer')\r
+\r
+Moderation\r
+----------\r
+As an option, messages may need to be validated by a moderator before to be visible\r
+to the recipient.  Possible usages are:\r
+\r
+* to control there is no unwanted words in the text fields.\r
+* to make sure that no direct contact informations are exchanged when the site is an intermediary\r
+  and delivers services based on subscription fees.\r
+\r
+Messages are first created in a ``pending`` state. A moderator is in charge to change them to\r
+a ``rejected`` or ``accepted`` state.  This operation can be done in two ways:\r
+\r
+* By a person, through the Admin site. A specially simplified change view is provided,\r
+  with one-click buttons to accept or reject the message.\r
+* Automatically, through one or more auto-moderator functions.\r
+\r
+Filters\r
+-------\r
+As options, custom filters can disallow messages, in two ways:\r
+\r
+* **user filter**: a user is not in a state to act as a recipient\r
+* **exchange filter**: criteria for a message between a specific sender\r
+  and a specific recipient are not fulfilled\r
+\r
+----\r
+\r
+Contents:\r
+\r
+.. toctree::\r
+   :maxdepth: 2\r
+\r
+   quickstart\r
+   moderation\r
+   views\r
+   features\r
+   tags-filters\r
+   management\r
+   faq\r
+\r
+Indices and tables\r
+==================\r
+\r
+* :ref:`genindex`\r
+* :ref:`modindex`\r
+* :ref:`search`\r
+\r
diff --git a/docs/make.bat b/docs/make.bat
new file mode 100644 (file)
index 0000000..4b94827
--- /dev/null
@@ -0,0 +1,113 @@
+@ECHO OFF\r
+\r
+REM Command file for Sphinx documentation\r
+\r
+set SPHINXBUILD=sphinx-build\r
+set BUILDDIR=_build\r
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .\r
+if NOT "%PAPER%" == "" (\r
+       set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%\r
+)\r
+\r
+if "%1" == "" goto help\r
+\r
+if "%1" == "help" (\r
+       :help\r
+       echo.Please use `make ^<target^>` where ^<target^> is one of\r
+       echo.  html      to make standalone HTML files\r
+       echo.  dirhtml   to make HTML files named index.html in directories\r
+       echo.  pickle    to make pickle files\r
+       echo.  json      to make JSON files\r
+       echo.  htmlhelp  to make HTML files and a HTML help project\r
+       echo.  qthelp    to make HTML files and a qthelp project\r
+       echo.  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter\r
+       echo.  changes   to make an overview over all changed/added/deprecated items\r
+       echo.  linkcheck to check all external links for integrity\r
+       echo.  doctest   to run all doctests embedded in the documentation if enabled\r
+       goto end\r
+)\r
+\r
+if "%1" == "clean" (\r
+       for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i\r
+       del /q /s %BUILDDIR%\*\r
+       goto end\r
+)\r
+\r
+if "%1" == "html" (\r
+       %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html\r
+       echo.\r
+       echo.Build finished. The HTML pages are in %BUILDDIR%/html.\r
+       goto end\r
+)\r
+\r
+if "%1" == "dirhtml" (\r
+       %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml\r
+       echo.\r
+       echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.\r
+       goto end\r
+)\r
+\r
+if "%1" == "pickle" (\r
+       %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle\r
+       echo.\r
+       echo.Build finished; now you can process the pickle files.\r
+       goto end\r
+)\r
+\r
+if "%1" == "json" (\r
+       %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json\r
+       echo.\r
+       echo.Build finished; now you can process the JSON files.\r
+       goto end\r
+)\r
+\r
+if "%1" == "htmlhelp" (\r
+       %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp\r
+       echo.\r
+       echo.Build finished; now you can run HTML Help Workshop with the ^\r
+.hhp project file in %BUILDDIR%/htmlhelp.\r
+       goto end\r
+)\r
+\r
+if "%1" == "qthelp" (\r
+       %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp\r
+       echo.\r
+       echo.Build finished; now you can run "qcollectiongenerator" with the ^\r
+.qhcp project file in %BUILDDIR%/qthelp, like this:\r
+       echo.^> qcollectiongenerator %BUILDDIR%\qthelp\django-postman.qhcp\r
+       echo.To view the help file:\r
+       echo.^> assistant -collectionFile %BUILDDIR%\qthelp\django-postman.ghc\r
+       goto end\r
+)\r
+\r
+if "%1" == "latex" (\r
+       %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\r
+       echo.\r
+       echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.\r
+       goto end\r
+)\r
+\r
+if "%1" == "changes" (\r
+       %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes\r
+       echo.\r
+       echo.The overview file is in %BUILDDIR%/changes.\r
+       goto end\r
+)\r
+\r
+if "%1" == "linkcheck" (\r
+       %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck\r
+       echo.\r
+       echo.Link check complete; look for any errors in the above output ^\r
+or in %BUILDDIR%/linkcheck/output.txt.\r
+       goto end\r
+)\r
+\r
+if "%1" == "doctest" (\r
+       %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest\r
+       echo.\r
+       echo.Testing of doctests in the sources finished, look at the ^\r
+results in %BUILDDIR%/doctest/output.txt.\r
+       goto end\r
+)\r
+\r
+:end\r
diff --git a/docs/management.rst b/docs/management.rst
new file mode 100644 (file)
index 0000000..b7a586c
--- /dev/null
@@ -0,0 +1,40 @@
+Management Commands\r
+===================\r
+\r
+postman_cleanup\r
+---------------\r
+\r
+When a user deletes a message, the object is not deleted from the database right away,\r
+it is moved to a ``trash`` folder.\r
+One reason is to allow a message to be undeleted if the user wants to retrieve it.\r
+Another reason is that there is only one copy of a message for both the sender and the recipient,\r
+so the message must be marked for deletion by the two parties before to be considered for a withdraw.\r
+An additional constraint is that a message may be a member of a thread and the reply chain\r
+must be kept consistent.\r
+\r
+So there are some criteria to fulfill by a record to be really deleted from the database:\r
+\r
+* both the sender and the recipient must have marked the message as deleted\r
+* if the message is in a thread, all the messages of the thread must be marked for deletion\r
+* the action of deletion must have been done enough time ago\r
+\r
+A management command is provided for this purpose:\r
+\r
+**django-admin.py postman_cleanup**\r
+\r
+It can be run as a cron job or directly.\r
+\r
+The ``--days`` option can be used to specify the minimal number of days a message/thread\r
+must have been marked for deletion.\r
+Default value is 30 days.\r
+\r
+postman_checkup\r
+---------------\r
+\r
+A management command to run a test suite on the messages presently in the database.\r
+It checks messages and threads for possible inconsistencies, in a read-only mode.\r
+No change is made on the data.\r
+\r
+**django-admin.py postman_checkup**\r
+\r
+It can be run directly or better as a nightly cron job.\r
diff --git a/docs/moderation.rst b/docs/moderation.rst
new file mode 100644 (file)
index 0000000..92de994
--- /dev/null
@@ -0,0 +1,82 @@
+Moderation\r
+==========\r
+\r
+When created, a message is in a *pending* state. It is not delivered to the recipient\r
+immediately.  By default, some person must review its contents and must either accept\r
+or reject the message.\r
+\r
+Moderation is done through the Admin site. To ease the action, a special message type\r
+is available: PendingMessage. It's nothing else but the classic Message type, but:\r
+\r
+* It is intended to collect only messages in the *pending* state\r
+* A dedicated simplified change view is available, with two main buttons: Accept and Reject\r
+\r
+The moderator can give a reason in case of rejection of the message.\r
+If provided, this piece of information will be reported in the notification to the sender.\r
+\r
+Auto moderators\r
+---------------\r
+\r
+You may automate the moderation by giving zero, one, or many auto-moderator functions\r
+to the views.  The value of the parameter can be one single function or a sequence of\r
+functions as a tuple or a list.\r
+\r
+Views supporting an ``auto-moderators`` parameter are: ``write``, ``reply``.\r
+\r
+Example::\r
+\r
+    def mod1(message):\r
+        # ...\r
+        return None\r
+\r
+    def mod2(message):\r
+        # ...\r
+        return None\r
+    mod2.default_reason = 'mod2 default reason'\r
+\r
+    urlpatterns = patterns('postman.views',\r
+        # ...\r
+        url(r'^write/(?:(?P<recipients>[\w.@+-:]+)/)?$', 'write',\r
+            {'auto_moderators': (mod1, mod2)}, name='postman_write'),\r
+        url(r'^reply/(?P<message_id>[\d]+)/$', 'reply',\r
+            {'auto_moderators': mod1}, name='postman_reply'),\r
+        # ...\r
+    )\r
+\r
+Each auto-moderator function will be called for the message to moderate,\r
+in the same order as the one set in the parameter.\r
+\r
+*Input*:\r
+\r
+* ``message``: a Message instance\r
+\r
+*Output*:\r
+\r
+The structure of the output is either a ``rating`` or a tuple ``(rating, reason)``.\r
+\r
+``rating`` may take the following values:\r
+\r
+* ``None``\r
+* 0 or ``False``\r
+* 100 or ``True``\r
+* an integer between 1 and 99\r
+\r
+``reason`` is a string, giving a specific reason for a rejection.\r
+If not provided, a default reason will be taken from the ``default_reason`` attribute\r
+of the function, if any. Otherwise, there will be no reason.\r
+\r
+The processing of the chain of auto-moderators is managed by these rules:\r
+\r
+#. If return is ``None`` or outside the range 0..100, the auto-moderator is neutral\r
+#. If return is 0, no other function is processed, the message is rejected\r
+#. If return is 100, no other function is processed, the message is accepted\r
+#. Otherwise, the rating will count for an average among the full set of returned ratings\r
+\r
+At the end of the loop, if the decision is not final, the sequence is:\r
+\r
+#. If there was no valid rating at all, then the ``POSTMAN_AUTO_MODERATE_AS`` setting applies.\r
+#. An average rating is computed: if greater or equal to 50, the message is accepted.\r
+#. The message is rejected. The final reason is a comma separated collection of reasons\r
+   coming from moderators having returned a rating lesser than 50.\r
+\r
+\r
diff --git a/docs/quickstart.rst b/docs/quickstart.rst
new file mode 100644 (file)
index 0000000..5200128
--- /dev/null
@@ -0,0 +1,204 @@
+.. _quickstart:\r
+\r
+Quick start guide\r
+=================\r
+\r
+Requisites and dependances\r
+--------------------------\r
+\r
+Python version >= 2.6\r
+\r
+Some reasons:\r
+\r
+* use of ``str.format()``\r
+\r
+Django version >= 1.2.2\r
+\r
+Some reasons:\r
+\r
+* use of ``self.stdout`` in management commands\r
+\r
+Installation\r
+------------\r
+Get the code from the repository, which is hosted at `Bitbucket <http://bitbucket.org/>`_.\r
+\r
+You have two main ways to obtain the latest code and documentation:\r
+\r
+With the version control software Mercurial installed, get a local copy by typing::\r
+\r
+    hg clone http://bitbucket.org/psam/django-postman/\r
+\r
+Or download a copy of the package, which is available in several compressed formats,\r
+either from the ``Download`` tab or from the ``get source`` menu option.\r
+\r
+In both case, make sure the directory is accessible from the Python import path.\r
+\r
+Configuration\r
+-------------\r
+\r
+Required settings\r
+~~~~~~~~~~~~~~~~~\r
+\r
+Add ``postman`` to the ``INSTALLED_APPS`` setting of your project.\r
+\r
+Run a ``manage.py syncdb``.\r
+\r
+Include the URLconf ``postman.urls`` in your project's root URL configuration.\r
+\r
+.. _optional_settings:\r
+\r
+Optional settings\r
+~~~~~~~~~~~~~~~~~\r
+\r
+If you want to make use of a ``postman_unread_count`` context variable in your templates,\r
+add ``postman.context_processors.inbox`` to the ``TEMPLATE_CONTEXT_PROCESSORS`` setting\r
+of your project.\r
+\r
+You may specify some additional configuration options in your ``settings.py``:\r
+\r
+``POSTMAN_DISALLOW_ANONYMOUS``\r
+    Set it to True if you do not allow visitors to write to users.\r
+    That way, messaging is restricted to a User-to-User exchange.\r
+\r
+    *Defaults to*: False.\r
+\r
+``POSTMAN_DISALLOW_MULTIRECIPIENTS``\r
+    Set it to True if you do not allow more than one username in the recipient field.\r
+\r
+    *Defaults to*: False.\r
+\r
+``POSTMAN_DISALLOW_COPIES_ON_REPLY``\r
+    Set it to True if you do not allow additional recipients when replying.\r
+\r
+    *Defaults to*: False.\r
+    \r
+``POSTMAN_AUTO_MODERATE_AS``\r
+    The default moderation status when no auto-moderation functions, if any, were decisive.\r
+\r
+    * ``True`` to accept messages.\r
+    * ``False`` to reject messages.\r
+    * ``None`` to leave messages to a moderator review.\r
+\r
+    *Defaults to*: None.\r
+\r
+    To disable the moderation feature (no control, no filter):\r
+    * Set this option to True\r
+    * Do not provide any auto-moderation functions\r
+\r
+``POSTMAN_NOTIFIER_APP``\r
+    A notifier application name, used in preference to the basic emailing,\r
+    to notify users of their rejected or received messages.\r
+\r
+    *Defaults to*: 'notification', as in django-notification.\r
+\r
+    If you already have a notifier application with the default name in the installed applications\r
+    but you do not want it to be used by this application, set the option to None.\r
+\r
+``POSTMAN_MAILER_APP``\r
+    An email application name, used in preference to the basic django.core.mail, to send emails.\r
+\r
+    *Defaults to*: 'mailer', as in django-mailer.\r
+\r
+    If you already have a mailer application with the default name in the installed applications\r
+    but you do not want it to be used by this application, set the option to None.\r
+\r
+``POSTMAN_AUTOCOMPLETER_APP``\r
+    An auto-completer application specification, useful for recipient fields.\r
+    To enable the feature, define a dictionary with these keys:\r
+\r
+    * 'name'\r
+        The name of the auto-completer application.\r
+        Defaults to 'ajax_select'\r
+    * 'field'\r
+        The model class name.\r
+        Defaults to 'AutoCompleteField'\r
+    * 'arg_name'\r
+        The name of the argument\r
+        Defaults to 'channel'\r
+    * 'arg_default'\r
+        No default value. This is a mandatory default value, but you may supersede it in the field\r
+        definition of a custom form or pass it in the url pattern definitions.\r
+\r
+    *Defaults to*: an empty dictionary.\r
+\r
+Templates\r
+~~~~~~~~~\r
+A complete set of working templates is provided with the application.\r
+You may use it as it is with a CSS design of yours, re-use it or extend some parts of it,\r
+or only view it as an example.\r
+\r
+Relations between templates::\r
+\r
+    base.html\r
+    |_ base_folder.html\r
+    |  |_ inbox.html\r
+    |  |_ sent.html\r
+    |  |_ archives.html\r
+    |  |_ trash.html\r
+    |_ base_write.html\r
+    |  |_ write.html\r
+    |  |_ reply.html\r
+    |_ view.html\r
+\r
+If the django-ajax-selects application is used, the following URLs are referenced by this set:\r
+\r
+* {% admin_media_prefix %}js/jquery.min.js\r
+* {{ MEDIA_URL }}js/jquery.autocomplete.min.js\r
+* {{ MEDIA_URL }}css/jquery.autocomplete.css\r
+* {{ MEDIA_URL }}css/indicator.gif\r
+\r
+The ``postman/base.html`` template extends a ``base.html`` site template,\r
+in which some blocks are expected:\r
+\r
+* title: in <html><head><title>, at least for a part of the entire title string\r
+* extrahead: in <html><head>, to put some <script> and <link> elements\r
+* content: in <html><body>, to put the page contents\r
+* postman_menu: in <html><body>, to put a navigation menu\r
+\r
+Medias\r
+~~~~~~\r
+A CSS file is provided with the application, for the Admin site: ``postman/css/admin.css``.\r
+It is not obligatory but makes the display more confortable.\r
+\r
+The file is provided under ``postman/medias/``. It's up to you to make it visible to the URL resolver.\r
+\r
+For example:\r
+\r
+* In a production environment, set /<MEDIA_URL>/postman/ as a symlink to <Postman_module>/medias/postman/\r
+* In a development environment (django's runserver), you can put in the URLconf, something like::\r
+\r
+    ('^' + settings.MEDIA_URL.strip('/') + r'/(?P<path>postman/.*)$', 'django.views.static.serve',\r
+        {'document_root': os.path.join(imp.find_module('postman')[1], 'medias')}),\r
+\r
+See also :ref:`styles` for the stylesheets of views.\r
+\r
+Examples\r
+--------\r
+\r
+``settings.py``::\r
+\r
+    INSTALLED_APPS = (\r
+        # ...\r
+        'postman',\r
+        # ...\r
+        # 'pagination'\r
+        # 'ajax_select'\r
+        # 'notification'\r
+        # 'mailer'\r
+    )\r
+    # POSTMAN_DISALLOW_ANONYMOUS = True # default is False\r
+    # POSTMAN_DISALLOW_MULTIRECIPIENTS = True # default is False\r
+    # POSTMAN_DISALLOW_COPIES_ON_REPLY = True # default is False\r
+    # POSTMAN_AUTO_MODERATE_AS = True # default is None\r
+    # POSTMAN_NOTIFIER_APP = None # default is 'notification'\r
+    # POSTMAN_MAILER_APP = None # default is 'mailer'\r
+    # POSTMAN_AUTOCOMPLETER_APP = {\r
+        # 'name': '', # default is 'ajax_select'\r
+        # 'field': '', # default is 'AutoCompleteField'\r
+        # 'arg_name': '', # default is 'channel'\r
+        # 'arg_default': 'postman_friends', # no default, mandatory to enable the feature\r
+    # } # default is {}\r
+\r
+``urls.py``::\r
+\r
+    (r'^messages/', include('postman.urls')),\r
diff --git a/docs/tags-filters.rst b/docs/tags-filters.rst
new file mode 100644 (file)
index 0000000..440f9c0
--- /dev/null
@@ -0,0 +1,97 @@
+Tags and Filters\r
+================\r
+\r
+The following tags and filters are available to your templates by loading the library::\r
+\r
+    {% load postman_tags %}\r
+\r
+Here are the other special libraries in the ``postman/templatetags/`` directory,\r
+that are not intended for your site design:\r
+\r
+* ``postman_admin_modify.py``: a library exclusively designed for a customized change_form\r
+  template used in the Admin site for the moderation of pending messages.\r
+\r
+* ``pagination_tags_for_tests.py``: a mock of the django-pagination application template tags,\r
+  only usable for the test suite in case the real application is not installed.\r
+  To rename to ``pagination_tags.py`` during the test session.\r
+\r
+Tags\r
+----\r
+\r
+postman_unread\r
+~~~~~~~~~~~~~~\r
+\r
+Gives the number of unread messages for a user.\r
+Returns nothing (an empty string) for anonymous users.\r
+\r
+Storing the count in a variable for further processing is advised, such as::\r
+\r
+    {% postman_unread as unread_count %}\r
+    ...\r
+    {% if unread_count %}\r
+        You have <strong>{{ unread_count }}</strong> unread messages.\r
+    {% endif %}\r
+\r
+postman_order_by\r
+~~~~~~~~~~~~~~~~\r
+\r
+Returns a formatted GET query string, usable to have the messages list presented in\r
+a specific order.  This string must be put in the href attribute of a <a> HTML tag.\r
+\r
+One argument is required: a keyword to specify the field used for the sort.\r
+Supported values are:\r
+\r
+* sender\r
+* recipient\r
+* subject\r
+* date\r
+\r
+If the list is already sorted by the keyword, the returned value will specify\r
+the reversed order.  If there are other existing parameters, such as a page number,\r
+they are preserved in the resulting output.\r
+\r
+Example::\r
+\r
+    <a href="{% postman_order_by subject %}">...</a>\r
+\r
+Filters\r
+-------\r
+\r
+or_me\r
+~~~~~\r
+\r
+If the value is equal to the argument, replace it with the constant string '<me>'.\r
+\r
+For example, if we have::\r
+\r
+    {{ message.obfuscated_sender|or_me:user }}\r
+\r
+and the sender is the currently logged-in user, the output is compacted to show only\r
+the simple pattern '<me>'.\r
+\r
+Note that this pattern cannot be confused with the username of a real user,\r
+because the brackets are not in the valid character set for a username.\r
+\r
+compact_date\r
+~~~~~~~~~~~~\r
+\r
+Output a date as short as possible. The argument must provide three date format patterns.\r
+The pattern used depends on how the date compares to the current instant:\r
+\r
+* pattern 1 if in the same day\r
+* pattern 2 if in the same year\r
+* pattern 3 otherwise\r
+\r
+For example::\r
+\r
+    {{ message.sent_at|compact_date:_("g:i A,M j,n/j/y") }}\r
+\r
+With a message sent on "5 dec 2010, 09:21:58":\r
+\r
+============  ==============\r
+for the day:  the output is:\r
+============  ==============\r
+5 dec 2010    9:21 AM\r
+6 dec 2010    Dec 5\r
+1 jan 2011    12/5/10\r
+============  ==============\r
diff --git a/docs/views.rst b/docs/views.rst
new file mode 100644 (file)
index 0000000..3be4473
--- /dev/null
@@ -0,0 +1,102 @@
+Custom views\r
+============\r
+\r
+.. _styles:\r
+\r
+styles\r
+------\r
+Here is a sample of some CSS rules, usable for ``postman/views.html``::\r
+\r
+    .pm_message.pm_deleted             { text-decoration: line-through; }\r
+    .pm_message.pm_deleted .pm_body    { display: none; }\r
+    .pm_message.pm_archived            { font-style: italic; color: grey; }\r
+    .pm_message.pm_unread .pm_subject  { font-weight: bolder; }\r
+    .pm_message.pm_pending .pm_header  { background-color: #FFC; }\r
+    .pm_message.pm_rejected .pm_header { background-color: #FDD; }\r
+\r
+forms\r
+-----\r
+\r
+You can replace the default forms in views.\r
+\r
+Examples::\r
+\r
+    urlpatterns = patterns('postman.views',\r
+        # ...\r
+        url(r'^write/(?:(?P<recipients>[\w.@+-:]+)/)?$', 'write',\r
+            {'form_classes': (MyCustomWriteForm, MyCustomAnonymousWriteForm)}, name='postman_write'),\r
+        url(r'^reply/(?P<message_id>[\d]+)/$', 'reply',\r
+            {'form_class': MyCustomFullReplyForm}, name='postman_reply'),\r
+        url(r'^view/(?P<message_id>[\d]+)/$', 'view',\r
+            {'form_class': MyCustomQuickReplyForm}, name='postman_view'),\r
+        # ...\r
+    )\r
+\r
+templates\r
+---------\r
+\r
+You can replace the default template name in all views.\r
+\r
+Example::\r
+\r
+    urlpatterns = patterns('postman.views',\r
+        # ...\r
+        url(r'^view/(?P<message_id>[\d]+)/$', 'view',\r
+            {'template_name': 'my_custom_view.html'}, name='postman_view'),\r
+        # ...\r
+    )\r
+\r
+after submission\r
+----------------\r
+\r
+You can supersede the default view where to return to, after a successful submission.\r
+\r
+The default algorithm is:\r
+\r
+#. Return where you came from\r
+#. If it cannot be known, fall back to the inbox view\r
+#. But if the submission view has a ``success_url`` parameter, use it preferably\r
+#. In all cases, a ``next`` parameter in the query string has higher precedence\r
+\r
+The parameter ``success_url`` is available to these views:\r
+\r
+* ``write``\r
+* ``reply``\r
+* ``archive``\r
+* ``delete``\r
+* ``undelete``\r
+\r
+Example::\r
+\r
+    urlpatterns = patterns('postman.views',\r
+        # ...\r
+        url(r'^reply/(?P<message_id>[\d]+)/$', 'reply',\r
+            {'success_url': 'postman_inbox'}, name='postman_reply'),\r
+        # ...\r
+    )\r
+\r
+Example::\r
+\r
+    <a href="{% url postman_reply reply_to_pk %}?next={{ next_url|urlencode }}">Reply</a>\r
+\r
+reply formatters\r
+----------------\r
+\r
+You can replace the default formatters used for replying.\r
+\r
+Examples::\r
+\r
+    def format_subject(subject):\r
+        return "Re_ " + subject\r
+\r
+    def format_body(sender, body):\r
+        return "{0} _ {1}".format(sender, body)\r
+\r
+    urlpatterns = patterns('postman.views',\r
+        # ...\r
+        url(r'^reply/(?P<message_id>[\d]+)/$', 'reply',\r
+            {'formatters': (format_subject,format_body)}, name='postman_reply'),\r
+        url(r'^view/(?P<message_id>[\d]+)/$', 'view',\r
+            {'formatters': (format_subject,format_body)}, name='postman_view'),\r
+        # ...\r
+    )\r
diff --git a/postman/locale/en/LC_MESSAGES/django.po b/postman/locale/en/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..6a68aa0
--- /dev/null
@@ -0,0 +1,522 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-12-24 18:38+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: .\admin.py:22
+msgid "Sender and Recipient cannot be both undefined."
+msgstr ""
+
+#: .\admin.py:29
+msgid "Visitor's email is in excess."
+msgstr ""
+
+#: .\admin.py:34
+msgid "Visitor's email is missing."
+msgstr ""
+
+#: .\admin.py:40
+msgid "Reading date must be later to sending date."
+msgstr ""
+
+#: .\admin.py:45
+msgid "Deletion date by sender must be later to sending date."
+msgstr ""
+
+#: .\admin.py:50
+msgid "Deletion date by recipient must be later to sending date."
+msgstr ""
+
+#: .\admin.py:58
+msgid "Response date must be later to sending date."
+msgstr ""
+
+#: .\admin.py:60
+msgid "The message cannot be replied without having been read."
+msgstr ""
+
+#: .\admin.py:62
+msgid "Response date must be later to reading date."
+msgstr ""
+
+#: .\admin.py:64
+msgid "Response date cannot be set without at least one reply."
+msgstr ""
+
+#: .\admin.py:66
+msgid "The message cannot be replied without being in a thread."
+msgstr ""
+
+#: .\admin.py:88 .\admin.py:157 .\templates\postman\view.html.py:5
+msgid "Message"
+msgstr ""
+
+#: .\admin.py:93
+msgid "Dates"
+msgstr ""
+
+#: .\admin.py:98 .\admin.py:161
+msgid "Moderation"
+msgstr ""
+
+#: .\fields.py:22
+msgid "Some usernames are unknown or no more active: {users}."
+msgstr ""
+
+#: .\fields.py:23
+msgid ""
+"Ensure this value has at most {limit_value} distinct items (it has "
+"{show_value})."
+msgstr ""
+
+#: .\fields.py:24
+msgid ""
+"Ensure this value has at least {limit_value} distinct items (it has "
+"{show_value})."
+msgstr ""
+
+#: .\fields.py:25
+msgid "Some usernames are rejected: {users}."
+msgstr ""
+
+#: .\fields.py:26 .\forms.py:65
+msgid "{user.username}"
+msgstr ""
+
+#: .\fields.py:27 .\forms.py:66
+msgid "{user.username} ({reason})"
+msgstr ""
+
+#: .\forms.py:64
+msgid "Writing to some users is not possible: {users}."
+msgstr ""
+
+#: .\forms.py:149 .\forms.py:161
+msgid "Recipients"
+msgstr ""
+
+#: .\forms.py:149 .\forms.py:161 .\templates\postman\base_folder.html.py:26
+#: .\templates\postman\reply.html.py:4
+msgid "Recipient"
+msgstr ""
+
+#: .\forms.py:160
+msgid "Email"
+msgstr ""
+
+#: .\forms.py:176
+msgid "Undefined recipient."
+msgstr ""
+
+#: .\forms.py:195
+msgid "Additional recipients"
+msgstr ""
+
+#: .\forms.py:195
+msgid "Additional recipient"
+msgstr ""
+
+#: .\models.py:19
+msgid "Pending"
+msgstr ""
+
+#: .\models.py:20
+msgid "Accepted"
+msgstr ""
+
+#: .\models.py:21 .\templates\postman\view.html.py:13
+msgid "Rejected"
+msgstr ""
+
+#: .\models.py:197
+msgid "subject"
+msgstr ""
+
+#: .\models.py:198
+msgid "body"
+msgstr ""
+
+#: .\models.py:199 .\models.py:282
+msgid "sender"
+msgstr ""
+
+#: .\models.py:200 .\models.py:306
+msgid "recipient"
+msgstr ""
+
+#: .\models.py:202
+msgid "visitor"
+msgstr ""
+
+#: .\models.py:203
+msgid "parent message"
+msgstr ""
+
+#: .\models.py:204
+msgid "root message"
+msgstr ""
+
+#: .\models.py:205
+msgid "sent at"
+msgstr ""
+
+#: .\models.py:206
+msgid "read at"
+msgstr ""
+
+#: .\models.py:207
+msgid "replied at"
+msgstr ""
+
+#: .\models.py:208
+msgid "archived by sender"
+msgstr ""
+
+#: .\models.py:209
+msgid "archived by recipient"
+msgstr ""
+
+#: .\models.py:210
+msgid "deleted by sender at"
+msgstr ""
+
+#: .\models.py:211
+msgid "deleted by recipient at"
+msgstr ""
+
+#: .\models.py:213
+msgid "status"
+msgstr ""
+
+#: .\models.py:215
+msgid "moderator"
+msgstr ""
+
+#: .\models.py:216
+msgid "moderated at"
+msgstr ""
+
+#: .\models.py:217
+msgid "rejection reason"
+msgstr ""
+
+#: .\models.py:222
+msgid "message"
+msgstr ""
+
+#: .\models.py:223
+msgid "messages"
+msgstr ""
+
+#: .\models.py:334
+msgid "Undefined sender."
+msgstr ""
+
+#: .\models.py:478
+msgid "pending message"
+msgstr ""
+
+#: .\models.py:479
+msgid "pending messages"
+msgstr ""
+
+#: .\utils.py:32
+msgid "> "
+msgstr ""
+
+#: .\utils.py:48
+msgid ""
+"\n"
+"\n"
+"{sender} wrote:\n"
+"{body}\n"
+msgstr ""
+
+#: .\utils.py:57
+msgid "Re: {subject}"
+msgstr ""
+
+#: .\views.py:129 .\views.py:187
+msgid "Message successfully sent."
+msgstr ""
+
+#: .\views.py:131 .\views.py:189
+msgid "Message rejected for at least one recipient."
+msgstr ""
+
+#: .\views.py:277
+msgid "Select at least one object."
+msgstr ""
+
+#: .\views.py:283
+msgid "Message(s) or thread(s) successfully archived."
+msgstr ""
+
+#: .\views.py:288
+msgid "Message(s) or thread(s) successfully deleted."
+msgstr ""
+
+#: .\views.py:293
+msgid "Message(s) or thread(s) successfully recovered."
+msgstr ""
+
+#: .\management\__init__.py:14
+msgid "Message Rejected"
+msgstr ""
+
+#: .\management\__init__.py:14
+msgid "Your message has been rejected"
+msgstr ""
+
+#: .\management\__init__.py:15
+msgid "Message Received"
+msgstr ""
+
+#: .\management\__init__.py:15
+msgid "You have received a message"
+msgstr ""
+
+#: .\management\__init__.py:16
+msgid "Reply Received"
+msgstr ""
+
+#: .\management\__init__.py:16
+msgid "You have received a reply"
+msgstr ""
+
+#: .\templates\admin\postman\pendingmessage\change_form.html.py:17
+msgid "Please correct the error below."
+msgid_plural "Please correct the errors below."
+msgstr[0] ""
+msgstr[1] ""
+
+#: .\templates\admin\postman\pendingmessage\submit_line.html.py:6
+msgid "Accept"
+msgstr ""
+
+#: .\templates\admin\postman\pendingmessage\submit_line.html.py:7
+msgid "Reject"
+msgstr ""
+
+#: .\templates\postman\archives.html.py:3
+msgid "Archived Messages"
+msgstr ""
+
+#: .\templates\postman\archives.html.py:7
+msgid ""
+"Messages in this folder will never be removed. You can use this folder for "
+"long term storage."
+msgstr ""
+
+#: .\templates\postman\base.html.py:3
+msgid "Messaging"
+msgstr ""
+
+#: .\templates\postman\base.html.py:6
+msgid "Inbox"
+msgstr ""
+
+#: .\templates\postman\base.html.py:7 .\templates\postman\sent.html.py:3
+msgid "Sent Messages"
+msgstr ""
+
+#: .\templates\postman\base.html.py:8 .\templates\postman\write.html.py:3
+msgid "Write"
+msgstr ""
+
+#: .\templates\postman\base.html.py:9
+msgid "Archives"
+msgstr ""
+
+#: .\templates\postman\base.html.py:10
+msgid "Trash"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:9
+msgid "Sorry, this page number is invalid."
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:12
+msgid "by thread"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:13
+msgid "by message"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:17
+#: .\templates\postman\view.html.py:22
+msgid "Delete"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:18
+#: .\templates\postman\view.html.py:23
+msgid "Archive"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:19
+msgid "Undelete"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:24
+msgid "Action"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:25
+msgid "Sender"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:27
+msgid "Subject"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:28
+msgid "Date"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:43
+msgid "g:i A,M j,n/j/y"
+msgstr ""
+
+#: .\templates\postman\base_folder.html.py:51
+msgid "No messages."
+msgstr ""
+
+#: .\templates\postman\base_write.html.py:20
+msgid "Send"
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:1
+msgid "Dear user,"
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:3
+#: .\templates\postman\email_visitor.txt.py:3
+#, python-format
+msgid "On %(date)s, you asked to send a message to the user '%(recipient)s'."
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:5
+#: .\templates\postman\email_visitor.txt.py:5
+msgid "Your message has been rejected by the moderator"
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:5
+#: .\templates\postman\email_visitor.txt.py:5
+msgid ", for the following reason:"
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:9
+#: .\templates\postman\email_visitor.txt.py:10
+#, python-format
+msgid "On %(date)s, you sent a message to the user '%(sender)s'."
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:10
+msgid "Your correspondent has given you an answer."
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:11
+#, python-format
+msgid "You have received a copy of a response from the user '%(sender)s'."
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:13
+#, python-format
+msgid "You have received a message from the user '%(sender)s'."
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:16
+#: .\templates\postman\email_visitor.txt.py:14
+msgid "Thank you again for your interest in our services."
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:17
+#: .\templates\postman\email_visitor.txt.py:16
+msgid "The site administrator"
+msgstr ""
+
+#: .\templates\postman\email_user.txt.py:19
+#: .\templates\postman\email_visitor.txt.py:18
+msgid ""
+"Note: This message is issued by an automated system.\n"
+"Do not reply, this would not be taken into account."
+msgstr ""
+
+#: .\templates\postman\email_user_subject.txt.py:1
+#: .\templates\postman\email_visitor_subject.txt.py:1
+#, python-format
+msgid "Message \"%(subject)s\" on the site %(sitename)s"
+msgstr ""
+
+#: .\templates\postman\email_visitor.txt.py:1
+msgid "Dear visitor,"
+msgstr ""
+
+#: .\templates\postman\email_visitor.txt.py:8
+msgid "As a reminder, please find below the content of your message."
+msgstr ""
+
+#: .\templates\postman\email_visitor.txt.py:11
+msgid "Please find below the answer from your correspondent."
+msgstr ""
+
+#: .\templates\postman\email_visitor.txt.py:15
+msgid "For more comfort, we encourage you to open an account on the site."
+msgstr ""
+
+#: .\templates\postman\inbox.html.py:3
+msgid "Received Messages"
+msgstr ""
+
+#: .\templates\postman\inbox.html.py:6
+msgid "Received"
+msgstr ""
+
+#: .\templates\postman\reply.html.py:3 .\templates\postman\view.html.py:25
+#: .\templates\postman\view.html.py:28 .\templates\postman\view.html.py:31
+msgid "Reply"
+msgstr ""
+
+#: .\templates\postman\sent.html.py:6
+msgid "Sent"
+msgstr ""
+
+#: .\templates\postman\trash.html.py:3
+msgid "Deleted Messages"
+msgstr ""
+
+#: .\templates\postman\trash.html.py:10
+msgid ""
+"Messages in this folder can be removed from time to time. For long term "
+"storage, use instead the archive folder."
+msgstr ""
+
+#: .\templates\postman\view.html.py:5
+msgid "Thread"
+msgstr ""
+
+#: .\templates\postman\view.html.py:13
+msgid ":"
+msgstr ""
+
+#: .\templates\postman\view.html.py:20
+msgid "Back"
+msgstr ""
+
+#: .\templatetags\postman_tags.py:34
+msgid "<me>"
+msgstr ""
diff --git a/postman/locale/fr/LC_MESSAGES/django.mo b/postman/locale/fr/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..7506dda
Binary files /dev/null and b/postman/locale/fr/LC_MESSAGES/django.mo differ
diff --git a/postman/locale/fr/LC_MESSAGES/django.po b/postman/locale/fr/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..6f5d51a
--- /dev/null
@@ -0,0 +1,545 @@
+# django-postman French translation.
+# Copyright (C) 2010 Patrick Samson
+# This file is distributed under the same license as the django-postman package.
+# Patrick Samson <maxcom@laposte.net>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: django-postman 1.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-12-22 22:57+0100\n"
+"PO-Revision-Date: 2010-12-15 17:19+0100\n"
+"Last-Translator: Patrick Samson <maxcom@laposte.net>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n>1;\n"
+
+#: .\admin.py:22
+msgid "Sender and Recipient cannot be both undefined."
+msgstr ""
+"Expéditeur et Destinataire ne peuvent pas être indéfinis tous les deux."
+
+#: .\admin.py:29
+msgid "Visitor's email is in excess."
+msgstr "Le courriel du visiteur est en trop."
+
+#: .\admin.py:34
+msgid "Visitor's email is missing."
+msgstr "Le courriel du visiteur est manquant."
+
+#: .\admin.py:40
+msgid "Reading date must be later to sending date."
+msgstr "La date de lecture doit être postérieure à la date d'envoi."
+
+#: .\admin.py:45
+msgid "Deletion date by sender must be later to sending date."
+msgstr ""
+"La date de suppression par l'expéditeur doit être postérieure à la date "
+"d'envoi."
+
+#: .\admin.py:50
+msgid "Deletion date by recipient must be later to sending date."
+msgstr ""
+"La date de suppression par le destinataire doit être postérieure à la date "
+"d'envoi."
+
+#: .\admin.py:58
+msgid "Response date must be later to sending date."
+msgstr "La date de réponse doit être postérieure à la date d'envoi."
+
+#: .\admin.py:60
+msgid "The message cannot be replied without having been read."
+msgstr "Le message ne peut pas être répondu sans avoir été lu."
+
+#: .\admin.py:62
+msgid "Response date must be later to reading date."
+msgstr "La date de réponse doit être postérieure à la date de lecture."
+
+#: .\admin.py:64
+msgid "Response date cannot be set without at least one reply."
+msgstr ""
+"La date de réponse ne peut pas être positionnée sans au moins une réponse."
+
+#: .\admin.py:66
+msgid "The message cannot be replied without being in a thread."
+msgstr "Le message ne peut pas être répondu sans être dans une conversation."
+
+#: .\admin.py:88 .\admin.py:157 .\templates\postman\view.html.py:5
+msgid "Message"
+msgstr "Message"
+
+#: .\admin.py:93
+msgid "Dates"
+msgstr "Dates"
+
+#: .\admin.py:98 .\admin.py:161
+msgid "Moderation"
+msgstr "Modération"
+
+#: .\fields.py:22
+msgid "Some usernames are unknown or no more active: {users}."
+msgstr "Des noms d'utilisateur sont inconnus ou ne sont plus actifs : {users}."
+
+#: .\fields.py:23
+msgid ""
+"Ensure this value has at most {limit_value} distinct items (it has "
+"{show_value})."
+msgstr ""
+"Assurez-vous que cette valeur a au plus {limit_value} éléments distincts "
+"(elle en a {show_value})."
+
+#: .\fields.py:24
+msgid ""
+"Ensure this value has at least {limit_value} distinct items (it has "
+"{show_value})."
+msgstr ""
+"Assurez-vous que cette valeur a au moins {limit_value} éléments distincts "
+"(elle en a {show_value})."
+
+#: .\fields.py:25
+msgid "Some usernames are rejected: {users}."
+msgstr "Des noms d'utilisateur sont rejetés : {users}."
+
+#: .\fields.py:26 .\forms.py:65
+msgid "{user.username}"
+msgstr ""
+
+#: .\fields.py:27 .\forms.py:66
+msgid "{user.username} ({reason})"
+msgstr ""
+
+#: .\forms.py:64
+msgid "Writing to some users is not possible: {users}."
+msgstr "Écrire à certains utilisateurs n'est pas possible : {users}."
+
+#: .\forms.py:149 .\forms.py:161
+msgid "Recipients"
+msgstr "Destinataires"
+
+#: .\forms.py:149 .\forms.py:161 .\templates\postman\base_folder.html.py:26
+#: .\templates\postman\reply.html.py:4
+msgid "Recipient"
+msgstr "Destinataire"
+
+#: .\forms.py:160
+msgid "Email"
+msgstr "Courriel"
+
+#: .\forms.py:176
+msgid "Undefined recipient."
+msgstr "Destinataire indéfini."
+
+#: .\forms.py:195
+msgid "Additional recipients"
+msgstr "Destinataires supplémentaires"
+
+#: .\forms.py:195
+msgid "Additional recipient"
+msgstr "Destinataire supplémentaire"
+
+#: .\models.py:19
+msgid "Pending"
+msgstr "En attente"
+
+#: .\models.py:20
+msgid "Accepted"
+msgstr "Accepté"
+
+#: .\models.py:21 .\templates\postman\view.html.py:13
+msgid "Rejected"
+msgstr "Rejeté"
+
+#: .\models.py:200
+msgid "subject"
+msgstr "objet"
+
+#: .\models.py:201
+msgid "body"
+msgstr "contenu"
+
+#: .\models.py:202 .\models.py:285
+msgid "sender"
+msgstr "expéditeur"
+
+#: .\models.py:203 .\models.py:309
+msgid "recipient"
+msgstr "destinataire"
+
+#: .\models.py:205
+msgid "visitor"
+msgstr "visiteur"
+
+#: .\models.py:206
+msgid "parent message"
+msgstr "message parent"
+
+#: .\models.py:207
+msgid "root message"
+msgstr "message racine"
+
+#: .\models.py:208
+msgid "sent at"
+msgstr "envoyé le"
+
+#: .\models.py:209
+msgid "read at"
+msgstr "lu le"
+
+#: .\models.py:210
+msgid "replied at"
+msgstr "répondu le"
+
+#: .\models.py:211
+msgid "archived by sender"
+msgstr "archivé par l'expéditeur"
+
+#: .\models.py:212
+msgid "archived by recipient"
+msgstr "archivé par le destinataire"
+
+#: .\models.py:213
+msgid "deleted by sender at"
+msgstr "supprimé par l'expéditeur le"
+
+#: .\models.py:214
+msgid "deleted by recipient at"
+msgstr "supprimé par le destinataire le"
+
+#: .\models.py:216
+msgid "status"
+msgstr "état"
+
+#: .\models.py:218
+msgid "moderator"
+msgstr "modérateur"
+
+#: .\models.py:219
+msgid "moderated at"
+msgstr "modéré le"
+
+#: .\models.py:220
+msgid "rejection reason"
+msgstr "motif de rejet"
+
+#: .\models.py:225
+msgid "message"
+msgstr "message"
+
+#: .\models.py:226
+msgid "messages"
+msgstr "messages"
+
+#: .\models.py:337
+msgid "Undefined sender."
+msgstr "Expéditeur indéfini."
+
+#: .\models.py:481
+msgid "pending message"
+msgstr "message en attente"
+
+#: .\models.py:482
+msgid "pending messages"
+msgstr "messages en attente"
+
+#: .\utils.py:32
+msgid "> "
+msgstr ""
+
+#: .\utils.py:48
+msgid ""
+"\n"
+"\n"
+"{sender} wrote:\n"
+"{body}\n"
+msgstr ""
+"\n"
+"\n"
+"{sender} a écrit :\n"
+"{body}\n"
+
+#: .\utils.py:57
+msgid "Re: {subject}"
+msgstr ""
+
+#: .\views.py:121 .\views.py:187
+msgid "Message successfully sent."
+msgstr "Message envoyé avec succès."
+
+#: .\views.py:123 .\views.py:189
+msgid "Message rejected for at least one recipient."
+msgstr "Message rejeté pour au moins un destinataire."
+
+#: .\views.py:272
+msgid "Select at least one object."
+msgstr "Sélectionner au moins un objet."
+
+#: .\views.py:278
+msgid "Message(s) or thread(s) successfully archived."
+msgstr "Message(s) ou conversation(s) archivé(s) avec succès."
+
+#: .\views.py:283
+msgid "Message(s) or thread(s) successfully deleted."
+msgstr "Message(s) ou conversation(s) supprimé(s) avec succès."
+
+#: .\views.py:288
+msgid "Message(s) or thread(s) successfully recovered."
+msgstr "Message(s) ou conversation(s) restauré(s) avec succès."
+
+#: .\management\__init__.py:14
+msgid "Message Rejected"
+msgstr "Message Rejeté"
+
+#: .\management\__init__.py:14
+msgid "Your message has been rejected"
+msgstr "Votre message a été rejeté"
+
+#: .\management\__init__.py:15
+msgid "Message Received"
+msgstr "Message Reçu"
+
+#: .\management\__init__.py:15
+msgid "You have received a message"
+msgstr "Vous avez reçu un message"
+
+#: .\management\__init__.py:16
+msgid "Reply Received"
+msgstr "Réponse Reçue"
+
+#: .\management\__init__.py:16
+msgid "You have received a reply"
+msgstr "Vous avez reçu une réponse"
+
+#: .\templates\admin\postman\pendingmessage\change_form.html.py:17
+msgid "Please correct the error below."
+msgid_plural "Please correct the errors below."
+msgstr[0] ""
+msgstr[1] ""
+
+#: .\templates\admin\postman\pendingmessage\submit_line.html.py:6
+msgid "Accept"
+msgstr "Accepter"
+
+#: .\templates\admin\postman\pendingmessage\submit_line.html.py:7
+msgid "Reject"
+msgstr "Rejeter"
+
+#: .\templates\postman\archives.html.py:3
+msgid "Archived Messages"
+msgstr "Messages archivés"
+
+#: .\templates\postman\archives.html.py:7
+msgid ""
+"Messages in this folder will never be removed. You can use this folder for "
+"long term storage."
+msgstr ""
+"Les messages dans ce dossier ne seront jamais supprimés. Vous pouvez "
+"utiliser ce dossier pour un stockage à long terme."
+
+#: .\templates\postman\base.html.py:3
+msgid "Messaging"
+msgstr "Messagerie"
+
+#: .\templates\postman\base.html.py:6
+msgid "Inbox"
+msgstr "Boîte de réception"
+
+#: .\templates\postman\base.html.py:7 .\templates\postman\sent.html.py:3
+msgid "Sent Messages"
+msgstr "Messages envoyés"
+
+#: .\templates\postman\base.html.py:8 .\templates\postman\write.html.py:3
+msgid "Write"
+msgstr "Écrire"
+
+#: .\templates\postman\base.html.py:9
+msgid "Archives"
+msgstr "Archives"
+
+#: .\templates\postman\base.html.py:10
+msgid "Trash"
+msgstr "Corbeille"
+
+#: .\templates\postman\base_folder.html.py:9
+msgid "Sorry, this page number is invalid."
+msgstr "Désolé, ce numéro de page est invalide."
+
+#: .\templates\postman\base_folder.html.py:12
+msgid "by thread"
+msgstr "par conversation"
+
+#: .\templates\postman\base_folder.html.py:13
+msgid "by message"
+msgstr "par message"
+
+#: .\templates\postman\base_folder.html.py:17
+#: .\templates\postman\view.html.py:22
+msgid "Delete"
+msgstr "Supprimer"
+
+#: .\templates\postman\base_folder.html.py:18
+#: .\templates\postman\view.html.py:23
+msgid "Archive"
+msgstr "Archiver"
+
+#: .\templates\postman\base_folder.html.py:19
+msgid "Undelete"
+msgstr "Restaurer"
+
+#: .\templates\postman\base_folder.html.py:24
+msgid "Action"
+msgstr "Action"
+
+#: .\templates\postman\base_folder.html.py:25
+msgid "Sender"
+msgstr "Expéditeur"
+
+#: .\templates\postman\base_folder.html.py:27
+msgid "Subject"
+msgstr "Objet"
+
+#: .\templates\postman\base_folder.html.py:28
+msgid "Date"
+msgstr "Date"
+
+#: .\templates\postman\base_folder.html.py:43
+msgid "g:i A,M j,n/j/y"
+msgstr "G:i,j b,j/n/y"
+
+#: .\templates\postman\base_folder.html.py:51
+msgid "No messages."
+msgstr "Pas de message."
+
+#: .\templates\postman\base_write.html.py:20
+msgid "Send"
+msgstr "Envoyer"
+
+#: .\templates\postman\email_user.txt.py:1
+msgid "Dear user,"
+msgstr "Cher utilisateur,"
+
+#: .\templates\postman\email_user.txt.py:3
+#: .\templates\postman\email_visitor.txt.py:3
+#, python-format
+msgid "On %(date)s, you asked to send a message to the user '%(recipient)s'."
+msgstr ""
+"Le %(date)s, vous avez sollicité l'envoi d'un message à l'utilisateur '%"
+"(recipient)s'."
+
+#: .\templates\postman\email_user.txt.py:5
+#: .\templates\postman\email_visitor.txt.py:5
+msgid "Your message has been rejected by the moderator"
+msgstr "Votre message a été rejeté par le modérateur"
+
+#: .\templates\postman\email_user.txt.py:5
+#: .\templates\postman\email_visitor.txt.py:5
+msgid ", for the following reason:"
+msgstr ", pour le motif suivant :"
+
+#: .\templates\postman\email_user.txt.py:9
+#: .\templates\postman\email_visitor.txt.py:10
+#, python-format
+msgid "On %(date)s, you sent a message to the user '%(sender)s'."
+msgstr "Le %(date)s, vous avez envoyé un message à l'utilisateur '%(sender)s'."
+
+#: .\templates\postman\email_user.txt.py:10
+msgid "Your correspondent has given you an answer."
+msgstr "Votre correspondant vous a donné une réponse."
+
+#: .\templates\postman\email_user.txt.py:11
+#, python-format
+msgid "You have received a copy of a response from the user '%(sender)s'."
+msgstr "Vous avez reçu une copie d'une réponse de l'utilisateur '%(sender)s'."
+
+#: .\templates\postman\email_user.txt.py:13
+#, python-format
+msgid "You have received a message from the user '%(sender)s'."
+msgstr "Vous avez reçu un message de l'utilisateur '%(sender)s'."
+
+#: .\templates\postman\email_user.txt.py:16
+#: .\templates\postman\email_visitor.txt.py:14
+msgid "Thank you again for your interest in our services."
+msgstr "Merci encore pour l'intérêt que vous portez à nos services."
+
+#: .\templates\postman\email_user.txt.py:17
+#: .\templates\postman\email_visitor.txt.py:16
+msgid "The site administrator"
+msgstr "L'administrateur du site"
+
+#: .\templates\postman\email_user.txt.py:19
+#: .\templates\postman\email_visitor.txt.py:18
+msgid ""
+"Note: This message is issued by an automated system.\n"
+"Do not reply, this would not be taken into account."
+msgstr ""
+"NB: Ce message est émis par un automate. Ne faites\n"
+"pas de réponse, elle ne serait pas prise en compte."
+
+#: .\templates\postman\email_user_subject.txt.py:1
+#: .\templates\postman\email_visitor_subject.txt.py:1
+#, python-format
+msgid "Message \"%(subject)s\" on the site %(sitename)s"
+msgstr "Message \"%(subject)s\" sur le site %(sitename)s"
+
+#: .\templates\postman\email_visitor.txt.py:1
+msgid "Dear visitor,"
+msgstr "Cher visiteur,"
+
+#: .\templates\postman\email_visitor.txt.py:8
+msgid "As a reminder, please find below the content of your message."
+msgstr "Pour rappel, veuillez trouver ci-dessous le contenu de votre message."
+
+#: .\templates\postman\email_visitor.txt.py:11
+msgid "Please find below the answer from your correspondent."
+msgstr "Veuillez trouver ci-dessous la réponse de votre correspondant."
+
+#: .\templates\postman\email_visitor.txt.py:15
+msgid "For more comfort, we encourage you to open an account on the site."
+msgstr ""
+"Pour plus de confort, nous vous encourageons à ouvrir un compte sur le site."
+
+#: .\templates\postman\inbox.html.py:3
+msgid "Received Messages"
+msgstr "Messages reçus"
+
+#: .\templates\postman\inbox.html.py:6
+msgid "Received"
+msgstr "Reçu"
+
+#: .\templates\postman\reply.html.py:3 .\templates\postman\view.html.py:25
+#: .\templates\postman\view.html.py:28 .\templates\postman\view.html.py:31
+msgid "Reply"
+msgstr "Répondre"
+
+#: .\templates\postman\sent.html.py:6
+msgid "Sent"
+msgstr "Envoyé"
+
+#: .\templates\postman\trash.html.py:3
+msgid "Deleted Messages"
+msgstr "Messages effacés"
+
+#: .\templates\postman\trash.html.py:10
+msgid ""
+"Messages in this folder can be removed from time to time. For long term "
+"storage, use instead the archive folder."
+msgstr ""
+"Les messages dans ce dossier peuvent être retirés de temps en temps. Pour un "
+"stockage à long terme, utilisez plutôt le dossier d'archivage."
+
+#: .\templates\postman\view.html.py:5
+msgid "Thread"
+msgstr "Conversation"
+
+#: .\templates\postman\view.html.py:13
+msgid ":"
+msgstr " :"
+
+#: .\templates\postman\view.html.py:20
+msgid "Back"
+msgstr "Retour"
+
+#: .\templatetags\postman_tags.py:34
+msgid "<me>"
+msgstr "<moi>"