hello list. I have a model like this
--------------------------------------------------------
class Dcto(models.Model):
......
fk_dcto = models.ManyToManyField('self', blank=True, null=True)
--------------------------------------------------------
this create a this internal table with this fields
--------------------------------------------------------
id
from_dcto_id
to_dcto_id
--------------------------------------------------------
My problem appear when I save the formmodel. I want something like
this saved.
----------------------------------------------------
id | from_dcto_id | to_dcto_id
x | old_dcto 1 | new_dcto
x | old_dcto 2 | new_dcto
----------------------------------------------------
but I get this
----------------------------------------------------
id | from_dcto_id | to_dcto_id
x | old_dcto 1 | new_dcto
x | old_dcto 2 | new_dcto
x | new_dcto | old_dcto 1
x | new_dcto | old_dcto 2
----------------------------------------------------
Somebody know how can i solve this problem?
Another question. I prefer a CheckboxSelectMultiple(), no a
selectMultiple(), I can define this in the widget meta,
--------------------------------------------
widgets = {
'fk_dcto':forms.widgets.CheckboxSelectMultiple(),
--------------------------------------------
but the user selection isn't saved.
Thanks for read, and sorry for my poor english.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
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.