I have a ManyToMany model set, that on the edit uses a formset to add/
edit rows. I have this working, but the unfortunate part of it is
that the select that results from the ManyToMany relationship
populates with 16,000 records.
What I would like to do is, once the records are added, just have the
delete checkbox and show the 'description' field (uneditable) next to
it), and, rather than add records through a huge select list, add the
records by id.
To sketch it out, this is how it is:
<'Profile.directory-optin' checkbox>
<'Profile.directory-desc'>
<'Class.description' huge select>
<delete checkbox>
<!--hidden formset elements-->
<'Class.description' huge select>
<delete checkbox>
<!--hidden formset elements-->
<'Class.description' huge select>
<delete checkbox>
<!--hidden formset elements-->
<!--add new item-->
<'Class.description' huge select>
<delete checkbox>
<!--hidden formset elements-->
<save button>
And I'd rather it was something like:
<'Profile.directory-optin' checkbox>
<'Profile.directory-desc'>
<text of 'Class.description' field> <delete checkbox>
<!--hidden formset elements-->
<text of 'Class.description' field> <delete checkbox>
<!--hidden formset elements-->
<text of 'Class.description' field> <delete checkbox>
<!--hidden formset elements-->
<!--add new item-->
<new 'Class.id' text input field>
<!--does not need a 'delete' checkbox-->
<!--hidden formset elements-->
<save button>
The database tables look something like:
Profile Join table Class
======= ========== =====
id id id
directory-optin profile-id description
directory-desc class-id
Hope someone can help me out!
-- Clive
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/E30F44E6-07DA-4703-BAB1-BE295C72EF22%40indx.co.uk.