new_data = request.POST.copy()
new_data.update(request.FILES)
form = ThingForm(new_data)
if form.is_valid():
clean_data = form.clean_data
t = Image
t.name = clean_data['name']
if clean_data['photo']:
photo = clean_data['photo']
#html = "<html><body> hello %s </body></html>" %
(t.name)
#return HttpResponse(html)
t.save_photo_file(photo['filename'], photo['content'])
t.save()
but it is showing an error saying :::: 'module' object has no
attribute 'save_photo_file'
On Oct 15, 12:48 pm, mayank bhargava <[EMAIL PROTECTED]> wrote:
> hello ..
> i am using this code to insertimageinto DataBase
> new_data = request.POST.copy()
> new_data.update(request.FILES)
> profile_form = Things(None, name, new_data['photo'])
> profile_form.save()
>
> and it is working properly
>
> now i want to copy the content of thisimageon another folder
>
> please resolve this issue
>
> thanks...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---