On 12/15/06, Milan Andric <[EMAIL PROTECTED]> wrote:
> But this does not allow me to specify whether or not comments require
> registration/login.  The only other way to do it is by defining each
> view in a urls.py and wrapping each view with @login_required or
> similar.  This breaks the encapsulation of the comments app.  Is there
> any other way?  Would it be helpful to file a ticket for this?

django.contrib.comments actually contains two comment systems for just
this purpose: the FreeComment model, as you've noted, doesn't require
an authenticated user, so it's good for allowing open comments on an
object. The other -- django.contrib.comments.models.Comment --
requires a valid user to post, and the built-in forms for it will add
username/password fields so non-logged-in users can authenticate while
posting.

The forms mostly work the same, and you're already including the full
URLConf for the comments app, so you should be able to just change
your templates to pull in the registered comments forms and it'll work
(e.g, instead of using the free_comment_form tag, use the comment_form
tag).

-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to