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

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

2011-01-27 Thread Aryeh Leib Taurog
On Jan 26, 4:14 pm, bvdb wrote: > 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

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

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

2011-01-25 Thread Simone Dalla
2011/1/25 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 >

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

2011-01-25 Thread Chris Matthews
your developers/administrators can have full access but 'normal' users not. -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of bvdb Sent: 25 January 2011 18:20 To: Django users Subject: DB-Views or read-only tables in models

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

2011-01-25 Thread George Silva
Perhaps you could override the save method and make it like this: def save(self,*args,**kwargs): pass Would that work? This is also a curiosity I have, but didn't have a chance to test it. Any thoughts? George On Wed, Jan 26, 2011 at 12:22 AM, Russell Keith-Magee < russ...@keith-magee.com>

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

2011-01-25 Thread Russell Keith-Magee
On Wed, Jan 26, 2011 at 12:19 AM, bvdb wrote: > 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

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