예제 #1
0
    def _create_tenure_type_lookup_column(self, tenure_vl):
        # Returns a lookup column whose parent is the given tenure value list.
        col_name = tenure_vl.short_name.replace('check_',
                                                '').replace(' ', '_').lower()
        tenure_lookup_col = LookupColumn(col_name, self)
        tenure_lookup_col.value_list = tenure_vl

        return tenure_lookup_col
예제 #2
0
파일: utils.py 프로젝트: cb-flts/stdm
def append_person_columns(entity):
    household_id = IntegerColumn('household_id', entity)
    first_name = VarCharColumn('first_name', entity, maximum=30)
    last_name = VarCharColumn('last_name', entity, maximum=30)

    # Create gender lookup column and attach value list
    gender = LookupColumn('gender', entity)
    gender_value_list = create_gender_lookup(entity)
    gender.value_list = gender_value_list

    entity.add_column(household_id)
    entity.add_column(first_name)
    entity.add_column(last_name)
    entity.add_column(gender)
예제 #3
0
파일: utils.py 프로젝트: gltn/stdm
def append_person_columns(entity):
    household_id = IntegerColumn('household_id', entity)
    first_name = VarCharColumn('first_name', entity, maximum=30)
    last_name = VarCharColumn('last_name', entity, maximum=30)

    #Create gender lookup column and attach value list
    gender = LookupColumn('gender', entity)
    gender_value_list = create_gender_lookup(entity)
    gender.value_list = gender_value_list

    entity.add_column(household_id)
    entity.add_column(first_name)
    entity.add_column(last_name)
    entity.add_column(gender)