Saturday, October 19, 2013

Re: Access date a picture was taken

You can do it via de PIL library, which you need to have installed for using images in Django. Take a look to the approved answer in this SO question: http://stackoverflow.com/questions/4764932/in-python-how-do-i-read-the-exif-data-for-an-image

You can invoke the code for obtaining the date on the save() event and populate the corresponding field you want before saving the object, it's fairly straightforward :)


2013/10/19 Simon D <simon.deleersnyder@gmail.com>
Hi,

I'm developing a blog, and want Django to automatically store the date a picture was taken in the database. Is there a way to do this is Django?

I found something like Github which would have this option I think, but it comes with a lot of other stuff I don't need. Is there a simple way, without having to install anything?

Thanks in advance,

Simon

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cf069788-4c0d-4279-927a-c24438f7ab9f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BXe2iZnG43e410crx6EywkSAngt_omoBof8y8Nm3qJ7zhNjmg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate