Hello,
I've recently been porting many projects to 1.0, but have hit a snag
with the current one.  I'm looking at an old project that uses nesh's
django utils (mainly just the thumbnail image field model), and have
been slowly porting the project (and by extension nesh's code) to
1.0.  Now i have read the documentation on signals, as well as the
porting to 1.0 guide's signals section, but because i have not really
used signals in my projects, i'm a little unsure what exactly is being
called for by this error, and thought someone here may be of some
help.

The original code looked like:

    def contribute_to_class(self, cls, name):
        super(ImageWithThumbnailField, self).contribute_to_class(cls,
name)
        dispatcher.connect(_delete, signals.post_delete, sender=cls)
        dispatcher.connect(self._save, signals.pre_save, sender=cls)

My poor attempt at porting:

      def contribute_to_class(self, cls, name):
        super(ImageWithThumbnailField, self).contribute_to_class(cls,
name)
        signals.post_delete.connect(_delete, sender=cls)
        signals.pre_save.connect(self._save, sender=cls)

and the resultant error:

line 45, in contribute_to_class
    signals.post_delete.connect(_delete, sender=cls)
  File "/usr/lib/python2.4/site-packages/django/dispatch/
dispatcher.py", line 84, in connect
    assert argspec[2] is not None, \
AssertionError: Signal receivers must accept keyword arguments
(**kwargs).


now my understanding of the syntax is that _delete and self._save
would be keyword arguments, but apparently i am incorrect.  Any help
or suggestions would be greatly appreciated.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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