Skip to content
me want orm
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Just using the Django ORM

I really like the django orm, but I dont always want to use all of django. Here is a quick setup that imports just the needed parts of Django to use the ORM.

It still includes so you can do handy commands like syncdb, sql, etc. (Plus you could add south for migrations)

Settings for this are in as normal. Configure that as needed. Otherwise assuming you have django running:

python sql orm_only

Should result in:

CREATE TABLE "orm_only_newtable" (
    "id" serial NOT NULL PRIMARY KEY,
    "text" varchar(255) NOT NULL

-Mick Thompson @dthompson

You can’t perform that action at this time.