Hey folks,
I have a PostgreSQL stored procedure that does some fairly complex
logic to query/filter a particular table (though it ultimately does
return rows straight from that table). I'm trying to call this stored
procedure from within Django, and execute additional filters/etc on the
procedure:
MyModel.do_my_stored_procedure('proc', args).filter(mymodelfk__foo=bar)
(or the like.) Anyone have any pointers on how to best do this? Is
there, by any chance, native support for this in Django 1.1 that I just
haven't found yet?
There's an existing implementation that worked decently with Django 1.0
(djangosnippets.org #272). However, it works by generating a normal
query through an ordinary QuerySet and doing string
matching/substitution to insert the function call. I'd like to do
something a bit cleaner, but I don't yet understand Django's internals
well enough to hack them this much... Any ideas?
Thanks,
Adam
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---