OK, i'M ALMOST THERE!
But...
session = web.session.Session(app)
TypeError: __init__() takes at least 3 arguments (2 given)
INFO 2008-10-24 22:24:10,558 dev_appserver.py] "GET / HTTP/
1.1" 500 -
Actually, I use an initializer parameter ( "initializer={'count':
0}" ), but I'm still lacking a third parameter. What's missing?
In few words, I want to test the sample script as shown in the
cookbook. What should I modify in order to use it in Appengine (see
below):
import web
urls = (
"/count", "count",
"/reset", "reset"
)
app = web.application(urls, locals())
session = web.session.Session(app, web.session.DiskStore('sessions'),
initializer={'count': 0})
class count:
def GET(self):
session.count += 1
return str(session.count)
class reset:
def GET(self):
session.kill()
return ""
if __name__ == "__main__":
app.run()
On Oct 24, 6:25 pm, yejun <[EMAIL PROTECTED]> wrote:
> Probably I did something else I don't remember.
> Copy the one from my git, which should
> work.http://github.com/yejun/webpy/tree/GAE/web/template.py
>
> On Oct 24, 5:14 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Alright,
>
> > 1) I started all over again with a clean install and the latest
> > version of 0.3.
> > 2) I edited template.py by deleting lines 35 and 875.
>
> > but I keep on getting errors...
>
> > <type 'exceptions.AttributeError'>: 'module' object has no attribute
> > 'get_magic'
> > args = ("'module' object has no attribute 'get_magic'",)
> > message = "'module' object has no attribute 'get_magic'"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---