Search code examples
pythondjangowerkzeug

Django manage.py runserver throws ImportError: AdminMediaHandler


The Problem

When I run python manage.py runserver I get the error ImportError: cannot import name AdminMediaHandler.

ex.

(venv)agconti@agconti-Inspiron-5520:~/my_dev/github/stamped/stamped_project$ python manage.py runserver
ImportError: cannot import name AdminMediaHandler

This just started to happen after I installed the django-werkzeug-debugger-runserver.

Im using virtualenv. Here is what I have installed:

Django==1.5.2
Werkzeug==0.9.3
argparse==1.2.1
django-extensions==1.1.1
django-werkzeug-debugger-runserver==0.1.2
six==1.3.0
wsgiref==0.1.2

I'm not sure what could be causing the conflict. Any ideas?


Solution

  • Seems like django-werkzeug-debugger-runserver==0.1.2 is not compatible with Django1.5+, which I suspect you are using.

    Try uninstalling it and remove it from requirements.txt. And use django-extensions instead, which you already have installed.