What line is thrwing the error? the one with form.save(commit=False)
? On Thu, Apr 2, 2015 at 1:23 PM, Ronaldo Bahia <rona...@jobconvo.com> wrote: > updated > > > http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for-m2m-through/29417768#29417768 > > *Ronaldo Bahia * > Diretor | JobConvo.com > Tel: 11 3280 6971 > > 2015-04-02 13:15 GMT-03:00 Vijay Khemlani <vkhem...@gmail.com>: > >> post your updated code >> >> On Thu, Apr 2, 2015 at 1:06 PM, Ronaldo Bahia <rona...@jobconvo.com> >> wrote: >> >>> Dont know why but I still get the same error >>> >>> Ronaldo Bahia >>> >>> Em 02/04/2015, às 10:50, Vijay Khemlani <vkhem...@gmail.com> escreveu: >>> >>> In your Form class "job" is a ChoiceField, and it returns a primitive >>> value (such as "2") when cleaned. >>> >>> You would need to convert it back to a django model with >>> >>> job = Job.objects.get(pk=form.cleaned_data['job']) >>> >>> >>> >>> On Thu, Apr 2, 2015 at 10:17 AM, Ronaldo Bahia <rona...@jobconvo.com> >>> wrote: >>> >>>> Thanks. Solved cleaned_data issue. >>>> >>>> Now I getting: >>>> >>>> Cannot assign "u'2'": "CandidateToJob.job" must be a "Job" instance. >>>> >>>> Or >>>> >>>> Cannot assign "u'Title'": "CandidateToJob.job" must be a "Job" instance. >>>> >>>> Em quinta-feira, 2 de abril de 2015 09:44:44 UTC-3, Vijay Khemlani >>>> escreveu: >>>>> >>>>> Call form.is_valid() (and check that it returns True) before >>>>> accessing form.cleaned_data >>>>> >>>>> On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia <ron...@jobconvo.com> >>>>> wrote: >>>>> >>>>>> >>>>>> 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 the Google >>>>>> Groups "Django users" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to django-users...@googlegroups.com. >>>>>> To post to this group, send email to django...@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/65204e73-37e5-4463-862f-cf453d835440% >>>>>> 40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/django-users/65204e73-37e5-4463-862f-cf453d835440%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/1f030ca5-651e-45a9-b4b3-25dbe5dc31fa%40googlegroups.com >>>> <https://groups.google.com/d/msgid/django-users/1f030ca5-651e-45a9-b4b3-25dbe5dc31fa%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 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/CALn3ei2SJKHvjxCh2GV03Xh8%2BzOXJrV3FLZ9%3DEKjgStkfcqRdQ%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CALn3ei2SJKHvjxCh2GV03Xh8%2BzOXJrV3FLZ9%3DEKjgStkfcqRdQ%40mail.gmail.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/5D9058DA-F6B7-4866-95A0-CD7FA59AF5B1%40jobconvo.com >>> <https://groups.google.com/d/msgid/django-users/5D9058DA-F6B7-4866-95A0-CD7FA59AF5B1%40jobconvo.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 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/CALn3ei32-q-cRm1m_jktsVnYoFg40fu4v5Ztd_BjL-f7b4n7FA%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CALn3ei32-q-cRm1m_jktsVnYoFg40fu4v5Ztd_BjL-f7b4n7FA%40mail.gmail.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-6j4VeVw3EEJ02YkaW%2BWYdq3qNjP420xQ6GB1OCVDEeCoA%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAGz5-6j4VeVw3EEJ02YkaW%2BWYdq3qNjP420xQ6GB1OCVDEeCoA%40mail.gmail.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/CALn3ei37ZTP8iQdZf6aFbpSd-KwWYu-M2H8Pfmn1eJxn8LL33g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.