creating events in my classes, and allowing others to hook into them in my django app
Posted
by Blankman
on Stack Overflow
See other posts from Stack Overflow
or by Blankman
Published on 2010-06-17T17:13:41Z
Indexed on
2010/06/17
17:43 UTC
Read the original article
Hit count: 153
I want to create events for my classes.
Say I create a CMS application that has a Article
object.
I create events like:
OnEdit
OnCreate
OnDelete
PreCreate
PreDelete
Now I want someone to be able to hook into these events, and add their custom functionality at each event they wish.
I don't want them touching the core source code, so they would have to wire these custom methods to fire somewhere else.
I'm new to both python and django so please be as detailed as possible if you can.
© Stack Overflow or respective owner