Re: django and database views

2009-02-18 Thread will0
On Jan 6, 12:47 am, drakkan wrote: > On 6 Gen, 00:41, drakkan wrote: > > Suppose I want to delete an user. This user is in table1 and so in > databaseview too. Django default is to do adeletecascade so it tries > to remove the user from table1,

Re: django and database views

2009-01-05 Thread drakkan
On 6 Gen, 00:41, drakkan wrote: > On 6 Gen, 00:32, Malcolm Tredinnick wrote: > > > > > On Mon, 2009-01-05 at 06:31 -0800, drakkan wrote: > > > however if i delete an user with records associated in the view I have > > > this error: > > > >

Re: django and database views

2009-01-05 Thread drakkan
On 6 Gen, 00:32, Malcolm Tredinnick wrote: > On Mon, 2009-01-05 at 06:31 -0800, drakkan wrote: > > however if i delete an user with records associated in the view I have > > this error: > > > NotSupportedError: cannot delete from a view > > HINT:  You need an

Re: django and database views

2009-01-05 Thread Malcolm Tredinnick
On Mon, 2009-01-05 at 06:31 -0800, drakkan wrote: > however if i delete an user with records associated in the view I have > this error: > > NotSupportedError: cannot delete from a view > HINT: You need an unconditional ON DELETE DO INSTEAD rule. > > django try to delete record from the view

Re: django and database views

2009-01-05 Thread Russell Keith-Magee
On Tue, Jan 6, 2009 at 8:11 AM, drakkan wrote: > > > > On 6 Gen, 00:06, "Russell Keith-Magee" wrote: >> On Mon, Jan 5, 2009 at 11:31 PM, drakkan wrote: >> >> > Hi all, >> >> > I mapped a database view in django model as a

Re: django and database views

2009-01-05 Thread drakkan
On 6 Gen, 00:06, "Russell Keith-Magee" wrote: > On Mon, Jan 5, 2009 at 11:31 PM, drakkan wrote: > > > Hi all, > > > I mapped a database view in django model as a normal database table, > ... > > there is a know workaround for this? any way to

Re: django and database views

2009-01-05 Thread Russell Keith-Magee
On Mon, Jan 5, 2009 at 11:31 PM, drakkan wrote: > > Hi all, > > I mapped a database view in django model as a normal database table, ... > there is a know workaround for this? any way to declare read only the > model? In short, no. Django doesn't currently provide any

django and database views

2009-01-05 Thread drakkan
Hi all, I mapped a database view in django model as a normal database table, all seems fine and I'm able to follow foreign key too, here is a sample class databaseview(models.Model): field1= user=models.ForeignKey(User) however if i delete an user with

Django and DataBase Views

2008-04-19 Thread Narso
Hi, I am asking for help. I made a DataBase View and a Model to join some models/tables for use Admin Site filters. In the interactive shell (python manage.py shell) it work ok, but in the browser take a inaceptable long long time to get response. The example models is shown in the message