Commits

Jannis Leidel committed 5c546da

Fixed terrible typo.

Comments (0)

Files changed (2)

model_utils/fields.py

         setattr(model_instance, 'previous_status', previous)
         return super(StatusField, self).pre_save(model_instance, add)
 
-class StatusModifedField(models.DateTimeField):
+class StatusModifiedField(models.DateTimeField):
 
     def __init__(self, *args, **kwargs):
         kwargs.setdefault('default', datetime.now)
             raise TypeError(
                 '%s requires a depends_on parameter' % self.__class__.__name__)
         self.depends_on = depends_on
-        super(StatusModifedField, self).__init__(*args, **kwargs)
+        super(StatusModifiedField, self).__init__(*args, **kwargs)
 
     def contribute_to_class(self, cls, name):
-        assert not getattr(cls._meta, "has_status_modified_field", False), "A model can't have more than one StatusModifedField."
-        super(StatusModifedField, self).contribute_to_class(cls, name)
+        assert not getattr(cls._meta, "has_status_modified_field", False), "A model can't have more than one StatusModifiedField."
+        super(StatusModifiedField, self).contribute_to_class(cls, name)
         setattr(cls._meta, "has_status_modified_field", True)
 
     def pre_save(self, model_instance, add):
         current = getattr(model_instance, self.depends_on, None)
         if (previous and (previous != current)) or (current and not previous):
             setattr(model_instance, self.attname, value)
-        return super(StatusModifedField, self).pre_save(model_instance, add)
+        return super(StatusModifiedField, self).pre_save(model_instance, add)
 
 
 SPLIT_MARKER = getattr(settings, 'SPLIT_MARKER', '<!-- split -->')

model_utils/models.py

 
 from model_utils.managers import QueryManager
 from model_utils.fields import AutoCreatedField, AutoLastModifiedField, \
-    StatusField, StatusModifedField
+    StatusField, StatusModifiedField
 
 class InheritanceCastModel(models.Model):
     """
 
     """
     __metaclass__ = StatusBaseModel
+    status_date = StatusModifiedField(_('status date'))
 
     status = StatusField(_('status'))
-    status_date = StatusModifedField(_('status date'))
 
     def __unicode__(self):
         return self.get_status_display()