Hi, Here's my save method:
        def save(self):
                super(Entry, self).save()
                print "hello world from models"
                signals.send_pingback.send(sender=self.__class__, instance=self)
                signals.send_trackback.send(sender=self.__class__, 
instance=self)

I uncommented the debugging and have a "hello world" in both send.py
and handlers.py but they're never reached ....?



On Sep 24, 4:30 am, Arne <a...@rcs4u.de> wrote:
> Hi,
>
> the code, which sends the trackbacks is not very well debugged. Please
> make a small change in trackback/utils/handlers.py (Lines 28 & 42) and
> add "fail_silently=False" to the function calls (it's already there
> but commented out). This allows errors which occur while sending the
> trackbacks to another site to become visible.
>
> If you spot any errors, which you think are a fault of django-
> trackback, then please open an issue 
> athttp://code.google.com/p/django-trackback/issues/list
>
> - arne
>
> On Sep 24, 12:47 am, josebrwn <joseb...@gmail.com> wrote:
>
> > I'm wondering if anybody who's using trackback can answer a simple
> > question that has me stumped.  I added the signals code to my class'
> > save method, and it runs, it just doesn't seem to do anything.  I have
> > the code running on two sites and when I save entries that point at
> > one another, nothing ever ends up in either trackback table.
>
> > It is the first bit that has me confused.  Where would you put "the
> > following code" from the snip below .. in models?  urls?  From
> > INSTALL.txt ....
>
> > <snip>
>
> > If you have a model called BlogEntry, which holds your blog-entries,
> > you can
> > use the following code::
>
> >     from trackback import signals
> >     from trackback.utils import handlers
> >     from yourproject.yourapp.models import BlogEntry
>
> >     signals.send_pingback.connect(handlers.send_pingback,
> > sender=BlogEntry)
> >     signals.send_trackback.connect(handlers.send_trackback,
> > sender=BlogEntry)
>
> > To trigger sending of the signal change the save-method of the
> > BlogEntry model
> > to send the signal::
>
> >     class BlogEntry(models.Model):
> >         ...
> >         def save(self, *args, **kwargs):
> >             super(BlogEntry, self).save(*args, **kwargs)
> >             if self.published: # or some other condition
> >                 signals.send_pingback.send(sender=self.__class__,
> > instance=self)
> >                 signals.send_trackback.send(sender=self.__class__,
> > instance=self)
>
> > </snip>
--~--~---------~--~----~------------~-------~--~----~
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