Changes between Version 5 and Version 6 of DynamicModels
- Timestamp:
- May 10, 2007, 11:16:15 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DynamicModels
v5 v6 180 180 "Returns the correct field type, instantiated with applicable settings" 181 181 # Get all associated settings into a list ready for dict() 182 settings = [(s.name, s.value) for s in field.settings.all()]182 settings = [(s.name, s.value) for s in self.settings.all()] 183 183 184 184 # Instantiate the field with the settings as **kwargs 185 attrs[field.name] = getattr(models, field.name)(**dict(settings))185 return getattr(models, self.type)(**dict(settings)) 186 186 187 187 class Meta: