> I want to use some stored procedures. I am mySql. Is there > some way I can define stored procedures from withing django? > (We can call already defined procedures, > http://www.djangosnippets.org/snippets/118/ discusses how, but > can we also define stored procedures from within django?)
I don't believe Django holds your hand for creating SPs. Each DB engine tends to use its own languages for SPs which makes the process even harder. IIRC, PostgreSQL has support for SPs written in Python in addition to umpteen other languages. I haven't toyed with SPs in MySQL, and I don't know if sqlite even supports SPs (other than perhaps executing a bit of code on a trigger). You can always use cursor.execute() to create them, or you can use Django's facilities for executing SQL when you sqlcustom/sqlreset/sqlall/reset via manage.py as described at http://www.djangoproject.com/documentation/model-api/#database-backend-specific-sql-data and above. However, I don't think there's much more in the way of coddling facilities in Django. -tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---