Package django :: Package contrib :: Package comments :: Package views :: Module comments
[hide private]
[frames] | no frames]

Module comments

source code

Classes [hide private]
  PublicCommentManipulator
Manipulator that handles public registered comments
  PublicFreeCommentManipulator
Manipulator that handles public free (unregistered) comments
Functions [hide private]
 
post_comment(request, extra_context=None, context_processors=None)
Post a comment
source code
 
post_free_comment(request, extra_context=None, context_processors=None)
Post a free comment (not requiring a log in)
source code
 
comment_was_posted(request, extra_context=None, context_processors=None)
Display "comment was posted" success page
source code
Variables [hide private]
  COMMENTS_PER_PAGE = 20

Imports: validators, oldforms, mail_admins, mail_managers, Http404, ObjectDoesNotExist, render_to_response, RequestContext, Comment, FreeComment, RATINGS_REQUIRED, RATINGS_OPTIONAL, IS_PUBLIC, ContentType, AuthenticationForm, HttpResponseRedirect, normalize_newlines, settings, ungettext, _, smart_unicode, base64, datetime


Function Details [hide private]

post_comment(request, extra_context=None, context_processors=None)

source code 

Post a comment

Redirects to the `comments.comments.comment_was_posted` view upon success.

Templates: `comment_preview`
Context:
    comment
        the comment being posted
    comment_form
        the comment form
    options
        comment options
    target
        comment target
    hash
        security hash (must be included in a posted form to succesfully
        post a comment).
    rating_options
        comment ratings options
    ratings_optional
        are ratings optional?
    ratings_required
        are ratings required?
    rating_range
        range of ratings
    rating_choices
        choice of ratings

post_free_comment(request, extra_context=None, context_processors=None)

source code 

Post a free comment (not requiring a log in)

Redirects to `comments.comments.comment_was_posted` view on success.

Templates: `comment_free_preview`
Context:
    comment
        comment being posted
    comment_form
        comment form object
    options
        comment options
    target
        comment target
    hash
        security hash (must be included in a posted form to succesfully
        post a comment).

comment_was_posted(request, extra_context=None, context_processors=None)

source code 

Display "comment was posted" success page

Templates: `comment_posted`
Context:
    object
        The object the comment was posted on