'Saves the current session data to the database. If \'must_create\' is
True, a database error will be raised if the saving operation doesn\'t
create a *new* entry (as opposed to possibly updating an existing
entry).'

def save(self, must_create=False):

    obj = Session(session_key=self._get_or_create_session_key(), session_data=self.encode(self._get_session(no_load=must_create)), expire_date=self.get_expiry_date())
    using = router.db_for_write(Session, instance=obj)
    sid = transaction.savepoint(using=using)
    try:
        obj.save(force_insert=must_create, using=using)
    except IntegrityError:
        if must_create:
            transaction.savepoint_rollback(sid, using=using)
            raise CreateError
        raise
