#9015: Signal Connection Decorators -------------------------------------+-------------------------------------- Reporter: zvoase | Owner: brosner Status: assigned | Milestone: Component: Core framework | Version: SVN Resolution: | Keywords: signals Stage: Accepted | Has_patch: 1 Needs_docs: 1 | Needs_tests: 1 Needs_better_patch: 0 | -------------------------------------+-------------------------------------- Comment (by gsakkis):
I use a slightly more general version of the one posted on 10/04/09 that allows multiple signals at once: {{{ def connect(*signals, **kwds): ... @connect(post_save, post_delete, sender=MyModel) def delete_stale_cache(sender, instance, **kwds): cache.delete('mymodel_%s' % instance.pk) }}} -- Ticket URL: <http://code.djangoproject.com/ticket/9015#comment:14> 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 django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.