We are attempting to apply the concepts of Domain-Context Interaction (DCI) to our python/django development. Unfortunately, the metaclass mechanism which the main python library supporting this uses conflicts with that of Django's metaclass for db.models. What happens is that a metaclass and new methods are temporarily injected into the model object while it acts as a role within a context. While it is an instance of that role, we cannot use the save method on it. When the role is removed the object may then be saved. Unfortunately that's quite unsatisfactory and I'm wondering if Django's models can be a little smarter when figuring out whether an object is a Django db.model instance or not (we use multiple inheritance to retain the db.model metaclass). Alternatively, can someone who gets more about how the metaclass stuff is working with Django suggest a fix in the roles module that would make it get along better with Django's ORM?
roles can be found: http://pypi.python.org/pypi/roles/0.8 the dci group (object composition) is: http://groups.google.com/group/object-composition some example code showing how to make it all "work" with django is: http://groups.google.com/group/object-composition/browse_thread/thread/fbb11a1e02b68de9 DCI is a very exciting architecture to me that extends the object model &MVC/T to a more logical end and addresses a lot of complex issues in design. The concepts have significantly altered my approach to designing new systems. I really want to be able to make this work cleanly with Django if at all possible. Appreciate any insights. -- Ben Scherrey -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.