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 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 and this obviously fails,

there is a know workaround for this? any way to declare read only the
model?

regards
drakkan






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to