On Sep 19, 2005, at 11:39 AM, Robert Wittams wrote:
Well, I'm not an author of the framework, but the admin code is very
hard to understand (imo). I'm sure the authors understand it fine, but
for open source to instill confidence clarity is key. The admin view
should be a great example to django users, but unfortunately right now
it isn't.

No, it shouldn't -- the admin views are incredibly complex because the admin interface is incredibly complex. Public views are almost always going to be much much simpler. Even if the admin views get cleaned up -- which they should be, of course -- they still won't be a very good example. You wouldn't tell someone to read the Linux kernel source to learn how to program in C; the admin views should be thought of the same way.

My point was really that the admin view presents a really nice interface
by default, and it is a real shame that it doesn't achieve this by
utilising the standard recommended django bits. If it is "impossible" to get something like the admin view without hacking, then the best course
of action is to make it possible.

I don't want to alarm anyone or put anyone off django. It is a great
framework, and that is why I'm using it. I just think we need to be
clear that it is currently not possible to make stuff similar to the
admin views without a fair bit of hackery. I hope to obviate this.

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.

As far as I'm concerned, cleaning up the admin code would be a good idea from the "code smell" point of view, but would otherwise give very little practical benefit. Fact is, the admin interface works, and the work required to clean it up without missing any of the small subtleties will be intense. If the admin interface was actually broken, I'd feel differently, but at the moment there are many more pressing concerns than how some of the code "looks".

That said, patches are always welcome!

Jacob

Reply via email to