Skip to content

Commit 8d563ea

Browse files
committed
Update admin.py
Newer versions of Django no-longer include `update_wrapper`, as it's expected to be provided in the language's standard library. Here's the error I was getting as of now: File "/usr/lib/python2.7/site-packages/singleton_models/admin.py", line 5, in <module> from django.utils.functional import update_wrapper ImportError: cannot import name update_wrapper My environment is: Django 1.6.2 final, and Python 2.7.6
1 parent ff82d22 commit 8d563ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

singleton_models/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.utils.translation import ugettext as _
33
from django.utils.encoding import force_unicode
44
from django.http import HttpResponseRedirect
5-
from django.utils.functional import update_wrapper
5+
from functools import update_wrapper
66

77

88
class SingletonModelAdmin(admin.ModelAdmin):

0 commit comments

Comments
 (0)