On 12-12-11 19:25, cmc wrote:
I am trying to use django to upload images but its not working as
expected. Here is what I'm working with
Ehm, you're not telling us what goes wrong or unexpected :-)
There's one thing that I see in your code that might be a problem:
#handle_uploaded_image.py
def handle_uploaded_image(photo, caption, source, more_info):
photo_dir = '%s/uploaded_photos/Not_Published/%Y/%m/%d' %
settings.MEDIA_ROOT
You're passing one item (settings.MEDIA_ROOT) to a string that expects
two items: %s and %d. (&Y and %m don't have a meaning iirc, but %d means
"render as an integer".). So I'd expect an "TypeError: not enough
arguments for format string".
Reinout
--
Reinout van Rees http://reinout.vanrees.org/
[email protected] http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.