Thank you both for your answer. What I had in mind was read-only views, so all the update limitations are not a problem at all. Also, I am less interested in wrappers over native DBMS views. What I'd like is a programmer-friendly API for views, transparent to the underlying DBMS, similar to how Models are a transparent declarative way to work with (physical) tables.
I've started playing with this idea but unfortunately it's far from straightforward to extend the current framework. For one thing, standard object-oriented techniques don't work very well when metaclasses and other magic tricks (e.g. add_to_class, contribute_to_class) are involved. Second, there are numerous references to model._meta.db_table, the name of the (single) underlying table of the model, while for a view there isn't such a table; instead there are one or more tables to which the view's fields belong to. Speaking of fields, it is necessary for a view that each field knows its (physical) model; currently however only the model knows its fields, the field doesn't know the model it belongs to. I'm sure there are even more problems along the way but these are the ones I've hit so far. Thanks, George --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---