On 22 oct, 23:46, Heather <[EMAIL PROTECTED]> wrote: > That was a really good post - thanks :) I know you don't *have* to > use anything from the app you include or even *have* to include > everything in an app you write. But I think that I just have this > idea in my head that I can't let go of that each part should be able > to be inherited from - not just the models.
s/inherited from/reused/g !-) Well, the fact is that models are ften the core of an application, and, if well designed and implemented (IOW : no or extremely minimal business logic in the views), easily reusable. Views and urls are usually more project-specific, and let's not talk about templates. (snip) > > Well, that's the whole concept of middlewares, isn't it ?-) > > :P Heh - but it's not such a good concept for checking if you are > logged in. Authentication is actually handled by a middleware, you know ?-) Ok, I already expressed MVHO on this, which is that having a clean way to apply a same decorator to a whole set of urls at once would be a good thing. Now at least you have two or three (if you count the hack I proposed) ways to do it - which is by all means better than none. Believe me or else, I sometimes had to use *way* more *evil* hacks (Lord forgive me...) to make some existing apps (not Django - nor even Python FWIW) work together. > Or maybe I'm wrong and it's really not that much overhead. It's mostly of the order of one additionnal function call and a couple tests per request. Not optimal indeed, but if it happens to become a problem, you can always trash your middleware and spent 10 minutes rewriting your urls. Still not optimal indeed, but as far as I'm concerned, that's something I can live with. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

