Hello,
 I am using Django 0.97 pre in winxp. database is mysql. Please
forgive any errors or if I am not clear with some aspects as I am a
beginner trying to learn django. I am trying to upload a file: an
image. I am not worried about validation now. I want to know how to do
this.
I tried to do this But my data base shows only the name of the file
uploaded (I think it should store the path to the file).
  In my view I have

def save_data(request):

    ed_user=getfrmdb(uid)
    new_data=request.POST.copy()   #this accounts for uploading the
image too with other data.
    print new_data
    addata=User(id=uid,name=ed_user.name, email=new_data['u_email'],
 
address=new_data['u_add'],phone=new_data['u_ph'],date=datetime.date.today(),
                comments=new_data['u_comm'], image=  __________)
    addata.save()

I saw some codes (with new_data.update(request.FILES) )but I have a
hard time in understanding it completely.
   I would also like to know important tips to retrieve this uploaded
image. Thanking you ......


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to