jayjay
jayjay

Reputation: 1047

Django: Bypassing the database abstraction

I have been playing arround with django for a couple of days and it seems great, but I find it a pain if I want to change the structure of my database, I then am stuck with a few rather awkward options.

Is there a way to completely bypass djangos database abstraction so if I change the structure of the database I dont have to guess what model would have generated it or use a tool (south or ...) to change things?

I essentially want this: https://docs.djangoproject.com/en/dev/topics/db/sql/ (Raw SQL Queries) but instead of refering to a model, refering to an external database.

Could I just create an empty model and then only perform raw queries on it? (and set up the DB externally)

Thanks

P.S. I dont really mind if I have separate databases for the admin stuff and the app data

Upvotes: 0

Views: 763

Answers (1)

J0HN
J0HN

Reputation: 26921

It's in your question already, just read the docs article from here: Executing custom SQL directly

Upvotes: 1

Related Questions