Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
akaihola opened this Issue · 1 comment

1 participant

Antti Kaihola
Antti Kaihola

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:

$ ./manage.py harvest
Traceback (most recent call last):
  File "manage.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "django/core/management/__init__.py", line 381, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "django/core/management/__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "django/core/management/__init__.py", line 69, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "lettuce/django/__init__.py", line 19, in <module>
    from lettuce.django.server import Server
  File "lettuce/django/server.py", 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).

Antti Kaihola akaihola referenced this issue from a commit in akaihola/lettuce
Antti Kaihola 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
d4d215b
Antti Kaihola

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

Antti Kaihola akaihola closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.