3 ms·
I've not used SQLAlchemy much, but I assume it can be configured to map onto the DB tables that Django has created. Django has the concept of `apps`, where eac
by theptip 10y ago
I've not used SQLAlchemy much, but I assume it can be configured to map onto the DB tables that Django has created.
Django has the concept of `apps`, where each app gets its own namespace. So for model `foo` in app `app1`, you get a table `app1_foo`. Inside that table it's just the standard SQL columns that you'd expect. So you might need to override the default table name if your new ORM provides one, but no more than that.
The only other piece that might give you grief is the ContentType machinery; there's a content_type table that has a row for each model class, which lets you do generic foreign key lookups. It might be some work to duplicate that, if you start depending on it. But it's not super-complex; it's just <id, app_label, model> in that table.