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
Post a Comment