Thank you Graham. I will talk with my team mates again. Moving to URLs with names is no good solution for us. But maybe using the view methods itself.
Since a lazy reverse() exists since some releases now, removing the whole string magic might be a good idea. Thanks to all django developers for your constant updates. It's just hard to keep up with your pace :-) Am Mittwoch, 15. April 2015 12:51:25 UTC+2 schrieb Tim Graham: > > Please see the ticket and release notes: > https://code.djangoproject.com/ticket/22384 > > https://docs.djangoproject.com/en/1.8/releases/1.8/#passing-a-dotted-path-to-reverse-and-url > > If you want to continue using dotted paths, you might be able to create a > custom url() function that assigns a name using the view's path and use > that in your urlpatterns instead of django.conf.urls.url(). > > On Wednesday, April 15, 2015 at 4:19:47 AM UTC-4, guettli wrote: >> >> Today I realized that the ability to reverse using the Python path gets >> deprecated >> >> My source: >> https://docs.djangoproject.com/en/1.8/ref/urlresolvers/#reverse >> >> Imagine you have a very clear directory structure and everyone knows this >> in >> your company. >> >> The name of an url pattern is redundant. I like to avoid redundancy (DRY). >> >> I don't see the reasons behind this. >> >> The security issues are already solved: >> https://www.djangoproject.com/weblog/2014/apr/21/security/#s-issue-unexpected-code-execution-using-reverse >> >> Please tell me the reason. >> >> One work around this would be to give each view the name of the import >> path: name="common_structure.foo.bar" >> And if you don't allow dots: name="common_structure/foo/bar" >> But this looks not dirty. >> >> >> >> >> >> -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7b026328-b554-46de-a324-59d18870c413%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
