hi all.. using 1.0 w/ py 2.5 here. I have a problem with an
ImageField failing to upload the images. i've checked the perms on
the dir and they appear to be ok. Here are snippets of what i've got:
from models.py
pic = models.ImageField(upload_to='public/images/
bank_pics',blank=True)
from views.py
modbranch=Branch.objects.get(id=bra_id)
modbranch.pic = manage_cleantext(request.POST.get('pic',''))
modbranch.save()
from forms.py
pic = forms.ImageField(required=False, widget=forms.FileInput
(attrs={'class':'filebrowser'}))
a couple of questions.
I thought that the upload_to should be appended to the file name that
I upload when saved into the db field. Right now my db field just
shows testpic.jpg rather than assets/public/images/bank_pics/
testpic.jpg as expected. Am I mistaken?
Can you think of any reason that the image would not upload? I've even
got the form as a multi-part encode.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---