Decorating urlpatterns

One thing I wanted for a while was the ability to basically apply something like @login_required to a bunch of urlpatterns in one go, instead of having to decorate each and every view manually. I finally spent some time looking through the Django source, and I came up with the following:

I did actually. It’s a good idea, and for some reason I hadn’t even thought about approaching it like that. Although in my case, it would break the ability to use reverse() without explicitly naming the patterns, which is something I am relying on for now.