One more thing. The Job form field is showing the jobs from all companies. But I ned to filter only the jobs published by the user which is logged in.
I've tried but couldn't make it happen. Can you tell how to do it? Thanks #forms.pyclass SendCandForm(forms.Form): job = Company.objects.select_related('job').values_list('job__title', flat=True) jobs_choices = [('', 'Escolher')] + [(id, id) for id in job] job = forms.ChoiceField(choices=jobs_choices, label="Vaga", required=True, widget=forms.Select(attrs={'class': 'form-control'})) STATUS_CHOICES = ( ('0', 'Novo'), ('1', 'Não aprovado'), ('2', 'Pré Selecionado'), ('3', 'Contratado') ) status = forms.ChoiceField(required=True, widget=forms.RadioSelect(attrs={'class': ''}), choices=STATUS_CHOICES) def save(): job = self.cleaned_data['job'] status = self.cleaned_data['status'] ctj = CandidateToJob( job = job, status = status, candidate = candidate, ) ctj.save() return ctj 2015-04-04 8:49 GMT-03:00 Ronaldo Bahia <rona...@jobconvo.com>: > SOLVED > > http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for-m2m-through/29446017#29446017 > > Thanks Vijay for helping me > > Regards, > Ronaldo > > > > Em quinta-feira, 2 de abril de 2015 09:36:29 UTC-3, Ronaldo Bahia escreveu: >> >> >> Hi every one. >> >> Can you help me in this? >> >> http://stackoverflow.com/questions/29413107/django- >> modelform-object-has-no-attribute-cleaned-data-for-m2m-through >> >> Thanks in advance >> Ronaldo >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-users/Ve_RLvkK4Gs/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/d1188860-711c-47c0-b0ae-20b66ab94711%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/d1188860-711c-47c0-b0ae-20b66ab94711%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGz5-6jCy22y-cS%3Do0%3D2ZprwF-cBC60VHKjHnv8o8UmfaG049A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.