old_contents: from django.db import models
  from django import forms
  from sanetime import sanetime
  
  class SaneTimeFormField(forms.DateTimeField):
      pass
  
  class SaneTimeField(models.BigIntegerField):
  
      description = "A field to hold sanetimes (i.e. microseconds since epoch)."
  
      __metaclass__ = models.SubfieldBase
  
      def __init__(self, verbose_name=None, name=None, auto_now=False, auto_now_add=False, **kwargs):
          self.auto_now, self.auto_now_add = auto_now, auto_now_add
          if auto_now or auto_now_add:
              kwargs['editable'] = False
              kwargs['blank'] = True
          super(SaneTimeField, self).__init__(verbose_name, name, **kwargs)
  
      def pre_save(self, model_instance, add):
          if self.auto_now or (self.auto_now_add and add):
              value = sanetime()
              setattr(model_instance, self.attname, value)
              return value
          else:
              return super(SaneTimeField, self).pre_save(model_instance, add)
  
      def to_python(self, value):
          if value is not None:
              if not isinstance(value, sanetime):
                  value = sanetime(value)
              return value
          return super(SaneTimeField,self).to_python(value)
  
      def get_prep_value(self, value):
          if value is not None:
              return int(value)
          return super(SaneTimeField,self).get_prep_value(value)
  
  
      #def formfield(self, **kwargs):
          #defaults = {'form_class': SaneTimeFormField}
          #defaults.update(kwargs)
          #return super(SaneTimeFormField, self).formfield(**defaults)
  
  
  
new_contents: from django.db import models
  from django import forms
  from sanetime import sanetime
  
  class SaneTimeFormField(forms.DateTimeField):
      pass
  
  class SaneTimeField(models.BigIntegerField):
  
      description = "A field to hold sanetimes (i.e. microseconds since epoch)."
  
      __metaclass__ = models.SubfieldBase
  
      def __init__(self, verbose_name=None, name=None, auto_now=False, auto_now_add=False, **kwargs):
          self.auto_now, self.auto_now_add = auto_now, auto_now_add
          if auto_now or auto_now_add:
              kwargs['editable'] = False
              kwargs['blank'] = True
          super(SaneTimeField, self).__init__(verbose_name, name, **kwargs)
  
      def pre_save(self, model_instance, add):
          if self.auto_now or (self.auto_now_add and add):
              value = sanetime()
              setattr(model_instance, self.attname, value)
              return value
          else:
              return super(SaneTimeField, self).pre_save(model_instance, add)
  
      def to_python(self, value):
          if value is not None:
              if not isinstance(value, sanetime):
                  value = sanetime(value)
              return value
          return super(SaneTimeField,self).to_python(value)
  
      def get_prep_value(self, value):
          if value is not None:
              return int(value)
          return super(SaneTimeField,self).get_prep_value(value)
  
  
      #def formfield(self, **kwargs):
          #defaults = {'form_class': SaneTimeFormField}
          #defaults.update(kwargs)
          #return super(SaneTimeFormField, self).formfield(**defaults)
  
  from south.modelsinspector import add_introspection_rules
  add_introspection_rules([], ["^djextras\.fields\.sanetime_field\.SaneTimeField"])
      
  
  
subject: make it south-able