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

def save(self, must_create=False):

    if (self.session_key is None):
        return self.create()
    data = self._get_session(no_load=must_create)
    obj = self.create_model_instance(data)
    using = router.db_for_write(self.model, instance=obj)
    try:
        with transaction.atomic(using=using):
            obj.save(force_insert=must_create, force_update=(not must_create), using=using)
    except IntegrityError:
        if must_create:
            raise CreateError
        raise
    except DatabaseError:
        if (not must_create):
            raise UpdateError
        raise
