I have three models, a participant, contact, and contact detal.
Participant is basically a user table, contact is a list of
contact_types (ie, web links, emails etc) and contact detail is a
detail of the contacts for a particular participant -

the the contact detail class is below:

class ContactDetail(models.Model):
   contact_detail_id = models.AutoField(primary_key=True,
editable=False)
   contact = models.ForeignKey(Contact)
   participant = models.ForeignKey(Participant)
   contact_value = models.CharField(blank=True, maxlength=765)
   contact_comment = models.CharField(blank=True,null=True,
maxlength=12000)

   def __str__(self):
       return '%s %s %s' % (self.contact_value, self.contact,
self.participant)

   class Meta:
       db_table = 'CONTACT_DETAIL'
   class Admin:
      pass

What I want to do is have a form to edit the contact_detaisl for a
participant - something like

<contact_type>   <text box here for contact_value ><text box here for
contact_comment> then a button to update -
I would also like a back form line that has the dropdown for contact
types, plus 2 blank fields  with an add button.


My though was to build it as a single form to edit one contact detail -
then use a for loop to  put multiple forms on the page, so the page
looks like this....


AIM  [EMAIL PROTECTED]  no comment  [button update]
MSN [EMAIL PROTECTED]  no comment  [button update]
GTalk [EMAIL PROTECTED]  no comment  [button update]
<dropdown from contact>  [form field ]  [ form field]  [Button Add]

Is this a valid idea for the solution or are there other ways to do
this?


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