Created
October 11, 2011 01:59
-
-
Save harleyholt/1277081 to your computer and use it in GitHub Desktop.
Django Stored Procedure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import connections | |
arguments = ('one', 'two', 'three', '...') | |
cursor = connections['example-db'].cursor() | |
try: | |
cursor.callproc('proc_name', arguments) | |
results = cursor.fetchall() | |
finally: | |
cursor.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment