Re: DB-Views or read-only tables in models

2011-01-28 Thread bvdb
Thanks for describing the four possible reactions. My main concern is organisation, alas I imagine a Django solution, not just one for me. So the model needs to know about the view, i.e. we'd need a read-only attribute in models.py table definitions, so that a) Developer sets the attribute manually

Re: DB-Views or read-only tables in models

2011-01-26 Thread bvdb
On Jan 26, 3:22 am, Russell Keith-Magee wrote: > Django doesn't have a built-in representation of a view. .. > > You can define a Django model as a wrapper around a view by marking it > managed, but that doesn't make the model read-only -- it just prevents > Django from trying to create the model

DB-Views or read-only tables in models

2011-01-25 Thread bvdb
A developer sometimes has to access and present data that existed before his application. Common practice is for a database administrator to define a database view (with a CREATE VIEW sql command, not to be confused with the V in MVC) and give the Django developer access to this. This is only a rea