#9015: Signal Connection Decorators
---------------------------------------------+------------------------------
Reporter: zvoase | Owner: brosner
Status: reopened | Milestone:
Component: Core framework | Version: SVN
Resolution: | Keywords: signals
Stage: Design decision needed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 1 |
---------------------------------------------+------------------------------
Comment (by jezdez):
Replying to [comment:19 anonymous]:
> Function decorators usually named in the form of a verb - cache_page,
require_POST, etc. - so why is this decorator named '''receiver''' instead
of '''connect''' or '''receive_signal'''?
I have to say, that's a valid point, e.g. this looks nicer to me, too:
{{{
@receive_signal(post_login)
def update_last_seen(sender, user, **kwargs):
user.last_seen = datetime.now()
user.save()
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/9015#comment:20>
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.