python - ImageField in Django with Image from disk -


i'm writing gallery application on django , have question.

my goal show images path in computer app running.

for example images want show locate in "/usr/local/media/pictures"

there no problem if set path "/usr/local/media/pictures" in media_root , show image => (img src="/media/picture_1.jpg"/) picture_1.jpg in "/usr/local/media/pictures".

but want use app create thumbnail directly image (like solr-thumbnail).

my problem solr-thumbnail create thumbnail imagefield , don't know how can create imagefield path.

i search documentation on imagefield , need declare imagefield on model, don't want store images in databse. because user can delete/create image file explorer. there no upload on application.

thanks help.

you can find instructions on low-level api here

http://sorl-thumbnail.readthedocs.org/en/latest/examples.html#low-level-api-examples

alternatively, can construct instance of staticfilesstorage , use pass imagefile objects templates.

http://sorl-thumbnail.readthedocs.org/en/latest/template.html#source


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -