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
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)
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)