Skip to content

Commit

Permalink
Merge pull request #327 from ArtProcessors/fix-reverse-19
Browse files Browse the repository at this point in the history
fix `reverse` for Django 1.9
  • Loading branch information
bernardopires committed Mar 28, 2016
2 parents 6f2afa0 + f8f96b1 commit 3d3c899
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tenant_schemas/urlresolvers.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import warnings
from django.conf import settings
from django.core.urlresolvers import reverse as reverse_default
from django.utils.functional import lazy
from tenant_schemas.utils import clean_tenant_url


def reverse(viewname, urlconf=None, args=None, kwargs=None, prefix=None,
current_app=None):
url = reverse_default(viewname, urlconf, args, kwargs, prefix, current_app)
url = reverse_default(
viewname=viewname,
urlconf=urlconf,
args=args,
kwargs=kwargs,
current_app=current_app
)
return clean_tenant_url(url)

reverse_lazy = lazy(reverse, str)

0 comments on commit 3d3c899

Please sign in to comment.