On 21 oct, 16:40, Heather <[EMAIL PROTECTED]> wrote:
> I completely agree.  Even the middleware solution doesn't seem quite
> right as it will check each page/request.

Well, that's the whole concept of middlewares, isn't it ?-)

> I've been thinking about
> this a lot and I wonder if maybe the only part that should be reusable
> is the models?

Nope. We've been 'reusing' quite a few django apps so far, and while
there are indeed a couple spots where reusability could be improved
(my own grip is with views returning full responses - often I'd need
just the context and the template name), I can testify that I've
rarely seen such a level of reusability in a web framework.

Also a Django app doesn't have to provide any models (or views or
whatever). There are some app that only provides a set of
templatetags, filters and context_processors.

>I don't know.  But since there is no way (that I know
> of) to use inheritance for apps, apps seem to be sort of limiting.

I wouldn't say so. Getting at the right balance between simplicity and
flexibilty is indeed a difficult task. What you can reuse from a given
app depends on three factors: Django itself, how the app has been
written, and how you want to reuse it. I do think that Django would
benefit from a couple more hooks here and there, but this often
requires some "collaboration" from the app. Something *you* (and I)
can do then is to try and add this part to the apps you want to reuse
and contribute it back - chances are the authors will be grateful.

Same goes for Django itself FWIW (I mean, actively contributing), but
since it has much greater potential impact, we just can hope to have
each and any of our patches accepted - and that's mostly a
GoodThing(tm), since experience has proven that
EverythingButTheKitchenSink is not a sound design principle.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to