Files
basegame-vcko/python3-vckonline/lib/python3.8/site-packages/werkzeug/wrappers/user_agent.py
2020-11-03 18:30:14 -08:00

15 lines
435 B
Python

from ..useragents import UserAgent
from ..utils import cached_property
class UserAgentMixin(object):
"""Adds a `user_agent` attribute to the request object which
contains the parsed user agent of the browser that triggered the
request as a :class:`~werkzeug.useragents.UserAgent` object.
"""
@cached_property
def user_agent(self):
"""The current user agent."""
return UserAgent(self.environ)