On Mon, 2010-09-27 at 11:36 +0200, Patryk Zawadzki wrote: > > With the risk of being ignored once again, I dare to link to a working > solution that does not need any changed to the framework itself (other > than perhaps including the factory class): > > http://gist.github.com/584106
This looks rather good to me. It may have been ignored before because it has no comments and some things are not immediately obvious. For example, you are basically proposing that the concrete models are passed into view functions via URLconf, and from there are passed into any functions which need them, and so they would never actually need to be imported by the app that defines the abstract model. I for one would be much happier to not add any more machinery via Meta options. With some cleanup, and some documentation of this pattern, and possibly a better name, I think the AbstractMixin class you propose could be a good candidate for inclusion in core. Some notes: 1) it seems like line 15 in abstract.py should say 'abstract':'False', not 'True' - did I miss something? 2) there would need to be some way of merging the concrete class's own Meta options with the abstract class's Meta options 3) why do we need the _classcache? Is the key used specific enough - what if two different apps both create 'MyCategory' based on 'CategoryFactory', using them in different situations? Thanks, Luke -- "Christ Jesus came in to the world to save sinners" (1 Timothy 1:15) Luke Plant || http://lukeplant.me.uk/ -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.