#12812: Inheriting from comments breaks comment moderation
----------------------------------------------+-----------------------------
Reporter: Beetle_B | Owner: nobody
Status: reopened | Milestone:
Component: django.contrib.comments | Version: 1.1
Resolution: | Keywords: comments
inheritance moderation
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
----------------------------------------------+-----------------------------
Changes (by bjourne):
* status: closed => reopened
* resolution: invalid =>
Comment:
Reopening because I stumbled upon the exact same problem. Basically, it is
almost like a race condition. When the django.contrib.comments.moderation
module is imported, the Moderator class is instantiated which causes the
connect() method to be called. The connect() method calls
comments.get_model() which returns an instance of
django.contrib.comments.models.Comment which causes the bug. It happens
before python has evaluated your __init__.py file which contains the
get_model() function definition. So the signal connection code has to be
somehow delayed until after Python has evaluated __init__.py.
--
Ticket URL: <http://code.djangoproject.com/ticket/12812#comment:5>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en.