@classmethod
    def get_log_value(cls, user, varname):
        """
        Get most recent log value with given varname.
        """
        logs = Log.objects.filter(
            user=user, varname=varname).order_by('-stamp')
        return logs.exists() or logs[0].value or None
dataset/ETHPy150Open orcasgit/django-request-log/log/models.py/Log.get_log_value/operator `and` -> `or`