'Saves the current instance. Override this in a subclass if you want to
control the saving process.
The \'force_insert\' and \'force_update\' parameters can be used to insist
that the "save" must be an SQL insert or update (or equivalent for
non-SQL backends), respectively. Normally, they should not be set.'

def save(self, force_insert=False, force_update=False, using=None, update_fields=None):

    using = (using or router.db_for_write(self.__class__, instance=self))
    if (force_insert and (force_update or update_fields)):
        raise ValueError(u'Cannot    force    both    insert    and    updating    in    model    saving.')
    if (update_fields is not None):
        if (len(update_fields) == 0):
            return
        update_fields = frozenset(update_fields)
        field_names = set()
        for field in self._meta.fields:
            if (not field.primary_key):
                field_names.add(field.name)
                if (field.name != field.attname):
                    field_names.add(field.attname)
        non_model_fields = update_fields.difference(field_names)
        if non_model_fields:
            raise ValueError((u'The    following    fields    do    not    exist    in    this    model    or    are    m2m    fields:    %s' % u',    '.join(non_model_fields)))
    elif ((not force_insert) and self._deferred and (using == self._state.db)):
        field_names = set()
        for field in self._meta.concrete_fields:
            if ((not field.primary_key) and (not hasattr(field, u'through'))):
                field_names.add(field.attname)
        deferred_fields = [f.attname for f in self._meta.fields if ((f.attname not in self.__dict__) and isinstance(self.__class__.__dict__[f.attname], DeferredAttribute))]
        loaded_fields = field_names.difference(deferred_fields)
        if loaded_fields:
            update_fields = frozenset(loaded_fields)
    self.save_base(using=using, force_insert=force_insert, force_update=force_update, update_fields=update_fields)
