> Can you explain in more detail how you feel the admin uses "hacks"? > There's nothing the admin uses that you can't use in the public > views; it's just that the admin interface is very complex, and so the > code is very complex.
In my opinion, I don't disagree with the complexity argument. For me, it is more about admin eating Django's own dog food. For example, there are two tickets which come to mind (http://code.djangoproject.com/ticket/337 and http://code.djangoproject.com/ticket/338) which deal with things which work correctly for firlds within admin but which don't for generic views. There is a patch available for at least one of them, and the discussion for these indicates that the admin classes are doing some "magic" (note I didn't say "hacks"!) that isn't present to the non-admin world. As I read this thread, what I read into some of the messages was that it would be nice if the admin interface used capabilities available to, for instance, generic views, instead of having to replicate some of the same magic already present in the admin views. As for the complexity of admin, there are INDEED places where it is more complex than non-admin views. Enumerating the available tables, available fields, etc., is beyond what a lot of non-admin views need. However, if I'm going to place a field on a page (form field or otherwise), it is probably good for adoption and expansion of the framework to make it as little code as possible in the view and to make the code in the underlying classes as simple and straight-forward as possible. H.B.