Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

profile_required view args and kwargs

  • Loading branch information...
commit d22d3b71f2e9d6fa5ba11e026ea2e4152e7b2ee1 1 parent 86b3695
@jesperp jesperp authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 profilebase/
4 profilebase/
@@ -121,14 +121,14 @@ def logout(cls, request):
def profile_required(cls, view, redirect_field_name=REDIRECT_FIELD_NAME):
"""Check that a profile for this class is authenticated"""
login_url = settings.LOGIN_URL
- def wrapped(request):
+ def wrapped(request, *args, **kwargs):
name = cls.__name__.lower()
profile = getattr(request, name, None)
if not(profile and profile.is_authenticated()):
path = urlquote(request.get_full_path())
redir = login_url, redirect_field_name, path
return HttpResponseRedirect('%s?%s=%s' % redir)
- return view(request)
+ return view(request, *args, **kwargs)
return wrapped
Please sign in to comment.
Something went wrong with that request. Please try again.