This is the big thing for me which seems to be have been forgotten. If you need to quickly upgrade a Django project from using url to re_path the fastest way with the least amount of code changes is to simply alias the import in your urls.py files I.E ```from django.urls import re_path as url``` then you won't have to update every individual entry. so I don't see this as a big deal and am in favour of completely removing it and continue to encourage people to not question why they are using re_path and not path anyway which is more secure and fits more common url usage.
Sure if you are going from 1.x up then you have to replace more but you'll be making much larger changes anyway. On Tuesday, 5 May 2020 19:13:30 UTC+1, James Bennett wrote: > > On Tue, May 5, 2020 at 9:45 AM אורי <u...@speedy.net <javascript:>> > wrote: > > My project contains about 100 calls to url() with regex. Can you explain > to me what has been changed and why, and how should I change my code to > stop using url()? And where is it documented? I checked the documentation > and I didn't find an explanation why url() was changed and what are the > differences between url() and path() and re_path()? > > There is no difference; django.conf.urls.url() is just an alias for > django.urls.re_path(). > -- 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 django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/0abf4520-a85a-431d-a6d6-58c98118958d%40googlegroups.com.