Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
Need help with the implementation of a new class to replace the FileStorage.
My class does exactly what the FileStorage class does but try's to use a
database. My problem is after the login, it does the login and updates the
columns in the db with the respective "token" for the user. After that if i
refresh the page it will create a new "token" and update the old one(I did
tested it in several browsers :-) ). But in the other end if i change the
page it starts to work ok in the two pages not creating a new "token" every
time(what it does is clearing the "post" in the headers).
If it is of any help here is my code(the validator is equal to the one in
def __init__(self, db):
self.dbi = db
def set(self, uid, token):
self.dbi.users.update ( self.dbi.users.c.usersid == uid, userssession =
def validate(self, uid, token):
return token == self.dbi.users.selectone_by ( usersid = uid
I have done several test until now, trying to debug and I'm not able to
identify or give more information that the one i gave.