hi all,

 I've got a Project model that has an 'attach' field defined as follows:

 class Project(models.Model):
     ...
     attach_file = models.ManyToManyField(File)

 Which is the easiest way to get a file, save and add it to the project?

 I think I should create a Custom Manipulator folr File model, that has a
 save() method that adds the newly created object to the Project via
 file.project_set.add(project). So i'd need to pass the project as a hidden
 field, correct?

 Is it already possible to do that with newforms or is FileInput not yet
 ready? (Or all I miss is the fact that I must write by hand the widget?)

 Is there a working example?

 thanks
 sandro
 *:-)


--
Sandro Dentella  *:-)
http://www.tksql.org                    TkSQL Home page - My GPL work

--~--~---------~--~----~------------~-------~--~----~
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