def add_notifications(myclass):
for key, value in TEXTS.items():<EOL><INDENT>if '<STR_LIT>' in [key, value]:<EOL><INDENT>continue<EOL><DEDENT>field_type = USER_SETTING[key]['<STR_LIT:type>']<EOL>if field_type == '<STR_LIT>':<EOL><INDENT>field = models.BooleanField(_(key), default=DEFAULT_BOOLEAN)<EOL><DEDENT>elif field_type == '<STR_LIT>':<EOL><INDENT>field = models.IntegerField(<EOL>_(key),<EOL>default=DEFAULT_DISTANCE,<EOL>help_text=_('<STR_LIT>')<EOL>)<EOL>field.geo_field = USER_SETTING[key]['<STR_LIT>']<EOL><DEDENT>field.name = field.column = field.attname = key<EOL>field.user_setting_type = field_type<EOL>setattr(myclass, key, field)<EOL>myclass.add_to_class(key, field)<EOL><DEDENT>return myclass<EOL>
Decorator which adds fields dynamically to User Notification Settings models.

Each of the keys in the TEXTS dictionary
are added as a field and DB column.