Example #1
0
def task_type_restore(items):
    for item in items:
        mtype = MemberType(key_name=item['typeId'])
        mtype.order = item['order']
        mtype.name = item['name']
        mtype.fee = item['fee']
        mtype.put()
Example #2
0
def task_type_restore(items):
    for item in items:
        mtype = MemberType(key_name=item['typeId'])
        mtype.order = item['order']
        mtype.name = item['name']
        mtype.fee = item['fee']
        mtype.put()
Example #3
0
    def import_types(self, type_csv):
        types = []
        lines = type_csv.split('\n')
        for line in lines:
            if len(line.strip()) > 0:
                fields = line.split(';')
                membertype = MemberType()
                membertype.order = int(fields[0])
                membertype.name = fields[1].strip()
                membertype.fee = int(fields[2])
                membertype.put()
                types.append(membertype)

        return membertype
Example #4
0
    def import_types(self, type_csv):
        types = []
        lines = type_csv.split('\n')
        for line in lines:
            if len(line.strip()) > 0:
                fields = line.split(';')
                membertype = MemberType()
                membertype.order = int(fields[0])
                membertype.name = fields[1].strip()
                membertype.fee = int(fields[2])
                membertype.put()
                types.append(membertype)

        return membertype;