On Fri, Jul 18, 2008 at 3:09 PM, Malcolm Tredinnick
<[EMAIL PROTECTED]> wrote:
>
>
> On Fri, 2008-07-18 at 19:30 +0200, Mikael Moutakis wrote:
>> Hi
>> I've running from trunk and recently switched to the NFA-branch. I
>> found that the URL templatetag is unhelpful when failing to match a
>> url. I patched my own copy of the function URLNode in
>> django.template.defaulttags to return a more helpful error message
>> instead of a empty string. Should I file a ticket with the patch or
>> should I add the solution as a django snippet instead? Sorry, if this
>> is a stupid question, but I'm new to this. I modified the last 3 lines
>> of the function below.
>
>
> The basic design rule is that template tags should always fail silently
> if there's an error. Some templates and applications rely on this
> behaviour. So a change like this runs against that principle.
>
In other words, a patch like that will likely not get applied.
However, others may find it useful, so a snippet may be the way to go.
However, I wouldn't just post your patch as a snippet, but post a full
working tag that would be added to a users app, which can then be used
in place of the one that ships with Django.

If your interested in more specifics as to why Django has chosen
silent failure, search the list archives. Seems there was a recent
discussion about it.
-- 
----
Waylan Limberg
[EMAIL PROTECTED]

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