Login

executesql

Author:
amitu
Posted:
March 20, 2009
Language:
Python
Version:
1.0
Score:
1 (after 1 ratings)

A helper function for quick and dirty sql calls.

1
2
3
4
def executesql(query,param):
    from django.db import connection
    cursor = connection.cursor()
    return cursor.execute(query,param)

More like this

  1. Django Settings Assignment Expressions aka Walrus Operator example by webology 3 weeks, 2 days ago
  2. codigo alto nivel by MrRocklion 2 months, 2 weeks ago
  3. Load template from specific app by Krzysiek555 3 months, 1 week ago
  4. PostgreSQL JSON subqueries by dolamroth 3 months, 1 week ago
  5. "Magic Link" Management Command by webology 8 months, 2 weeks ago

Comments

Please login first before commenting.