Hi,
I'll start with some context so the question makes more sense. 
We run a multi-tenant SaaS where we use database multi-tenancy (one db per 
tenant).
Part of offering is extensive and rather complex reporting, which is hard 
to do in the django ORM in a performant manner.

The ability to use the orms filter abilities is important to us, and so 
we've been defining views and wrapping them in unmanaged models.
We aren't thrilled about this for multiple reasons, but primarily because 
migrations are no fun when you do database multi tenancy. 

This use case being reporting, we'd be fine with a "Read Only Model", where 
in the models Meta classs we'd specify some SQL (much like raw) and the 
SQLCompiler would use that SQL to select from and filter (much like a view).

Is this possible ? Does anyone have thoughts on how to get started ? 
 Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d4c56b1d-58fc-4bd4-a3b7-49853e531186%40googlegroups.com.

Reply via email to