Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#1583 closed defect (fixed)

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

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

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 James Bennett 18 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 by jkocherhans, 18 years ago

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 by James Bennett, 18 years ago

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...

by James Bennett, 18 years ago

Attachment: admin_list.diff added

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

comment:3 by James Bennett, 18 years ago

Summary: [magic-removal] django.parts.media.photos no longer exists[patch] django.parts.media.photos no longer exists
Version: SVN

comment:4 by Jacob, 18 years ago

Owner: changed from Adrian Holovaty to Jacob
Status: newassigned

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 by Jacob, 18 years ago

Resolution: fixed
Status: assignedclosed

(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