Invalid AdminMediaHandler import with Django pre-1.5 trunk since r17879 (Apr 9 2012) #280

akaihola opened this Issue Aug 2, 2012 · 1 comment


None yet

1 participant


Django's commit 17879 on Apr 9 2012 removed the deprecated AdminMediaHandler, as per official deprecation timeline (see bug #18035). Lettuce still tries to import it:

$ ./ harvest
Traceback (most recent call last):
  File "", line 9, in <module>
  File "django/core/management/", line 442, in execute_from_command_line
  File "django/core/management/", line 381, in execute
  File "django/core/management/", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "django/core/management/", line 69, in load_command_class
    module = import_module('' % (app_name, name))
  File "django/utils/", line 35, in import_module
  File "lettuce/django/", line 19, in <module>
    from lettuce.django.server import Server
  File "lettuce/django/", line 34, in <module>
    from django.core.servers.basehttp import AdminMediaHandler
ImportError: cannot import name AdminMediaHandler

This is django/django@ebbc414 (pre-1.5 Jul 31 2012) and Lettuce b83537c (Aug 1 2012).

@akaihola akaihola added a commit to akaihola/lettuce that referenced this issue Aug 2, 2012
@akaihola akaihola Fixes issue #280: don't attempt to import Django's AdminMediaHandler,…
… and ask the user to disable LETTUCE_SERVE_ADMIN_MEDIA on Django >=1.5

The corresponding pull request #286 was committed in e3fe912. Closing.

@akaihola akaihola closed this Nov 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment