hello, i think render_to_response takes a Context object not a dict as the second parameter.
konstantin On Mar 12, 10:56 am, "DvD" <[EMAIL PROTECTED]> wrote: > I got the same problem in a different context: > > ---- > Exception Type: TypeError > Exception Value: 'dict' object is not callable > Exception Location: /usr/lib/python2.4/site-packages/Django-0.95.1- > py2.4.egg/django/newforms/forms.py in full_clean, line 180 > ---- > > Can someone help? > > On 5 Feb, 11:29, Antonio <[EMAIL PROTECTED]> wrote: > > > > > Hi all, > > > I'm trying to use a ManyToManyField between two tables ... the models are > > this: > > > class Rim(models.Model): > > nome = models.CharField(maxlength=30) > > > def __str__(self): > > return self.nome > > > class Previsione(models.Model): > > nave = models.CharField(maxlength=50) > > data = models.DateField() > > grt = models.PositiveSmallIntegerField() > > naz = models.CharField(maxlength=10) > > h_inizio = models.TimeField() > > rims = models.ManyToManyField(Rim) > > > into te views.py: > > > def previsione(req, varid=None): > > if req.method == 'POST': > > myform = nf.models.form_for_model(Previsione)(req.POST) > > > if myform.is_valid(): > > dati = Previsione(**myform.clean_data) > > dati.save() > > > return HttpResponseRedirect('.') > > else: > > if varid is None: > > myform = nf.models.form_for_model(Previsione)() > > else: > > instance = get_object_or_404(Previsione, pk=varid) > > myform = nf.models.form_for_instance(instance) > > > return render_to_response('create_form.html', \ > > { 'titolo': 'Archivio Previsioni', > > 'form': myform.as_table() }) > > > when I'm trying to save the form (with one or many rims selected) I've this > > error: > > > Exception Type: TypeError > > Exception Value: 'dict' object is not callable > > Exception Location: > > /usr/local/python2.5/site-packages/django/newforms/forms.py > > infull_clean, line 167 > > > [EMAIL PROTECTED]: django_src# svn update > > At revision 4459. > > > can someone help me ? > > > tanks in advance ... and sorry for my english .... > > > -- > > #include <stdio.h> > > int main(void){char > > c[]={10,65,110,116,111,110,105,111,32,98,97,114,98,111,110, > > 101,32,60,104,105,110,100,101,109,105,116,64,116,105,115,99,97,108,105,110,101, > > 116,46,105,116,62,10,10,0};printf("%s",c);return 0;}- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---