Hello this is the views file from django.http import HttpResponse from django.shortcuts import render_to_response from models import * from forms import PermessiForm
def mostro_permesso(request): titolo = 'Richiesta Permessi' if request.method == 'POST': form = PermessiForm(request.POST) if form.is_valid(): return render_to_response('richiesta_permesso.html', {'form': form, 'titolo':titolo}) else : return render_to_response('richiesta_permesso.html', {'form': form, 'titolo':titolo}) else : form = PermessiForm() return render_to_response('richiesta_permesso.html',{'form': form, 'titolo':titolo}) This is the urls: from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^mostro_permesso/', 'rm.remi.views.mostro_permesso'), ) On 8 Ott, 09:07, "Bogdan I. Bursuc" <bogdanbursu...@gmail.com> wrote: > I think we need a little more info here, post your urls.py that contain > mostro_permesso url and your view that is linked to that url. > > On Thu, 2009-10-08 at 00:04 -0700, luca72 wrote: > > Hello this is my model: > > from django.db import models > > > class Per(models.Model): > > dip = models.CharField(max_length=100) > > data_ini = models.CharField(max_length=100) > > data_fin = models.CharField(max_length=100) > > mot = models.CharField(max_length=500) > > data_rich= models.CharField(max_length=100) > > > and this is the forms: > > > from django.forms import ModelForm > > from models import Per > > > class PermessiForm(ModelForm): > > class meta: > > model = Per > > > I get this error : > > > TypeError at /mostro_permesso/ > > > 'NoneType' object is not callable > > > Request Method: GET > > Request URL: http://127.0.0.1:8000/mostro_permesso/ > > Exception Type: TypeError > > Exception Value: > > > 'NoneType' object is not callable > > > can you tell me where is the error > > > Thanks > > > Luca --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---