Blog de Contraslash (Legacy)

Reverse Lazy with args

January 29, 2016

Reverse Lazy with args

Tomado de StackOverflow

en el response:

return reverse_lazy('resource-view',
                            kwargs={'param': param},
                            current_app='myapp')

y en urls.py

urlpatterns = patterns('',
    url(r'^coolresource/(?P<param>\d+)/$', 
        RedirectSomewhere.as_view()),
)