/usr/share/pyshared/django_threadedcomments-0.9.0.egg-info/PKG-INFO is in python-django-threadedcomments 0.9.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | Metadata-Version: 1.1
Name: django-threadedcomments
Version: 0.9.0
Summary: A simple yet flexible threaded commenting system.
Home-page: https://github.com/HonzaKral/django-threadedcomments
Author: Diederik van der Boor
Author-email: vdboor@edoburu.nl
License: BSD
Download-URL: https://github.com/HonzaKral/django-threadedcomments/zipball/master
Description: django-threadedcomments
=======================
*threadedcomments* is a Django application which allows for the simple creation of a threaded commenting system.
Commenters can reply both to the original item, and reply to other comments as well.
The application is (as of 0.9) built on top of django.contrib.comments,
which allows it to be easily extended by other modules.
Installation
============
Install the package via pip::
pip install django-threadedcomments
It's preferred to install the module in a virtual environment.
Configuration
-------------
Add the following to ``settings.py``::
INSTALLED_APPS += (
'threadedcomments',
'django.contrib.comments',
)
COMMENTS_APP = 'threadedcomments'
By placing the ``threadedcomments`` app above the ``django.contrib.comments`` application,
the placeholder ``comments/list.html`` template will already be replaced by a threaded view.
Make sure django.contrib.comments_ is configured in ``urls.py``::
urlpatterns += patterns('',
url(r'^articles/comments/', include('django.contrib.comments.urls')),
)
Provide a template that displays the comments for the ``object`` (e.g. article or blog entry)::
{% load threadedcomments_tags %}
...
<h2>Comments for {{ object.title }}:</h2>
{% render_comment_list for object %}
{% render_comment_form for object %}
Template design
---------------
Naturally, it's desirable to write your own version of ``comments/list.html`` in your project,
or use one of the ``comments/app/list.html`` or ``comments/app/model/list.html`` overrides.
Make sure to override ``comments/base.html`` as well, so the other views of django.contrib.comments_
are displayed using your web site design. The other templates of django.contrib.comments_ are
very plain as well on purpose (for example ``comments/posted.html``),
since these pages depend on the custom design of the web site.
See the provided ``example`` app for a basic configuration,
including a JavaScript-based reply form that moves to the comment the visitor replies to.
Template tags
=============
The ``threadedcomments_tags`` library is a drop-in replacement for the ``comments`` library
that is required for the plain comments. The tags are forwards compatible;
they support the same syntax as django.contrib.comments_ provides,
and they add a few extra parameters.
Fething comment counts::
{% get_comment_count for [object] as [varname] %}
{% get_comment_count for [object] as [varname] root_only %}
{% get_comment_count for [app].[model] [id] as [varname] %}
{% get_comment_count for [app].[model] [id] as [varname] root_only %}
Fetching the comments list::
{% get_comment_list for [object] as [varname] %}
{% get_comment_list for [object] as [varname] flat %}
{% get_comment_list for [object] as [varname] root_only %}
Rendering the comments list::
{% render_comment_list for [object] %}
{% render_comment_list for [object] root_only %}
{% render_comment_list for [app].[model] [id] %}
{% render_comment_list for [app].[model] [id] root_only %}
Fetching the comment form::
{% get_comment_form for [object] as [varname] %}
{% get_comment_form for [object] as [varname] with [parent_id] %}
{% get_comment_form for [app].[model] [id] as [varname] %}
{% get_comment_form for [app].[model] [id] as [varname] with [parent_id] %}
Rendering the comment form::
{% render_comment_form for [object] %}
{% render_comment_form for [object] with [parent_id] %}
{% render_comment_form for [app].[model] [id] %}
{% render_comment_form for [app].[model] [id] with [parent_id] %}
Rendering the whole tree::
{% for comment in comment_list|fill_tree|annotate_tree %}
{% ifchanged comment.parent_id %}{% else %}</li>{% endifchanged %}
{% if not comment.open and not comment.close %}</li>{% endif %}
{% if comment.open %}<ul>{% endif %}
<li id="c{{ comment.id }}">
...
{% for close in comment.close %}</li></ul>{% endfor %}
{% endfor %}
The ``fill_tree`` filter is required for pagination, it ensures that the parents of the first comment are included as well.
The ``annotate_tree`` filter adds the ``open`` and ``close`` properties to the comment.
Extending the module
====================
The application is built on top of the standard django.contrib.comments_ framework,
which supports various signals, and template overrides to customize the comments.
To customize django-threadedcomments, override the proper templates, or include the apps that provide the missing features.
Front-end editing support for example, is left out on purpose. It belongs to the domain of moderation, and policies
to know "who can do what". That deserves to be in a separate application, it shouldn't be in this application as it focuses on threading.
The same applies to social media logins, comment subscriptions, spam protection and Ajax posting.
Note that the standard framework also supports moderation, flagging, and RSS feeds too. More documentation can be found at:
* `Django's comments framework <https://docs.djangoproject.com/en/dev/ref/contrib/comments/>`_
* `Customizing the comments framework <http://docs.djangoproject.com/en/dev/ref/contrib/comments/custom/>`_
* `Example of using the in-built comments app <http://docs.djangoproject.com/en/dev/ref/contrib/comments/example/>`_
Some of the modules worth looking at are:
* django-comments-spamfighter_
* django-myrecaptcha_
* django-fluent-comments_
These modules can enhance the comments system even further.
.. _django.contrib.comments: https://docs.djangoproject.com/en/dev/ref/contrib/comments/
.. _django-fluent-comments: https://github.com/edoburu/django-fluent-comments/
.. _django-myrecaptcha: https://bitbucket.org/pelletier/django-myrecaptcha/
.. _django-comments-spamfighter: https://github.com/bartTC/django-comments-spamfighter/
Keywords: django,comments,threading
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|