Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1583 closed defect (fixed)

[patch] django.parts.media.photos no longer exists

Reported by: Esaj Owned by: jacob
Component: contrib.admin Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There's a bad import in django/contrib/admin/templatetags/admin_list.py:

 File "/usr/lib/python2.3/site-packages/django/contrib/admin/templatetags/admin_list.py" in items_for_result
  155. from django.parts.media.photos import get_thumbnail_url

  ImportError at /admin/pages/image/
  No module named parts.media.photos

Attachments (1)

admin_list.diff (1.1 KB) - added by ubernostrum 9 years ago.
Use path instead of non-existent thumbnail as admin list repr of ImageField

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by jkocherhans

django.parts.media.photos was removed in [2124]

I've hacked a fix for this before by copying code from http://code.djangoproject.com/browser/django/branches/magic-removal/django/parts/media/photos.py?rev=2123 into django/contrib/admin/templatetags/admin_list.py

This fixed my problem, but I wasn't using get_thumbnail_url for anything. No idea if the fix was "correct". Jusy FYI for anyone who wants to take this on.

comment:2 Changed 9 years ago by ubernostrum

Why not just remove the import statement? IIRC the 'get_thumbnail_url' function was Ellington-specific cruft that didn't do anything useful in Django...

Changed 9 years ago by ubernostrum

Use path instead of non-existent thumbnail as admin list repr of ImageField

comment:3 Changed 9 years ago by ubernostrum

  • Summary changed from [magic-removal] django.parts.media.photos no longer exists to [patch] django.parts.media.photos no longer exists
  • Version set to SVN

comment:4 Changed 9 years ago by jacob

  • Owner changed from adrian to jacob
  • Status changed from new to assigned

I'm not totally sure about this patch... it might cause problems with the display if people are using large images with list_display... for now I think I'll change it just to use the image path, but in the future we might want to have a super-simple thumbnailer built into the admin for just this purpose.

comment:5 Changed 9 years ago by jacob

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [2831]) Fixed #1583: django.contrib.admin.templatetags.admin_list no longer imports from the non-existant django.parts.media.photos. Thanks, ubernostrum

Note: See TracTickets for help on using tickets.
Back to Top