On Tue, Jan 6, 2009 at 8:11 AM, drakkan <drakkan1...@gmail.com> wrote:
>
>
>
> On 6 Gen, 00:06, "Russell Keith-Magee" <freakboy3...@gmail.com> wrote:
>> On Mon, Jan 5, 2009 at 11:31 PM, drakkan <drakkan1...@gmail.com> 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 support for database 
>> views.
>>
>> There might be a few tricks you could do (such as redefining delete()
>
> thanks but this didn't work I already redefined delete as follow:
>
>
> def delete(self):
>    pass
>
> but the error is the same
>
>
>> to be a no-op on the view model and on a custom default manager), but
>> these certainly aren't tested or proven suggestions.

Did you redefine just on the model class, or did you do the default
manager change as well? Thinking about this a little more, you will
also need to define your own custom QuerySet class that disables
delete().

In short, this isn't going to be easy unless you're willing to get
your hands dirty and dig into the code a little.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
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