Hi,

I like the upcoming reverse_lazy in Django 1.4 (commit 16121). I suggest the examples should include using reverse_lazy in urlpatterns.

I just helped a user out in stackoverflow [1] who was struggling with NoReverseMatch errors because their url patterns used reverse for optional arguments. I think adding an example might stop users from struggling with the same problem in future.

My suggested one line addition to the examples in [2] is

* providing a reversed url in a URL pattern as an extra argument to the view function.

On the other hand, I realise that the documentation is stating "some common cases", it doesn't have to be exhaustive.

I'd like to make a ticket and patch if people think this is a good idea.

Regards,
Alasdair Nicol

[1]: http://stackoverflow.com/questions/6512610/django-url-error-in-template-with-password-change-view/6514169 [2]: https://docs.djangoproject.com/en/dev/topics/http/urls/#passing-extra-options-to-view-functions

--
Alasdair Nicol
Developer, MEMSET

mail: [email protected]
 web: http://www.memset.com/

Memset Ltd., registration number 4504980. 25 Frederick Sanger Road, Guildford, 
Surrey, GU2 7YD, UK.

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

Reply via email to