Another option, if you are using PostgreSQL or other db that supports
VIEW's, is to store your queries as db VIEWs and then write Django
models that reference those views. Then you still get the yummy
goodness of using the django dbapi to access the "objects" returned by
your messy query/VIEW
One idea is to create a package that would contain files of your
queries.
Each file could just be have an assignment : QUERY = """ """
You could then import them, like : from queries import update_this
and access it by update_this.QUERY
Corey
On Aug 11, 2006, at 3:05 PM, Maciej Bliziński w
Hello Djangoers,
I've got to write a set of large SQL queries. I'd like to avoid putting
the whole pages of the SQL into the Python code. I'd like to store the
queries as separate files and load them when needed.
How to do in a Django way? Create something similar to template
directory? What wou
3 matches
Mail list logo