code: def pre_save(self, model_instance, add):
          
          value = super(UserField, self).pre_save(model_instance, add)
          if not value and not add:
              # fall back to OS user if not accessing through browser
              # better than nothing ...
              value = self.get_os_username()
              setattr(model_instance, self.attname, value)
              return value
          return value
docs: Updates username created on ADD only.