Code

Opened 3 years ago

Closed 3 years ago

Last modified 17 months ago

#15861 closed Cleanup/optimization (fixed)

No way to reset a file in Admin section

Reported by: anonymous Owned by: nobody
Component: contrib.admin Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If I submit a file through the admin section, there is no way for me to clear the file, without going into the DB shell itself or writing code to remove it. This is not ideal.

Imagine I have a file field that has an optional thumbnail field that will display the thumbnail if given, or just a standard image if not. Now lets say my client puts up a thumbnail but later realises (because they are fools) that the image was not cleared and has to take it down. The only way to solve this is to upload the default image, which they might not have. It also takes up unnecessary space on the server.

From a DB perspective, it is the same type as a Charfield, which can be set to through the Admin section, so i see no reason why this isn't the same for a File/Image Field.

Or am I just being lazy? :-)

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by lukeplant

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to fixed
  • Status changed from new to closed

This is already present in 1.3. Please check the most recent version of Django, or at least the docs, to see if your bug has been fixed.

http://docs.djangoproject.com/en/dev/releases/1.3/#clearable-default-widget-for-filefield

comment:2 Changed 17 months ago by anonymous

  • Easy pickings unset
  • UI/UX unset

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.