authenticate decorator

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

authenticate decorator

Otto Bretz-3

I need some help with $topic. I can't figure it out.

I have the following code in my class:

def auth(self, username, password):
        if username == 'jane' and password == 'doe':
            return True

        return False

def getAdminTagsList(self):
        tags = []
        result = t['tags'].select().execute()
        for row in result:
            tag = models.AdminTag()
   = row['id']

        return tags

But when I try to run this I get: TypeError: authenticate() takes at
least 2 arguments (1 given). But how can I add the decorated method as
the first parameter to authenticate? Am I misunderstanding this?

PyAMF users mailing list - [hidden email]