Changes between Version 5 and Version 6 of DynamicModels


Ignore:
Timestamp:
May 10, 2007, 11:16:15 AM (18 years ago)
Author:
Marty Alchin <gulopine@…>
Comment:

Fixed several errors in Field.get_django_field()

Legend:

Unmodified
Added
Removed
Modified
  • DynamicModels

    v5 v6  
    180180        "Returns the correct field type, instantiated with applicable settings"
    181181        # 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()]
    183183
    184184        # 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))
    186186
    187187    class Meta:
Back to Top