[Django]-Is it possible to redefine reverse in a Django project?


only way so that django reverse is replaced by ur_reverse is

django.core.urlresolvers.reverse = ur_reverse

or if you like decorator syntactic sugar

django.core.urlresolvers.reverse = ur_reverse_decorator(django.core.urlresolvers.reverse )

which i would not advice(and many will shout), unless you are not willing to change every usage of reverse with ur_reverse

Leave a comment