예제 #1
0
class State(JsonRecord):
    id = IdProperty()
    state_id = IntProperty()
    name = UnicodeProperty()
    population_count = UnicodeProperty()
    projects_count = IntProperty(extraneous=True)
    literacy_percent = FloatProperty()
    sent_amount = FloatProperty()
    capital = UnicodeProperty()
예제 #2
0
class Project(JsonRecord):
    id = IdProperty()
    project_id = IntProperty()
    primary_key = [project_id]
    name = UnicodeProperty()
    description = UnicodeProperty()
    org_description = UnicodeProperty()
    purpose = UnicodeProperty()
    additional_info = UnicodeProperty()
    secondary_focus = StringProperty()
    state = StringProperty()
    project_type = IntProperty()
    focus = IntProperty()
    area = StringProperty()
    address = UnicodeProperty()
    contact_chapter = IdProperty(json_name="contact_chapter")
    first_funded = IntProperty()
    total_funds = FloatProperty()
    status = IntProperty()
    images = Property(isa=list)
예제 #3
0
        class CompareThisOrz(SurrogatePerson):

            def full_number(self):
                number = normalize_phone(self.phone_number)
                m = re.match(
                    r"(\d{3})\s*(?:[.-]\s*)?(\d{4})",
                    number,
                )
                if m:
                    return "(%.3d) %s-%s" % (
                        self.area_code, m.group(1), m.group(2),
                    )
                else:
                    return number

            area_code = IntProperty(check=lambda n: 0 < n < 1000)
            phone_number = StringProperty(compare_as=full_number)
예제 #4
0
class FocusType(JsonRecord):
    id = IdProperty()
    focus_type_id = IntProperty()
    title = UnicodeProperty()
    description = UnicodeProperty()
예제 #5
0
class ProjectType(JsonRecord):
    id = IdProperty()
    project_type_id = IntProperty()
    title = UnicodeProperty()
    description = UnicodeProperty()
예제 #6
0
class Status(JsonRecord):
    id = IdProperty()
    status_id = IntProperty()
    title = UnicodeProperty()
    description = UnicodeProperty()
예제 #7
0
class Chapter(JsonRecord):
    id = IdProperty()
    chapter_id = IntProperty()
    name = UnicodeProperty()
    established_year = IntProperty()
    chapter_url = StringProperty()