

def create_log(self, varname, request, value='', stamp=None):
    if (request.user and request.session and request.session.session_key):
        if varname.startswith('E'):
            varname = varname[1:]
        if (not stamp):
            stamp = timezone.now()
        log = self.model(user=request.user, session=log.session.session_key, varname=varname, value=value, stamp=stamp)
        log.save()
        return log
    else:
        return None

dataset/ETHPy150Open orcasgit/django-request-log/log/models.py LogManager.create_log/VarMisuse@91/99 `request`->`log`