exclude field from SQL insert

52 views
Skip to first unread message

Slafs

unread,
Jul 13, 2011, 11:05:45 AM7/13/11
to django...@googlegroups.com
Hello.

I have a model in Django that is based on database view. One of the fields is "virtual" (computed in the view) .
I would like to exclude this field in my model from being used in SQL Insert and Update statements.

Do You know maybe how can I do that ?

Regards

Tom Evans

unread,
Jul 13, 2011, 11:27:37 AM7/13/11
to django...@googlegroups.com

Models based on views are not explicitly supported, but should work
well in practice (use managed=False in the meta class). Virtual
computed 'fields' are definitely not supported for update/insert.

Cheers

Tom

Cheers

Tom

Venkatraman S

unread,
Jul 13, 2011, 12:38:04 PM7/13/11
to django...@googlegroups.com

On Wed, Jul 13, 2011 at 8:57 PM, Tom Evans <tevans.uk@googlemail.com> wrote:
Models based on views are not explicitly supported, but should work
well in practice (use managed=False in the meta class). Virtual
computed 'fields' are definitely not supported for update/insert.

Nice, i didnt know this.
Reply all
Reply to author
Forward
0 new messages