fix view module name using wraps in the decorator
This commit is contained in:
parent
8996d4b323
commit
702c9cda2c
2 changed files with 4 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
from functools import wraps
|
||||
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.http import HttpResponseForbidden
|
||||
|
||||
|
@ -7,6 +9,7 @@ from issue.models import Project
|
|||
def project_perm_required(perm):
|
||||
|
||||
def decorator(view):
|
||||
@wraps(view)
|
||||
def wrapper(request, *args, **kwargs):
|
||||
if len(args) > 0 and isinstance(args[0], Project):
|
||||
project = args[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue