jschrewe / django-mongoadmin

Integrates mongodb into django's admin
http://www.schafproductions.com/projects/mongo-admin/
BSD 3-Clause "New" or "Revised" License
112 stars 38 forks source link

ImportError: cannot import name 'update_wrapper' #35

Open hhstore opened 8 years ago

hhstore commented 8 years ago

my project env:

python 3.4.3

Django (1.7.4)
mongoadmin (0.2)
mongodbforms (0.3)
mongoengine (0.10.0)
pymongo (3.1)

when i add mongoadmin into settings.py,

INSTALLED_APPS = (
    'mongoadmin',
    'django.contrib.admin',
)

and run: python3 manage.py runserver 0.0.0.0:8000

it happens an error:

Traceback (most recent call last):
  File "manage.py", line 20, in <module>
    execute_from_command_line(sys.argv)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/apps/config.py", line 87, in create
    module = import_module(entry)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mongoadmin/__init__.py", line 1, in <module>
    from .options import *
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mongoadmin/options.py", line 26, in <module>
    from django.utils.functional import update_wrapper
ImportError: cannot import name 'update_wrapper'

just add the module, not use it.

if I delete the module, run OK.

so, i think it is a bug.

hhstore commented 8 years ago

i find a similar issue.

https://github.com/kezabelle/django-haystackbrowser/issues/5