fix small error for django 3.0

This commit is contained in:
Adolfo Gómez García 2019-12-23 10:49:26 +01:00
parent 7801cf85c0
commit a66a14a63e

View File

@ -39,7 +39,6 @@ import typing
from functools import wraps from functools import wraps
from django.http import HttpResponseRedirect, HttpResponseForbidden, HttpResponse, HttpRequest from django.http import HttpResponseRedirect, HttpResponseForbidden, HttpResponse, HttpRequest
from django.utils.translation import get_language from django.utils.translation import get_language
from django.utils.decorators import available_attrs
from django.urls import reverse from django.urls import reverse
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
@ -108,7 +107,6 @@ def webLoginRequired(admin: typing.Union[bool, str] = False) -> typing.Callable[
if admin == 'admin', needs admin if admin == 'admin', needs admin
""" """
def decorator(view_func: typing.Callable[..., RT]) -> typing.Callable[..., RT]: def decorator(view_func: typing.Callable[..., RT]) -> typing.Callable[..., RT]:
@wraps(view_func, assigned=available_attrs(view_func))
def _wrapped_view(request: HttpRequest, *args, **kwargs) -> RT: def _wrapped_view(request: HttpRequest, *args, **kwargs) -> RT:
""" """
Wrapped function for decorator Wrapped function for decorator