Opened 14 years ago

Last modified 13 years ago

#12229 closed

ImageField.save should be documented upfront and obvious — at Initial Version

Reported by: freyley Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Nowhere on this page

http://docs.djangoproject.com/en/dev/ref/models/fields/

Does it say how to save an image to a filefield or imagefield. Only by digging in to the code was I able to find this:

p = Photo(...)
p.image.save(filename, ContentFile(data))

which was exactly what I wanted. If there's a preferred way to do it, that'd be fine too.

Change History (0)

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