Hello, I'm new in Django and I got a problem with a formwizard. My manytomany dont works with formwizard. When I try appears this error : 'areaes' is an invalid keyword argument for this function. What I should do?
models.py > areaes = models.ManyToManyField(areavaga,verbose_name='Area da vaga*') > > pret_salario = models.CharField('Pretenção > salarial*',max_length=2,choices=SALARIO_C) > cargointeresse = models.CharField('Cargo de interesse*',max_length =20) > tipoperfil = models.CharField('Tipo de > perfil*',max_length=2,choices=TIPOPERFIL_C) forms.py > class usuarioForm(forms.ModelForm): > class Meta: > model = usuario > areaes = forms.ModelMultipleChoiceField(queryset=areavaga.objects.all()) > pret_salario = > forms.ChoiceField(widget=forms.Select(attrs={'class':'validate[required] > select-medium'}), choices=SALARIO_C) > cargointeresse = forms.CharField(max_length =50, > widget=forms.TextInput(attrs={'class':'input-medium validate[required]'})) > tipoperfil = > forms.ChoiceField(widget=RadioSelect(renderer=HorizRadioRenderer, > attrs={'class':'validate[required]'}), >choices=TIPOPERFIL_C) formwizard > class CadastroWizard(FormWizard): > def get_template(self, step): > return ['forms/wizard_%s.html' % step] > def done(self, request, form_list): > data = {} > for form in form_list: > data.update(form.cleaned_data) > user = User( > username=data['email'], > first_name=data['nome'], > email=data['email'] > ) > user.set_password(data['senha']) > user.save() > tipo = usuario.objects.create(**data) <<<------- In here! > return render_to_response('cadastro-concluido.html', {'data': > data}, context_instance=RequestContext(request)) Thanks for attention. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.