Hi Alasdair,

On Jun 30, 7:49 am, Alasdair Nicol <alasd...@memset.com> wrote:
> 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-templa...
> [2]:https://docs.djangoproject.com/en/dev/topics/http/urls/#passing-extra...

This is a good suggestion. Feel free to open a ticket. In fact, the
doc about reverse_lazy could be further improved by providing some
concrete code samples -- so if your patch contains some, all the
better ;-)

Julien

-- 
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 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to