fallback to django.utils.functional.wraps(for 1.1.x)
This commit is contained in:
parent
7f34b221b1
commit
b5dd494e6f
1 changed files with 4 additions and 1 deletions
|
@ -1,7 +1,10 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
|
|
||||||
from django.contrib.auth.decorators import wraps
|
try:
|
||||||
|
from django.contrib.auth.decorators import wraps
|
||||||
|
except:
|
||||||
|
from django.utils.functional import wraps
|
||||||
from shortcuts import render_to_json_response
|
from shortcuts import render_to_json_response
|
||||||
|
|
||||||
def login_required_json(function=None):
|
def login_required_json(function=None):
|
||||||
|
|
Loading…
Reference in a new issue