On 6/7/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> Alternatively (and I suspect this is a variation on what Marty is
> suggesting), move all the url processing bit out of __call__() and into
> a function that __call__ calls. Then that function can be overridden in
> the subclass. Notice that you don't have a similar problem in AdminSite
> because the root() method there is only doing URL processing, so it can
> be overridden and called via super().

That's exactly what I was suggesting, actually. Well, for one of my
ramblings anyway. I'm glad to see I wasn't spouting completely random
nonsense. I'd prefer this method, I think, so that subclasses have the
choice to check against their URLs before the base class's, after it,
or ignore the base class handling altogether.

It somehow seems a bit less clean than using regular expressions and
such, but since this is such a specialized case, I do have to admit
that adding in the full flexibility of urlpatterns in here would just
complicate things unnecessarily.

I just created ticket #4516 for this, with a patch that moves the URL
handling into a handle_url() method, which is then responsible for
returning an HttpResponse.

-Gul

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to