I have the following model
class ActionConfirm(models.Model):
CONFIRM_METHOD = (
(u'ce', u'Certificate'),
(u'tf', u'Trainee Feedback'),
(u'ms', u'Multi Source Feedback'),
(u'rp', u'Reflection upon Practice'),
(u'ot', u'Other - Please add/describe')
)
confirm_method = models.CharField(max_length=2, choices=CONFIRM_METHOD)
user = User
and the following form
class ActionConfirmForm(forms.ModelForm):
class Meta:
model = ActionConfirm
and I know that I can get their current choices by doing
selected = ActionConfirm.objects.filter(user=user)
So how do I exclude values from the the confirm_method field which they have already selected?
If it was from a db I know I could do choices = ActionConfirm.objects.exclude(choice__in = selected)
but I don't know how to do it when it is from a tuple of tuples.