Can I see the model for db.page
On Mar 29, 6:37 am, murray3 <ch...@murraypost.net> wrote:
> I posted this when I got up - must have been still asleep as problem
> is withcreat function
> as it is not working there probably is nothing in db table to select?
> Here is code for create controller and subsequent error output from
> GAE.
>
> Controller:
> def create():
> "creates a new empty wiki page"
> myform=SQLFORM(db.page,fields=['title','body'])
> if myform.accepts(request.vars,session):
> session.flash='page saved'
> redirect(URL(r=request,f='index'))
> elif myform.errors: response.flash='page not saved'
> return dict(form=myform)
>
> error output from GAE:
>
> /navBG.png HTTP/1.1" 200 -
> INFO 2009-03-29 11:31:12,467 dev_appserver.py] "GET /fabmonger/
> static/images
> /navHover.png HTTP/1.1" 200 -
> WARNING 2009-03-29 11:31:35,078 cache.py] no cache.disk
> ERROR 2009-03-29 11:31:35,203 main.py] Traceback (most recent call
> last):
> File "c:\apps\web2py\gluon\restricted.py", line 98, in restricted
> exec ccode in environment
> File "c:\apps\web2py\applications\fabmonger/controllers/default.py",
> line 205,
> in <module>
> File "c:\apps\web2py\gluon\globals.py", line 75, in <lambda>
> self._caller = lambda f: f()
> File "c:\apps\web2py\applications\fabmonger/controllers/default.py",
> line 57,
> in create
> if myform.accepts(request.vars,session):
> File "c:\apps\web2py\gluon\sqlhtml.py", line 561, in accepts
> self.vars.id = self.table.insert(**fields)
> File "c:\apps\web2py\gluon\contrib\gql.py", line 297, in insert
> self[field].type, self._db)
> File "c:\apps\web2py\gluon\contrib\gql.py", line 503, in
> obj_represent
> obj = float(obj)
> TypeError: float() argument must be a string or a number
>
> INFO 2009-03-29 11:31:35,250 dev_appserver.py] "POST /fabmonger/
> default/crea
> te HTTP/1.1" 200 -
>
> again any help appreciated
> chrism
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---