I've investigated further and... it's very strange.

I've got a version of my custom comments framework, with
enable_comments moderation, working fine. Here are the contents of my
working customcomments/forms.py and customcomments/models.py:
http://dpaste.com/253382/

However, if I add "from weblog.models import Blog" to either of those
files, my custom moderation has no effect.

This is a problem, because what I really want to do is not add a
'title' field to each custom comment, but add a ForeignKey field that
links to the Blog object (comments are posted on Entries, each of
which is associated with a Blog). So I will need to import the Blog
class.

In case it helps, here's the contents of weblog/models.py that
contains the Blog class: http://dpaste.com/253384/

This modification really isn't worth the two days I've now spent
puzzling over it, but it's got personal, and I just want to understand
the solution now! Any help very much appreciated.


On Tue, Oct 5, 2010 at 11:27 AM, Phil Gyford <gyf...@gmail.com> wrote:
> Hi,
>
> I can't get my extended version of django.contrib.comments to take
> notice of moderation.
>
> If I use the standard comments framework, then my subclass of
> CommentModerator does the job - I've just used it to define
> enable_field, and this allows or prohibits comments as expected.
>
> But if I switch to using my custom version of the comments framework
> (which adds an extra field) it seems like the moderator is ignored -
> all comments are allowed through, no matter whether the enable_field
> on the commented-on object is true or false.
>
> I can't see what I'm missing. Here's the code for my moderator, in
> case it helps: http://dpaste.com/253308/ It works fine like that, with
> the standard framework, but if I switch the import lines over, add my
> custom comments app to INSTALLED_APPS and COMMENTS_APP settings, the
> enable_field has no effect.
>
> What's the magical missing step....? Thanks.
>
> Phil
>
> --
> http://www.gyford.com/
>



-- 
http://www.gyford.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to