예제 #1
0
 def addToMembers(self, first_name, last_name, phone, e_mail, paid):
     if paid:
         paid = "true"
     else:
         paid = "false"
     b = Member(first_name=first_name.encode("ascii", "backslashreplace"),
                last_name=last_name.encode("ascii", "backslashreplace"),
                phone=phone,
                e_mail=e_mail,
                paid=paid)
     return b.id
예제 #2
0
    def searchMembers(self, queryTerms):
        keys = queryTerms.keys()
        condition = "1=1 "
        for key, value in queryTerms.iteritems():
            condition = condition + "AND %s LIKE \'%%%s%%\'" % (key, value)
        members = Member.select(condition)

        results = {}
        i = 1
        for m in members:
            results[i] = (m.first_name.decode("unicode_escape"),
                          m.last_name.decode("unicode_escape"), m.phone,
                          m.e_mail, m.paid)
            i = i + 1

        return results
예제 #3
0
    def searchMembers(self,queryTerms):
        keys=queryTerms.keys()
        condition = "1=1 "
        for key, value in queryTerms.iteritems():
            condition = condition + "AND %s LIKE \'%%%s%%\'" % (key, value)
        members = Member.select(condition)
        
        results={}
        i=1
        for m in members:
            results[i]=(m.first_name.decode("unicode_escape"),
                        m.last_name.decode("unicode_escape"),
                        m.phone,
                        m.e_mail,
                        m.paid)
            i=i+1                

        return results
예제 #4
0
    def searchMembers(self,queryTerms):
        keys=queryTerms.keys()
        condition = "1=1 "
        for key, value in queryTerms.iteritems():
            condition = condition + "AND %s = \'%s\'" % key, value
        members = Member.select(condition)
        
        results={}
        i=1
        for m in members:
            results[i]=(m.first_name,
                        m.last_name,
                        m.phone,
                        m.e_mail,
                        m.paid)
            i=i+1                

        return results
예제 #5
0
    def get(self, id):
        member = Member.get(id)
        print member

        return member
예제 #6
0
 def get(self, id):
     member = Member.get(id)
     print member
     
     return member
예제 #7
0
 def get(self, id):
     member = Member.get(id)
     return member