On Wed, 2007-02-14 at 11:26 +0100, Bram - Smartelectronix wrote: > Malcolm Tredinnick wrote: > > At the moment, the only workaround is to call out to your own shell > > script (or other) to do the insert. If you have a look around line 506 > > of django/core/management.py, you can see where Django emits a > > "post-syncdb" signal after setting up the database, so you can register > > a handler for that before calling the setup routines and then do your > > own stuff afterwards (include an os.system() or equivalent call). See > > [1] for an example of how to use this signal -- although that link isn't > > responding for me right now; hopefully it's just being temperamental. > > > > [1] > > http://www.bright-green.com/blog/2006_07_12/initialising_application_data_.html > > That's a great pointer. Perhaps this could just be described in the > django docs... I'm guessing there are plenty more signals that could be > used to do all kinds of useful things.
Documenting the signal dispatching stuff is one of the things on the list to do before the 1.0 release. In the interim, Mercurytide, the guys who announced their Django cheatsheet on this list yesterday, did a nice whitepaper on the available signals last year: http://www.mercurytide.com/whitepapers/django-signals/ Partway down that page, they list all the builtin signals. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en -~----------~----~----~----~------~----~------~--~---

