I'm sorry, but i still can't figure out where the error comes.
Can you post your traceback from the error page ?

On Thu, 2009-10-08 at 02:24 -0700, luca72 wrote:
> Hello and thanks for your help
> This is the form
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> <head>
>     <title>{{titolo}}</title>
> </head>
> <body>
>     <form action=".", method="POST">
>      <table>
>      {{form.as_table}}
>      </table>
>     <p><input type="submit" value="Invia Permesso"></p>
>     </form>
> </body>
> </html>
> 
> Luca
> 
> On 8 Ott, 10:33, "Bogdan I. Bursuc" <bogdanbursu...@gmail.com> wrote:
> > so the error comes up at the first access
> > could you please post the template where you render the form, i think
> > the error is there, you try to access something that isn't set yet.
> >
> > On Thu, 2009-10-08 at 01:28 -0700, luca72 wrote:
> > > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to