On 5/23/06, Eric Walstad <[EMAIL PROTECTED]> wrote:
> Otherwise,
> have a look at the docs for executing arbitrary sql statements using Django's
> cursor object.  I don't know of a Django orm method that does exactly what
> you want.
>
> <http://www.djangoproject.com/documentation/model_api/#executing-custom-sql>

And if you don't want to hard-code stuff as in your example, you might
have a look at the code in django.core.management's
_get_sql_model_create function, which uses models and fields to
generate create statements and serves as a map to the internals of
models.

(I dunno how much you should depend on those internals not changing, of course.)

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to