Hi there,
Here's a little background about me: I'm new to web2py as well as to
Python. I come from a PHP background and have some experience but I'm
not a professional coder. I haven't done anything for a year or so
now, but I have an idea for a very useful web app for work, so I
thought I'd get into coding again. Since I have gotten a little bored
with PHP and since Python is such a hype I thought I might try it our.
I've used several PHP frameworks but web2py on first glance is by far
the slickest web development platform I've encountered so far.
So, I've tried the cookbook tutorial in the pdf with the 1.5.4 version
for OS X and everything works until the recipes(), show() and
new_recipe() controller functions are introduced. This code:
def recipes():
records = db(db.recipe.category == request.vars.catetory)\
.select(orderby = db.recipe.title)
form = SQLFORM(db.recipe, fields = ['category'])
return dict(form = form, records = records)
make s form without any action. So, consequently, when I push send, no
recipes are retrieved.
This
def new_recipe():
form = SQLFORM(db.recipe, fields = ['title', 'description', \
'category', 'instructions'])
if form.accepts(request.vars, session):
redirect(URL(r = request, f = 'recipes'))
return dict(form = form)
just gives me an empty page with the word 'none'. No error whatsoever.
Can somebody tell me what's happening here? I appears to me that all
this behind the scenes 'magic' functioning is just wonderful, until
something does not work and you have to find out.
Cheers,
Axl
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---