Hi, thanks for making a mailing list about inqueries.

I want to know if is possible to autogenerate a view that allows a
many to many relationship with an extra field to be captured.

ie:

class statictests(models.Model):
       statictests_id = models.AutoField(primary_key=True);
        statictests_name = models.CharField(max_length=90);

class proyect(models.Model):
       tests = models.ManyToManyField(statictests, through =
'num_tests');

class num_tests_unidades(models.Model):
        un_alt_tec = models.ForeignKey(statictests);
        res_proy_ver = models.ForeignKey(proyect);
        num_tests = models.IntegerField();

The view that results from this code is:
------------------------------------------------------------------------------
<select multiple="multiple" name="tests" id="id_tests">
<option value="1">bababa.</option>
<option value="2">bebe.</option>
<option value="3">bibi</option>
<option value="4">etc1.</option>
<option value="5">etc2.</option>
</select>
-----------------------------------------------------------------------------
I need something that specifies the attribute of the relationship.

Thanks in advance


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