> > >>> reverse('i_dont_exist')
> > NoReverseMatch: Reverse for 'i_dont_exist' with arguments '()' and
> > keyword arguments '{}' not found.
>
> > In this case, it would be nicer to have something like:
>
> > NoURLPattern: No patterns specified for 'i_dont_exist'.
>
> Just on this point, I must disagree. For instance, consider if you
> have a URL named 'i_dont_exist', and the URL pattern has two
> positional arguments.
Ah, sorry. I've been unclear. My point here is that when there /isn't/
a URL with that name. It would be good to distinguish between having
no regexes and not being able to reverse the regex.
So, if I have an URL:
url(r'^fruit/(bananas|apples)$', some_view, name='fruit'),
And I make a spelling mistake:
>>> reverse('rfuit', args=['bananas'])
I would like some hint that the problem isn't in my regex. The two
options I'm proposing are:
NoURLPattern: No patterns specified for 'rfuit'.
Or:
NoReverseMatch: Reverse for 'rfuit' with arguments '()' and
keyword arguments '{}' not found (patterns tried: []).
--
You received this message because you are subscribed to the Google Groups
"Django developers" 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-developers?hl=en.