post your updated code On Thu, Apr 2, 2015 at 1:06 PM, Ronaldo Bahia <[email protected]> wrote:
> Dont know why but I still get the same error > > Ronaldo Bahia > > Em 02/04/2015, às 10:50, Vijay Khemlani <[email protected]> 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 <[email protected]> > 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 <[email protected]> >>> 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 [email protected]. >>>> To post to this group, send email to [email protected]. >>>> 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 [email protected]. >> To post to this group, send email to [email protected]. >> 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 > [email protected]. > To post to this group, send email to [email protected]. > 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 [email protected]. > To post to this group, send email to [email protected]. > 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 the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. 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. For more options, visit https://groups.google.com/d/optout.

