On Wed, 2006-05-10 at 06:20 -0700, mazurin wrote: > > Hi, > > I'm trying to implement a complicated sequence of updates inside a > form-handling view, and I realized that it might be best to do it > inside a Postgresql function. In fact, I've already found sample code > for a postgres function that's almost exactly what I need. > > My question is, how do I add the CREATE FUNCTION statement to > Django's db-creating process? For initial data, I know that I just make > a bunch of .sql files that have the same name as the models, and put > them inside the sql/ directory. Is there something similar I can do for > functions?
All of the initial data is inserted after all the tables have been created. So you can put your stored procedure creation code in the initial SQL data file for (any) one of your models. There is no generic initial data file that is read, so this would seem to be the simplest solution. 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 -~----------~----~----~----~------~----~------~--~---

