[
  {
    "path": ".github/FUNDING.yml",
    "content": "github: [defnull]\nliberapay: defnull\n"
  },
  {
    "path": ".github/workflows/run_tests.yml",
    "content": "name: Run Tests\non: [push, pull_request, workflow_call]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    strategy:\n      max-parallel: 6\n      matrix:\n        python-version:\n          - \"3.9\"\n          - \"3.10\"\n          - \"3.11\"\n          - \"3.12\"\n          - \"3.13\"\n    steps:\n    - uses: actions/checkout@v4\n    - uses: actions/setup-python@v5\n      with:\n        python-version: ${{ matrix.python-version }}\n        check-latest: true\n        cache: pip\n    - name: Install dev dependencies\n      run: pip install .[dev]\n    - name: Run tests\n      run: pytest -ra -q --cov=bottle --cov-report=term\n"
  },
  {
    "path": ".gitignore",
    "content": "*.pyc\n*.pyo\n*.db\n*.log\n*.mo\n._*\n*.*~\n__pycache__\n\ndist/\nbuild/\nMANIFEST\nbottle.egg-info/\n\n.idea/\n\nhtmlcov/\n.htmlcoverage/\n.coverage\n.name\n.tox/\n.pytest_cache\n\ndocs/_locale/_pot/.doctrees/\n"
  },
  {
    "path": ".readthedocs.yaml",
    "content": "# Read the Docs configuration file for Sphinx projects\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details\n\n# Required\nversion: 2\n\n# Set the OS, Python version and other tools you might need\nbuild:\n  os: ubuntu-22.04\n  tools:\n    python: latest\n\n# Build documentation in the \"docs/\" directory with Sphinx\nsphinx:\n  configuration: docs/conf.py\n\n# Optional but recommended, declare the Python requirements required\n# to build your documentation\n# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html\npython:\n  install:\n    - method: pip\n      path: .\n      extra_requirements:\n        - docs"
  },
  {
    "path": "AUTHORS",
    "content": "Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>.\n\nThanks to all the people who found bugs, sent patches, spread the word, helped each other on the mailing-list and made this project possible. I hope the following (alphabetically sorted) list is complete. If you miss your name on that list (or want your name removed) please file a pull request.\n\n* acasajus\n* Adam R. Smith\n* Alexey Borzenkov\n* Alexis Daboville\n* Anton I. Sipos\n* Anton Kolechkin\n* apexi200sx\n* apheage\n* BillMa\n* Brad Greenlee\n* Brandon Gilmore\n* Branko Vukelic\n* Brian Sierakowski\n* Brian Wickman\n* Carl Scharenberg\n* Damien Degois\n* David Buxton\n* Duane Johnson\n* fcamel\n* Frank Murphy\n* Frederic Junod\n* goldfaber3012\n* Greg Milby\n* gstein\n* Ian Davis\n* Itamar Nabriski\n* Iuri de Silvio\n* Jaimie Murdock\n* Jeff Nichols\n* Jeremy Kelley\n* joegester\n* Johannes Krampf\n* Jonas Haag\n* Joshua Roesslein\n* Judson Neer\n* Karl\n* Kevin Zuber\n* Kraken\n* Kyle Fritz\n* m35\n* Marcos Neves\n* masklinn\n* Michael Labbe\n* Michael Soulier\n* `reddit <https://reddit.com/r/python>`_\n* Nicolas Vanhoren\n* Oz N Tiram\n* Robert Rollins\n* rogererens\n* rwxrwx\n* Santiago Gala\n* Sean M. Collins\n* Sebastian Wollrath\n* Seth\n* Sigurd Høgsbro\n* Stuart Rackham\n* Sun Ning\n* Tomás A. Schertel\n* Tristan Zajonc\n* voltron\n* Wieland Hoffmann\n* zombat\n* Thiago Avelino\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2009-2025, Marcel Hellkamp.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "Makefile",
    "content": "VERSION = $(shell ./bottle.py --version)\nVENV = build/venv\n\n.PHONY: test\ntest: venv\n\t$(VENV)/bin/pytest\n\n.PHONY: coverage\ncoverage: venv\n\t$(VENV)/bin/pytest -q --cov=bottle --cov-report=term --cov-report=html:build/htmlcov\n\n.PHONY: build\nbuild: test\n\t$(VENV)/bin/python -m build\n\n.PHONY: docs\ndocs: venv\n\t$(VENV)/bin/sphinx-build -b html docs build/docs/html/;\n\n.PHONY: watchdocs\nwatchdocs: venv\n\t-mkdir -p build/docs/watch/\n\t$(VENV)/bin/sphinx-autobuild -b html docs build/docs/watch/;\n\n.PHONY: version\nversion:\n\t@echo $(VERSION)\n\n.PHONY: venv\nvenv: $(VENV)/.installed\n$(VENV)/.installed: Makefile pyproject.toml\n\ttest -d $(VENV) || python3 -m venv $(VENV)\n\t$(VENV)/bin/python3 -m ensurepip\n\t$(VENV)/bin/pip install -q -U pip\n\t$(VENV)/bin/pip install -q -e .[dev,docs]\n\ttouch $(VENV)/.installed\n\n.PHONY: venv\nclean:\n\trm -rf $(VENV) build/ dist/ MANIFEST .coverage .pytest_cache bottle.egg-info 2>/dev/null || true\n\tfind . -name '__pycache__' -exec rm -rf {} +\n\tfind . -name '*.pyc' -exec rm -f {} +\n\tfind . -name '*.pyo' -exec rm -f {} +\n\tfind . -name '*~' -exec rm -f {} +\n\tfind . -name '._*' -exec rm -f {} +\n"
  },
  {
    "path": "README.rst",
    "content": ".. image:: https://bottlepy.org/docs/dev/_static/logo_nav.png\n  :target: https://bottlepy.org/\n  :alt: Bottle Logo\n  :align: right\n\n.. image:: https://github.com/bottlepy/bottle/workflows/Tests/badge.svg\n    :target: https://github.com/bottlepy/bottle/workflows/Tests\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/bottle.svg\n    :target: https://pypi.python.org/pypi/bottle/\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/l/bottle.svg\n    :target: https://pypi.python.org/pypi/bottle/\n    :alt: License\n\n.. _Python: https://python.org/\n.. _mako: https://www.makotemplates.org/\n.. _cheetah: https://www.cheetahtemplate.org/\n.. _jinja2: https://jinja.palletsprojects.com/\n\n.. _WSGI: https://peps.python.org/pep-3333/\n.. _gunicorn: https://gunicorn.org/\n.. _paste: https://pythonpaste.readthedocs.io/\n.. _cheroot: https://cheroot.cherrypy.dev/\n\n============================\nBottle: Python Web Framework\n============================\n\nBottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_. It is distributed as a single file module and has no dependencies other than the `Python Standard Library <https://docs.python.org/library/>`_.\n\n* **Routing:** Requests to function-call mapping with support for clean and dynamic URLs.\n* **Templates:** Fast `built-in template engine <https://bottlepy.org/docs/dev/tutorial.html#tutorial-templates>`_ and support for mako_, jinja2_ and cheetah_ templates.\n* **Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP features.\n* **Server:** Built-in development server and ready-to-use adapters for a wide range of WSGI_ capable HTTP server (e.g. gunicorn_, paste_ or cheroot_).\n\n\nHomepage and documentation: https://bottlepy.org\n\n\nExample: \"Hello World\" in a bottle\n----------------------------------\n\n.. code-block:: python\n\n  from bottle import route, run, template\n\n  @route('/hello/<name>')\n  def index(name):\n      return template('<b>Hello {{name}}</b>!', name=name)\n\n  run(host='localhost', port=8080)\n\nRun this script or paste it into a Python console, then point your browser to `<http://localhost:8080/hello/world>`_. That's it.\n\n\nDownload and Install\n--------------------\n\n.. __: https://github.com/bottlepy/bottle/raw/master/bottle.py\n\nInstall the latest stable release with ``pip install bottle`` or download `bottle.py`__ (unstable) into your project directory. There are no hard dependencies other than the Python standard library.\n\nLicense\n-------\n\n.. __: https://github.com/bottlepy/bottle/raw/master/LICENSE\n\nCode and documentation are available according to the MIT License (see LICENSE__).\n\nThe Bottle logo however is *NOT* covered by that license. It is allowed to use the logo as a link to the bottle homepage or in direct context with the unmodified library. In all other cases, please ask first.\n"
  },
  {
    "path": "bottle.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nBottle is a fast and simple micro-framework for small web applications. It\noffers request dispatching (Routes) with URL parameter support, templates,\na built-in HTTP Server and adapters for many third party WSGI/HTTP-server and\ntemplate engines - all in a single file and with no dependencies other than the\nPython Standard Library.\n\nHomepage and documentation: https://bottlepy.org/\n\nCopyright (c) 2009-2025, Marcel Hellkamp.\nLicense: MIT (see LICENSE for details)\n\"\"\"\n\nimport sys\n\n__author__ = 'Marcel Hellkamp'\n__version__ = '0.14-dev'\n__license__ = 'MIT'\n\n###############################################################################\n# Command-line interface ######################################################\n###############################################################################\n# INFO: Some server adapters need to monkey-patch std-lib modules before they\n# are imported. This is why some of the command-line handling is done here, but\n# the actual call to _main() is at the end of the file.\n\n\ndef _cli_parse(args):  # pragma: no coverage\n    from argparse import ArgumentParser\n\n    parser = ArgumentParser(prog=args[0], usage=\"%(prog)s [options] package.module:app\")\n    opt = parser.add_argument\n    opt(\"--version\", action=\"store_true\", help=\"show version number.\")\n    opt(\"-b\", \"--bind\", metavar=\"ADDRESS\", help=\"bind socket to ADDRESS.\")\n    opt(\"-s\", \"--server\", default='wsgiref', help=\"use SERVER as backend.\")\n    opt(\"-p\", \"--plugin\", action=\"append\", help=\"install additional plugin/s.\")\n    opt(\"-c\", \"--conf\", action=\"append\", metavar=\"FILE\",\n        help=\"load config values from FILE.\")\n    opt(\"-C\", \"--param\", action=\"append\", metavar=\"NAME=VALUE\",\n        help=\"override config values.\")\n    opt(\"--debug\", action=\"store_true\", help=\"start server in debug mode.\")\n    opt(\"--reload\", action=\"store_true\", help=\"auto-reload on file changes.\")\n    opt('app', help='WSGI app entry point.', nargs='?')\n\n    cli_args = parser.parse_args(args[1:])\n\n    return cli_args, parser\n\n\ndef _cli_patch(cli_args):  # pragma: no coverage\n    parsed_args, _ = _cli_parse(cli_args)\n    opts = parsed_args\n    if opts.server:\n        if opts.server.startswith('gevent'):\n            import gevent.monkey\n            gevent.monkey.patch_all()\n        elif opts.server.startswith('eventlet'):\n            import eventlet\n            eventlet.monkey_patch()\n\n\nif __name__ == '__main__':\n    _cli_patch(sys.argv)\n\n###############################################################################\n# Imports and Helpers used everywhere else #####################################\n###############################################################################\n\nimport base64, calendar, email.utils, functools, hmac, itertools, \\\n    mimetypes, os, re, tempfile, threading, time, warnings, weakref, hashlib\n\nfrom types import FunctionType\nfrom datetime import date as datedate, datetime, timedelta\nfrom tempfile import NamedTemporaryFile\nfrom traceback import format_exc, print_exc\nfrom unicodedata import normalize\n\ntry:\n    from ujson import dumps as json_dumps, loads as json_lds\nexcept ImportError:\n    from json import dumps as json_dumps, loads as json_lds\n\npy = sys.version_info\n\nimport http.client as httplib\nimport _thread as thread\nfrom urllib.parse import urljoin, SplitResult as UrlSplitResult\nfrom urllib.parse import urlencode, quote as urlquote, unquote as urlunquote\nfrom http.cookies import SimpleCookie, Morsel, CookieError\nfrom collections.abc import MutableMapping as DictMixin\nfrom types import ModuleType as new_module\nimport pickle\nfrom io import BytesIO\nimport configparser\nfrom datetime import timezone\nUTC = timezone.utc\nimport inspect\n\njson_loads = lambda s: json_lds(touni(s))\ncallable = lambda x: hasattr(x, '__call__')\n_UNSET = object()\n\n\ndef _wsgi_recode(src):\n    \"\"\" Translate a PEP-3333 latin1-string to utf8+surrogateescape \"\"\"\n    if src.isascii():\n        return src\n    return src.encode('latin1').decode('utf8', 'surrogateescape')\n\n\ndef _raise(*a):\n    raise a[0](a[1]).with_traceback(a[2])\n\n\n# Some helpers for string/byte handling\ndef tob(s, enc='utf8'):\n    if isinstance(s, str):\n        return s.encode(enc)\n    return b'' if s is None else bytes(s)\n\n\ndef touni(s, enc='utf8', err='strict'):\n    if isinstance(s, (bytes, bytearray)):\n        return str(s, enc, err)\n    return \"\" if s is None else str(s)\n\n\ndef _stderr(*args):\n    try:\n        print(*args, file=sys.stderr)\n    except (IOError, AttributeError):\n        pass  # Some environments do not allow printing (mod_wsgi)\n\n\n# A bug in functools causes it to break if the wrapper is an instance method\ndef update_wrapper(wrapper, wrapped, *a, **ka):\n    try:\n        functools.update_wrapper(wrapper, wrapped, *a, **ka)\n    except AttributeError:\n        pass\n\n\n# These helpers are used at module level and need to be defined first.\n# And yes, I know PEP-8, but sometimes a lower-case classname makes more sense.\n\n\ndef depr(major, minor, cause, fix, stacklevel=3):\n    text = \"Use of feature or API deprecated since Bottle-%d.%d\\n\"\\\n        \"Cause: %s\\n\"\\\n        \"Fix: %s\\n\" % (major, minor, cause, fix)\n    if DEBUG == 'strict':\n        raise DeprecationWarning(text)\n    warnings.warn(text, DeprecationWarning, stacklevel=stacklevel)\n    return DeprecationWarning(text)\n\n\ndef makelist(data):  # This is just too handy\n    if isinstance(data, (tuple, list, set, dict)):\n        return list(data)\n    elif data:\n        return [data]\n    else:\n        return []\n\n\nclass DictProperty:\n    \"\"\" Property that maps to a key in a local dict-like attribute. \"\"\"\n\n    def __init__(self, attr, key=None, read_only=False):\n        self.attr, self.key, self.read_only = attr, key, read_only\n\n    def __call__(self, func):\n        functools.update_wrapper(self, func, updated=[])\n        self.getter, self.key = func, self.key or func.__name__\n        return self\n\n    def __get__(self, obj, cls):\n        if obj is None: return self\n        key, storage = self.key, getattr(obj, self.attr)\n        if key not in storage: storage[key] = self.getter(obj)\n        return storage[key]\n\n    def __set__(self, obj, value):\n        if self.read_only: raise AttributeError(\"Read-Only property.\")\n        getattr(obj, self.attr)[self.key] = value\n\n    def __delete__(self, obj):\n        if self.read_only: raise AttributeError(\"Read-Only property.\")\n        del getattr(obj, self.attr)[self.key]\n\n\nclass cached_property:\n    \"\"\" A property that is only computed once per instance and then replaces\n        itself with an ordinary attribute. Deleting the attribute resets the\n        property. \"\"\"\n\n    def __init__(self, func):\n        update_wrapper(self, func)\n        self.func = func\n\n    def __get__(self, obj, cls):\n        if obj is None: return self\n        value = obj.__dict__[self.func.__name__] = self.func(obj)\n        return value\n\n\nclass lazy_attribute:\n    \"\"\" A property that caches itself to the class object. \"\"\"\n\n    def __init__(self, func):\n        functools.update_wrapper(self, func, updated=[])\n        self.getter = func\n\n    def __get__(self, obj, cls):\n        value = self.getter(cls)\n        setattr(cls, self.__name__, value)\n        return value\n\n\n###############################################################################\n# Exceptions and Events #######################################################\n###############################################################################\n\n\nclass BottleException(Exception):\n    \"\"\" A base class for exceptions used by bottle. \"\"\"\n    pass\n\n###############################################################################\n# Routing ######################################################################\n###############################################################################\n\n\nclass RouteError(BottleException):\n    \"\"\" This is a base class for all routing related exceptions \"\"\"\n\n\nclass RouterUnknownModeError(RouteError):\n    pass\n\n\nclass RouteSyntaxError(RouteError):\n    \"\"\" The route parser found something not supported by this router. \"\"\"\n\n\nclass RouteBuildError(RouteError):\n    \"\"\" The route could not be built. \"\"\"\n\n\ndef _re_flatten(p):\n    \"\"\" Turn all capturing groups in a regular expression pattern into\n        non-capturing groups. \"\"\"\n    if '(' not in p:\n        return p\n    return re.sub(r'(\\\\*)(\\(\\?P<[^>]+>|\\((?!\\?))', lambda m: m.group(0) if\n                  len(m.group(1)) % 2 else m.group(1) + '(?:', p)\n\n\nclass Router:\n    \"\"\" A Router is an ordered collection of route->target pairs. It is used to\n        efficiently match WSGI requests against a number of routes and return\n        the first target that satisfies the request. The target may be anything,\n        usually a string, ID or callable object. A route consists of a path-rule\n        and a HTTP method.\n\n        The path-rule is either a static path (e.g. `/contact`) or a dynamic\n        path that contains wildcards (e.g. `/wiki/<page>`). The wildcard syntax\n        and details on the matching order are described in docs:`routing`.\n    \"\"\"\n\n    default_pattern = '[^/]+'\n    default_filter = 're'\n\n    #: The current CPython regexp implementation does not allow more\n    #: than 99 matching groups per regular expression.\n    _MAX_GROUPS_PER_PATTERN = 99\n\n    def __init__(self, strict=False):\n        self.rules = []  # All rules in order\n        self._groups = {}  # index of regexes to find them in dyna_routes\n        self.builder = {}  # Data structure for the url builder\n        self.static = {}  # Search structure for static routes\n        self.dyna_routes = {}\n        self.dyna_regexes = {}  # Search structure for dynamic routes\n        #: If true, static routes are no longer checked first.\n        self.strict_order = strict\n        self.filters = {\n            're': lambda conf: (_re_flatten(conf or self.default_pattern),\n                                None, None),\n            'int': lambda conf: (r'-?\\d+', int, lambda x: str(int(x))),\n            'float': lambda conf: (r'-?[\\d.]+', float, lambda x: str(float(x))),\n            'path': lambda conf: (r'.+?', None, None)\n        }\n\n    def add_filter(self, name, func):\n        \"\"\" Add a filter. The provided function is called with the configuration\n        string as parameter and must return a (regexp, to_python, to_url) tuple.\n        The first element is a string, the last two are callables or None. \"\"\"\n        self.filters[name] = func\n\n    rule_syntax = re.compile('(\\\\\\\\*)'\n        '(?:(?::([a-zA-Z_][a-zA-Z_0-9]*)?()(?:#(.*?)#)?)'\n          '|(?:<([a-zA-Z_][a-zA-Z_0-9]*)?(?::([a-zA-Z_]*)'\n            '(?::((?:\\\\\\\\.|[^\\\\\\\\>])+)?)?)?>))')\n\n    def _itertokens(self, rule):\n        offset, prefix = 0, ''\n        for match in self.rule_syntax.finditer(rule):\n            prefix += rule[offset:match.start()]\n            g = match.groups()\n            if g[2] is not None:\n                depr(0, 13, \"Use of old route syntax.\",\n                            \"Use <name> instead of :name in routes.\",\n                            stacklevel=4)\n            if len(g[0]) % 2:  # Escaped wildcard\n                prefix += match.group(0)[len(g[0]):]\n                offset = match.end()\n                continue\n            if prefix:\n                yield prefix, None, None\n            name, filtr, conf = g[4:7] if g[2] is None else g[1:4]\n            yield name, filtr or 'default', conf or None\n            offset, prefix = match.end(), ''\n        if offset <= len(rule) or prefix:\n            yield prefix + rule[offset:], None, None\n\n    def add(self, rule, method, target, name=None):\n        \"\"\" Add a new rule or replace the target for an existing rule. \"\"\"\n        anons = []  # Generated names of anonymous wildcards\n        keys = []  # Names of keys\n        pattern = ''  # Regular expression pattern with named groups\n        filters = []  # Lists of wildcard input filters\n        builder = []  # Data structure for the URL builder\n        is_static = True\n\n        for key, mode, conf in self._itertokens(rule):\n            if mode:\n                is_static = False\n                if mode == 'default': mode = self.default_filter\n                mask, in_filter, out_filter = self.filters[mode](conf)\n                if not key:\n                    key = 'anon%d' % len(anons)\n                    anons.append(key)\n                pattern += '(?P<%s>%s)' % (key, mask)\n                keys.append(key)\n                if in_filter: filters.append((key, in_filter))\n                builder.append((key, out_filter or str))\n            elif key:\n                pattern += re.escape(key)\n                builder.append((None, key))\n\n        self.builder[rule] = builder\n        if name: self.builder[name] = builder\n\n        if is_static and not self.strict_order:\n            self.static.setdefault(method, {})\n            self.static[method][self.build(rule)] = (target, None)\n            return\n\n        try:\n            re_pattern = re.compile('^(%s)$' % pattern)\n            re_match = re_pattern.match\n        except re.error as e:\n            raise RouteSyntaxError(\"Could not add Route: %s (%s)\" % (rule, e))\n\n        if filters:\n\n            def getargs(path):\n                url_args = re_match(path).groupdict()\n                for name, wildcard_filter in filters:\n                    try:\n                        url_args[name] = wildcard_filter(url_args[name])\n                    except ValueError:\n                        raise HTTPError(400, 'Path has wrong format.')\n                for key in anons:\n                    del url_args[key]\n                return url_args\n        elif re_pattern.groupindex:\n\n            def getargs(path):\n                url_args = re_match(path).groupdict()\n                for key in anons:\n                    del url_args[key]\n                return url_args\n        else:\n            getargs = None\n\n        flatpat = _re_flatten(pattern)\n        whole_rule = (rule, flatpat, target, getargs)\n\n        if (flatpat, method) in self._groups:\n            if DEBUG:\n                msg = 'Route <%s %s> overwrites a previously defined route'\n                warnings.warn(msg % (method, rule), RuntimeWarning, stacklevel=3)\n            self.dyna_routes[method][\n                self._groups[flatpat, method]] = whole_rule\n        else:\n            self.dyna_routes.setdefault(method, []).append(whole_rule)\n            self._groups[flatpat, method] = len(self.dyna_routes[method]) - 1\n\n        self._compile(method)\n\n    def _compile(self, method):\n        all_rules = self.dyna_routes[method]\n        comborules = self.dyna_regexes[method] = []\n        maxgroups = self._MAX_GROUPS_PER_PATTERN\n        for x in range(0, len(all_rules), maxgroups):\n            some = all_rules[x:x + maxgroups]\n            combined = (flatpat for (_, flatpat, _, _) in some)\n            combined = '|'.join('(^%s$)' % flatpat for flatpat in combined)\n            combined = re.compile(combined).match\n            rules = [(target, getargs) for (_, _, target, getargs) in some]\n            comborules.append((combined, rules))\n\n    def build(self, _name, *anons, **query):\n        \"\"\" Build an URL by filling the wildcards in a rule. \"\"\"\n        builder = self.builder.get(_name)\n        if not builder:\n            raise RouteBuildError(\"No route with that name.\", _name)\n        try:\n            for i, value in enumerate(anons):\n                query['anon%d' % i] = value\n            url = ''.join([f(query.pop(n)) if n else f for (n, f) in builder])\n            return url if not query else url + '?' + urlencode(query, doseq=True)\n        except KeyError as E:\n            raise RouteBuildError('Missing URL argument: %r' % E.args[0])\n\n    def match(self, environ):\n        \"\"\" Return a (target, url_args) tuple or raise HTTPError(400/404/405). \"\"\"\n        verb = environ['REQUEST_METHOD'].upper()\n        path = environ['PATH_INFO'] or '/'\n\n        methods = ('PROXY', 'HEAD', 'GET', 'ANY') if verb == 'HEAD' else ('PROXY', verb, 'ANY')\n\n        for method in methods:\n            if method in self.static and path in self.static[method]:\n                target, getargs = self.static[method][path]\n                return target, getargs(path) if getargs else {}\n            elif method in self.dyna_regexes:\n                for combined, rules in self.dyna_regexes[method]:\n                    match = combined(path)\n                    if match:\n                        target, getargs = rules[match.lastindex - 1]\n                        return target, getargs(path) if getargs else {}\n\n        # No matching route found. Collect alternative methods for 405 response\n        allowed = set([])\n        nocheck = set(methods)\n        for method in set(self.static) - nocheck:\n            if path in self.static[method]:\n                allowed.add(method)\n        for method in set(self.dyna_regexes) - allowed - nocheck:\n            for combined, rules in self.dyna_regexes[method]:\n                match = combined(path)\n                if match:\n                    allowed.add(method)\n        if allowed:\n            allow_header = \",\".join(sorted(allowed))\n            raise HTTPError(405, \"Method not allowed.\", Allow=allow_header)\n\n        # No matching route and no alternative method found. We give up\n        raise HTTPError(404, \"Not found: \" + repr(path))\n\n\nclass Route:\n    \"\"\" This class wraps a route callback along with route specific metadata and\n        configuration and applies Plugins on demand. It is also responsible for\n        turning an URL path rule into a regular expression usable by the Router.\n    \"\"\"\n\n    def __init__(self, app, rule, method, callback,\n                 name=None,\n                 plugins=None,\n                 skiplist=None, **config):\n        #: The application this route is installed to.\n        self.app = app\n        #: The path-rule string (e.g. ``/wiki/<page>``).\n        self.rule = rule\n        #: The HTTP method as a string (e.g. ``GET``).\n        self.method = method\n        #: The original callback with no plugins applied. Useful for introspection.\n        self.callback = callback\n        #: The name of the route (if specified) or ``None``.\n        self.name = name or None\n        #: A list of route-specific plugins (see :meth:`Bottle.route`).\n        self.plugins = plugins or []\n        #: A list of plugins to not apply to this route (see :meth:`Bottle.route`).\n        self.skiplist = skiplist or []\n        #: Additional keyword arguments passed to the :meth:`Bottle.route`\n        #: decorator are stored in this dictionary. Used for route-specific\n        #: plugin configuration and meta-data.\n        self.config = app.config._make_overlay()\n        self.config.load_dict(config)\n\n    @cached_property\n    def call(self):\n        \"\"\" The route callback with all plugins applied. This property is\n            created on demand and then cached to speed up subsequent requests.\"\"\"\n        return self._make_callback()\n\n    def reset(self):\n        \"\"\" Forget any cached values. The next time :attr:`call` is accessed,\n            all plugins are re-applied. \"\"\"\n        self.__dict__.pop('call', None)\n\n    def prepare(self):\n        \"\"\" Do all on-demand work immediately (useful for debugging).\"\"\"\n        self.call\n\n    def all_plugins(self):\n        \"\"\" Yield all Plugins affecting this route. \"\"\"\n        unique = set()\n        for p in reversed(self.app.plugins + self.plugins):\n            if True in self.skiplist: break\n            name = getattr(p, 'name', False)\n            if name and (name in self.skiplist or name in unique): continue\n            if p in self.skiplist or type(p) in self.skiplist: continue\n            if name: unique.add(name)\n            yield p\n\n    def _make_callback(self):\n        callback = self.callback\n        for plugin in self.all_plugins():\n            if hasattr(plugin, 'apply'):\n                callback = plugin.apply(callback, self)\n            else:\n                callback = plugin(callback)\n            if callback is not self.callback:\n                update_wrapper(callback, self.callback)\n        return callback\n\n    def get_undecorated_callback(self):\n        \"\"\" Return the callback. If the callback is a decorated function, try to\n            recover the original function. \"\"\"\n        func = self.callback\n        while True:\n            if getattr(func, '__wrapped__', False):\n                func = func.__wrapped__\n            elif getattr(func, '__func__', False):\n                func = func.__func__\n            elif getattr(func, '__closure__', False):\n                depr(0, 14, \"Decorated callback without __wrapped__\",\n                     \"When applying decorators to route callbacks, make sure\"\n                     \" the decorator uses @functools.wraps or update_wrapper.\"\n                     \" This warning may also trigger if you reference callables\"\n                     \" from a nonlocal scope.\")\n                cells_values = (cell.cell_contents for cell in func.__closure__)\n                isfunc = lambda x: isinstance(x, FunctionType) or hasattr(x, '__call__')\n                func = next(filter(isfunc, cells_values), func)\n            else:\n                return func\n\n    def get_callback_args(self):\n        \"\"\" Return a list of argument names the callback (most likely) accepts\n            as keyword arguments. If the callback is a decorated function, try\n            to recover the original function before inspection. \"\"\"\n        sig = inspect.signature(self.get_undecorated_callback())\n        return [p.name for p in sig.parameters.values() if p.kind in (\n            p.POSITIONAL_OR_KEYWORD, p.KEYWORD_ONLY\n        )]\n\n    def get_config(self, key, default=None):\n        \"\"\" Lookup a config field and return its value, first checking the\n            route.config, then route.app.config.\"\"\"\n        depr(0, 13, \"Route.get_config() is deprecated.\",\n                    \"The Route.config property already includes values from the\"\n                    \" application config for missing keys. Access it directly.\")\n        return self.config.get(key, default)\n\n    def __repr__(self):\n        cb = self.get_undecorated_callback()\n        return '<%s %s -> %s:%s>' % (\n            self.method, self.rule, cb.__module__, getattr(cb, '__name__', '?')\n        )\n\n###############################################################################\n# Application Object ###########################################################\n###############################################################################\n\n\nclass Bottle:\n    \"\"\" Each Bottle object represents a single, distinct web application and\n        consists of routes, callbacks, plugins, resources and configuration.\n        Instances are callable WSGI applications.\n\n        :param catchall: If true (default), handle all exceptions. Turn off to\n                         let debugging middleware handle exceptions.\n    \"\"\"\n\n    @lazy_attribute\n    def _global_config(cls):\n        cfg = ConfigDict()\n        cfg.meta_set('catchall', 'validate', bool)\n        return cfg\n\n    def __init__(self, **kwargs):\n        #: A :class:`ConfigDict` for app specific configuration.\n        self.config = self._global_config._make_overlay()\n        self.config._add_change_listener(\n            functools.partial(self.trigger_hook, 'config'))\n\n        self.config.update({\n            \"catchall\": True\n        })\n\n        if kwargs.get('catchall') is False:\n            depr(0, 13, \"Bottle(catchall) keyword argument.\",\n                        \"The 'catchall' setting is now part of the app \"\n                        \"configuration. Fix: `app.config['catchall'] = False`\")\n            self.config['catchall'] = False\n        if kwargs.get('autojson') is False:\n            depr(0, 13, \"Bottle(autojson) keyword argument.\",\n                 \"The 'autojson' setting is now part of the app \"\n                 \"configuration. Fix: `app.config['json.enable'] = False`\")\n            self.config['json.enable'] = False\n\n        self._mounts = []\n\n        #: A :class:`ResourceManager` for application files\n        self.resources = ResourceManager()\n\n        self.routes = []  # List of installed :class:`Route` instances.\n        self.router = Router()  # Maps requests to :class:`Route` instances.\n        self.error_handler = {}\n\n        # Core plugins\n        self.plugins = []  # List of installed plugins.\n        self.install(JSONPlugin())\n        self.install(TemplatePlugin())\n\n    #: If true, most exceptions are caught and returned as :exc:`HTTPError`\n    catchall = DictProperty('config', 'catchall')\n\n    __hook_names = 'before_request', 'after_request', 'app_reset', 'config'\n    __hook_reversed = {'after_request'}\n\n    @cached_property\n    def _hooks(self):\n        return dict((name, []) for name in self.__hook_names)\n\n    def add_hook(self, name, func):\n        \"\"\" Attach a callback to a hook. Three hooks are currently implemented:\n\n            before_request\n                Executed once before each request. The request context is\n                available, but no routing has happened yet.\n            after_request\n                Executed once after each request regardless of its outcome.\n            app_reset\n                Called whenever :meth:`Bottle.reset` is called.\n        \"\"\"\n        if name in self.__hook_reversed:\n            self._hooks[name].insert(0, func)\n        else:\n            self._hooks[name].append(func)\n\n    def remove_hook(self, name, func):\n        \"\"\" Remove a callback from a hook. \"\"\"\n        if name in self._hooks and func in self._hooks[name]:\n            self._hooks[name].remove(func)\n            return True\n\n    def trigger_hook(self, __name, *args, **kwargs):\n        \"\"\" Trigger a hook and return a list of results. \"\"\"\n        return [hook(*args, **kwargs) for hook in self._hooks[__name][:]]\n\n    def hook(self, name):\n        \"\"\" Return a decorator that attaches a callback to a hook. See\n            :meth:`add_hook` for details.\"\"\"\n\n        def decorator(func):\n            self.add_hook(name, func)\n            return func\n\n        return decorator\n\n    def _mount_wsgi(self, prefix, app, **options):\n        segments = [p for p in prefix.split('/') if p]\n        if not segments:\n            raise ValueError('WSGI applications cannot be mounted to \"/\".')\n        path_depth = len(segments)\n\n        def mountpoint_wrapper():\n            try:\n                request.path_shift(path_depth)\n                rs = HTTPResponse([])\n\n                def start_response(status, headerlist, exc_info=None):\n                    if exc_info:\n                        _raise(*exc_info)\n                    status = _wsgi_recode(status)\n                    headerlist = [(k, _wsgi_recode(v)) for (k, v) in headerlist]\n                    rs.status = status\n                    for name, value in headerlist:\n                        rs.add_header(name, value)\n                    return rs.body.append\n\n                body = app(request.environ, start_response)\n                rs.body = itertools.chain(rs.body, body) if rs.body else body\n                return rs\n            finally:\n                request.path_shift(-path_depth)\n\n        options.setdefault('skip', True)\n        options.setdefault('method', 'PROXY')\n        options.setdefault('mountpoint', {'prefix': prefix, 'target': app})\n        options['callback'] = mountpoint_wrapper\n\n        self.route('/%s/<:re:.*>' % '/'.join(segments), **options)\n        if not prefix.endswith('/'):\n            self.route('/' + '/'.join(segments), **options)\n\n    def _mount_app(self, prefix, app, **options):\n        if app in self._mounts or '_mount.app' in app.config:\n            depr(0, 13, \"Application mounted multiple times. Falling back to WSGI mount.\",\n                 \"Clone application before mounting to a different location.\")\n            return self._mount_wsgi(prefix, app, **options)\n\n        if options:\n            depr(0, 13, \"Unsupported mount options. Falling back to WSGI mount.\",\n                 \"Do not specify any route options when mounting bottle application.\")\n            return self._mount_wsgi(prefix, app, **options)\n\n        if not prefix.endswith(\"/\"):\n            depr(0, 13, \"Prefix must end in '/'. Falling back to WSGI mount.\",\n                 \"Consider adding an explicit redirect from '/prefix' to '/prefix/' in the parent application.\")\n            return self._mount_wsgi(prefix, app, **options)\n\n        self._mounts.append(app)\n        app.config['_mount.prefix'] = prefix\n        app.config['_mount.app'] = self\n        for route in app.routes:\n            route.rule = prefix + route.rule.lstrip('/')\n            self.add_route(route)\n\n    def mount(self, prefix, app, **options):\n        \"\"\" Mount an application (:class:`Bottle` or plain WSGI) to a specific\n            URL prefix. Example::\n\n                parent_app.mount('/prefix/', child_app)\n\n            :param prefix: path prefix or `mount-point`.\n            :param app: an instance of :class:`Bottle` or a WSGI application.\n\n            Plugins from the parent application are not applied to the routes\n            of the mounted child application. If you need plugins in the child\n            application, install them separately.\n\n            While it is possible to use path wildcards within the prefix path\n            (:class:`Bottle` childs only), it is highly discouraged.\n\n            The prefix path must end with a slash. If you want to access the\n            root of the child application via `/prefix` in addition to\n            `/prefix/`, consider adding a route with a 307 redirect to the\n            parent application.\n        \"\"\"\n\n        if not prefix.startswith('/'):\n            raise ValueError(\"Prefix must start with '/'\")\n\n        if isinstance(app, Bottle):\n            return self._mount_app(prefix, app, **options)\n        else:\n            return self._mount_wsgi(prefix, app, **options)\n\n    def merge(self, routes):\n        \"\"\" Merge the routes of another :class:`Bottle` application or a list of\n            :class:`Route` objects into this application. The routes keep their\n            'owner', meaning that the :data:`Route.app` attribute is not\n            changed. \"\"\"\n        if isinstance(routes, Bottle):\n            routes = routes.routes\n        for route in routes:\n            self.add_route(route)\n\n    def install(self, plugin):\n        \"\"\" Add a plugin to the list of plugins and prepare it for being\n            applied to all routes of this application. A plugin may be a simple\n            decorator or an object that implements the :class:`Plugin` API.\n        \"\"\"\n        if hasattr(plugin, 'setup'): plugin.setup(self)\n        if not callable(plugin) and not hasattr(plugin, 'apply'):\n            raise TypeError(\"Plugins must be callable or implement .apply()\")\n        self.plugins.append(plugin)\n        self.reset()\n        return plugin\n\n    def uninstall(self, plugin):\n        \"\"\" Uninstall plugins. Pass an instance to remove a specific plugin, a type\n            object to remove all plugins that match that type, a string to remove\n            all plugins with a matching ``name`` attribute or ``True`` to remove all\n            plugins. Return the list of removed plugins. \"\"\"\n        removed, remove = [], plugin\n        for i, plugin in list(enumerate(self.plugins))[::-1]:\n            if remove is True or remove is plugin or remove is type(plugin) \\\n               or getattr(plugin, 'name', True) == remove:\n                removed.append(plugin)\n                del self.plugins[i]\n                if hasattr(plugin, 'close'): plugin.close()\n        if removed: self.reset()\n        return removed\n\n    def reset(self, route=None):\n        \"\"\" Reset all routes (force plugins to be re-applied) and clear all\n            caches. If an ID or route object is given, only that specific route\n            is affected. \"\"\"\n        if route is None: routes = self.routes\n        elif isinstance(route, Route): routes = [route]\n        else: routes = [self.routes[route]]\n        for route in routes:\n            route.reset()\n        if DEBUG:\n            for route in routes:\n                route.prepare()\n        self.trigger_hook('app_reset')\n\n    def close(self):\n        \"\"\" Close the application and all installed plugins. \"\"\"\n        for plugin in self.plugins:\n            if hasattr(plugin, 'close'): plugin.close()\n\n    def run(self, **kwargs):\n        \"\"\" Calls :func:`run` with the same parameters. \"\"\"\n        run(self, **kwargs)\n\n    def match(self, environ):\n        \"\"\" Search for a matching route and return a (:class:`Route`, urlargs)\n            tuple. The second value is a dictionary with parameters extracted\n            from the URL. Raise :exc:`HTTPError` (404/405) on a non-match.\"\"\"\n        return self.router.match(environ)\n\n    def get_url(self, routename, **kargs):\n        \"\"\" Return a string that matches a named route \"\"\"\n        scriptname = request.environ.get('SCRIPT_NAME', '').strip('/') + '/'\n        location = self.router.build(routename, **kargs).lstrip('/')\n        return urljoin(urljoin('/', scriptname), location)\n\n    def add_route(self, route):\n        \"\"\" Add a route object, but do not change the :data:`Route.app`\n            attribute.\"\"\"\n        self.routes.append(route)\n        self.router.add(route.rule, route.method, route, name=route.name)\n        if DEBUG: route.prepare()\n\n    def route(self,\n              path=None,\n              method='GET',\n              callback=None,\n              name=None,\n              apply=None,\n              skip=None, **config):\n        \"\"\" A decorator to bind a function to a request URL. Example::\n\n                @app.route('/hello/<name>')\n                def hello(name):\n                    return 'Hello %s' % name\n\n            The ``<name>`` part is a wildcard. See :class:`Router` for syntax\n            details.\n\n            :param path: Request path or a list of paths to listen to. If no\n              path is specified, it is automatically generated from the\n              signature of the function.\n            :param method: HTTP method (`GET`, `POST`, `PUT`, ...) or a list of\n              methods to listen to. (default: `GET`)\n            :param callback: An optional shortcut to avoid the decorator\n              syntax. ``route(..., callback=func)`` equals ``route(...)(func)``\n            :param name: The name for this route. (default: None)\n            :param apply: A decorator or plugin or a list of plugins. These are\n              applied to the route callback in addition to installed plugins.\n            :param skip: A list of plugins, plugin classes or names. Matching\n              plugins are not installed to this route. ``True`` skips all.\n\n            Any additional keyword arguments are stored as route-specific\n            configuration and passed to plugins (see :meth:`Plugin.apply`).\n        \"\"\"\n        if callable(path): path, callback = None, path\n        plugins = makelist(apply)\n        skiplist = makelist(skip)\n\n        def decorator(callback):\n            if isinstance(callback, str):\n                callback = load(callback) # type: Callable\n            for rule in makelist(path) or yieldroutes(callback):\n                for verb in makelist(method):\n                    verb = verb.upper()\n                    route = Route(self, rule, verb, callback,\n                                  name=name,\n                                  plugins=plugins,\n                                  skiplist=skiplist, **config)\n                    self.add_route(route)\n            return callback\n\n        return decorator(callback) if callback else decorator\n\n    def get(self, path=None, method='GET', **options):\n        \"\"\" Equals :meth:`route`. \"\"\"\n        return self.route(path, method, **options)\n\n    def post(self, path=None, method='POST', **options):\n        \"\"\" Equals :meth:`route` with a ``POST`` method parameter. \"\"\"\n        return self.route(path, method, **options)\n\n    def put(self, path=None, method='PUT', **options):\n        \"\"\" Equals :meth:`route` with a ``PUT`` method parameter. \"\"\"\n        return self.route(path, method, **options)\n\n    def delete(self, path=None, method='DELETE', **options):\n        \"\"\" Equals :meth:`route` with a ``DELETE`` method parameter. \"\"\"\n        return self.route(path, method, **options)\n\n    def patch(self, path=None, method='PATCH', **options):\n        \"\"\" Equals :meth:`route` with a ``PATCH`` method parameter. \"\"\"\n        return self.route(path, method, **options)\n\n    def error(self, code=500, callback=None):\n        \"\"\" Register an output handler for a HTTP error code. Can\n            be used as a decorator or called directly ::\n\n                def error_handler_500(error):\n                    return 'error_handler_500'\n\n                app.error(code=500, callback=error_handler_500)\n\n                @app.error(404)\n                def error_handler_404(error):\n                    return 'error_handler_404'\n\n        \"\"\"\n\n        def decorator(callback):\n            if isinstance(callback, str): callback = load(callback)\n            self.error_handler[int(code)] = callback\n            return callback\n\n        return decorator(callback) if callback else decorator\n\n    def default_error_handler(self, res):\n        return tob(template(ERROR_PAGE_TEMPLATE, e=res, template_settings=dict(name='__ERROR_PAGE_TEMPLATE')))\n\n    def _handle(self, environ):\n        path = environ['bottle.raw_path'] = environ['PATH_INFO']\n        environ['PATH_INFO'] = _wsgi_recode(path)\n\n        environ['bottle.app'] = self\n        request.bind(environ)\n        response.bind()\n        out = None\n\n        try:\n            try:\n                self.trigger_hook('before_request')\n                route, args = self.router.match(environ)\n                environ['route.handle'] = route\n                environ['bottle.route'] = route\n                environ['route.url_args'] = args\n                out = route.call(**args)\n            except HTTPResponse as E:\n                out = E\n            finally:\n                if isinstance(out, HTTPResponse):\n                    out.apply(response)\n                try:\n                    self.trigger_hook('after_request')\n                except HTTPResponse as E:\n                    out = E\n                    out.apply(response)\n        except (KeyboardInterrupt, SystemExit, MemoryError):\n            raise\n        except Exception as E:\n            _try_close(out)\n            if not self.catchall: raise\n            stacktrace = format_exc()\n            environ['wsgi.errors'].write(stacktrace)\n            environ['wsgi.errors'].flush()\n            environ['bottle.exc_info'] = sys.exc_info()\n            out = HTTPError(500, \"Internal Server Error\", E, stacktrace)\n            out.apply(response)\n\n        return out\n\n    def _cast(self, out, peek=None):\n        \"\"\" Try to convert the parameter into something WSGI compatible and set\n            correct HTTP headers when possible.\n            Support: False, bytes/bytearray, str, dict, HTTPResponse, HTTPError,\n            file-like, iterable of bytes/bytearray or str instances.\n        \"\"\"\n\n        # Empty output is done here\n        if not out:\n            if 'Content-Length' not in response:\n                response['Content-Length'] = 0\n            return []\n        # Join lists of byte or unicode strings. Mixed lists are NOT supported\n        if isinstance(out, (tuple, list)) and isinstance(out[0], (bytes, str)):\n            out = out[0][0:0].join(out)  # b'abc'[0:0] -> b''\n        # Encode unicode strings\n        if isinstance(out, str):\n            out = out.encode(response.charset)\n        # Byte Strings are just returned\n        if isinstance(out, bytes):\n            if 'Content-Length' not in response:\n                response['Content-Length'] = len(out)\n            return [out]\n        # HTTPError or HTTPException (recursive, because they may wrap anything)\n        # TODO: Handle these explicitly in handle() or make them iterable.\n        if isinstance(out, HTTPError):\n            out.apply(response)\n            out = self.error_handler.get(out.status_code,\n                                         self.default_error_handler)(out)\n            return self._cast(out)\n        if isinstance(out, HTTPResponse):\n            out.apply(response)\n            return self._cast(out.body)\n\n        # File-like objects.\n        if hasattr(out, 'read'):\n            if 'wsgi.file_wrapper' in request.environ:\n                return request.environ['wsgi.file_wrapper'](out)\n            elif hasattr(out, 'close') or not hasattr(out, '__iter__'):\n                return WSGIFileWrapper(out)\n\n        # Handle Iterables. We peek into them to detect their inner type.\n        try:\n            iout = iter(out)\n            first = next(iout)\n            while not first:\n                first = next(iout)\n        except StopIteration:\n            _try_close(out)\n            return self._cast('')\n        except HTTPResponse as E:\n            first = E\n        except (KeyboardInterrupt, SystemExit, MemoryError):\n            raise\n        except Exception as error:\n            _try_close(out)\n            if not self.catchall: raise\n            first = HTTPError(500, 'Unhandled exception', error, format_exc())\n\n        # These are the inner types allowed in iterator or generator objects.\n        if isinstance(first, HTTPResponse):\n            return self._cast(first)\n        elif isinstance(first, bytes):\n            new_iter = itertools.chain([first], iout)\n        elif isinstance(first, str):\n            encoder = lambda x: x.encode(response.charset)\n            new_iter = map(encoder, itertools.chain([first], iout))\n        else:\n            _try_close(out)\n            msg = 'Unsupported response type: %s' % type(first)\n            return self._cast(HTTPError(500, msg))\n        if hasattr(out, 'close'):\n            new_iter = _closeiter(new_iter, out.close)\n        return new_iter\n\n    def wsgi(self, environ, start_response):\n        \"\"\" The bottle WSGI-interface. \"\"\"\n        out = None\n        try:\n            out = self._cast(self._handle(environ))\n            # rfc2616 section 4.3\n            if response._status_code in (100, 101, 204, 304) \\\n               or environ['REQUEST_METHOD'] == 'HEAD':\n                if hasattr(out, 'close'): out.close()\n                out = []\n            exc_info = environ.get('bottle.exc_info')\n            if exc_info is not None:\n                del environ['bottle.exc_info']\n            start_response(response._wsgi_status_line(), response.headerlist, exc_info)\n            return out\n        except (KeyboardInterrupt, SystemExit, MemoryError):\n            raise\n        except Exception as E:\n            _try_close(out)\n            if not self.catchall: raise\n            err = '<h1>Critical error while processing request: %s</h1>' \\\n                  % html_escape(environ.get('PATH_INFO', '/'))\n            if DEBUG:\n                err += '<h2>Error:</h2>\\n<pre>\\n%s\\n</pre>\\n' \\\n                       '<h2>Traceback:</h2>\\n<pre>\\n%s\\n</pre>\\n' \\\n                       % (html_escape(repr(E)), html_escape(format_exc()))\n            environ['wsgi.errors'].write(err)\n            environ['wsgi.errors'].flush()\n            headers = [('Content-Type', 'text/html; charset=UTF-8')]\n            start_response('500 INTERNAL SERVER ERROR', headers, sys.exc_info())\n            return [tob(err)]\n\n    def __call__(self, environ, start_response):\n        \"\"\" Each instance of :class:'Bottle' is a WSGI application. \"\"\"\n        return self.wsgi(environ, start_response)\n\n    def __enter__(self):\n        \"\"\" Use this application as default for all module-level shortcuts. \"\"\"\n        default_app.push(self)\n        return self\n\n    def __exit__(self, exc_type, exc_value, traceback):\n        default_app.pop()\n\n    def __setattr__(self, name, value):\n        if name in self.__dict__:\n            raise AttributeError(\"Attribute %s already defined. Plugin conflict?\" % name)\n        object.__setattr__(self, name, value)\n\n###############################################################################\n# HTTP and WSGI Tools ##########################################################\n###############################################################################\n\n\nclass BaseRequest:\n    \"\"\" A wrapper for WSGI environment dictionaries that adds a lot of\n        convenient access methods and properties. Most of them are read-only.\n\n        Adding new attributes to a request actually adds them to the environ\n        dictionary (as 'bottle.request.ext.<name>'). This is the recommended\n        way to store and access request-specific data.\n    \"\"\"\n\n    __slots__ = ('environ', )\n\n    #: Maximum size of memory buffer for :attr:`body` in bytes.\n    MEMFILE_MAX = 102400\n\n    def __init__(self, environ=None):\n        \"\"\" Wrap a WSGI environ dictionary. \"\"\"\n        #: The wrapped WSGI environ dictionary. This is the only real attribute.\n        #: All other attributes actually are read-only properties.\n        self.environ = {} if environ is None else environ\n        self.environ['bottle.request'] = self\n\n    @DictProperty('environ', 'bottle.app', read_only=True)\n    def app(self):\n        \"\"\" Bottle application handling this request. \"\"\"\n        raise RuntimeError('This request is not connected to an application.')\n\n    @DictProperty('environ', 'bottle.route', read_only=True)\n    def route(self):\n        \"\"\" The bottle :class:`Route` object that matches this request. \"\"\"\n        raise RuntimeError('This request is not connected to a route.')\n\n    @DictProperty('environ', 'route.url_args', read_only=True)\n    def url_args(self):\n        \"\"\" The arguments extracted from the URL. \"\"\"\n        raise RuntimeError('This request is not connected to a route.')\n\n    @property\n    def path(self):\n        \"\"\" The value of ``PATH_INFO`` with exactly one prefixed slash (to fix\n            broken clients and avoid the \"empty path\" edge case). \"\"\"\n        return '/' + self.environ.get('PATH_INFO', '').lstrip('/')\n\n    @property\n    def method(self):\n        \"\"\" The ``REQUEST_METHOD`` value as an uppercase string. \"\"\"\n        return self.environ.get('REQUEST_METHOD', 'GET').upper()\n\n    @DictProperty('environ', 'bottle.request.headers', read_only=True)\n    def headers(self):\n        \"\"\" A :class:`WSGIHeaderDict` that provides case-insensitive access to\n            HTTP request headers. \"\"\"\n        return WSGIHeaderDict(self.environ)\n\n    def get_header(self, name, default=None):\n        \"\"\" Return the value of a request header, or a given default value. \"\"\"\n        return self.headers.get(name, default)\n\n    @DictProperty('environ', 'bottle.request.cookies', read_only=True)\n    def cookies(self):\n        \"\"\" Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT\n            decoded. Use :meth:`get_cookie` if you expect signed cookies. \"\"\"\n        cookie_header = _wsgi_recode(self.environ.get('HTTP_COOKIE', ''))\n        cookies = SimpleCookie(cookie_header).values()\n        return FormsDict((c.key, c.value) for c in cookies)\n\n    def get_cookie(self, key, default=None, secret=None, digestmod=hashlib.sha256):\n        \"\"\" Return the content of a cookie. To read a `Signed Cookie`, the\n            `secret` must match the one used to create the cookie (see\n            :meth:`Response.set_cookie <BaseResponse.set_cookie>`). If anything goes wrong (missing\n            cookie or wrong signature), return a default value. \"\"\"\n        value = self.cookies.get(key)\n        if secret:\n            # See BaseResponse.set_cookie for details on signed cookies.\n            if value and value.startswith('!') and '?' in value:\n                sig, msg = map(tob, value[1:].split('?', 1))\n                hash = hmac.new(tob(secret), msg, digestmod=digestmod).digest()\n                if _lscmp(sig, base64.b64encode(hash)):\n                    dst = pickle.loads(base64.b64decode(msg))\n                    if dst and dst[0] == key:\n                        return dst[1]\n            return default\n        return value or default\n\n    @DictProperty('environ', 'bottle.request.query', read_only=True)\n    def query(self):\n        \"\"\" The :attr:`query_string` parsed into a :class:`FormsDict`. These\n            values are sometimes called \"URL arguments\" or \"GET parameters\", but\n            not to be confused with \"URL wildcards\" as they are provided by the\n            :class:`Router`. \"\"\"\n        get = self.environ['bottle.get'] = FormsDict()\n        pairs = _parse_qsl(self.environ.get('QUERY_STRING', ''), 'utf8')\n        for key, value in pairs:\n            get[key] = value\n        return get\n\n    @DictProperty('environ', 'bottle.request.forms', read_only=True)\n    def forms(self):\n        \"\"\" Form values parsed from an `url-encoded` or `multipart/form-data`\n            encoded POST or PUT request body. The result is returned as a\n            :class:`FormsDict`. All keys and values are strings. File uploads\n            are stored separately in :attr:`files`. \"\"\"\n        forms = FormsDict()\n        for name, item in self.POST.allitems():\n            if not isinstance(item, FileUpload):\n                forms[name] = item\n        return forms\n\n    @DictProperty('environ', 'bottle.request.params', read_only=True)\n    def params(self):\n        \"\"\" A :class:`FormsDict` with the combined values of :attr:`query` and\n            :attr:`forms`. File uploads are stored in :attr:`files`. \"\"\"\n        params = FormsDict()\n        for key, value in self.query.allitems():\n            params[key] = value\n        for key, value in self.forms.allitems():\n            params[key] = value\n        return params\n\n    @DictProperty('environ', 'bottle.request.files', read_only=True)\n    def files(self):\n        \"\"\" File uploads parsed from `multipart/form-data` encoded POST or PUT\n            request body. The values are instances of :class:`FileUpload`.\n\n        \"\"\"\n        files = FormsDict()\n        for name, item in self.POST.allitems():\n            if isinstance(item, FileUpload):\n                files[name] = item\n        return files\n\n    @DictProperty('environ', 'bottle.request.json', read_only=True)\n    def json(self):\n        \"\"\" If the ``Content-Type`` header is ``application/json`` or\n            ``application/json-rpc``, this property holds the parsed content\n            of the request body. Only requests smaller than :attr:`MEMFILE_MAX`\n            are processed to avoid memory exhaustion.\n            Invalid JSON raises a 400 error response.\n        \"\"\"\n        ctype = self.environ.get('CONTENT_TYPE', '').lower().split(';')[0]\n        if ctype in ('application/json', 'application/json-rpc'):\n            b = self._get_body_string(self.MEMFILE_MAX)\n            if not b:\n                return None\n            try:\n                return json_loads(b)\n            except (ValueError, TypeError) as err:\n                raise HTTPError(400, 'Invalid JSON', exception=err)\n        return None\n\n    def _iter_body(self, read, bufsize):\n        maxread = max(0, self.content_length)\n        while maxread:\n            part = read(min(maxread, bufsize))\n            if not part: break\n            yield part\n            maxread -= len(part)\n\n    @staticmethod\n    def _iter_chunked(read, bufsize):\n        err = HTTPError(400, 'Error while parsing chunked transfer body.')\n        rn, sem, bs = b'\\r\\n', b';', b''\n        while True:\n            header = read(1)\n            while header[-2:] != rn:\n                c = read(1)\n                header += c\n                if not c: raise err\n                if len(header) > bufsize: raise err\n            size, _, _ = header.partition(sem)\n            try:\n                maxread = int(size.strip(), 16)\n            except ValueError:\n                raise err\n            if maxread == 0: break\n            buff = bs\n            while maxread > 0:\n                if not buff:\n                    buff = read(min(maxread, bufsize))\n                part, buff = buff[:maxread], buff[maxread:]\n                if not part: raise err\n                yield part\n                maxread -= len(part)\n            if read(2) != rn:\n                raise err\n\n    @DictProperty('environ', 'bottle.request.body', read_only=True)\n    def _body(self):\n        try:\n            read_func = self.environ['wsgi.input'].read\n        except KeyError:\n            self.environ['wsgi.input'] = BytesIO()\n            return self.environ['wsgi.input']\n        body_iter = self._iter_chunked if self.chunked else self._iter_body\n        body, body_size, is_temp_file = BytesIO(), 0, False\n        for part in body_iter(read_func, self.MEMFILE_MAX):\n            body.write(part)\n            body_size += len(part)\n            if not is_temp_file and body_size > self.MEMFILE_MAX:\n                body, tmp = NamedTemporaryFile(mode='w+b'), body\n                body.write(tmp.getvalue())\n                del tmp\n                is_temp_file = True\n        self.environ['wsgi.input'] = body\n        body.seek(0)\n        return body\n\n    def _get_body_string(self, maxread):\n        \"\"\" Read body into a string. Raise HTTPError(413) on requests that are\n            too large. \"\"\"\n        if self.content_length > maxread:\n            raise HTTPError(413, 'Request entity too large')\n        data = self.body.read(maxread + 1)\n        if len(data) > maxread:\n            raise HTTPError(413, 'Request entity too large')\n        return data\n\n    @property\n    def body(self):\n        \"\"\" The HTTP request body as a seek-able file-like object. Depending on\n            :attr:`MEMFILE_MAX`, this is either a temporary file or a\n            :class:`io.BytesIO` instance. Accessing this property for the first\n            time reads and replaces the ``wsgi.input`` environ variable.\n            Subsequent accesses just do a `seek(0)` on the file object. \"\"\"\n        self._body.seek(0)\n        return self._body\n\n    @property\n    def chunked(self):\n        \"\"\" True if Chunked transfer encoding was. \"\"\"\n        return 'chunked' in self.environ.get(\n            'HTTP_TRANSFER_ENCODING', '').lower()\n\n    #: An alias for :attr:`query`.\n    GET = query\n\n    @DictProperty('environ', 'bottle.request.post', read_only=True)\n    def POST(self):\n        \"\"\" The values of :attr:`forms` and :attr:`files` combined into a single\n            :class:`FormsDict`. Values are either strings (form values) or\n            instances of :class:`FileUpload`.\n        \"\"\"\n        post = FormsDict()\n        content_type = self.environ.get('CONTENT_TYPE', '')\n        content_type, options = _parse_http_header(content_type)[0]\n        # We default to application/x-www-form-urlencoded for everything that\n        # is not multipart and take the fast path (also: 3.1 workaround)\n        if not content_type.startswith('multipart/'):\n            body = self._get_body_string(self.MEMFILE_MAX).decode('utf8', 'surrogateescape')\n            for key, value in _parse_qsl(body, 'utf8'):\n                post[key] = value\n            return post\n\n        charset = options.get(\"charset\", \"utf8\")\n        boundary = options.get(\"boundary\")\n        if not boundary:\n            raise MultipartError(\"Invalid content type header, missing boundary\")\n        parser = _MultipartParser(self.body, boundary, self.content_length,\n            mem_limit=self.MEMFILE_MAX, memfile_limit=self.MEMFILE_MAX,\n            charset=charset)\n\n        for part in parser.parse():\n            if not part.filename and part.is_buffered():\n                post[part.name] = part.value\n            else:\n                post[part.name] = FileUpload(part.file, part.name,\n                                            part.filename, part.headerlist)\n\n        return post\n\n    @property\n    def url(self):\n        \"\"\" The full request URI including hostname and scheme. If your app\n            lives behind a reverse proxy or load balancer and you get confusing\n            results, make sure that the ``X-Forwarded-Host`` header is set\n            correctly. \"\"\"\n        return self.urlparts.geturl()\n\n    @DictProperty('environ', 'bottle.request.urlparts', read_only=True)\n    def urlparts(self):\n        \"\"\" The :attr:`url` string as an :class:`urlparse.SplitResult` tuple.\n            The tuple contains (scheme, host, path, query_string and fragment),\n            but the fragment is always empty because it is not visible to the\n            server. \"\"\"\n        env = self.environ\n        http = env.get('HTTP_X_FORWARDED_PROTO') or env.get('wsgi.url_scheme', 'http')\n        host = env.get('HTTP_X_FORWARDED_HOST') or env.get('HTTP_HOST')\n        if not host:\n            # HTTP 1.1 requires a Host-header. This is for HTTP/1.0 clients.\n            host = env.get('SERVER_NAME', '127.0.0.1')\n            port = env.get('SERVER_PORT')\n            if port and port != ('80' if http == 'http' else '443'):\n                host += ':' + port\n        path = urlquote(self.fullpath)\n        return UrlSplitResult(http, host, path, env.get('QUERY_STRING'), '')\n\n    @property\n    def fullpath(self):\n        \"\"\" Request path including :attr:`script_name` (if present). \"\"\"\n        return urljoin(self.script_name, self.path.lstrip('/'))\n\n    @property\n    def query_string(self):\n        \"\"\" The raw :attr:`query` part of the URL (everything in between ``?``\n            and ``#``) as a string. \"\"\"\n        return self.environ.get('QUERY_STRING', '')\n\n    @property\n    def script_name(self):\n        \"\"\" The initial portion of the URL's `path` that was removed by a higher\n            level (server or routing middleware) before the application was\n            called. This script path is returned with leading and tailing\n            slashes. \"\"\"\n        script_name = self.environ.get('SCRIPT_NAME', '').strip('/')\n        return '/' + script_name + '/' if script_name else '/'\n\n    def path_shift(self, shift=1):\n        \"\"\" Shift path segments from :attr:`path` to :attr:`script_name` and\n            vice versa.\n\n           :param shift: The number of path segments to shift. May be negative\n                         to change the shift direction. (default: 1)\n        \"\"\"\n        script, path = path_shift(self.environ.get('SCRIPT_NAME', '/'), self.path, shift)\n        self['SCRIPT_NAME'], self['PATH_INFO'] = script, path\n\n    @property\n    def content_length(self):\n        \"\"\" The request body length as an integer. The client is responsible to\n            set this header. Otherwise, the real length of the body is unknown\n            and -1 is returned. In this case, :attr:`body` will be empty. \"\"\"\n        return int(self.environ.get('CONTENT_LENGTH') or -1)\n\n    @property\n    def content_type(self):\n        \"\"\" The Content-Type header as a lowercase-string (default: empty). \"\"\"\n        return self.environ.get('CONTENT_TYPE', '').lower()\n\n    @property\n    def is_xhr(self):\n        \"\"\" True if the request was triggered by a XMLHttpRequest. This only\n            works with JavaScript libraries that support the `X-Requested-With`\n            header (most of the popular libraries do). \"\"\"\n        requested_with = self.environ.get('HTTP_X_REQUESTED_WITH', '')\n        return requested_with.lower() == 'xmlhttprequest'\n\n    @property\n    def is_ajax(self):\n        \"\"\" Alias for :attr:`is_xhr`. \"Ajax\" is not the right term. \"\"\"\n        return self.is_xhr\n\n    @property\n    def auth(self):\n        \"\"\" HTTP authentication data as a (user, password) tuple. This\n            implementation currently supports basic (not digest) authentication\n            only. If the authentication happened at a higher level (e.g. in the\n            front web-server or a middleware), the password field is None, but\n            the user field is looked up from the ``REMOTE_USER`` environ\n            variable. On any errors, None is returned. \"\"\"\n        basic = parse_auth(self.environ.get('HTTP_AUTHORIZATION', ''))\n        if basic: return basic\n        ruser = self.environ.get('REMOTE_USER')\n        if ruser: return (ruser, None)\n        return None\n\n    @property\n    def remote_route(self):\n        \"\"\" A list of all IPs that were involved in this request, starting with\n            the client IP and followed by zero or more proxies. This does only\n            work if all proxies support the ```X-Forwarded-For`` header. Note\n            that this information can be forged by malicious clients. \"\"\"\n        proxy = self.environ.get('HTTP_X_FORWARDED_FOR')\n        if proxy: return [ip.strip() for ip in proxy.split(',')]\n        remote = self.environ.get('REMOTE_ADDR')\n        return [remote] if remote else []\n\n    @property\n    def remote_addr(self):\n        \"\"\" The client IP as a string. Note that this information can be forged\n            by malicious clients. \"\"\"\n        route = self.remote_route\n        return route[0] if route else None\n\n    def copy(self):\n        \"\"\" Return a new :class:`Request` with a shallow :attr:`environ` copy. \"\"\"\n        return Request(self.environ.copy())\n\n    def get(self, key, default=None):\n        return self.environ.get(key, default)\n\n    def __getitem__(self, key):\n        return self.environ[key]\n\n    def __delitem__(self, key):\n        self[key] = \"\"\n        del (self.environ[key])\n\n    def __iter__(self):\n        return iter(self.environ)\n\n    def __len__(self):\n        return len(self.environ)\n\n    def keys(self):\n        return self.environ.keys()\n\n    def __setitem__(self, key, value):\n        \"\"\" Change an environ value and clear all caches that depend on it. \"\"\"\n\n        if self.environ.get('bottle.request.readonly'):\n            raise KeyError('The environ dictionary is read-only.')\n\n        self.environ[key] = value\n        todelete = ()\n\n        if key == 'wsgi.input':\n            todelete = ('body', 'forms', 'files', 'params', 'post', 'json')\n        elif key == 'QUERY_STRING':\n            todelete = ('query', 'params')\n        elif key.startswith('HTTP_'):\n            todelete = ('headers', 'cookies')\n\n        for key in todelete:\n            self.environ.pop('bottle.request.' + key, None)\n\n    def __repr__(self):\n        return '<%s: %s %s>' % (self.__class__.__name__, self.method, self.url)\n\n    def __getattr__(self, name):\n        \"\"\" Search in self.environ for additional user defined attributes. \"\"\"\n        try:\n            var = self.environ['bottle.request.ext.%s' % name]\n            return var.__get__(self) if hasattr(var, '__get__') else var\n        except KeyError:\n            raise AttributeError('Attribute %r not defined.' % name)\n\n    def __setattr__(self, name, value):\n        \"\"\" Define new attributes that are local to the bound request environment. \"\"\"\n        if name == 'environ': return object.__setattr__(self, name, value)\n        key = 'bottle.request.ext.%s' % name\n        if hasattr(self, name):\n            raise AttributeError(\"Attribute already defined: %s\" % name)\n        self.environ[key] = value\n\n    def __delattr__(self, name):\n        try:\n            del self.environ['bottle.request.ext.%s' % name]\n        except KeyError:\n            raise AttributeError(\"Attribute not defined: %s\" % name)\n\n\ndef _hkey(key):\n    key = touni(key)\n    if '\\n' in key or '\\r' in key or '\\0' in key:\n        raise ValueError(\"Header names must not contain control characters: %r\" % key)\n    return key.title().replace('_', '-')\n\n\ndef _hval(value):\n    value = touni(value)\n    if '\\n' in value or '\\r' in value or '\\0' in value:\n        raise ValueError(\"Header value must not contain control characters: %r\" % value)\n    return value\n\n\nclass HeaderProperty:\n    def __init__(self, name, reader=None, writer=None, default=''):\n        self.name, self.default = name, default\n        self.reader, self.writer = reader, writer\n        self.__doc__ = 'Current value of the %r header.' % name.title()\n\n    def __get__(self, obj, _):\n        if obj is None: return self\n        value = obj.get_header(self.name, self.default)\n        return self.reader(value) if self.reader else value\n\n    def __set__(self, obj, value):\n        obj[self.name] = self.writer(value) if self.writer else value\n\n    def __delete__(self, obj):\n        del obj[self.name]\n\n\nclass BaseResponse:\n    \"\"\" Storage class for a response body as well as headers and cookies.\n\n        This class does support dict-like case-insensitive item-access to\n        headers, but is NOT a dict. Most notably, iterating over a response\n        yields parts of the body and not the headers.\n    \"\"\"\n\n    default_status = 200\n    default_content_type = 'text/html; charset=UTF-8'\n\n    # Header denylist for specific response codes\n    # (rfc2616 section 10.2.3 and 10.3.5)\n    bad_headers = {\n        204: frozenset(('Content-Type', 'Content-Length')),\n        304: frozenset(('Allow', 'Content-Encoding', 'Content-Language',\n                  'Content-Length', 'Content-Range', 'Content-Type',\n                  'Content-Md5', 'Last-Modified'))\n    }\n\n    def __init__(self, body='', status=None, headers=None, **more_headers):\n        \"\"\" Create a new response object.\n\n        :param body: The response body as one of the supported types.\n        :param status: Either an HTTP status code (e.g. 200) or a status line\n                       including the reason phrase (e.g. '200 OK').\n        :param headers: A dictionary or a list of name-value pairs.\n\n        Additional keyword arguments are added to the list of headers.\n        Underscores in the header name are replaced with dashes.\n        \"\"\"\n        self._cookies = None\n        self._headers = {}\n        self.body = body\n        self.status = status or self.default_status\n        if headers:\n            if isinstance(headers, dict):\n                headers = headers.items()\n            for name, value in headers:\n                self.add_header(name, value)\n        if more_headers:\n            for name, value in more_headers.items():\n                self.add_header(name, value)\n\n    def copy(self, cls=None):\n        \"\"\" Returns a copy of self. \"\"\"\n        cls = cls or BaseResponse\n        assert issubclass(cls, BaseResponse)\n        copy = cls()\n        copy.status = self.status\n        copy._headers = dict((k, v[:]) for (k, v) in self._headers.items())\n        if self._cookies:\n            cookies = copy._cookies = SimpleCookie()\n            for k, v in self._cookies.items():\n                cookies[k] = v.value\n                cookies[k].update(v)  # also copy cookie attributes\n        return copy\n\n    def __iter__(self):\n        return iter(self.body)\n\n    def close(self):\n        if hasattr(self.body, 'close'):\n            self.body.close()\n\n    @property\n    def status_line(self):\n        \"\"\" The HTTP status line as a string (e.g. ``404 Not Found``).\"\"\"\n        return self._status_line\n\n    @property\n    def status_code(self):\n        \"\"\" The HTTP status code as an integer (e.g. 404).\"\"\"\n        return self._status_code\n\n    def _set_status(self, status):\n        if isinstance(status, int):\n            code, status = status, _HTTP_STATUS_LINES.get(status)\n        elif ' ' in status:\n            if '\\n' in status or '\\r' in status or '\\0' in status:\n                raise ValueError('Status line must not include control chars.')\n            status = status.strip()\n            code = int(status.split()[0])\n        else:\n            raise ValueError('String status line without a reason phrase.')\n        if not 100 <= code <= 999:\n            raise ValueError('Status code out of range.')\n        self._status_code = code\n        self._status_line = str(status or ('%d Unknown' % code))\n\n    def _get_status(self):\n        return self._status_line\n\n    status = property(\n        _get_status, _set_status, None,\n        ''' A writeable property to change the HTTP response status. It accepts\n            either a numeric code (100-999) or a string with a custom reason\n            phrase (e.g. \"404 Brain not found\"). Both :data:`status_line` and\n            :data:`status_code` are updated accordingly. The return value is\n            always a status string. ''')\n    del _get_status, _set_status\n\n    @property\n    def headers(self):\n        \"\"\" An instance of :class:`HeaderDict`, a case-insensitive dict-like\n            view on the response headers. \"\"\"\n        hdict = HeaderDict()\n        hdict.dict = self._headers\n        return hdict\n\n    def __contains__(self, name):\n        return _hkey(name) in self._headers\n\n    def __delitem__(self, name):\n        del self._headers[_hkey(name)]\n\n    def __getitem__(self, name):\n        return self._headers[_hkey(name)][-1]\n\n    def __setitem__(self, name, value):\n        self._headers[_hkey(name)] = [_hval(value)]\n\n    def get_header(self, name, default=None):\n        \"\"\" Return the value of a previously defined header. If there is no\n            header with that name, return a default value. \"\"\"\n        return self._headers.get(_hkey(name), [default])[-1]\n\n    def set_header(self, name, value):\n        \"\"\" Create a new response header, replacing any previously defined\n            headers with the same name. \"\"\"\n        self._headers[_hkey(name)] = [_hval(value)]\n\n    def add_header(self, name, value):\n        \"\"\" Add an additional response header, not removing duplicates. \"\"\"\n        self._headers.setdefault(_hkey(name), []).append(_hval(value))\n\n    def iter_headers(self):\n        \"\"\" Yield (header, value) tuples, skipping headers that are not\n            allowed with the current response status code. \"\"\"\n        return self.headerlist\n\n    def _wsgi_status_line(self):\n        \"\"\" WSGI conform status line (latin1-encodeable) \"\"\"\n        return self._status_line.encode('utf8', 'surrogateescape').decode('latin1')\n\n    @property\n    def headerlist(self):\n        \"\"\" WSGI conform list of (header, value) tuples. \"\"\"\n        out = []\n        headers = list(self._headers.items())\n        if 'Content-Type' not in self._headers:\n            headers.append(('Content-Type', [self.default_content_type]))\n        if self._status_code in self.bad_headers:\n            bad_headers = self.bad_headers[self._status_code]\n            headers = [h for h in headers if h[0] not in bad_headers]\n        out += [(name, val) for (name, vals) in headers for val in vals]\n        if self._cookies:\n            for c in self._cookies.values():\n                out.append(('Set-Cookie', _hval(c.OutputString())))\n        out = [(k, v.encode('utf8', 'surrogateescape').decode('latin1')) for (k, v) in out]\n        return out\n\n    content_type = HeaderProperty('Content-Type')\n    content_length = HeaderProperty('Content-Length', reader=int, default=-1)\n    expires = HeaderProperty(\n        'Expires',\n        reader=lambda x: datetime.fromtimestamp(parse_date(x), UTC),\n        writer=lambda x: http_date(x))\n\n    @property\n    def charset(self, default='UTF-8'):\n        \"\"\" Return the charset specified in the content-type header (default: utf8). \"\"\"\n        if 'charset=' in self.content_type:\n            return self.content_type.split('charset=')[-1].split(';')[0].strip()\n        return default\n\n    def set_cookie(self, name, value, secret=None, digestmod=hashlib.sha256, **options):\n        \"\"\" Create a new cookie or replace an old one. If the `secret` parameter is\n            set, create a `Signed Cookie` (described below).\n\n            :param name: the name of the cookie.\n            :param value: the value of the cookie.\n            :param secret: a signature key required for signed cookies.\n\n            Additionally, this method accepts all RFC 2109 attributes that are\n            supported by :class:`cookie.Morsel`, including:\n\n            :param maxage: maximum age in seconds. (default: None)\n            :param expires: a datetime object or UNIX timestamp. (default: None)\n            :param domain: the domain that is allowed to read the cookie.\n              (default: current domain)\n            :param path: limits the cookie to a given path (default: current path)\n            :param secure: limit the cookie to HTTPS connections (default: off).\n            :param httponly: prevents client-side javascript to read this cookie\n              (default: off, requires Python 2.6 or newer).\n            :param samesite: Control or disable third-party use for this cookie.\n              Possible values: `lax`, `strict` or `none` (default).\n\n            If neither `expires` nor `maxage` is set (default), the cookie will\n            expire at the end of the browser session (as soon as the browser\n            window is closed).\n\n            Signed cookies may store any pickle-able object and are\n            cryptographically signed to prevent manipulation. Keep in mind that\n            cookies are limited to 4kb in most browsers.\n\n            Warning: Pickle is a potentially dangerous format. If an attacker\n            gains access to the secret key, he could forge cookies that execute\n            code on server side if unpickled. Using pickle is discouraged and\n            support for it will be removed in later versions of bottle.\n\n            Warning: Signed cookies are not encrypted (the client can still see\n            the content) and not copy-protected (the client can restore an old\n            cookie). The main intention is to make pickling and unpickling\n            save, not to store secret information at client side.\n        \"\"\"\n        if not self._cookies:\n            self._cookies = SimpleCookie()\n\n        # Monkey-patch Cookie lib to support 'SameSite' parameter\n        # https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-4.1\n        if py < (3, 8, 0):\n            Morsel._reserved.setdefault('samesite', 'SameSite')\n\n        if secret:\n            if not isinstance(value, str):\n                depr(0, 13, \"Pickling of arbitrary objects into cookies is \"\n                            \"deprecated.\", \"Only store strings in cookies. \"\n                            \"JSON strings are fine, too.\")\n            encoded = base64.b64encode(pickle.dumps([name, value], -1))\n            sig = base64.b64encode(hmac.new(tob(secret), encoded,\n                                            digestmod=digestmod).digest())\n            value = touni(b'!' + sig + b'?' + encoded)\n        elif not isinstance(value, str):\n            raise TypeError('Secret key required for non-string cookies.')\n\n        # Cookie size plus options must not exceed 4kb.\n        if len(name) + len(value) > 3800:\n            raise ValueError('Content does not fit into a cookie.')\n\n        self._cookies[name] = value\n\n        for key, value in options.items():\n            if key in ('max_age', 'maxage'):  # 'maxage' variant added in 0.13\n                key = 'max-age'\n                if isinstance(value, timedelta):\n                    value = value.seconds + value.days * 24 * 3600\n            if key == 'expires':\n                value = http_date(value)\n            if key in ('same_site', 'samesite'):  # 'samesite' variant added in 0.13\n                key, value = 'samesite', (value or \"none\").lower()\n                if value not in ('lax', 'strict', 'none'):\n                    raise CookieError(\"Invalid value for SameSite\")\n            if key in ('secure', 'httponly') and not value:\n                continue\n            self._cookies[name][key] = value\n\n    def delete_cookie(self, key, **kwargs):\n        \"\"\" Delete a cookie. Be sure to use the same `domain` and `path`\n            settings as used to create the cookie. \"\"\"\n        kwargs['max_age'] = -1\n        kwargs['expires'] = 0\n        self.set_cookie(key, '', **kwargs)\n\n    def __repr__(self):\n        out = ''\n        for name, value in self.headerlist:\n            out += '%s: %s\\n' % (name.title(), value.strip())\n        return out\n\n\ndef _local_property():\n    ls = threading.local()\n\n    def fget(_):\n        try:\n            return ls.var\n        except AttributeError:\n            raise RuntimeError(\"Request context not initialized.\")\n\n    def fset(_, value):\n        ls.var = value\n\n    def fdel(_):\n        del ls.var\n\n    return property(fget, fset, fdel, 'Thread-local property')\n\n\nclass LocalRequest(BaseRequest):\n    \"\"\" A thread-local subclass of :class:`BaseRequest` with a different\n        set of attributes for each thread. There is usually only one global\n        instance of this class (:data:`request`). If accessed during a\n        request/response cycle, this instance always refers to the *current*\n        request (even on a multithreaded server). \"\"\"\n    bind = BaseRequest.__init__\n    environ = _local_property()\n\n\nclass LocalResponse(BaseResponse):\n    \"\"\" A thread-local subclass of :class:`BaseResponse` with a different\n        set of attributes for each thread. There is usually only one global\n        instance of this class (:data:`response`). Its attributes are used\n        to build the HTTP response at the end of the request/response cycle.\n    \"\"\"\n    bind = BaseResponse.__init__\n    _status_line = _local_property()\n    _status_code = _local_property()\n    _cookies = _local_property()\n    _headers = _local_property()\n    body = _local_property()\n\n\nRequest = BaseRequest\nResponse = BaseResponse\n\n\nclass HTTPResponse(Response, BottleException):\n    \"\"\" A subclass of :class:`Response` that can be raised or returned from request\n        handlers to short-curcuit request processing and override changes made to the\n        global :data:`request` object. This bypasses error handlers, even if the status\n        code indicates an error. Return or raise :class:`HTTPError` to trigger error\n        handlers.\n    \"\"\"\n\n    def __init__(self, body='', status=None, headers=None, **more_headers):\n        super(HTTPResponse, self).__init__(body, status, headers, **more_headers)\n\n    def apply(self, other):\n        \"\"\" Copy the state of this response to a different :class:`Response` object. \"\"\"\n        other._status_code = self._status_code\n        other._status_line = self._status_line\n        other._headers = self._headers\n        other._cookies = self._cookies\n        other.body = self.body\n\n\nclass HTTPError(HTTPResponse):\n    \"\"\" A subclass of :class:`HTTPResponse` that triggers error handlers. \"\"\"\n\n    default_status = 500\n\n    def __init__(self,\n                 status=None,\n                 body=None,\n                 exception=None,\n                 traceback=None, **more_headers):\n        self.exception = exception\n        self.traceback = traceback\n        super(HTTPError, self).__init__(body, status, **more_headers)\n\n###############################################################################\n# Plugins ######################################################################\n###############################################################################\n\n\nclass PluginError(BottleException):\n    pass\n\n\nclass JSONPlugin:\n    name = 'json'\n    api = 2\n\n    def __init__(self, json_dumps=json_dumps):\n        self.json_dumps = json_dumps\n\n    def setup(self, app):\n        app.config._define('json.enable', default=True, validate=bool,\n                          help=\"Enable or disable automatic dict->json filter.\")\n        app.config._define('json.ascii', default=False, validate=bool,\n                          help=\"Use only 7-bit ASCII characters in output.\")\n        app.config._define('json.indent', default=True, validate=bool,\n                          help=\"Add whitespace to make json more readable.\")\n        app.config._define('json.dump_func', default=None,\n                          help=\"If defined, use this function to transform\"\n                               \" dict into json. The other options no longer\"\n                               \" apply.\")\n\n    def apply(self, callback, route):\n        dumps = self.json_dumps\n        if not self.json_dumps: return callback\n\n        @functools.wraps(callback)\n        def wrapper(*a, **ka):\n            try:\n                rv = callback(*a, **ka)\n            except HTTPResponse as resp:\n                rv = resp\n\n            if isinstance(rv, dict):\n                # Attempt to serialize, raises exception on failure\n                json_response = dumps(rv)\n                # Set content type only if serialization successful\n                response.content_type = 'application/json'\n                return json_response\n            elif isinstance(rv, HTTPResponse) and isinstance(rv.body, dict):\n                rv.body = dumps(rv.body)\n                rv.content_type = 'application/json'\n            return rv\n\n        return wrapper\n\n\nclass TemplatePlugin:\n    \"\"\" This plugin applies the :func:`view` decorator to all routes with a\n        `template` config parameter. If the parameter is a tuple, the second\n        element must be a dict with additional options (e.g. `template_engine`)\n        or default variables for the template. \"\"\"\n    name = 'template'\n    api = 2\n\n    def setup(self, app):\n        app.tpl = self\n\n    def apply(self, callback, route):\n        conf = route.config.get('template')\n        if isinstance(conf, (tuple, list)) and len(conf) == 2:\n            return view(conf[0], **conf[1])(callback)\n        elif isinstance(conf, str):\n            return view(conf)(callback)\n        else:\n            return callback\n\n\n#: Not a plugin, but part of the plugin API. TODO: Find a better place.\nclass _ImportRedirect:\n    def __init__(self, name, impmask):\n        \"\"\" Create a virtual package that redirects imports (see PEP 302). \"\"\"\n        self.name = name\n        self.impmask = impmask\n        self.module = sys.modules.setdefault(name, new_module(name))\n        self.module.__dict__.update({\n            '__file__': __file__,\n            '__path__': [],\n            '__all__': [],\n            '__loader__': self\n        })\n        sys.meta_path.append(self)\n\n    def find_spec(self, fullname, path, target=None):\n        if '.' not in fullname: return\n        if fullname.rsplit('.', 1)[0] != self.name: return\n        from importlib.util import spec_from_loader\n        return spec_from_loader(fullname, self)\n\n    def find_module(self, fullname, path=None):\n        if '.' not in fullname: return\n        if fullname.rsplit('.', 1)[0] != self.name: return\n        return self\n\n    def create_module(self, spec):\n        return self.load_module(spec.name)\n\n    def exec_module(self, module):\n        pass  # This probably breaks importlib.reload() :/\n\n    def load_module(self, fullname):\n        if fullname in sys.modules: return sys.modules[fullname]\n        modname = fullname.rsplit('.', 1)[1]\n        realname = self.impmask % modname\n        __import__(realname)\n        module = sys.modules[fullname] = sys.modules[realname]\n        setattr(self.module, modname, module)\n        module.__loader__ = self\n        return module\n\n###############################################################################\n# Common Utilities #############################################################\n###############################################################################\n\n\nclass MultiDict(DictMixin):\n    \"\"\" This dict stores multiple values per key, but behaves exactly like a\n        normal dict in that it returns only the newest value for any given key.\n        There are special methods available to access the full list of values.\n    \"\"\"\n\n    def __init__(self, *a, **k):\n        self.dict = dict((k, [v]) for (k, v) in dict(*a, **k).items())\n\n    def __len__(self):\n        return len(self.dict)\n\n    def __iter__(self):\n        return iter(self.dict)\n\n    def __contains__(self, key):\n        return key in self.dict\n\n    def __delitem__(self, key):\n        del self.dict[key]\n\n    def __getitem__(self, key):\n        return self.dict[key][-1]\n\n    def __setitem__(self, key, value):\n        self.append(key, value)\n\n    def keys(self):\n        return self.dict.keys()\n\n    def values(self):\n        return (v[-1] for v in self.dict.values())\n\n    def items(self):\n        return ((k, v[-1]) for k, v in self.dict.items())\n\n    def allitems(self):\n        return ((k, v) for k, vl in self.dict.items() for v in vl)\n\n    iterkeys = keys\n    itervalues = values\n    iteritems = items\n    iterallitems = allitems\n\n    def get(self, key, default=None, index=-1, type=None):\n        \"\"\" Return the most recent value for a key.\n\n            :param default: The default value to be returned if the key is not\n                   present or the type conversion fails.\n            :param index: An index for the list of available values.\n            :param type: If defined, this callable is used to cast the value\n                    into a specific type. Exception are suppressed and result in\n                    the default value to be returned.\n        \"\"\"\n        try:\n            val = self.dict[key][index]\n            return type(val) if type else val\n        except Exception:\n            pass\n        return default\n\n    def append(self, key, value):\n        \"\"\" Add a new value to the list of values for this key. \"\"\"\n        self.dict.setdefault(key, []).append(value)\n\n    def replace(self, key, value):\n        \"\"\" Replace the list of values with a single value. \"\"\"\n        self.dict[key] = [value]\n\n    def getall(self, key):\n        \"\"\" Return a (possibly empty) list of values for a key. \"\"\"\n        return self.dict.get(key) or []\n\n    #: Aliases for WTForms to mimic other multi-dict APIs (Django)\n    getone = get\n    getlist = getall\n\n\nclass FormsDict(MultiDict):\n    \"\"\" This :class:`MultiDict` subclass is used to store request form data.\n        Additionally to the normal dict-like item access methods, this container\n        also supports attribute-like access to its values. Missing attributes\n        default to an empty string.\n\n        .. versionchanged:: 0.14\n            All keys and values are now decoded as utf8 by default, item and\n            attribute access will return the same string.\n    \"\"\"\n\n    def decode(self, encoding=None):\n        \"\"\" (deprecated) Starting with 0.13 all keys and values are already\n            correctly decoded. \"\"\"\n        copy = FormsDict()\n        for key, value in self.allitems():\n            copy[key] = value\n        return copy\n\n    def getunicode(self, name, default=None, encoding=None):\n        \"\"\" (deprecated) Return the value as a unicode string, or the default. \"\"\"\n        return self.get(name, default)\n\n    def __getattr__(self, name, default=str()):\n        # Without this guard, pickle generates a cryptic TypeError:\n        if name.startswith('__') and name.endswith('__'):\n            return super(FormsDict, self).__getattr__(name)\n        return self.get(name, default=default)\n\n\nclass HeaderDict(MultiDict):\n    \"\"\" A case-insensitive version of :class:`MultiDict` that defaults to\n        replace the old value instead of appending it. \"\"\"\n\n    def __init__(self, *a, **ka):\n        self.dict = {}\n        if a or ka: self.update(*a, **ka)\n\n    def __contains__(self, key):\n        return _hkey(key) in self.dict\n\n    def __delitem__(self, key):\n        del self.dict[_hkey(key)]\n\n    def __getitem__(self, key):\n        return self.dict[_hkey(key)][-1]\n\n    def __setitem__(self, key, value):\n        self.dict[_hkey(key)] = [_hval(value)]\n\n    def append(self, key, value):\n        self.dict.setdefault(_hkey(key), []).append(_hval(value))\n\n    def replace(self, key, value):\n        self.dict[_hkey(key)] = [_hval(value)]\n\n    def getall(self, key):\n        return self.dict.get(_hkey(key)) or []\n\n    def get(self, key, default=None, index=-1):\n        return MultiDict.get(self, _hkey(key), default, index)\n\n    def filter(self, names):\n        for name in (_hkey(n) for n in names):\n            if name in self.dict:\n                del self.dict[name]\n\n\nclass WSGIHeaderDict(DictMixin):\n    \"\"\" This dict-like class wraps a WSGI environ dict and provides convenient\n        access to HTTP_* fields. Header names are case-insensitive and titled by default.\n    \"\"\"\n    #: List of keys that do not have a ``HTTP_`` prefix.\n    cgikeys = ('CONTENT_TYPE', 'CONTENT_LENGTH')\n\n    def __init__(self, environ):\n        self.environ = environ\n\n    def _ekey(self, key):\n        \"\"\" Translate header field name to CGI/WSGI environ key. \"\"\"\n        key = key.replace('-', '_').upper()\n        if key in self.cgikeys:\n            return key\n        return 'HTTP_' + key\n\n    def raw(self, key, default=None):\n        \"\"\" Return the header value as is (not utf8-translated). \"\"\"\n        return self.environ.get(self._ekey(key), default)\n\n    def __getitem__(self, key):\n        return _wsgi_recode(self.environ[self._ekey(key)])\n\n    def __setitem__(self, key, value):\n        raise TypeError(\"%s is read-only.\" % self.__class__)\n\n    def __delitem__(self, key):\n        raise TypeError(\"%s is read-only.\" % self.__class__)\n\n    def __iter__(self):\n        for key in self.environ:\n            if key[:5] == 'HTTP_':\n                yield _hkey(key[5:])\n            elif key in self.cgikeys:\n                yield _hkey(key)\n\n    def keys(self):\n        return [x for x in self]\n\n    def __len__(self):\n        return len(self.keys())\n\n    def __contains__(self, key):\n        return self._ekey(key) in self.environ\n\n\nclass ConfigDict(dict):\n    \"\"\" A dict-like configuration storage with additional support for\n        namespaces, validators, meta-data and overlays.\n\n        This dict-like class is heavily optimized for read access.\n        Read-only methods and item access should be as fast as a native dict.\n    \"\"\"\n\n    __slots__ = ('_meta', '_change_listener', '_overlays', '_virtual_keys', '_source', '__weakref__')\n\n    def __init__(self):\n        self._meta = {}\n        self._change_listener = []\n        #: Weak references of overlays that need to be kept in sync.\n        self._overlays = []\n        #: Config that is the source for this overlay.\n        self._source = None\n        #: Keys of values copied from the source (values we do not own)\n        self._virtual_keys = set()\n\n    def load_module(self, name, squash=True):\n        \"\"\"Load values from a Python module.\n\n           Import a python module by name and add all upper-case module-level\n           variables to this config dict.\n\n           :param name: Module name to import and load.\n           :param squash: If true (default), nested dicts are assumed to\n              represent namespaces and flattened (see :meth:`load_dict`).\n        \"\"\"\n        config_obj = load(name)\n        obj = {key: getattr(config_obj, key)\n               for key in dir(config_obj) if key.isupper()}\n\n        if squash:\n            self.load_dict(obj)\n        else:\n            self.update(obj)\n        return self\n\n    def load_config(self, filename, **options):\n        \"\"\" Load values from ``*.ini`` style config files using configparser.\n\n            INI style sections (e.g. ``[section]``) are used as namespace for\n            all keys within that section. Both section and key names may contain\n            dots as namespace separators and are converted to lower-case.\n\n            The special sections ``[bottle]`` and ``[ROOT]`` refer to the root\n            namespace and the ``[DEFAULT]`` section defines default values for all\n            other sections.\n\n            :param filename: The path of a config file, or a list of paths.\n            :param options: All keyword parameters are passed to the underlying\n                :class:`python:configparser.ConfigParser` constructor call.\n\n        \"\"\"\n        options.setdefault('allow_no_value', True)\n        options.setdefault('interpolation', configparser.ExtendedInterpolation())\n        conf = configparser.ConfigParser(**options)\n        conf.read(filename)\n        for section in conf.sections():\n            for key in conf.options(section):\n                value = conf.get(section, key)\n                if section not in ('bottle', 'ROOT'):\n                    key = section + '.' + key\n                self[key.lower()] = value\n        return self\n\n    def load_dict(self, source, namespace=''):\n        \"\"\" Load values from a dictionary structure. Nesting can be used to\n            represent namespaces.\n\n            >>> c = ConfigDict()\n            >>> c.load_dict({'some': {'namespace': {'key': 'value'} } })\n            {'some.namespace.key': 'value'}\n        \"\"\"\n        for key, value in source.items():\n            if isinstance(key, str):\n                nskey = (namespace + '.' + key).strip('.')\n                if isinstance(value, dict):\n                    self.load_dict(value, namespace=nskey)\n                else:\n                    self[nskey] = value\n            else:\n                raise TypeError('Key has type %r (not a string)' % type(key))\n        return self\n\n    def update(self, *a, **ka):\n        \"\"\" If the first parameter is a string, all keys are prefixed with this\n            namespace. Apart from that it works just as the usual dict.update().\n\n            >>> c = ConfigDict()\n            >>> c.update('some.namespace', key='value')\n        \"\"\"\n        prefix = ''\n        if a and isinstance(a[0], str):\n            prefix = a[0].strip('.') + '.'\n            a = a[1:]\n        for key, value in dict(*a, **ka).items():\n            self[prefix + key] = value\n\n    def setdefault(self, key, value=None):\n        if key not in self:\n            self[key] = value\n        return self[key]\n\n    def __setitem__(self, key, value):\n        if not isinstance(key, str):\n            raise TypeError('Key has type %r (not a string)' % type(key))\n\n        self._virtual_keys.discard(key)\n\n        value = self.meta_get(key, 'filter', lambda x: x)(value)\n        if key in self and self[key] is value:\n            return\n\n        self._on_change(key, value)\n        dict.__setitem__(self, key, value)\n\n        for overlay in self._iter_overlays():\n            overlay._set_virtual(key, value)\n\n    def __delitem__(self, key):\n        if key not in self:\n            raise KeyError(key)\n        if key in self._virtual_keys:\n            raise KeyError(\"Virtual keys cannot be deleted: %s\" % key)\n\n        if self._source and key in self._source:\n            # Not virtual, but present in source -> Restore virtual value\n            dict.__delitem__(self, key)\n            self._set_virtual(key, self._source[key])\n        else:  # not virtual, not present in source. This is OUR value\n            self._on_change(key, None)\n            dict.__delitem__(self, key)\n            for overlay in self._iter_overlays():\n                overlay._delete_virtual(key)\n\n    def _set_virtual(self, key, value):\n        \"\"\" Recursively set or update virtual keys. \"\"\"\n        if key in self and key not in self._virtual_keys:\n            return  # Do nothing for non-virtual keys.\n\n        self._virtual_keys.add(key)\n        if key in self and self[key] is not value:\n            self._on_change(key, value)\n        dict.__setitem__(self, key, value)\n        for overlay in self._iter_overlays():\n            overlay._set_virtual(key, value)\n\n    def _delete_virtual(self, key):\n        \"\"\" Recursively delete virtual entry. \"\"\"\n        if key not in self._virtual_keys:\n            return  # Do nothing for non-virtual keys.\n\n        if key in self:\n            self._on_change(key, None)\n        dict.__delitem__(self, key)\n        self._virtual_keys.discard(key)\n        for overlay in self._iter_overlays():\n            overlay._delete_virtual(key)\n\n    def _on_change(self, key, value):\n        for cb in self._change_listener:\n            if cb(self, key, value):\n                return True\n\n    def _add_change_listener(self, func):\n        self._change_listener.append(func)\n        return func\n\n    def meta_get(self, key, metafield, default=None):\n        \"\"\" Return the value of a meta field for a key. \"\"\"\n        return self._meta.get(key, {}).get(metafield, default)\n\n    def meta_set(self, key, metafield, value):\n        \"\"\" Set the meta field for a key to a new value.\n\n            Meta-fields are shared between all members of an overlay tree.\n        \"\"\"\n        self._meta.setdefault(key, {})[metafield] = value\n\n    def meta_list(self, key):\n        \"\"\" Return an iterable of meta field names defined for a key. \"\"\"\n        return self._meta.get(key, {}).keys()\n\n    def _define(self, key, default=_UNSET, help=_UNSET, validate=_UNSET):\n        \"\"\" (Unstable) Shortcut for plugins to define own config parameters. \"\"\"\n        if default is not _UNSET:\n            self.setdefault(key, default)\n        if help is not _UNSET:\n            self.meta_set(key, 'help', help)\n        if validate is not _UNSET:\n            self.meta_set(key, 'validate', validate)\n\n    def _iter_overlays(self):\n        for ref in self._overlays:\n            overlay = ref()\n            if overlay is not None:\n                yield overlay\n\n    def _make_overlay(self):\n        \"\"\" (Unstable) Create a new overlay that acts like a chained map: Values\n            missing in the overlay are copied from the source map. Both maps\n            share the same meta entries.\n\n            Entries that were copied from the source are called 'virtual'. You\n            can not delete virtual keys, but overwrite them, which turns them\n            into non-virtual entries. Setting keys on an overlay never affects\n            its source, but may affect any number of child overlays.\n\n            Other than collections.ChainMap or most other implementations, this\n            approach does not resolve missing keys on demand, but instead\n            actively copies all values from the source to the overlay and keeps\n            track of virtual and non-virtual keys internally. This removes any\n            lookup-overhead. Read-access is as fast as a build-in dict for both\n            virtual and non-virtual keys.\n\n            Changes are propagated recursively and depth-first. A failing\n            on-change handler in an overlay stops the propagation of virtual\n            values and may result in an partly updated tree. Take extra care\n            here and make sure that on-change handlers never fail.\n\n            Used by Route.config\n        \"\"\"\n        # Cleanup dead references\n        self._overlays[:] = [ref for ref in self._overlays if ref() is not None]\n\n        overlay = ConfigDict()\n        overlay._meta = self._meta\n        overlay._source = self\n        self._overlays.append(weakref.ref(overlay))\n        for key in self:\n            overlay._set_virtual(key, self[key])\n        return overlay\n\n\nclass AppStack(list):\n    \"\"\" A stack-like list. Calling it returns the head of the stack. \"\"\"\n\n    def __call__(self):\n        \"\"\" Return the current default application. \"\"\"\n        return self.default\n\n    def push(self, value=None):\n        \"\"\" Add a new :class:`Bottle` instance to the stack \"\"\"\n        if not isinstance(value, Bottle):\n            value = Bottle()\n        self.append(value)\n        return value\n    new_app = push\n\n    @property\n    def default(self):\n        try:\n            return self[-1]\n        except IndexError:\n            return self.push()\n\n\nclass WSGIFileWrapper:\n    def __init__(self, fp, buffer_size=1024 * 64):\n        self.fp, self.buffer_size = fp, buffer_size\n        for attr in 'fileno', 'close', 'read', 'readlines', 'tell', 'seek':\n            if hasattr(fp, attr): setattr(self, attr, getattr(fp, attr))\n\n    def __iter__(self):\n        buff, read = self.buffer_size, self.read\n        part = read(buff)\n        while part:\n            yield part\n            part = read(buff)\n\n\nclass _closeiter:\n    \"\"\" This only exists to be able to attach a .close method to iterators that\n        do not support attribute assignment (most of itertools). \"\"\"\n\n    def __init__(self, iterator, close=None):\n        self.iterator = iterator\n        self.close_callbacks = makelist(close)\n\n    def __iter__(self):\n        return iter(self.iterator)\n\n    def close(self):\n        for func in self.close_callbacks:\n            func()\n\n\ndef _try_close(obj):\n    \"\"\" Call obj.close() if present and ignore exceptions \"\"\"\n    try:\n        if hasattr(obj, 'close'):\n            obj.close()\n    except Exception:\n        pass\n\n\nclass ResourceManager:\n    \"\"\" This class manages a list of search paths and helps to find and open\n        application-bound resources (files).\n\n        :param base: default value for :meth:`add_path` calls.\n        :param opener: callable used to open resources.\n        :param cachemode: controls which lookups are cached. One of 'all',\n                         'found' or 'none'.\n    \"\"\"\n\n    def __init__(self, base='./', opener=open, cachemode='all'):\n        self.opener = opener\n        self.base = base\n        self.cachemode = cachemode\n\n        #: A list of search paths. See :meth:`add_path` for details.\n        self.path = []\n        #: A cache for resolved paths. ``res.cache.clear()`` clears the cache.\n        self.cache = {}\n\n    def add_path(self, path, base=None, index=None, create=False):\n        \"\"\" Add a new path to the list of search paths. Return False if the\n            path does not exist.\n\n            :param path: The new search path. Relative paths are turned into\n                an absolute and normalized form. If the path looks like a file\n                (not ending in `/`), the filename is stripped off.\n            :param base: Path used to absolutize relative search paths.\n                Defaults to :attr:`base` which defaults to ``os.getcwd()``.\n            :param index: Position within the list of search paths. Defaults\n                to last index (appends to the list).\n\n            The `base` parameter makes it easy to reference files installed\n            along with a python module or package::\n\n                res.add_path('./resources/', __file__)\n        \"\"\"\n        base = os.path.abspath(os.path.dirname(base or self.base))\n        path = os.path.abspath(os.path.join(base, os.path.dirname(path)))\n        path += os.sep\n        if path in self.path:\n            self.path.remove(path)\n        if create and not os.path.isdir(path):\n            os.makedirs(path)\n        if index is None:\n            self.path.append(path)\n        else:\n            self.path.insert(index, path)\n        self.cache.clear()\n        return os.path.exists(path)\n\n    def __iter__(self):\n        \"\"\" Iterate over all existing files in all registered paths. \"\"\"\n        search = self.path[:]\n        while search:\n            path = search.pop()\n            if not os.path.isdir(path): continue\n            for name in os.listdir(path):\n                full = os.path.join(path, name)\n                if os.path.isdir(full): search.append(full)\n                else: yield full\n\n    def lookup(self, name):\n        \"\"\" Search for a resource and return an absolute file path, or `None`.\n\n            The :attr:`path` list is searched in order. The first match is\n            returned. Symlinks are followed. The result is cached to speed up\n            future lookups. \"\"\"\n        if name not in self.cache or DEBUG:\n            for path in self.path:\n                fpath = os.path.join(path, name)\n                if os.path.isfile(fpath):\n                    if self.cachemode in ('all', 'found'):\n                        self.cache[name] = fpath\n                    return fpath\n            if self.cachemode == 'all':\n                self.cache[name] = None\n        return self.cache[name]\n\n    def open(self, name, mode='r', *args, **kwargs):\n        \"\"\" Find a resource and return a file object, or raise IOError. \"\"\"\n        fname = self.lookup(name)\n        if not fname: raise IOError(\"Resource %r not found.\" % name)\n        return self.opener(fname, mode=mode, *args, **kwargs)\n\n\nclass FileUpload:\n    def __init__(self, fileobj, name, filename, headers=None):\n        \"\"\" Wrapper for a single file uploaded via ``multipart/form-data``. \"\"\"\n        #: Open file(-like) object (BytesIO buffer or temporary file)\n        self.file = fileobj\n        #: Name of the upload form field\n        self.name = name\n        #: Raw filename as sent by the client (may contain unsafe characters)\n        self.raw_filename = filename\n        #: A :class:`HeaderDict` with additional headers (e.g. content-type)\n        self.headers = HeaderDict(headers) if headers else HeaderDict()\n\n    content_type = HeaderProperty('Content-Type')\n    content_length = HeaderProperty('Content-Length', reader=int, default=-1)\n\n    def get_header(self, name, default=None):\n        \"\"\" Return the value of a header within the multipart part. \"\"\"\n        return self.headers.get(name, default)\n\n    @cached_property\n    def filename(self):\n        \"\"\" Name of the file on the client file system, but normalized to ensure\n            file system compatibility. An empty filename is returned as 'empty'.\n\n            Only ASCII letters, digits, dashes, underscores and dots are\n            allowed in the final filename. Accents are removed, if possible.\n            Whitespace is replaced by a single dash. Leading or tailing dots\n            or dashes are removed. The filename is limited to 255 characters.\n        \"\"\"\n        fname = self.raw_filename\n        fname = normalize('NFKD', fname)\n        fname = fname.encode('ASCII', 'ignore').decode('ASCII')\n        fname = os.path.basename(fname.replace('\\\\', os.path.sep))\n        fname = re.sub(r'[^a-zA-Z0-9-_.\\s]', '', fname).strip()\n        fname = re.sub(r'[-\\s]+', '-', fname).strip('.-')\n        return fname[:255] or 'empty'\n\n    def _copy_file(self, fp, chunk_size=2 ** 16):\n        read, write, offset = self.file.read, fp.write, self.file.tell()\n        while 1:\n            buf = read(chunk_size)\n            if not buf: break\n            write(buf)\n        self.file.seek(offset)\n\n    def save(self, destination, overwrite=False, chunk_size=2 ** 16):\n        \"\"\" Save file to disk or copy its content to an open file(-like) object.\n            If *destination* is a directory, :attr:`filename` is added to the\n            path. Existing files are not overwritten by default (IOError).\n\n            :param destination: File path, directory or file(-like) object.\n            :param overwrite: If True, replace existing files. (default: False)\n            :param chunk_size: Bytes to read at a time. (default: 64kb)\n        \"\"\"\n        if isinstance(destination, str):  # Except file-likes here\n            if os.path.isdir(destination):\n                destination = os.path.join(destination, self.filename)\n            if not overwrite and os.path.exists(destination):\n                raise IOError('File exists.')\n            with open(destination, 'wb') as fp:\n                self._copy_file(fp, chunk_size)\n        else:\n            self._copy_file(destination, chunk_size)\n\n###############################################################################\n# Application Helper ###########################################################\n###############################################################################\n\n\ndef abort(code=500, text='Unknown Error.'):\n    \"\"\" Aborts execution and causes a HTTP error. \"\"\"\n    raise HTTPError(code, text)\n\n\ndef redirect(url, code=None):\n    \"\"\" Aborts execution and causes a 303 or 302 redirect, depending on\n        the HTTP protocol version. \"\"\"\n    if not code:\n        code = 303 if request.get('SERVER_PROTOCOL') == \"HTTP/1.1\" else 302\n    res = response.copy(cls=HTTPResponse)\n    res.status = code\n    res.body = \"\"\n    res.set_header('Location', urljoin(request.url, url))\n    raise res\n\n\ndef _rangeiter(fp, offset, limit, bufsize=1024 * 1024):\n    \"\"\" Yield chunks from a range in a file. \"\"\"\n    fp.seek(offset)\n    while limit > 0:\n        part = fp.read(min(limit, bufsize))\n        if not part:\n            break\n        limit -= len(part)\n        yield part\n\n\ndef static_file(filename, root,\n                mimetype=True,\n                download=False,\n                charset='UTF-8',\n                etag=None,\n                headers=None):\n    \"\"\" Open a file in a safe way and return an instance of :exc:`HTTPResponse`\n        that can be sent back to the client.\n\n        :param filename: Name or path of the file to send, relative to ``root``.\n        :param root: Root path for file lookups. Should be an absolute directory\n            path.\n        :param mimetype: Provide the content-type header (default: guess from\n            file extension)\n        :param download: If True, ask the browser to open a `Save as...` dialog\n            instead of opening the file with the associated program. You can\n            specify a custom filename as a string. If not specified, the\n            original filename is used (default: False).\n        :param charset: The charset for files with a ``text/*`` mime-type.\n            (default: UTF-8)\n        :param etag: Provide a pre-computed ETag header. If set to ``False``,\n            ETag handling is disabled. (default: auto-generate ETag header)\n        :param headers: Additional headers dict to add to the response.\n\n        While checking user input is always a good idea, this function provides\n        additional protection against malicious ``filename`` parameters from\n        breaking out of the ``root`` directory and leaking sensitive information\n        to an attacker.\n\n        Read-protected files or files outside of the ``root`` directory are\n        answered with ``403 Access Denied``. Missing files result in a\n        ``404 Not Found`` response. Conditional requests (``If-Modified-Since``,\n        ``If-None-Match``) are answered with ``304 Not Modified`` whenever\n        possible. ``HEAD`` and ``Range`` requests (used by download managers to\n        check or continue partial downloads) are also handled automatically.\n    \"\"\"\n\n    root = os.path.join(os.path.abspath(root), '')\n    filename = os.path.abspath(os.path.join(root, filename.strip('/\\\\')))\n    headers = headers.copy() if headers else {}\n    getenv = request.environ.get\n\n    if not filename.startswith(root):\n        return HTTPError(403, \"Access denied.\")\n    if not os.path.isfile(filename):\n        return HTTPError(404, \"File does not exist.\")\n    if not os.access(filename, os.R_OK):\n        return HTTPError(403, \"You do not have permission to access this file.\")\n\n    if mimetype is True:\n        name = download if isinstance(download, str) else filename\n        mimetype, encoding = mimetypes.guess_type(name)\n        if encoding == 'gzip':\n            mimetype = 'application/gzip'\n        elif encoding:  # e.g. bzip2 -> application/x-bzip2\n            mimetype = 'application/x-' + encoding\n\n    if charset and mimetype and 'charset=' not in mimetype \\\n       and (mimetype[:5] == 'text/' or mimetype == 'application/javascript'):\n        mimetype += '; charset=%s' % charset\n\n    if mimetype:\n        headers['Content-Type'] = mimetype\n\n    if download is True:\n        download = os.path.basename(filename)\n\n    if download:\n        download = download.replace('\"', '')\n        headers['Content-Disposition'] = 'attachment; filename=\"%s\"' % download\n\n    stats = os.stat(filename)\n    headers['Content-Length'] = clen = stats.st_size\n    headers['Last-Modified'] = email.utils.formatdate(stats.st_mtime, usegmt=True)\n    headers['Date'] = email.utils.formatdate(time.time(), usegmt=True)\n\n    if etag is None:\n        etag = '%d:%d:%d:%d:%s' % (stats.st_dev, stats.st_ino, stats.st_mtime,\n                                   clen, filename)\n        etag = hashlib.sha1(tob(etag)).hexdigest()\n\n    if etag:\n        headers['ETag'] = etag\n        check = getenv('HTTP_IF_NONE_MATCH')\n        if check and check == etag:\n            return HTTPResponse(status=304, **headers)\n\n    ims = getenv('HTTP_IF_MODIFIED_SINCE')\n    if ims:\n        ims = parse_date(ims.split(\";\")[0].strip())\n        if ims is not None and ims >= int(stats.st_mtime):\n            return HTTPResponse(status=304, **headers)\n\n    body = '' if request.method == 'HEAD' else open(filename, 'rb')\n\n    headers[\"Accept-Ranges\"] = \"bytes\"\n    range_header = getenv('HTTP_RANGE')\n    if range_header:\n        ranges = list(parse_range_header(range_header, clen))\n        if not ranges:\n            return HTTPError(416, \"Requested Range Not Satisfiable\")\n        offset, end = ranges[0]\n        rlen = end - offset\n        headers[\"Content-Range\"] = \"bytes %d-%d/%d\" % (offset, end - 1, clen)\n        headers[\"Content-Length\"] = str(rlen)\n        if body: body = _closeiter(_rangeiter(body, offset, rlen), body.close)\n        return HTTPResponse(body, status=206, **headers)\n    return HTTPResponse(body, **headers)\n\n###############################################################################\n# HTTP Utilities and MISC (TODO) ###############################################\n###############################################################################\n\n\ndef debug(mode=True):\n    \"\"\" Change the debug level.\n    There is only one debug level supported at the moment.\"\"\"\n    global DEBUG\n    if mode: warnings.simplefilter('default')\n    DEBUG = bool(mode)\n\n\ndef http_date(value):\n    if isinstance(value, str):\n        return value\n    if isinstance(value, datetime):\n        # aware datetime.datetime is converted to UTC time\n        # naive datetime.datetime is treated as UTC time\n        value = value.utctimetuple()\n    elif isinstance(value, datedate):\n        # datetime.date is naive, and is treated as UTC time\n        value = value.timetuple()\n    if not isinstance(value, (int, float)):\n        # convert struct_time in UTC to UNIX timestamp\n        value = calendar.timegm(value)\n    return email.utils.formatdate(value, usegmt=True)\n\n\ndef parse_date(ims):\n    \"\"\" Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch. \"\"\"\n    try:\n        ts = email.utils.parsedate_tz(ims)\n        return calendar.timegm(ts[:8] + (0, )) - (ts[9] or 0)\n    except (TypeError, ValueError, IndexError, OverflowError):\n        return None\n\n\ndef parse_auth(header):\n    \"\"\" Parse rfc2617 HTTP authentication header string (basic) and return (user,pass) tuple or None\"\"\"\n    try:\n        method, data = header.split(None, 1)\n        if method.lower() == 'basic':\n            user, pwd = touni(base64.b64decode(tob(data))).split(':', 1)\n            return user, pwd\n    except (KeyError, ValueError):\n        return None\n\n\ndef parse_range_header(header, maxlen=0):\n    \"\"\" Yield (start, end) ranges parsed from a HTTP Range header. Skip\n        unsatisfiable ranges. The end index is non-inclusive.\"\"\"\n    if not header or header[:6] != 'bytes=': return\n    ranges = [r.split('-', 1) for r in header[6:].split(',') if '-' in r]\n    for start, end in ranges:\n        try:\n            if not start:  # bytes=-100    -> last 100 bytes\n                start, end = max(0, maxlen - int(end)), maxlen\n            elif not end:  # bytes=100-    -> all but the first 99 bytes\n                start, end = int(start), maxlen\n            else:  # bytes=100-200 -> bytes 100-200 (inclusive)\n                start, end = int(start), min(int(end) + 1, maxlen)\n            if 0 <= start < end <= maxlen:\n                yield start, end\n        except ValueError:\n            pass\n\n\n#: Header tokenizer used by _parse_http_header()\n_hsplit = re.compile('(?:(?:\"((?:[^\"\\\\\\\\]|\\\\\\\\.)*)\")|([^;,=]+))([;,=]?)').findall\n\n\ndef _parse_http_header(h):\n    \"\"\" Parses a typical multi-valued and parametrised HTTP header (e.g. Accept headers) and returns a list of values\n        and parameters. For non-standard or broken input, this implementation may return partial results.\n    :param h: A header string (e.g. ``text/html,text/plain;q=0.9,*/*;q=0.8``)\n    :return: List of (value, params) tuples. The second element is a (possibly empty) dict.\n    \"\"\"\n    values = []\n    if '\"' not in h:  # INFO: Fast path without regexp (~2x faster)\n        for value in h.split(','):\n            parts = value.split(';')\n            values.append((parts[0].strip(), {}))\n            for attr in parts[1:]:\n                name, value = attr.split('=', 1)\n                values[-1][1][name.strip().lower()] = value.strip()\n    else:\n        lop, key, attrs = ',', None, {}\n        for quoted, plain, tok in _hsplit(h):\n            value = plain.strip() if plain else quoted.replace('\\\\\"', '\"')\n            if lop == ',':\n                attrs = {}\n                values.append((value, attrs))\n            elif lop == ';':\n                if tok == '=':\n                    key = value\n                else:\n                    attrs[value.strip().lower()] = ''\n            elif lop == '=' and key:\n                attrs[key.strip().lower()] = value\n                key = None\n            lop = tok\n    return values\n\n\ndef _parse_qsl(qs, encoding=\"utf8\"):\n    r = []\n    for pair in qs.split('&'):\n        if not pair: continue\n        nv = pair.split('=', 1)\n        if len(nv) != 2: nv.append('')\n        key = urlunquote(nv[0].replace('+', ' '), encoding)\n        value = urlunquote(nv[1].replace('+', ' '), encoding)\n        r.append((key, value))\n    return r\n\n\ndef _lscmp(a, b):\n    \"\"\" Compares two strings in a cryptographically safe way:\n        Runtime is not affected by length of common prefix. \"\"\"\n    return not sum(0 if x == y else 1\n                   for x, y in zip(a, b)) and len(a) == len(b)\n\n\ndef cookie_encode(data, key, digestmod=None):\n    \"\"\" Encode and sign a pickle-able object. Return a (byte) string \"\"\"\n    depr(0, 13, \"cookie_encode() will be removed soon.\",\n                \"Do not use this API directly.\")\n    digestmod = digestmod or hashlib.sha256\n    msg = base64.b64encode(pickle.dumps(data, -1))\n    sig = base64.b64encode(hmac.new(tob(key), msg, digestmod=digestmod).digest())\n    return b'!' + sig + b'?' + msg\n\n\ndef cookie_decode(data, key, digestmod=None):\n    \"\"\" Verify and decode an encoded string. Return an object or None.\"\"\"\n    depr(0, 13, \"cookie_decode() will be removed soon.\",\n                \"Do not use this API directly.\")\n    data = tob(data)\n    if cookie_is_encoded(data):\n        sig, msg = data.split(b'?', 1)\n        digestmod = digestmod or hashlib.sha256\n        hashed = hmac.new(tob(key), msg, digestmod=digestmod).digest()\n        if _lscmp(sig[1:], base64.b64encode(hashed)):\n            return pickle.loads(base64.b64decode(msg))\n    return None\n\n\ndef cookie_is_encoded(data):\n    \"\"\" Return True if the argument looks like a encoded cookie.\"\"\"\n    depr(0, 13, \"cookie_is_encoded() will be removed soon.\",\n                \"Do not use this API directly.\")\n    return bool(data.startswith(b'!') and b'?' in data)\n\n\ndef html_escape(string):\n    \"\"\" Escape HTML special characters ``&<>`` and quotes ``'\"``. \"\"\"\n    return string.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')\\\n                 .replace('\"', '&quot;').replace(\"'\", '&#039;')\n\n\ndef html_quote(string):\n    \"\"\" Escape and quote a string to be used as an HTTP attribute.\"\"\"\n    return '\"%s\"' % html_escape(string).replace('\\n', '&#10;') \\\n        .replace('\\r', '&#13;').replace('\\t', '&#9;')\n\n\ndef yieldroutes(func):\n    \"\"\" Return a generator for routes that match the signature (name, args)\n    of the func parameter. This may yield more than one route if the function\n    takes optional keyword arguments. The output is best described by example::\n\n        a()         -> '/a'\n        b(x, y)     -> '/b/<x>/<y>'\n        c(x, y=5)   -> '/c/<x>' and '/c/<x>/<y>'\n        d(x=5, y=6) -> '/d' and '/d/<x>' and '/d/<x>/<y>'\n    \"\"\"\n    path = '/' + func.__name__.replace('__', '/').lstrip('/')\n    sig = inspect.signature(func, follow_wrapped=False)\n    for p in sig.parameters.values():\n        if p.kind == p.POSITIONAL_ONLY:\n            raise ValueError(\"Invalid signature for yieldroutes: %s\" % sig)\n        if p.kind in (p.POSITIONAL_OR_KEYWORD, p.KEYWORD_ONLY):\n            if p.default != p.empty:\n                yield path  # Yield path without this (optional) parameter.\n            path += \"/<%s>\" % p.name\n    yield path\n\n\ndef path_shift(script_name, path_info, shift=1):\n    \"\"\" Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa.\n\n        :return: The modified paths.\n        :param script_name: The SCRIPT_NAME path.\n        :param script_name: The PATH_INFO path.\n        :param shift: The number of path fragments to shift. May be negative to\n          change the shift direction. (default: 1)\n    \"\"\"\n    if shift == 0: return script_name, path_info\n    pathlist = path_info.strip('/').split('/')\n    scriptlist = script_name.strip('/').split('/')\n    if pathlist and pathlist[0] == '': pathlist = []\n    if scriptlist and scriptlist[0] == '': scriptlist = []\n    if 0 < shift <= len(pathlist):\n        moved = pathlist[:shift]\n        scriptlist = scriptlist + moved\n        pathlist = pathlist[shift:]\n    elif 0 > shift >= -len(scriptlist):\n        moved = scriptlist[shift:]\n        pathlist = moved + pathlist\n        scriptlist = scriptlist[:shift]\n    else:\n        empty = 'SCRIPT_NAME' if shift < 0 else 'PATH_INFO'\n        raise AssertionError(\"Cannot shift. Nothing left from %s\" % empty)\n    new_script_name = '/' + '/'.join(scriptlist)\n    new_path_info = '/' + '/'.join(pathlist)\n    if path_info.endswith('/') and pathlist: new_path_info += '/'\n    return new_script_name, new_path_info\n\n\ndef auth_basic(check, realm=\"private\", text=\"Access denied\"):\n    \"\"\" Callback decorator to require HTTP auth (basic).\n        TODO: Add route(check_auth=...) parameter. \"\"\"\n\n    def decorator(func):\n\n        @functools.wraps(func)\n        def wrapper(*a, **ka):\n            user, password = request.auth or (None, None)\n            if user is None or not check(user, password):\n                err = HTTPError(401, text)\n                err.add_header('WWW-Authenticate', 'Basic realm=\"%s\"' % realm)\n                return err\n            return func(*a, **ka)\n\n        return wrapper\n\n    return decorator\n\n# Shortcuts for common Bottle methods.\n# They all refer to the current default application.\n\n\ndef make_default_app_wrapper(name):\n    \"\"\" Return a callable that relays calls to the current default app. \"\"\"\n\n    @functools.wraps(getattr(Bottle, name))\n    def wrapper(*a, **ka):\n        return getattr(app(), name)(*a, **ka)\n\n    return wrapper\n\n\nroute = make_default_app_wrapper('route')\nget = make_default_app_wrapper('get')\npost = make_default_app_wrapper('post')\nput = make_default_app_wrapper('put')\ndelete = make_default_app_wrapper('delete')\npatch = make_default_app_wrapper('patch')\nerror = make_default_app_wrapper('error')\nmount = make_default_app_wrapper('mount')\nhook = make_default_app_wrapper('hook')\ninstall = make_default_app_wrapper('install')\nuninstall = make_default_app_wrapper('uninstall')\nurl = make_default_app_wrapper('get_url')\n\n\n###############################################################################\n# Multipart Handling ###########################################################\n###############################################################################\n# cgi.FieldStorage was deprecated in Python 3.11 and removed in 3.13\n# This implementation is based on https://github.com/defnull/multipart/\n\n\nclass MultipartError(HTTPError):\n    def __init__(self, msg):\n        HTTPError.__init__(self, 400, \"MultipartError: \" + msg)\n\n\nclass _MultipartParser:\n    def __init__(\n        self,\n        stream,\n        boundary,\n        content_length=-1,\n        disk_limit=2 ** 30,\n        mem_limit=2 ** 20,\n        memfile_limit=2 ** 18,\n        buffer_size=2 ** 16,\n        charset=\"latin1\",\n    ):\n        self.stream = stream\n        self.boundary = boundary\n        self.content_length = content_length\n        self.disk_limit = disk_limit\n        self.memfile_limit = memfile_limit\n        self.mem_limit = min(mem_limit, self.disk_limit)\n        self.buffer_size = min(buffer_size, self.mem_limit)\n        self.charset = charset\n\n        if not boundary:\n            raise MultipartError(\"No boundary.\")\n\n        if self.buffer_size - 6 < len(boundary):  # \"--boundary--\\r\\n\"\n            raise MultipartError(\"Boundary does not fit into buffer_size.\")\n\n    def _lineiter(self):\n        \"\"\" Iterate over a binary file-like object (crlf terminated) line by\n            line. Each line is returned as a (line, crlf) tuple. Lines larger\n            than buffer_size are split into chunks where all but the last chunk\n            has an empty string instead of crlf. Maximum chunk size is twice the\n            buffer size.\n        \"\"\"\n\n        read = self.stream.read\n        maxread, maxbuf = self.content_length, self.buffer_size\n        partial = b\"\"  # Contains the last (partial) line\n\n        while True:\n            chunk = read(maxbuf if maxread < 0 else min(maxbuf, maxread))\n            maxread -= len(chunk)\n            if not chunk:\n                if partial:\n                    yield partial, b''\n                break\n\n            if partial:\n                chunk = partial + chunk\n\n            scanpos = 0\n            while True:\n                i = chunk.find(b'\\r\\n', scanpos)\n                if i >= 0:\n                    yield chunk[scanpos:i], b'\\r\\n'\n                    scanpos = i + 2\n                else:  # CRLF not found\n                    partial = chunk[scanpos:] if scanpos else chunk\n                    break\n\n            if len(partial) > maxbuf:\n                yield partial[:-1], b\"\"\n                partial = partial[-1:]\n\n    def parse(self):\n        \"\"\" Return a MultiPart iterator. Can only be called once. \"\"\"\n\n        lines, line = self._lineiter(), \"\"\n        separator = b\"--\" + tob(self.boundary)\n        terminator = separator + b\"--\"\n        mem_used, disk_used = 0, 0  # Track used resources to prevent DoS\n        is_tail = False  # True if the last line was incomplete (cutted)\n\n        # Consume first boundary. Ignore any preamble, as required by RFC\n        # 2046, section 5.1.1.\n        for line, nl in lines:\n            if line in (separator, terminator):\n                break\n        else:\n            raise MultipartError(\"Stream does not contain boundary\")\n\n        # First line is termainating boundary -> empty multipart stream\n        if line == terminator:\n            for _ in lines:\n                raise MultipartError(\"Found data after empty multipart stream\")\n            return\n\n        part_options = {\n            \"buffer_size\": self.buffer_size,\n            \"memfile_limit\": self.memfile_limit,\n            \"charset\": self.charset,\n        }\n        part = _MultipartPart(**part_options)\n\n        for line, nl in lines:\n            if not is_tail and (line == separator or line == terminator):\n                part.finish()\n                if part.is_buffered():\n                    mem_used += part.size\n                else:\n                    disk_used += part.size\n                yield part\n                if line == terminator:\n                    break\n                part = _MultipartPart(**part_options)\n            else:\n                is_tail = not nl  # The next line continues this one\n                try:\n                    part.feed(line, nl)\n                    if part.is_buffered():\n                        if part.size + mem_used > self.mem_limit:\n                            raise MultipartError(\"Memory limit reached.\")\n                    elif part.size + disk_used > self.disk_limit:\n                        raise MultipartError(\"Disk limit reached.\")\n                except MultipartError:\n                    part.close()\n                    raise\n        else:\n            part.close()\n\n        if line != terminator:\n            raise MultipartError(\"Unexpected end of multipart stream.\")\n\n\nclass _MultipartPart:\n    def __init__(self, buffer_size=2 ** 16, memfile_limit=2 ** 18, charset=\"latin1\"):\n        self.headerlist = []\n        self.headers = None\n        self.file = False\n        self.size = 0\n        self._buf = b\"\"\n        self.disposition = None\n        self.name = None\n        self.filename = None\n        self.content_type = None\n        self.charset = charset\n        self.memfile_limit = memfile_limit\n        self.buffer_size = buffer_size\n\n    def feed(self, line, nl=\"\"):\n        if self.file:\n            return self.write_body(line, nl)\n        return self.write_header(line, nl)\n\n    def write_header(self, line, nl):\n        line = str(line, self.charset)\n\n        if not nl:\n            raise MultipartError(\"Unexpected end of line in header.\")\n\n        if not line.strip():  # blank line -> end of header segment\n            self.finish_header()\n        elif line[0] in \" \\t\" and self.headerlist:\n            name, value = self.headerlist.pop()\n            self.headerlist.append((name, value + line.strip()))\n        else:\n            if \":\" not in line:\n                raise MultipartError(\"Syntax error in header: No colon.\")\n\n            name, value = line.split(\":\", 1)\n            self.headerlist.append((name.strip(), value.strip()))\n\n    def write_body(self, line, nl):\n        if not line and not nl:\n            return  # This does not even flush the buffer\n\n        self.size += len(line) + len(self._buf)\n        self.file.write(self._buf + line)\n        self._buf = nl\n\n        if self.content_length > 0 and self.size > self.content_length:\n            raise MultipartError(\"Size of body exceeds Content-Length header.\")\n\n        if self.size > self.memfile_limit and isinstance(self.file, BytesIO):\n            self.file, old = NamedTemporaryFile(mode=\"w+b\"), self.file\n            old.seek(0)\n\n            copied, maxcopy, chunksize = 0, self.size, self.buffer_size\n            read, write = old.read, self.file.write\n            while copied < maxcopy:\n                chunk = read(min(chunksize, maxcopy - copied))\n                write(chunk)\n                copied += len(chunk)\n\n    def finish_header(self):\n        self.file = BytesIO()\n        self.headers = HeaderDict(self.headerlist)\n        content_disposition = self.headers.get(\"Content-Disposition\")\n        content_type = self.headers.get(\"Content-Type\")\n\n        if not content_disposition:\n            raise MultipartError(\"Content-Disposition header is missing.\")\n\n        self.disposition, self.options = _parse_http_header(content_disposition)[0]\n        self.name = self.options.get(\"name\")\n        if \"filename\" in self.options:\n            self.filename = self.options.get(\"filename\")\n            if self.filename[1:3] == \":\\\\\" or self.filename[:2] == \"\\\\\\\\\":\n                self.filename = self.filename.split(\"\\\\\")[-1]  # ie6 bug\n\n        self.content_type, options = _parse_http_header(content_type)[0] if content_type else (None, {})\n        self.charset = options.get(\"charset\") or self.charset\n\n        self.content_length = int(self.headers.get(\"Content-Length\", \"-1\"))\n\n    def finish(self):\n        if not self.file:\n            raise MultipartError(\"Incomplete part: Header section not closed.\")\n        self.file.seek(0)\n\n    def is_buffered(self):\n        \"\"\" Return true if the data is fully buffered in memory.\"\"\"\n        return isinstance(self.file, BytesIO)\n\n    @property\n    def value(self):\n        \"\"\" Data decoded with the specified charset \"\"\"\n        return str(self.raw, self.charset)\n\n    @property\n    def raw(self):\n        \"\"\" Data without decoding \"\"\"\n        pos = self.file.tell()\n        self.file.seek(0)\n\n        try:\n            return self.file.read()\n        finally:\n            self.file.seek(pos)\n\n    def close(self):\n        if self.file:\n            self.file.close()\n            self.file = False\n\n###############################################################################\n# Server Adapter ###############################################################\n###############################################################################\n\n# Before you edit or add a server adapter, please read:\n# - https://github.com/bottlepy/bottle/pull/647#issuecomment-60152870\n# - https://github.com/bottlepy/bottle/pull/865#issuecomment-242795341\n\n\nclass ServerAdapter:\n    quiet = False\n\n    def __init__(self, host='127.0.0.1', port=8080, **options):\n        self.options = options\n        self.host = host\n        self.port = int(port)\n\n    def run(self, handler):  # pragma: no cover\n        pass\n\n    @property\n    def _listen_url(self):\n        if self.host.startswith(\"unix:\"):\n            return self.host\n        elif ':' in self.host:\n            return \"http://[%s]:%d/\" % (self.host, self.port)\n        else:\n            return \"http://%s:%d/\" % (self.host, self.port)\n\n    def __repr__(self):\n        args = ', '.join('%s=%r' % kv for kv in self.options.items())\n        return \"%s(%s)\" % (self.__class__.__name__, args)\n\n\nclass CGIServer(ServerAdapter):\n    quiet = True\n\n    def run(self, handler):  # pragma: no cover\n        from wsgiref.handlers import CGIHandler\n\n        def fixed_environ(environ, start_response):\n            environ.setdefault('PATH_INFO', '')\n            return handler(environ, start_response)\n\n        CGIHandler().run(fixed_environ)\n\n\nclass FlupFCGIServer(ServerAdapter):\n    def run(self, handler):  # pragma: no cover\n        import flup.server.fcgi\n        self.options.setdefault('bindAddress', (self.host, self.port))\n        flup.server.fcgi.WSGIServer(handler, **self.options).run()\n\n\nclass WSGIRefServer(ServerAdapter):\n    def run(self, app):  # pragma: no cover\n        from wsgiref.simple_server import make_server\n        from wsgiref.simple_server import WSGIRequestHandler, WSGIServer\n        import socket\n\n        class FixedHandler(WSGIRequestHandler):\n            def log_message(other, format, *args):\n                if not self.quiet:\n                    return WSGIRequestHandler.log_message(other, format, *args)\n\n        handler_cls = self.options.get('handler_class', FixedHandler)\n        server_cls = self.options.get('server_class', WSGIServer)\n\n        if ':' in self.host:  # Fix wsgiref for IPv6 addresses.\n            if getattr(server_cls, 'address_family') == socket.AF_INET:\n\n                class server_cls(server_cls):\n                    address_family = socket.AF_INET6\n\n        self.srv = make_server(self.host, self.port, app, server_cls,\n                               handler_cls)\n        self.port = self.srv.server_port  # update port actual port (0 means random)\n        try:\n            self.srv.serve_forever()\n        except KeyboardInterrupt:\n            self.srv.server_close()  # Prevent ResourceWarning: unclosed socket\n            raise\n\n\nclass CherryPyServer(ServerAdapter):\n    def run(self, handler):  # pragma: no cover\n        depr(0, 13, \"The wsgi server part of cherrypy was split into a new \"\n                    \"project called 'cheroot'.\", \"Use the 'cheroot' server \"\n                    \"adapter instead of cherrypy.\")\n        from cherrypy import wsgiserver  # This will fail for CherryPy >= 9\n\n        self.options['bind_addr'] = (self.host, self.port)\n        self.options['wsgi_app'] = handler\n\n        certfile = self.options.get('certfile')\n        if certfile:\n            del self.options['certfile']\n        keyfile = self.options.get('keyfile')\n        if keyfile:\n            del self.options['keyfile']\n\n        server = wsgiserver.CherryPyWSGIServer(**self.options)\n        if certfile:\n            server.ssl_certificate = certfile\n        if keyfile:\n            server.ssl_private_key = keyfile\n\n        try:\n            server.start()\n        finally:\n            server.stop()\n\n\nclass CherootServer(ServerAdapter):\n    def run(self, handler):  # pragma: no cover\n        from cheroot import wsgi\n        from cheroot.ssl import builtin\n        self.options['bind_addr'] = (self.host, self.port)\n        self.options['wsgi_app'] = handler\n        certfile = self.options.pop('certfile', None)\n        keyfile = self.options.pop('keyfile', None)\n        chainfile = self.options.pop('chainfile', None)\n        server = wsgi.Server(**self.options)\n        if certfile and keyfile:\n            server.ssl_adapter = builtin.BuiltinSSLAdapter(\n                certfile, keyfile, chainfile)\n        try:\n            server.start()\n        finally:\n            server.stop()\n\n\nclass WaitressServer(ServerAdapter):\n    def run(self, handler):\n        from waitress import serve\n        serve(handler, host=self.host, port=self.port, _quiet=self.quiet, **self.options)\n\n\nclass PasteServer(ServerAdapter):\n    def run(self, handler):  # pragma: no cover\n        from paste import httpserver\n        from paste.translogger import TransLogger\n        handler = TransLogger(handler, setup_console_handler=(not self.quiet))\n        httpserver.serve(handler,\n                         host=self.host,\n                         port=str(self.port), **self.options)\n\n\nclass MeinheldServer(ServerAdapter):\n    def run(self, handler):\n        from meinheld import server\n        server.listen((self.host, self.port))\n        server.run(handler)\n\n\nclass FapwsServer(ServerAdapter):\n    \"\"\" Extremely fast webserver using libev. See https://github.com/william-os4y/fapws3 \"\"\"\n\n    def run(self, handler):  # pragma: no cover\n        depr(0, 13, \"fapws3 is not maintained and support will be dropped.\")\n        import fapws._evwsgi as evwsgi\n        from fapws import base, config\n        port = self.port\n        if float(config.SERVER_IDENT[-2:]) > 0.4:\n            # fapws3 silently changed its API in 0.5\n            port = str(port)\n        evwsgi.start(self.host, port)\n        # fapws3 never releases the GIL. Complain upstream. I tried. No luck.\n        if 'BOTTLE_CHILD' in os.environ and not self.quiet:\n            _stderr(\"WARNING: Auto-reloading does not work with Fapws3.\")\n            _stderr(\"         (Fapws3 breaks python thread support)\")\n        evwsgi.set_base_module(base)\n\n        def app(environ, start_response):\n            environ['wsgi.multiprocess'] = False\n            return handler(environ, start_response)\n\n        evwsgi.wsgi_cb(('', app))\n        evwsgi.run()\n\n\nclass TornadoServer(ServerAdapter):\n    \"\"\" The super hyped asynchronous server by facebook. Untested. \"\"\"\n\n    def run(self, handler):  # pragma: no cover\n        import tornado.wsgi, tornado.httpserver, tornado.ioloop\n        container = tornado.wsgi.WSGIContainer(handler)\n        server = tornado.httpserver.HTTPServer(container)\n        server.listen(port=self.port, address=self.host)\n        tornado.ioloop.IOLoop.instance().start()\n\n\nclass AppEngineServer(ServerAdapter):\n    \"\"\" Adapter for Google App Engine. \"\"\"\n    quiet = True\n\n    def run(self, handler):\n        depr(0, 13, \"AppEngineServer no longer required\",\n             \"Configure your application directly in your app.yaml\")\n        from google.appengine.ext.webapp import util\n        # A main() function in the handler script enables 'App Caching'.\n        # Lets makes sure it is there. This _really_ improves performance.\n        module = sys.modules.get('__main__')\n        if module and not hasattr(module, 'main'):\n            module.main = lambda: util.run_wsgi_app(handler)\n        util.run_wsgi_app(handler)\n\n\nclass TwistedServer(ServerAdapter):\n    \"\"\" Untested. \"\"\"\n\n    def run(self, handler):\n        from twisted.web import server, wsgi\n        from twisted.python.threadpool import ThreadPool\n        from twisted.internet import reactor\n        thread_pool = ThreadPool()\n        thread_pool.start()\n        reactor.addSystemEventTrigger('after', 'shutdown', thread_pool.stop)\n        factory = server.Site(wsgi.WSGIResource(reactor, thread_pool, handler))\n        reactor.listenTCP(self.port, factory, interface=self.host)\n        if not reactor.running:\n            reactor.run()\n\n\nclass DieselServer(ServerAdapter):\n    \"\"\" Untested. \"\"\"\n\n    def run(self, handler):\n        depr(0, 13, \"Diesel is not tested or supported and will be removed.\")\n        from diesel.protocols.wsgi import WSGIApplication\n        app = WSGIApplication(handler, port=self.port)\n        app.run()\n\n\nclass GeventServer(ServerAdapter):\n    \"\"\" Untested. Options:\n\n        * See gevent.wsgi.WSGIServer() documentation for more options.\n    \"\"\"\n\n    def run(self, handler):\n        from gevent import pywsgi, local\n        if not isinstance(threading.local(), local.local):\n            msg = \"Bottle requires gevent.monkey.patch_all() (before import)\"\n            raise RuntimeError(msg)\n        if self.quiet:\n            self.options['log'] = None\n        address = (self.host, self.port)\n        server = pywsgi.WSGIServer(address, handler, **self.options)\n        if 'BOTTLE_CHILD' in os.environ:\n            import signal\n            signal.signal(signal.SIGINT, lambda s, f: server.stop())\n        server.serve_forever()\n\n\nclass GunicornServer(ServerAdapter):\n    \"\"\" Untested. See https://gunicorn.org/configure.html for options. \"\"\"\n\n    def run(self, handler):\n        from gunicorn.app.base import BaseApplication\n\n        if self.host.startswith(\"unix:\"):\n            config = {'bind': self.host}\n        else:\n            config = {'bind': \"%s:%d\" % (self.host, self.port)}\n\n        config.update(self.options)\n\n        class GunicornApplication(BaseApplication):\n            def load_config(self):\n                for key, value in config.items():\n                    self.cfg.set(key, value)\n\n            def load(self):\n                return handler\n\n        GunicornApplication().run()\n\n\nclass EventletServer(ServerAdapter):\n    \"\"\" Untested. Options:\n\n        * `backlog` adjust the eventlet backlog parameter which is the maximum\n          number of queued connections. Should be at least 1; the maximum\n          value is system-dependent.\n        * `family`: (default is 2) socket family, optional. See socket\n          documentation for available families.\n    \"\"\"\n\n    def run(self, handler):\n        from eventlet import wsgi, listen, patcher\n        if not patcher.is_monkey_patched(os):\n            msg = \"Bottle requires eventlet.monkey_patch() (before import)\"\n            raise RuntimeError(msg)\n        socket_args = {}\n        for arg in ('backlog', 'family'):\n            try:\n                socket_args[arg] = self.options.pop(arg)\n            except KeyError:\n                pass\n        address = (self.host, self.port)\n        try:\n            wsgi.server(listen(address, **socket_args), handler,\n                        log_output=(not self.quiet))\n        except TypeError:\n            # Fallback, if we have old version of eventlet\n            wsgi.server(listen(address), handler)\n\n\nclass BjoernServer(ServerAdapter):\n    \"\"\" Fast server written in C: https://github.com/jonashaag/bjoern \"\"\"\n\n    def run(self, handler):\n        from bjoern import run\n        run(handler, self.host, self.port, reuse_port=True)\n\n\nclass AsyncioServerAdapter(ServerAdapter):\n    \"\"\" Extend ServerAdapter for adding custom event loop \"\"\"\n    def get_event_loop(self):\n        pass\n\n\nclass AiohttpServer(AsyncioServerAdapter):\n    \"\"\" Asynchronous HTTP client/server framework for asyncio\n        https://pypi.python.org/pypi/aiohttp/\n        https://pypi.org/project/aiohttp-wsgi/\n    \"\"\"\n\n    def get_event_loop(self):\n        import asyncio\n        return asyncio.new_event_loop()\n\n    def run(self, handler):\n        import asyncio\n        from aiohttp_wsgi.wsgi import serve\n        self.loop = self.get_event_loop()\n        asyncio.set_event_loop(self.loop)\n\n        if 'BOTTLE_CHILD' in os.environ:\n            import signal\n            signal.signal(signal.SIGINT, lambda s, f: self.loop.stop())\n\n        serve(handler, host=self.host, port=self.port)\n\n\nclass AiohttpUVLoopServer(AiohttpServer):\n    \"\"\"uvloop\n       https://github.com/MagicStack/uvloop\n    \"\"\"\n    def get_event_loop(self):\n        import uvloop\n        return uvloop.new_event_loop()\n\n\nclass AutoServer(ServerAdapter):\n    \"\"\" Untested. \"\"\"\n    adapters = [WaitressServer, PasteServer, TwistedServer, CherryPyServer,\n                CherootServer, WSGIRefServer]\n\n    def run(self, handler):\n        for sa in self.adapters:\n            try:\n                return sa(self.host, self.port, **self.options).run(handler)\n            except ImportError:\n                pass\n\n\nserver_names = {\n    'cgi': CGIServer,\n    'flup': FlupFCGIServer,\n    'wsgiref': WSGIRefServer,\n    'waitress': WaitressServer,\n    'cherrypy': CherryPyServer,\n    'cheroot': CherootServer,\n    'paste': PasteServer,\n    'fapws3': FapwsServer,\n    'tornado': TornadoServer,\n    'gae': AppEngineServer,\n    'twisted': TwistedServer,\n    'diesel': DieselServer,\n    'meinheld': MeinheldServer,\n    'gunicorn': GunicornServer,\n    'eventlet': EventletServer,\n    'gevent': GeventServer,\n    'bjoern': BjoernServer,\n    'aiohttp': AiohttpServer,\n    'uvloop': AiohttpUVLoopServer,\n    'auto': AutoServer,\n}\n\n###############################################################################\n# Application Control ##########################################################\n###############################################################################\n\n\ndef load(target, **namespace):\n    \"\"\" Import a module or fetch an object from a module.\n\n        * ``package.module`` returns `module` as a module object.\n        * ``pack.mod:name`` returns the module variable `name` from `pack.mod`.\n        * ``pack.mod:func()`` calls `pack.mod.func()` and returns the result.\n\n        The last form accepts not only function calls, but any type of\n        expression. Keyword arguments passed to this function are available as\n        local variables. Example: ``import_string('re:compile(x)', x='[a-z]')``\n    \"\"\"\n    module, target = target.split(\":\", 1) if ':' in target else (target, None)\n    if module not in sys.modules: __import__(module)\n    if not target: return sys.modules[module]\n    if target.isalnum(): return getattr(sys.modules[module], target)\n    package_name = module.split('.')[0]\n    namespace[package_name] = sys.modules[package_name]\n    return eval('%s.%s' % (module, target), namespace)\n\n\ndef load_app(target):\n    \"\"\" Load a bottle application from a module and make sure that the import\n        does not affect the current default application, but returns a separate\n        application object. See :func:`load` for the target parameter. \"\"\"\n    global NORUN\n    NORUN, nr_old = True, NORUN\n    tmp = default_app.push()  # Create a new \"default application\"\n    try:\n        rv = load(target)  # Import the target module\n        return rv if callable(rv) else tmp\n    finally:\n        default_app.remove(tmp)  # Remove the temporary added default application\n        NORUN = nr_old\n\n\n_debug = debug\n\n\ndef run(app=None,\n        server='wsgiref',\n        host='127.0.0.1',\n        port=8080,\n        interval=1,\n        reloader=False,\n        quiet=False,\n        plugins=None,\n        debug=None,\n        config=None, **kargs):\n    \"\"\" Start a server instance. This method blocks until the server terminates.\n\n        :param app: WSGI application or target string supported by\n               :func:`load_app`. (default: :func:`default_app`)\n        :param server: Server adapter to use. See :data:`server_names` keys\n               for valid names or pass a :class:`ServerAdapter` subclass.\n               (default: `wsgiref`)\n        :param host: Server address to bind to. Pass ``0.0.0.0`` to listens on\n               all interfaces including the external one. (default: 127.0.0.1)\n        :param port: Server port to bind to. Values below 1024 require root\n               privileges. (default: 8080)\n        :param reloader: Start auto-reloading server? (default: False)\n        :param interval: Auto-reloader interval in seconds (default: 1)\n        :param quiet: Suppress output to stdout and stderr? (default: False)\n        :param options: Options passed to the server adapter.\n     \"\"\"\n    if NORUN: return\n    if reloader and not os.environ.get('BOTTLE_CHILD'):\n        import subprocess\n        fd, lockfile = tempfile.mkstemp(prefix='bottle.', suffix='.lock')\n        environ = os.environ.copy()\n        environ['BOTTLE_CHILD'] = 'true'\n        environ['BOTTLE_LOCKFILE'] = lockfile\n        args = [sys.executable] + sys.argv\n        # If a package was loaded with `python -m`, then `sys.argv` needs to be\n        # restored to the original value, or imports might break. See #1336\n        if getattr(sys.modules.get('__main__'), '__package__', None):\n            args[1:1] = [\"-m\", sys.modules['__main__'].__package__]\n\n        try:\n            os.close(fd)  # We never write to this file\n            while os.path.exists(lockfile):\n                p = subprocess.Popen(args, env=environ)\n                while p.poll() is None:\n                    os.utime(lockfile, None)  # Tell child we are still alive\n                    time.sleep(interval)\n                if p.returncode == 3:  # Child wants to be restarted\n                    continue\n                sys.exit(p.returncode)\n        except KeyboardInterrupt:\n            pass\n        finally:\n            if os.path.exists(lockfile):\n                os.unlink(lockfile)\n        return\n\n    try:\n        if debug is not None: _debug(debug)\n        app = app or default_app()\n        if isinstance(app, str):\n            app = load_app(app)\n        if not callable(app):\n            raise ValueError(\"Application is not callable: %r\" % app)\n\n        for plugin in plugins or []:\n            if isinstance(plugin, str):\n                plugin = load(plugin)\n            app.install(plugin)\n\n        if config:\n            app.config.update(config)\n\n        if server in server_names:\n            server = server_names.get(server)\n        if isinstance(server, str):\n            server = load(server)\n        if isinstance(server, type):\n            server = server(host=host, port=port, **kargs)\n        if not isinstance(server, ServerAdapter):\n            raise ValueError(\"Unknown or unsupported server: %r\" % server)\n\n        server.quiet = server.quiet or quiet\n        if not server.quiet:\n            _stderr(\"Bottle v%s server starting up (using %s)...\" %\n                    (__version__, repr(server)))\n            _stderr(\"Listening on %s\" % server._listen_url)\n            _stderr(\"Hit Ctrl-C to quit.\\n\")\n\n        if reloader:\n            lockfile = os.environ.get('BOTTLE_LOCKFILE')\n            bgcheck = FileCheckerThread(lockfile, interval)\n            with bgcheck:\n                server.run(app)\n            if bgcheck.status == 'reload':\n                sys.exit(3)\n        else:\n            server.run(app)\n    except KeyboardInterrupt:\n        pass\n    except (SystemExit, MemoryError):\n        raise\n    except:  # noqa: E722\n        if not reloader: raise\n        if not getattr(server, 'quiet', quiet):\n            print_exc()\n        time.sleep(interval)\n        sys.exit(3)\n\n\nclass FileCheckerThread(threading.Thread):\n    \"\"\" Interrupt main-thread as soon as a changed module file is detected,\n        the lockfile gets deleted or gets too old. \"\"\"\n\n    def __init__(self, lockfile, interval):\n        threading.Thread.__init__(self)\n        self.daemon = True\n        self.lockfile, self.interval = lockfile, interval\n        #: Is one of 'reload', 'error' or 'exit'\n        self.status = None\n\n    def run(self):\n        exists = os.path.exists\n        mtime = lambda p: os.stat(p).st_mtime\n        files = {}\n\n        for module in list(sys.modules.values()):\n            path = getattr(module, '__file__', '') or ''\n            if path[-4:] in ('.pyo', '.pyc'): path = path[:-1]\n            if path and exists(path): files[path] = mtime(path)\n\n        while not self.status:\n            if not exists(self.lockfile)\\\n               or mtime(self.lockfile) < time.time() - self.interval - 5:\n                self.status = 'error'\n                thread.interrupt_main()\n            for path, lmtime in list(files.items()):\n                if not exists(path) or mtime(path) > lmtime:\n                    self.status = 'reload'\n                    thread.interrupt_main()\n                    break\n            time.sleep(self.interval)\n\n    def __enter__(self):\n        self.start()\n\n    def __exit__(self, exc_type, *_):\n        if not self.status: self.status = 'exit'  # silent exit\n        self.join()\n        return exc_type is not None and issubclass(exc_type, KeyboardInterrupt)\n\n###############################################################################\n# Template Adapters ############################################################\n###############################################################################\n\n\nclass TemplateError(BottleException):\n    pass\n\n\nclass BaseTemplate:\n    \"\"\" Base class and minimal API for template adapters \"\"\"\n    extensions = ['tpl', 'html', 'thtml', 'stpl']\n    settings = {}  # used in prepare()\n    defaults = {}  # used in render()\n\n    def __init__(self,\n                 source=None,\n                 name=None,\n                 lookup=None,\n                 encoding='utf8', **settings):\n        \"\"\" Create a new template.\n        If the source parameter (str or buffer) is missing, the name argument\n        is used to guess a template filename. Subclasses can assume that\n        self.source and/or self.filename are set. Both are strings.\n        The lookup, encoding and settings parameters are stored as instance\n        variables.\n        The lookup parameter stores a list containing directory paths.\n        The encoding parameter should be used to decode byte strings or files.\n        The settings parameter contains a dict for engine-specific settings.\n        \"\"\"\n        self.name = name\n        self.source = source.read() if hasattr(source, 'read') else source\n        self.filename = source.filename if hasattr(source, 'filename') else None\n        self.lookup = [os.path.abspath(x) for x in lookup] if lookup else []\n        self.encoding = encoding\n        self.settings = self.settings.copy()  # Copy from class variable\n        self.settings.update(settings)  # Apply\n        if not self.source and self.name:\n            self.filename = self.search(self.name, self.lookup)\n            if not self.filename:\n                raise TemplateError('Template %s not found.' % repr(name))\n        if not self.source and not self.filename:\n            raise TemplateError('No template specified.')\n        self.prepare(**self.settings)\n\n    @classmethod\n    def search(cls, name, lookup=None):\n        \"\"\" Search name in all directories specified in lookup.\n        First without, then with common extensions. Return first hit. \"\"\"\n        if not lookup:\n            raise depr(0, 12, \"Empty template lookup path.\", \"Configure a template lookup path.\")\n\n        if os.path.isabs(name):\n            raise depr(0, 12, \"Use of absolute path for template name.\",\n                       \"Refer to templates with names or paths relative to the lookup path.\")\n\n        for spath in lookup:\n            spath = os.path.abspath(spath) + os.sep\n            fname = os.path.abspath(os.path.join(spath, name))\n            if not fname.startswith(spath): continue\n            if os.path.isfile(fname): return fname\n            for ext in cls.extensions:\n                if os.path.isfile('%s.%s' % (fname, ext)):\n                    return '%s.%s' % (fname, ext)\n\n    @classmethod\n    def global_config(cls, key, *args):\n        \"\"\" This reads or sets the global settings stored in class.settings. \"\"\"\n        if args:\n            cls.settings = cls.settings.copy()  # Make settings local to class\n            cls.settings[key] = args[0]\n        else:\n            return cls.settings[key]\n\n    def prepare(self, **options):\n        \"\"\" Run preparations (parsing, caching, ...).\n        It should be possible to call this again to refresh a template or to\n        update settings.\n        \"\"\"\n        raise NotImplementedError\n\n    def render(self, *args, **kwargs):\n        \"\"\" Render the template with the specified local variables and return\n        a single byte or unicode string. If it is a byte string, the encoding\n        must match self.encoding. This method must be thread-safe!\n        Local variables may be provided in dictionaries (args)\n        or directly, as keywords (kwargs).\n        \"\"\"\n        raise NotImplementedError\n\n\nclass MakoTemplate(BaseTemplate):\n    def prepare(self, **options):\n        from mako.template import Template\n        from mako.lookup import TemplateLookup\n        options.update({'input_encoding': self.encoding})\n        options.setdefault('format_exceptions', bool(DEBUG))\n        lookup = TemplateLookup(directories=self.lookup, **options)\n        if self.source:\n            self.tpl = Template(self.source, lookup=lookup, **options)\n        else:\n            self.tpl = Template(uri=self.name,\n                                filename=self.filename,\n                                lookup=lookup, **options)\n\n    def render(self, *args, **kwargs):\n        for dictarg in args:\n            kwargs.update(dictarg)\n        _defaults = self.defaults.copy()\n        _defaults.update(kwargs)\n        return self.tpl.render(**_defaults)\n\n\nclass CheetahTemplate(BaseTemplate):\n    def prepare(self, **options):\n        from Cheetah.Template import Template\n        self.context = threading.local()\n        self.context.vars = {}\n        options['searchList'] = [self.context.vars]\n        if self.source:\n            self.tpl = Template(source=self.source, **options)\n        else:\n            self.tpl = Template(file=self.filename, **options)\n\n    def render(self, *args, **kwargs):\n        for dictarg in args:\n            kwargs.update(dictarg)\n        self.context.vars.update(self.defaults)\n        self.context.vars.update(kwargs)\n        out = str(self.tpl)\n        self.context.vars.clear()\n        return out\n\n\nclass Jinja2Template(BaseTemplate):\n    def prepare(self, filters=None, tests=None, globals={}, **kwargs):\n        from jinja2 import Environment, FunctionLoader\n        self.env = Environment(loader=FunctionLoader(self.loader), **kwargs)\n        if filters: self.env.filters.update(filters)\n        if tests: self.env.tests.update(tests)\n        if globals: self.env.globals.update(globals)\n        if self.source:\n            self.tpl = self.env.from_string(self.source)\n        else:\n            self.tpl = self.env.get_template(self.name)\n\n    def render(self, *args, **kwargs):\n        for dictarg in args:\n            kwargs.update(dictarg)\n        _defaults = self.defaults.copy()\n        _defaults.update(kwargs)\n        return self.tpl.render(**_defaults)\n\n    def loader(self, name):\n        if name == self.filename:\n            fname = name\n        else:\n            fname = self.search(name, self.lookup)\n        if not fname: return\n        with open(fname, \"rb\") as f:\n            return (f.read().decode(self.encoding), fname, lambda: False)\n\n\nclass SimpleTemplate(BaseTemplate):\n    def prepare(self,\n                escape_func=html_escape,\n                noescape=False,\n                syntax=None, **ka):\n        self.cache = {}\n        enc = self.encoding\n        self._str = lambda x: touni(x, enc)\n        self._escape = lambda x: escape_func(touni(x, enc))\n        self.syntax = syntax\n        if noescape:\n            self._str, self._escape = self._escape, self._str\n\n    @cached_property\n    def co(self):\n        return compile(self.code, self.filename or '<string>', 'exec')\n\n    @cached_property\n    def code(self):\n        source = self.source\n        if not source:\n            with open(self.filename, 'rb') as f:\n                source = f.read()\n        try:\n            source, encoding = touni(source), 'utf8'\n        except UnicodeError:\n            raise depr(0, 11, 'Unsupported template encodings.', 'Use utf-8 for templates.')\n        parser = StplParser(source, encoding=encoding, syntax=self.syntax)\n        code = parser.translate()\n        self.encoding = parser.encoding\n        return code\n\n    def _rebase(self, _env, _name=None, **kwargs):\n        _env['_rebase'] = (_name, kwargs)\n\n    def _include(self, _env, _name=None, **kwargs):\n        env = _env.copy()\n        env.update(kwargs)\n        if _name not in self.cache:\n            self.cache[_name] = self.__class__(name=_name, lookup=self.lookup, syntax=self.syntax)\n        return self.cache[_name].execute(env['_stdout'], env)\n\n    def execute(self, _stdout, kwargs):\n        env = self.defaults.copy()\n        env.update(kwargs)\n        env.update({\n            '_stdout': _stdout,\n            '_printlist': _stdout.extend,\n            'include': functools.partial(self._include, env),\n            'rebase': functools.partial(self._rebase, env),\n            '_rebase': None,\n            '_str': self._str,\n            '_escape': self._escape,\n            'get': env.get,\n            'setdefault': env.setdefault,\n            'defined': env.__contains__\n        })\n        exec(self.co, env)\n        if env.get('_rebase'):\n            subtpl, rargs = env.pop('_rebase')\n            rargs['base'] = ''.join(_stdout)  # copy stdout\n            del _stdout[:]  # clear stdout\n            return self._include(env, subtpl, **rargs)\n        return env\n\n    def render(self, *args, **kwargs):\n        \"\"\" Render the template using keyword arguments as local variables. \"\"\"\n        env = {}\n        stdout = []\n        for dictarg in args:\n            env.update(dictarg)\n        env.update(kwargs)\n        self.execute(stdout, env)\n        return ''.join(stdout)\n\n\nclass StplSyntaxError(TemplateError):\n    pass\n\n\nclass StplParser:\n    \"\"\" Parser for stpl templates. \"\"\"\n    _re_cache = {}  #: Cache for compiled re patterns\n\n    # This huge pile of voodoo magic splits python code into 8 different tokens.\n    # We use the verbose (?x) regex mode to make this more manageable\n\n    _re_tok = r'''(\n        [urbURB]*\n        (?:  ''(?!')\n            |\"\"(?!\")\n            |'{6}\n            |\"{6}\n            |'(?:[^\\\\']|\\\\.)+?'\n            |\"(?:[^\\\\\"]|\\\\.)+?\"\n            |'{3}(?:[^\\\\]|\\\\.|\\n)+?'{3}\n            |\"{3}(?:[^\\\\]|\\\\.|\\n)+?\"{3}\n        )\n    )'''\n\n    _re_inl = _re_tok.replace(r'|\\n', '')  # We re-use this string pattern later\n    _re_tok += r'''\n        # 2: Comments (until end of line, but not the newline itself)\n        |(\\#.*)\n        # 3: Open and close (4) grouping tokens\n        |([\\[\\{\\(])\n        |([\\]\\}\\)])\n        # 5,6: Keywords that start or continue a python block (only start of line)\n        |^([\\ \\t]*(?:if|for|while|with|try|def|class)\\b)\n        |^([\\ \\t]*(?:elif|else|except|finally)\\b)\n        # 7: Our special 'end' keyword (but only if it stands alone)\n        |((?:^|;)[\\ \\t]*end[\\ \\t]*(?=(?:%(block_close)s[\\ \\t]*)?\\r?$|;|\\#))\n        # 8: A customizable end-of-code-block template token (only end of line)\n        |(%(block_close)s[\\ \\t]*(?=\\r?$))\n        # 9: And finally, a single newline. The 10th token is 'everything else'\n        |(\\r?\\n)\n    '''\n\n    # Match the start tokens of code areas in a template\n    _re_split = r'''(?m)^[ \\t]*(\\\\?)((%(line_start)s)|(%(block_start)s))'''\n    # Match inline statements (may contain python strings)\n    _re_inl = r'''%%(inline_start)s((?:%s|[^'\"\\n])*?)%%(inline_end)s''' % _re_inl\n    # add the flag in front of the regexp to avoid Deprecation warning (see Issue #949)\n    # verbose and dot-matches-newline mode\n    _re_tok = '(?mx)' + _re_tok\n    _re_inl = '(?mx)' + _re_inl\n\n    default_syntax = '<% %> % {{ }}'\n\n    def __init__(self, source, syntax=None, encoding='utf8'):\n        self.source, self.encoding = touni(source, encoding), encoding\n        self.set_syntax(syntax or self.default_syntax)\n        self.code_buffer, self.text_buffer = [], []\n        self.lineno, self.offset = 1, 0\n        self.indent, self.indent_mod = 0, 0\n        self.paren_depth = 0\n\n    def get_syntax(self):\n        \"\"\" Tokens as a space separated string (default: <% %> % {{ }}) \"\"\"\n        return self._syntax\n\n    def set_syntax(self, syntax):\n        self._syntax = syntax\n        self._tokens = syntax.split()\n        if syntax not in self._re_cache:\n            names = 'block_start block_close line_start inline_start inline_end'\n            etokens = map(re.escape, self._tokens)\n            pattern_vars = dict(zip(names.split(), etokens))\n            patterns = (self._re_split, self._re_tok, self._re_inl)\n            patterns = [re.compile(p % pattern_vars) for p in patterns]\n            self._re_cache[syntax] = patterns\n        self.re_split, self.re_tok, self.re_inl = self._re_cache[syntax]\n\n    syntax = property(get_syntax, set_syntax)\n\n    def translate(self):\n        if self.offset: raise RuntimeError('Parser is a one time instance.')\n        while True:\n            m = self.re_split.search(self.source, pos=self.offset)\n            if m:\n                text = self.source[self.offset:m.start()]\n                self.text_buffer.append(text)\n                self.offset = m.end()\n                if m.group(1):  # Escape syntax\n                    line, sep, _ = self.source[self.offset:].partition('\\n')\n                    self.text_buffer.append(\n                        self.source[m.start():m.start(1)] + m.group(2) + line + sep)\n                    self.offset += len(line + sep)\n                    continue\n                self.flush_text()\n                self.offset += self.read_code(self.source[self.offset:],\n                                              multiline=bool(m.group(4)))\n            else:\n                break\n        self.text_buffer.append(self.source[self.offset:])\n        self.flush_text()\n        return ''.join(self.code_buffer)\n\n    def read_code(self, pysource, multiline):\n        code_line, comment = '', ''\n        offset = 0\n        while True:\n            m = self.re_tok.search(pysource, pos=offset)\n            if not m:\n                code_line += pysource[offset:]\n                offset = len(pysource)\n                self.write_code(code_line.strip(), comment)\n                break\n            code_line += pysource[offset:m.start()]\n            offset = m.end()\n            _str, _com, _po, _pc, _blk1, _blk2, _end, _cend, _nl = m.groups()\n            if self.paren_depth > 0 and (_blk1 or _blk2):  # a if b else c\n                code_line += _blk1 or _blk2\n                continue\n            if _str:  # Python string\n                code_line += _str\n            elif _com:  # Python comment (up to EOL)\n                comment = _com\n                if multiline and _com.strip().endswith(self._tokens[1]):\n                    multiline = False  # Allow end-of-block in comments\n            elif _po:  # open parenthesis\n                self.paren_depth += 1\n                code_line += _po\n            elif _pc:  # close parenthesis\n                if self.paren_depth > 0:\n                    # we could check for matching parentheses here, but it's\n                    # easier to leave that to python - just check counts\n                    self.paren_depth -= 1\n                code_line += _pc\n            elif _blk1:  # Start-block keyword (if/for/while/def/try/...)\n                code_line = _blk1\n                self.indent += 1\n                self.indent_mod -= 1\n            elif _blk2:  # Continue-block keyword (else/elif/except/...)\n                code_line = _blk2\n                self.indent_mod -= 1\n            elif _cend:  # The end-code-block template token (usually '%>')\n                if multiline: multiline = False\n                else: code_line += _cend\n            elif _end:\n                self.indent -= 1\n                self.indent_mod += 1\n            else:  # \\n\n                self.write_code(code_line.strip(), comment)\n                self.lineno += 1\n                code_line, comment, self.indent_mod = '', '', 0\n                if not multiline:\n                    break\n\n        return offset\n\n    def flush_text(self):\n        text = ''.join(self.text_buffer)\n        del self.text_buffer[:]\n        if not text: return\n        parts, pos, nl = [], 0, '\\\\\\n' + '  ' * self.indent\n        for m in self.re_inl.finditer(text):\n            prefix, pos = text[pos:m.start()], m.end()\n            if prefix:\n                parts.append(nl.join(map(repr, prefix.splitlines(True))))\n            if prefix.endswith('\\n'): parts[-1] += nl\n            parts.append(self.process_inline(m.group(1).strip()))\n        if pos < len(text):\n            prefix = text[pos:]\n            lines = prefix.splitlines(True)\n            if lines[-1].endswith('\\\\\\\\\\n'): lines[-1] = lines[-1][:-3]\n            elif lines[-1].endswith('\\\\\\\\\\r\\n'): lines[-1] = lines[-1][:-4]\n            parts.append(nl.join(map(repr, lines)))\n        code = '_printlist((%s,))' % ', '.join(parts)\n        self.lineno += code.count('\\n') + 1\n        self.write_code(code)\n\n    @staticmethod\n    def process_inline(chunk):\n        if chunk[0] == '!': return '_str(%s)' % chunk[1:]\n        return '_escape(%s)' % chunk\n\n    def write_code(self, line, comment=''):\n        code = '  ' * (self.indent + self.indent_mod)\n        code += line.lstrip() + comment + '\\n'\n        self.code_buffer.append(code)\n\n\ndef template(*args, **kwargs):\n    \"\"\"\n    Get a rendered template as a string iterator.\n    You can use a name, a filename or a template string as first parameter.\n    Template rendering arguments can be passed as dictionaries\n    or directly (as keyword arguments).\n    \"\"\"\n    tpl = args[0] if args else None\n    for dictarg in args[1:]:\n        kwargs.update(dictarg)\n    adapter = kwargs.pop('template_adapter', SimpleTemplate)\n    lookup = kwargs.pop('template_lookup', TEMPLATE_PATH)\n    tplid = (id(lookup), tpl)\n    if tplid not in TEMPLATES or DEBUG:\n        settings = kwargs.pop('template_settings', {})\n        if isinstance(tpl, adapter):\n            TEMPLATES[tplid] = tpl\n            if settings: TEMPLATES[tplid].prepare(**settings)\n        elif \"\\n\" in tpl or \"{\" in tpl or \"%\" in tpl or '$' in tpl:\n            TEMPLATES[tplid] = adapter(source=tpl, lookup=lookup, **settings)\n        else:\n            TEMPLATES[tplid] = adapter(name=tpl, lookup=lookup, **settings)\n    if not TEMPLATES[tplid]:\n        abort(500, 'Template (%s) not found' % tpl)\n    return TEMPLATES[tplid].render(kwargs)\n\n\nmako_template = functools.partial(template, template_adapter=MakoTemplate)\ncheetah_template = functools.partial(template,\n                                     template_adapter=CheetahTemplate)\njinja2_template = functools.partial(template, template_adapter=Jinja2Template)\n\n\ndef view(tpl_name, **defaults):\n    \"\"\" Decorator: renders a template for a handler.\n        The handler can control its behavior like that:\n\n          - return a dict of template vars to fill out the template\n          - return something other than a dict and the view decorator will not\n            process the template, but return the handler result as is.\n            This includes returning a HTTPResponse(dict) to get,\n            for instance, JSON with autojson or other castfilters.\n    \"\"\"\n\n    def decorator(func):\n\n        @functools.wraps(func)\n        def wrapper(*args, **kwargs):\n            result = func(*args, **kwargs)\n            if isinstance(result, (dict, DictMixin)):\n                tplvars = defaults.copy()\n                tplvars.update(result)\n                return template(tpl_name, **tplvars)\n            elif result is None:\n                return template(tpl_name, **defaults)\n            return result\n\n        return wrapper\n\n    return decorator\n\n\nmako_view = functools.partial(view, template_adapter=MakoTemplate)\ncheetah_view = functools.partial(view, template_adapter=CheetahTemplate)\njinja2_view = functools.partial(view, template_adapter=Jinja2Template)\n\n###############################################################################\n# Constants and Globals ########################################################\n###############################################################################\n\nTEMPLATE_PATH = ['./', './views/']\nTEMPLATES = {}\nDEBUG = False\nNORUN = False  # If set, run() does nothing. Used by load_app()\n\n#: A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')\nHTTP_CODES = httplib.responses.copy()\nHTTP_CODES[418] = \"I'm a teapot\"  # RFC 2324\nHTTP_CODES[428] = \"Precondition Required\"\nHTTP_CODES[429] = \"Too Many Requests\"\nHTTP_CODES[431] = \"Request Header Fields Too Large\"\nHTTP_CODES[451] = \"Unavailable For Legal Reasons\"  # RFC 7725\nHTTP_CODES[511] = \"Network Authentication Required\"\n_HTTP_STATUS_LINES = dict((k, '%d %s' % (k, v))\n                          for (k, v) in HTTP_CODES.items())\n\n#: The default template used for error pages. Override with @error()\nERROR_PAGE_TEMPLATE = \"\"\"\n%%try:\n    %%from %s import DEBUG, request\n    <!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n    <html>\n        <head>\n            <title>Error: {{e.status}}</title>\n            <style type=\"text/css\">\n              html {background-color: #eee; font-family: sans-serif;}\n              body {background-color: #fff; border: 1px solid #ddd;\n                    padding: 15px; margin: 15px;}\n              pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}\n            </style>\n        </head>\n        <body>\n            <h1>Error: {{e.status}}</h1>\n            <p>Sorry, the requested URL <tt>{{repr(request.url)}}</tt>\n               caused an error:</p>\n            <pre>{{e.body}}</pre>\n            %%if DEBUG and e.exception:\n              <h2>Exception:</h2>\n              %%try:\n                %%exc = repr(e.exception)\n              %%except:\n                %%exc = '<unprintable %%s object>' %% type(e.exception).__name__\n              %%end\n              <pre>{{exc}}</pre>\n            %%end\n            %%if DEBUG and e.traceback:\n              <h2>Traceback:</h2>\n              <pre>{{e.traceback}}</pre>\n            %%end\n        </body>\n    </html>\n%%except ImportError:\n    <b>ImportError:</b> Could not generate the error page. Please add bottle to\n    the import path.\n%%end\n\"\"\" % __name__\n\n#: A thread-safe instance of :class:`LocalRequest`. If accessed from within a\n#: request callback, this instance always refers to the *current* request\n#: (even on a multi-threaded server).\nrequest = LocalRequest()\n\n#: A thread-safe instance of :class:`LocalResponse`. It is used to change the\n#: HTTP response for the *current* request.\nresponse = LocalResponse()\n\n#: A thread-safe namespace. Not used by Bottle.\nlocal = threading.local()\n\n# Initialize app stack (create first empty Bottle app now deferred until needed)\n# BC: 0.6.4 and needed for run()\napps = app = default_app = AppStack()\n\n#: A virtual package that redirects import statements.\n#: Example: ``import bottle.ext.sqlite`` actually imports `bottle_sqlite`.\next = _ImportRedirect('bottle.ext' if __name__ == '__main__' else\n                      __name__ + \".ext\", 'bottle_%s').module\n\n\ndef _main(argv):  # pragma: no coverage\n    args, parser = _cli_parse(argv)\n\n    def _cli_error(cli_msg):\n        parser.print_help()\n        _stderr('\\nError: %s\\n' % cli_msg)\n        sys.exit(1)\n\n    if args.version:\n        print(__version__)\n        sys.exit(0)\n    if not args.app:\n        _cli_error(\"No application entry point specified.\")\n\n    sys.path.insert(0, '.')\n    sys.modules.setdefault('bottle', sys.modules['__main__'])\n\n    host, port = (args.bind or 'localhost'), 8080\n    if ':' in host and host.rfind(']') < host.rfind(':'):\n        host, port = host.rsplit(':', 1)\n    host = host.strip('[]')\n\n    config = ConfigDict()\n\n    for cfile in args.conf or []:\n        try:\n            if cfile.endswith('.json'):\n                with open(cfile, 'rb') as fp:\n                    config.load_dict(json_loads(fp.read()))\n            else:\n                config.load_config(cfile)\n        except configparser.Error as parse_error:\n            _cli_error(parse_error)\n        except IOError:\n            _cli_error(\"Unable to read config file %r\" % cfile)\n        except (UnicodeError, TypeError, ValueError) as error:\n            _cli_error(\"Unable to parse config file %r: %s\" % (cfile, error))\n\n    for cval in args.param or []:\n        if '=' in cval:\n            config.update((cval.split('=', 1),))\n        else:\n            config[cval] = True\n\n    run(args.app,\n        host=host,\n        port=int(port),\n        server=args.server,\n        reloader=args.reload,\n        plugins=args.plugin,\n        debug=args.debug,\n        config=config)\n\n\ndef main():\n    _main(sys.argv)\n\n\nif __name__ == '__main__':  # pragma: no coverage\n    main()\n"
  },
  {
    "path": "docs/_locale/.tx/config",
    "content": "[main]\nhost = https://www.transifex.com\ntype = PO\n\n[bottle.development]\nfile_filter = <lang>/LC_MESSAGES/development.po\nsource_file = _pot/development.pot\nsource_lang = en\ntype = PO\n\n[bottle.index]\nfile_filter = <lang>/LC_MESSAGES/index.po\nsource_file = _pot/index.pot\nsource_lang = en\ntype = PO\n\n[bottle.configuration]\nfile_filter = <lang>/LC_MESSAGES/configuration.po\nsource_file = _pot/configuration.pot\nsource_lang = en\ntype = PO\n\n[bottle.changelog]\nfile_filter = <lang>/LC_MESSAGES/changelog.po\nsource_file = _pot/changelog.pot\nsource_lang = en\ntype = PO\n\n[bottle.stpl]\nfile_filter = <lang>/LC_MESSAGES/stpl.po\nsource_file = _pot/stpl.pot\nsource_lang = en\ntype = PO\n\n[bottle.async]\nfile_filter = <lang>/LC_MESSAGES/async.po\nsource_file = _pot/async.pot\nsource_lang = en\ntype = PO\n\n[bottle.recipes]\nfile_filter = <lang>/LC_MESSAGES/recipes.po\nsource_file = _pot/recipes.pot\nsource_lang = en\ntype = PO\n\n[bottle.tutorial]\nfile_filter = <lang>/LC_MESSAGES/tutorial.po\nsource_file = _pot/tutorial.pot\nsource_lang = en\ntype = PO\n\n[bottle.deployment]\nfile_filter = <lang>/LC_MESSAGES/deployment.po\nsource_file = _pot/deployment.pot\nsource_lang = en\ntype = PO\n\n[bottle.routing]\nfile_filter = <lang>/LC_MESSAGES/routing.po\nsource_file = _pot/routing.pot\nsource_lang = en\ntype = PO\n\n[bottle.api]\nfile_filter = <lang>/LC_MESSAGES/api.po\nsource_file = _pot/api.pot\nsource_lang = en\ntype = PO\n\n[bottle.tutorial_app]\nfile_filter = <lang>/LC_MESSAGES/tutorial_app.po\nsource_file = _pot/tutorial_app.pot\nsource_lang = en\ntype = PO\n\n[bottle.plugins]\nfile_filter = <lang>/LC_MESSAGES/plugins.po\nsource_file = _pot/plugins.pot\nsource_lang = en\ntype = PO\n\n[bottle.contact]\nfile_filter = <lang>/LC_MESSAGES/contact.po\nsource_file = _pot/contact.pot\nsource_lang = en\ntype = PO\n\n[bottle.faq]\nfile_filter = <lang>/LC_MESSAGES/faq.po\nsource_file = _pot/faq.pot\nsource_lang = en\ntype = PO\n\n[bottle.plugins--index]\nfile_filter = <lang>/LC_MESSAGES/plugins/index.po\nsource_file = _pot/plugins/index.pot\nsource_lang = en\ntype = PO\n\n"
  },
  {
    "path": "docs/_locale/README.txt",
    "content": "Translation Workflow\n====================\n\nIf documentation changed, run `make push` to push new messages to transiflex (manager account required).\n\nTo update the local translation files, call `make pull` and commit the changes from time to time  (manager account required).\n\nGo to https://www.transifex.com/bottle for actually translating stuff. You can du that with a normal user account at transiflex.\n"
  },
  {
    "path": "docs/_locale/_pot/api.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../api.rst:3\nmsgid \"API Reference\"\nmsgstr \"\"\n\n#: ../../api.rst:10\nmsgid \"This is a mostly auto-generated API. If you are new to bottle, you might find the narrative :doc:`tutorial` more helpful.\"\nmsgstr \"\"\n\n#: ../../api.rst:17\nmsgid \"Module Contents\"\nmsgstr \"\"\n\n#: ../../api.rst:19\nmsgid \"The module defines several functions, constants, and an exception.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.debug:1\nmsgid \"Change the debug level. There is only one debug level supported at the moment.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.run:1\nmsgid \"Start a server instance. This method blocks until the server terminates.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.run:0\n#: ../../../bottle.py:docstring of bottle.path_shift:0\n#: ../../../bottle.py:docstring of bottle.MultiDict.get:0\n#: ../../../bottle.py:docstring of bottle.HeaderDict.get:0\n#: ../../../bottle.py:docstring of bottle.ResourceManager:0\n#: ../../../bottle.py:docstring of bottle.ResourceManager.add_path:0\n#: ../../../bottle.py:docstring of bottle.FileUpload.save:0\n#: ../../../bottle.py:docstring of bottle.Bottle:0\n#: ../../../bottle.py:docstring of bottle.Bottle.mount:0\n#: ../../../bottle.py:docstring of bottle.Bottle.route:0\n#: ../../../bottle.py:docstring of bottle.BaseRequest.path_shift:0\n#: ../../../bottle.py:docstring of bottle.BaseResponse:0\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:0\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.run:3\nmsgid \"WSGI application or target string supported by :func:`load_app`. (default: :func:`default_app`)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.run:5\nmsgid \"Server adapter to use. See :data:`server_names` keys for valid names or pass a :class:`ServerAdapter` subclass. (default: `wsgiref`)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.run:8\nmsgid \"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces including the external one. (default: 127.0.0.1)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.run:10\nmsgid \"Server port to bind to. Values below 1024 require root privileges. (default: 8080)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.run:12\nmsgid \"Start auto-reloading server? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.run:13\nmsgid \"Auto-reloader interval in seconds (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.run:14\nmsgid \"Suppress output to stdout and stderr? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.run:15\nmsgid \"Options passed to the server adapter.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.load:1\nmsgid \"Import a module or fetch an object from a module.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.load:3\nmsgid \"``package.module`` returns `module` as a module object.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.load:4\nmsgid \"``pack.mod:name`` returns the module variable `name` from `pack.mod`.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.load:5\nmsgid \"``pack.mod:func()`` calls `pack.mod.func()` and returns the result.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.load:7\nmsgid \"The last form accepts not only function calls, but any type of expression. Keyword arguments passed to this function are available as local variables. Example: ``import_string('re:compile(x)', x='[a-z]')``\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.load_app:1\nmsgid \"Load a bottle application from a module and make sure that the import does not affect the current default application, but returns a separate application object. See :func:`load` for the target parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.request:1\n#: ../../../bottle.py:docstring of bottle.request:1\nmsgid \"A thread-safe instance of :class:`LocalRequest`. If accessed from within a request callback, this instance always refers to the *current* request (even on a multi-threaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.response:1\nmsgid \"A thread-safe instance of :class:`LocalResponse`. It is used to change the HTTP response for the *current* request.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.HTTP_CODES:1\nmsgid \"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')\"\nmsgstr \"\"\n\n#: ../../api.rst:38\nmsgid \"Return the current :ref:`default-app`. Actually, these are callable instances of :class:`AppStack` and implement a stack-like API.\"\nmsgstr \"\"\n\n#: ../../api.rst:42\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../api.rst:44\nmsgid \"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and :class:`AppStack`) and uses the top of the stack as a *default application* for some of the module-level functions and decorators.\"\nmsgstr \"\"\n\n#: ../../api.rst:54\nmsgid \"Decorator to install a route to the current default application. See :meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:59\nmsgid \"Decorator to install an error handler to the current default application. See :meth:`Bottle.error` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:63\nmsgid \"WSGI and HTTP Utilities\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.parse_date:1\nmsgid \"Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.parse_auth:1\nmsgid \"Parse rfc2617 HTTP authentication header string (basic) and return (user,pass) tuple or None\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.cookie_encode:1\nmsgid \"Encode and sign a pickle-able object. Return a (byte) string\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.cookie_decode:1\nmsgid \"Verify and decode an encoded string. Return an object or None.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.cookie_is_encoded:1\nmsgid \"Return True if the argument looks like a encoded cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.yieldroutes:1\nmsgid \"Return a generator for routes that match the signature (name, args) of the func parameter. This may yield more than one route if the function takes optional keyword arguments. The output is best described by example::\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.path_shift:1\nmsgid \"Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.path_shift:0\nmsgid \"Returns\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.path_shift:3\nmsgid \"The modified paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.path_shift:4\nmsgid \"The SCRIPT_NAME path.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.path_shift:5\nmsgid \"The PATH_INFO path.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.path_shift:6\nmsgid \"The number of path fragments to shift. May be negative to change the shift direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../api.rst:81\nmsgid \"Data Structures\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict:1\nmsgid \"This dict stores multiple values per key, but behaves exactly like a normal dict in that it returns only the newest value for any given key. There are special methods available to access the full list of values.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.keys:1\nmsgid \"D.keys() -> a set-like object providing a view on D's keys\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.values:1\nmsgid \"D.values() -> an object providing a view on D's values\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.items:1\nmsgid \"D.items() -> a set-like object providing a view on D's items\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.get:1\n#: ../../../bottle.py:docstring of bottle.HeaderDict.get:1\nmsgid \"Return the most recent value for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.get:3\n#: ../../../bottle.py:docstring of bottle.HeaderDict.get:3\nmsgid \"The default value to be returned if the key is not present or the type conversion fails.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.get:5\n#: ../../../bottle.py:docstring of bottle.HeaderDict.get:5\nmsgid \"An index for the list of available values.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.get:6\n#: ../../../bottle.py:docstring of bottle.HeaderDict.get:6\nmsgid \"If defined, this callable is used to cast the value into a specific type. Exception are suppressed and result in the default value to be returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.append:1\n#: ../../../bottle.py:docstring of bottle.HeaderDict.append:1\nmsgid \"Add a new value to the list of values for this key.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.replace:1\n#: ../../../bottle.py:docstring of bottle.HeaderDict.replace:1\nmsgid \"Replace the list of values with a single value.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.getall:1\n#: ../../../bottle.py:docstring of bottle.MultiDict.getall:1\n#: ../../../bottle.py:docstring of bottle.HeaderDict.getall:1\nmsgid \"Return a (possibly empty) list of values for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.MultiDict.get:1\nmsgid \"Aliases for WTForms to mimic other multi-dict APIs (Django)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.HeaderDict:1\nmsgid \"A case-insensitive version of :class:`MultiDict` that defaults to replace the old value instead of appending it.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FormsDict:1\nmsgid \"This :class:`MultiDict` subclass is used to store request form data. Additionally to the normal dict-like item access methods (which return unmodified data as native strings), this container also supports attribute-like access to its values. Attributes are automatically de- or recoded to match :attr:`input_encoding` (default: 'utf8'). Missing attributes default to an empty string.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FormsDict.input_encoding:1\nmsgid \"Encoding used for attribute values.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FormsDict.recode_unicode:1\nmsgid \"If true (default), unicode strings are first encoded with `latin1` and then decoded to match :attr:`input_encoding`.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FormsDict.decode:1\nmsgid \"Returns a copy with all keys and values de- or recoded to match :attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FormsDict.getunicode:1\nmsgid \"Return the value as a unicode string, or the default.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.WSGIHeaderDict:1\nmsgid \"This dict-like class wraps a WSGI environ dict and provides convenient access to HTTP_* fields. Keys and values are native strings (2.x bytes or 3.x unicode) and keys are case-insensitive. If the WSGI environment contains non-native string values, these are de- or encoded using a lossless 'latin1' character set.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.WSGIHeaderDict:7\nmsgid \"The API will remain stable even on changes to the relevant PEPs. Currently PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-native strings.)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.WSGIHeaderDict.cgikeys:1\nmsgid \"List of keys that do not have a ``HTTP_`` prefix.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.WSGIHeaderDict.raw:1\nmsgid \"Return the header value as is (may be bytes or unicode).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.AppStack:1\nmsgid \"A stack-like list. Calling it returns the head of the stack.\"\nmsgstr \"\"\n\n#: ../../api.rst:100\nmsgid \"Return the current default application and remove it from the stack.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.AppStack.push:1\n#: ../../../bottle.py:docstring of bottle.AppStack.push:1\nmsgid \"Add a new :class:`Bottle` instance to the stack\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager:1\nmsgid \"This class manages a list of search paths and helps to find and open application-bound resources (files).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager:4\nmsgid \"default value for :meth:`add_path` calls.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager:5\nmsgid \"callable used to open resources.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager:6\nmsgid \"controls which lookups are cached. One of 'all', 'found' or 'none'.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.path:1\nmsgid \"A list of search paths. See :meth:`add_path` for details.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.cache:1\nmsgid \"A cache for resolved paths. ``res.cache.clear()`` clears the cache.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager.add_path:1\nmsgid \"Add a new path to the list of search paths. Return False if the path does not exist.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager.add_path:4\nmsgid \"The new search path. Relative paths are turned into an absolute and normalized form. If the path looks like a file (not ending in `/`), the filename is stripped off.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager.add_path:7\nmsgid \"Path used to absolutize relative search paths. Defaults to :attr:`base` which defaults to ``os.getcwd()``.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager.add_path:9\nmsgid \"Position within the list of search paths. Defaults to last index (appends to the list).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager.add_path:12\nmsgid \"The `base` parameter makes it easy to reference files installed along with a python module or package::\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager.lookup:1\nmsgid \"Search for a resource and return an absolute file path, or `None`.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager.lookup:3\nmsgid \"The :attr:`path` list is searched in order. The first match is returned. Symlinks are followed. The result is cached to speed up future lookups.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ResourceManager.open:1\nmsgid \"Find a resource and return a file object, or raise IOError.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.file:1\nmsgid \"Open file(-like) object (BytesIO buffer or temporary file)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.name:1\nmsgid \"Name of the upload form field\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.raw_filename:1\nmsgid \"Raw filename as sent by the client (may contain unsafe characters)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.headers:1\nmsgid \"A :class:`HeaderDict` with additional headers (e.g. content-type)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FileUpload.content_type:1\n#: ../../../bottle.py:docstring of bottle.BaseResponse.content_type:1\nmsgid \"Current value of the 'Content-Type' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FileUpload.content_length:1\n#: ../../../bottle.py:docstring of bottle.BaseResponse.content_length:1\nmsgid \"Current value of the 'Content-Length' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FileUpload.get_header:1\nmsgid \"Return the value of a header within the mulripart part.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FileUpload.filename:1\nmsgid \"Name of the file on the client file system, but normalized to ensure file system compatibility. An empty filename is returned as 'empty'.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FileUpload.filename:4\nmsgid \"Only ASCII letters, digits, dashes, underscores and dots are allowed in the final filename. Accents are removed, if possible. Whitespace is replaced by a single dash. Leading or tailing dots or dashes are removed. The filename is limited to 255 characters.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FileUpload.save:1\nmsgid \"Save file to disk or copy its content to an open file(-like) object. If *destination* is a directory, :attr:`filename` is added to the path. Existing files are not overwritten by default (IOError).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FileUpload.save:5\nmsgid \"File path, directory or file(-like) object.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FileUpload.save:6\nmsgid \"If True, replace existing files. (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.FileUpload.save:7\nmsgid \"Bytes to read at a time. (default: 64kb)\"\nmsgstr \"\"\n\n#: ../../api.rst:109\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BottleException:1\nmsgid \"A base class for exceptions used by bottle.\"\nmsgstr \"\"\n\n#: ../../api.rst:117\nmsgid \"The :class:`Bottle` Class\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle:1\nmsgid \"Each Bottle object represents a single, distinct web application and consists of routes, callbacks, plugins, resources and configuration. Instances are callable WSGI applications.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle:5\nmsgid \"If true (default), handle all exceptions. Turn off to let debugging middleware handle exceptions.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.config:1\nmsgid \"A :class:`ConfigDict` for app specific configuration.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.resources:1\nmsgid \"A :class:`ResourceManager` for application files\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.catchall:1\nmsgid \"If true, most exceptions are caught and returned as :exc:`HTTPError`\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.add_hook:1\nmsgid \"Attach a callback to a hook. Three hooks are currently implemented:\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.add_hook:4\nmsgid \"before_request\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.add_hook:4\nmsgid \"Executed once before each request. The request context is available, but no routing has happened yet.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.add_hook:6\nmsgid \"after_request\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.add_hook:7\nmsgid \"Executed once after each request regardless of its outcome.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.add_hook:8\nmsgid \"app_reset\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.add_hook:9\nmsgid \"Called whenever :meth:`Bottle.reset` is called.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.remove_hook:1\nmsgid \"Remove a callback from a hook.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.trigger_hook:1\nmsgid \"Trigger a hook and return a list of results.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.hook:1\nmsgid \"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.mount:1\nmsgid \"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL prefix. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.mount:6\nmsgid \"path prefix or `mount-point`.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.mount:7\nmsgid \"an instance of :class:`Bottle` or a WSGI application.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.mount:9\nmsgid \"Plugins from the parent application are not applied to the routes of the mounted child application. If you need plugins in the child application, install them separately.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.mount:13\nmsgid \"While it is possible to use path wildcards within the prefix path (:class:`Bottle` childs only), it is highly discouraged.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.mount:16\nmsgid \"The prefix path must end with a slash. If you want to access the root of the child application via `/prefix` in addition to `/prefix/`, consider adding a route with a 307 redirect to the parent application.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.merge:1\nmsgid \"Merge the routes of another :class:`Bottle` application or a list of :class:`Route` objects into this application. The routes keep their 'owner', meaning that the :data:`Route.app` attribute is not changed.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.install:1\nmsgid \"Add a plugin to the list of plugins and prepare it for being applied to all routes of this application. A plugin may be a simple decorator or an object that implements the :class:`Plugin` API.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.uninstall:1\nmsgid \"Uninstall plugins. Pass an instance to remove a specific plugin, a type object to remove all plugins that match that type, a string to remove all plugins with a matching ``name`` attribute or ``True`` to remove all plugins. Return the list of removed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.reset:1\nmsgid \"Reset all routes (force plugins to be re-applied) and clear all caches. If an ID or route object is given, only that specific route is affected.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.close:1\nmsgid \"Close the application and all installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.run:1\nmsgid \"Calls :func:`run` with the same parameters.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.match:1\nmsgid \"Search for a matching route and return a (:class:`Route`, urlargs) tuple. The second value is a dictionary with parameters extracted from the URL. Raise :exc:`HTTPError` (404/405) on a non-match.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.get_url:1\nmsgid \"Return a string that matches a named route\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.add_route:1\nmsgid \"Add a route object, but do not change the :data:`Route.app` attribute.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.route:1\nmsgid \"A decorator to bind a function to a request URL. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.route:7\nmsgid \"The ``<name>`` part is a wildcard. See :class:`Router` for syntax details.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.route:10\nmsgid \"Request path or a list of paths to listen to. If no path is specified, it is automatically generated from the signature of the function.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.route:13\nmsgid \"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. (default: `GET`)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.route:15\nmsgid \"An optional shortcut to avoid the decorator syntax. ``route(..., callback=func)`` equals ``route(...)(func)``\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.route:17\nmsgid \"The name for this route. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.route:18\nmsgid \"A decorator or plugin or a list of plugins. These are applied to the route callback in addition to installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.route:20\nmsgid \"A list of plugins, plugin classes or names. Matching plugins are not installed to this route. ``True`` skips all.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.route:23\nmsgid \"Any additional keyword arguments are stored as route-specific configuration and passed to plugins (see :meth:`Plugin.apply`).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.get:1\nmsgid \"Equals :meth:`route`.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.post:1\nmsgid \"Equals :meth:`route` with a ``POST`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.put:1\nmsgid \"Equals :meth:`route` with a ``PUT`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.delete:1\nmsgid \"Equals :meth:`route` with a ``DELETE`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.patch:1\nmsgid \"Equals :meth:`route` with a ``PATCH`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.error:1\nmsgid \"Register an output handler for a HTTP error code. Can be used as a decorator or called directly ::\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Bottle.wsgi:1\nmsgid \"The bottle WSGI-interface.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Route:1\nmsgid \"This class wraps a route callback along with route specific metadata and configuration and applies Plugins on demand. It is also responsible for turning an URL path rule into a regular expression usable by the Router.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.app:1\nmsgid \"The application this route is installed to.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.rule:1\nmsgid \"The path-rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.method:1\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.callback:1\nmsgid \"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.name:1\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.plugins:1\nmsgid \"A list of route-specific plugins (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.skiplist:1\nmsgid \"A list of plugins to not apply to this route (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.config:1\nmsgid \"Additional keyword arguments passed to the :meth:`Bottle.route` decorator are stored in this dictionary. Used for route-specific plugin configuration and meta-data.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Route.call:1\nmsgid \"The route callback with all plugins applied. This property is created on demand and then cached to speed up subsequent requests.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Route.reset:1\nmsgid \"Forget any cached values. The next time :attr:`call` is accessed, all plugins are re-applied.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Route.prepare:1\nmsgid \"Do all on-demand work immediately (useful for debugging).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Route.all_plugins:1\nmsgid \"Yield all Plugins affecting this route.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Route.get_undecorated_callback:1\nmsgid \"Return the callback. If the callback is a decorated function, try to recover the original function.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Route.get_callback_args:1\nmsgid \"Return a list of argument names the callback (most likely) accepts as keyword arguments. If the callback is a decorated function, try to recover the original function before inspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.Route.get_config:1\nmsgid \"Lookup a config field and return its value, first checking the route.config, then route.app.config.\"\nmsgstr \"\"\n\n#: ../../api.rst:127\nmsgid \"The :class:`Request` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:129\nmsgid \"The :class:`Request` class wraps a WSGI environment and provides helpful methods to parse and access form data, cookies, file uploads and other metadata. Most of the attributes are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest:1\nmsgid \"A wrapper for WSGI environment dictionaries that adds a lot of convenient access methods and properties. Most of them are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest:4\nmsgid \"Adding new attributes to a request actually adds them to the environ dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to store and access request-specific data.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.MEMFILE_MAX:1\nmsgid \"Maximum size of memory buffer for :attr:`body` in bytes.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.environ:1\nmsgid \"The wrapped WSGI environ dictionary. This is the only real attribute. All other attributes actually are read-only properties.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.app:1\nmsgid \"Bottle application handling this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.route:1\nmsgid \"The bottle :class:`Route` object that matches this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.url_args:1\nmsgid \"The arguments extracted from the URL.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.path:1\nmsgid \"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken clients and avoid the \\\"empty path\\\" edge case).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.method:1\nmsgid \"The ``REQUEST_METHOD`` value as an uppercase string.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.headers:1\nmsgid \"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP request headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.get_header:1\nmsgid \"Return the value of a request header, or a given default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.cookies:1\nmsgid \"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. Use :meth:`get_cookie` if you expect signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.get_cookie:1\nmsgid \"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must match the one used to create the cookie (see :meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or wrong signature), return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.query:1\nmsgid \"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are sometimes called \\\"URL arguments\\\" or \\\"GET parameters\\\", but not to be confused with \\\"URL wildcards\\\" as they are provided by the :class:`Router`.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.forms:1\nmsgid \"Form values parsed from an `url-encoded` or `multipart/form-data` encoded POST or PUT request body. The result is returned as a :class:`FormsDict`. All keys and values are strings. File uploads are stored separately in :attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.params:1\nmsgid \"A :class:`FormsDict` with the combined values of :attr:`query` and :attr:`forms`. File uploads are stored in :attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.files:1\nmsgid \"File uploads parsed from `multipart/form-data` encoded POST or PUT request body. The values are instances of :class:`FileUpload`.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.json:1\nmsgid \"If the ``Content-Type`` header is ``application/json`` or ``application/json-rpc``, this property holds the parsed content of the request body. Only requests smaller than :attr:`MEMFILE_MAX` are processed to avoid memory exhaustion. Invalid JSON raises a 400 error response.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.body:1\nmsgid \"The HTTP request body as a seek-able file-like object. Depending on :attr:`MEMFILE_MAX`, this is either a temporary file or a :class:`io.BytesIO` instance. Accessing this property for the first time reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses just do a `seek(0)` on the file object.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.chunked:1\nmsgid \"True if Chunked transfer encoding was.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.query:1\nmsgid \"An alias for :attr:`query`.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.POST:1\nmsgid \"The values of :attr:`forms` and :attr:`files` combined into a single :class:`FormsDict`. Values are either strings (form values) or instances of :class:`cgi.FieldStorage` (file uploads).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.url:1\nmsgid \"The full request URI including hostname and scheme. If your app lives behind a reverse proxy or load balancer and you get confusing results, make sure that the ``X-Forwarded-Host`` header is set correctly.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.urlparts:1\nmsgid \"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple contains (scheme, host, path, query_string and fragment), but the fragment is always empty because it is not visible to the server.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.fullpath:1\nmsgid \"Request path including :attr:`script_name` (if present).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.query_string:1\nmsgid \"The raw :attr:`query` part of the URL (everything in between ``?`` and ``#``) as a string.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.script_name:1\nmsgid \"The initial portion of the URL's `path` that was removed by a higher level (server or routing middleware) before the application was called. This script path is returned with leading and tailing slashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.path_shift:2\nmsgid \"Shift path segments from :attr:`path` to :attr:`script_name` and\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.path_shift:2\nmsgid \"vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.path_shift:4\nmsgid \"The number of path segments to shift. May be negative to change the shift direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.content_length:1\nmsgid \"The request body length as an integer. The client is responsible to set this header. Otherwise, the real length of the body is unknown and -1 is returned. In this case, :attr:`body` will be empty.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.content_type:1\nmsgid \"The Content-Type header as a lowercase-string (default: empty).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.is_xhr:1\nmsgid \"True if the request was triggered by a XMLHttpRequest. This only works with JavaScript libraries that support the `X-Requested-With` header (most of the popular libraries do).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.is_ajax:1\nmsgid \"Alias for :attr:`is_xhr`. \\\"Ajax\\\" is not the right term.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.auth:1\nmsgid \"HTTP authentication data as a (user, password) tuple. This implementation currently supports basic (not digest) authentication only. If the authentication happened at a higher level (e.g. in the front web-server or a middleware), the password field is None, but the user field is looked up from the ``REMOTE_USER`` environ variable. On any errors, None is returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.remote_route:1\nmsgid \"A list of all IPs that were involved in this request, starting with the client IP and followed by zero or more proxies. This does only work if all proxies support the ```X-Forwarded-For`` header. Note that this information can be forged by malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.remote_addr:1\nmsgid \"The client IP as a string. Note that this information can be forged by malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.copy:1\nmsgid \"Return a new :class:`Request` with a shallow :attr:`environ` copy.\"\nmsgstr \"\"\n\n#: ../../api.rst:137\nmsgid \"The module-level :data:`bottle.request` is a proxy object (implemented in :class:`LocalRequest`) and always refers to the `current` request, or in other words, the request that is currently processed by the request handler in the current thread. This `thread locality` ensures that you can safely use a global instance in a multi-threaded environment.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.LocalRequest:1\nmsgid \"A thread-local subclass of :class:`BaseRequest` with a different set of attributes for each thread. There is usually only one global instance of this class (:data:`request`). If accessed during a request/response cycle, this instance always refers to the *current* request (even on a multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseRequest.__init__:1\nmsgid \"Wrap a WSGI environ dictionary.\"\nmsgstr \"\"\n\n#: ../../api.rst:146\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:148\nmsgid \"The :class:`Response` class stores the HTTP status code as well as headers and cookies that are to be sent to the client. Similar to :data:`bottle.request` there is a thread-local :data:`bottle.response` instance that can be used to adjust the `current` response. Moreover, you can instantiate :class:`Response` and return it from your request handler. In this case, the custom instance overrules the headers and cookies defined in the global one.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse:1\nmsgid \"Storage class for a response body as well as headers and cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse:3\nmsgid \"This class does support dict-like case-insensitive item-access to headers, but is NOT a dict. Most notably, iterating over a response yields parts of the body and not the headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse:7\nmsgid \"The response body as one of the supported types.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse:8\nmsgid \"Either an HTTP status code (e.g. 200) or a status line including the reason phrase (e.g. '200 OK').\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse:10\nmsgid \"A dictionary or a list of name-value pairs.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse:12\nmsgid \"Additional keyword arguments are added to the list of headers. Underscores in the header name are replaced with dashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.copy:1\nmsgid \"Returns a copy of self.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.status_line:1\nmsgid \"The HTTP status line as a string (e.g. ``404 Not Found``).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.status_code:1\nmsgid \"The HTTP status code as an integer (e.g. 404).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.status:1\nmsgid \"A writeable property to change the HTTP response status. It accepts either a numeric code (100-999) or a string with a custom reason phrase (e.g. \\\"404 Brain not found\\\"). Both :data:`status_line` and :data:`status_code` are updated accordingly. The return value is always a status string.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.headers:1\nmsgid \"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the response headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.get_header:1\nmsgid \"Return the value of a previously defined header. If there is no header with that name, return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_header:1\nmsgid \"Create a new response header, replacing any previously defined headers with the same name.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.add_header:1\nmsgid \"Add an additional response header, not removing duplicates.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.iter_headers:1\nmsgid \"Yield (header, value) tuples, skipping headers that are not allowed with the current response status code.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.headerlist:1\nmsgid \"WSGI conform list of (header, value) tuples.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.expires:1\nmsgid \"Current value of the 'Expires' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.charset:1\nmsgid \"Return the charset specified in the content-type header (default: utf8).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:1\nmsgid \"Create a new cookie or replace an old one. If the `secret` parameter is set, create a `Signed Cookie` (described below).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:4\nmsgid \"the name of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:5\nmsgid \"the value of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:6\nmsgid \"a signature key required for signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:8\nmsgid \"Additionally, this method accepts all RFC 2109 attributes that are supported by :class:`cookie.Morsel`, including:\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:11\nmsgid \"maximum age in seconds. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:12\nmsgid \"a datetime object or UNIX timestamp. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:13\nmsgid \"the domain that is allowed to read the cookie. (default: current domain)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:15\nmsgid \"limits the cookie to a given path (default: current path)\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:16\nmsgid \"limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:17\nmsgid \"prevents client-side javascript to read this cookie (default: off, requires Python 2.6 or newer).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:19\nmsgid \"Control or disable third-party use for this cookie. Possible values: `lax`, `strict` or `none` (default).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:22\nmsgid \"If neither `expires` nor `maxage` is set (default), the cookie will expire at the end of the browser session (as soon as the browser window is closed).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:26\nmsgid \"Signed cookies may store any pickle-able object and are cryptographically signed to prevent manipulation. Keep in mind that cookies are limited to 4kb in most browsers.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:30\nmsgid \"Warning: Pickle is a potentially dangerous format. If an attacker gains access to the secret key, he could forge cookies that execute code on server side if unpickled. Using pickle is discouraged and support for it will be removed in later versions of bottle.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.set_cookie:35\nmsgid \"Warning: Signed cookies are not encrypted (the client can still see the content) and not copy-protected (the client can restore an old cookie). The main intention is to make pickling and unpickling save, not to store secret information at client side.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.delete_cookie:1\nmsgid \"Delete a cookie. Be sure to use the same `domain` and `path` settings as used to create the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.LocalResponse:1\nmsgid \"A thread-local subclass of :class:`BaseResponse` with a different set of attributes for each thread. There is usually only one global instance of this class (:data:`response`). Its attributes are used to build the HTTP response at the end of the request/response cycle.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseResponse.__init__:1\nmsgid \"Initialize self.  See help(type(self)) for accurate signature.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.LocalResponse.body:1\nmsgid \"Thread-local property\"\nmsgstr \"\"\n\n#: ../../api.rst:160\nmsgid \"The following two classes can be raised as an exception. The most noticeable difference is that bottle invokes error handlers for :class:`HTTPError`, but not for :class:`HTTPResponse` or other response types.\"\nmsgstr \"\"\n\n#: ../../api.rst:172\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../api.rst:174\nmsgid \"All template engines supported by :mod:`bottle` implement the :class:`BaseTemplate` API. This way it is possible to switch and mix template engines without changing the application code at all.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseTemplate:1\nmsgid \"Base class and minimal API for template adapters\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseTemplate.__init__:1\nmsgid \"Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseTemplate.search:1\nmsgid \"Search name in all directories specified in lookup. First without, then with common extensions. Return first hit.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseTemplate.global_config:1\nmsgid \"This reads or sets the global settings stored in class.settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseTemplate.prepare:1\nmsgid \"Run preparations (parsing, caching, ...). It should be possible to call this again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.BaseTemplate.render:1\nmsgid \"Render the template with the specified local variables and return a single byte or unicode string. If it is a byte string, the encoding must match self.encoding. This method must be thread-safe! Local variables may be provided in dictionaries (args) or directly, as keywords (kwargs).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.view:1\nmsgid \"Decorator: renders a template for a handler. The handler can control its behavior like that:\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.view:4\nmsgid \"return a dict of template vars to fill out the template\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.view:5\nmsgid \"return something other than a dict and the view decorator will not process the template, but return the handler result as is. This includes returning a HTTPResponse(dict) to get, for instance, JSON with autojson or other castfilters.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.template:1\nmsgid \"Get a rendered template as a string iterator. You can use a name, a filename or a template string as first parameter. Template rendering arguments can be passed as dictionaries or directly (as keyword arguments).\"\nmsgstr \"\"\n\n#: ../../api.rst:185\nmsgid \"You can write your own adapter for your favourite template engine or use one of the predefined adapters. Currently there are four fully supported template engines:\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Class\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"URL\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Decorator\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Render function\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":class:`SimpleTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`view`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`template`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":class:`MakoTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \"http://www.makotemplates.org\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":class:`CheetahTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \"http://www.cheetahtemplate.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":class:`Jinja2Template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \"http://jinja.pocoo.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:196\nmsgid \"To use :class:`MakoTemplate` as your default template engine, just import its specialised decorator and render function::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/async.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../async.rst:2\nmsgid \"Primer to Asynchronous Applications\"\nmsgstr \"\"\n\n#: ../../async.rst:4\nmsgid \"Asynchronous design patterns don't mix well with the synchronous nature of `WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most asynchronous frameworks (tornado, twisted, ...) implement a specialized API to expose their asynchronous features. Bottle is a WSGI framework and shares the synchronous nature of WSGI, but thanks to the awesome `gevent project <http://www.gevent.org/>`_, it is still possible to write asynchronous applications with bottle. This article documents the usage of Bottle with Asynchronous WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:7\nmsgid \"The Limits of Synchronous WSGI\"\nmsgstr \"\"\n\n#: ../../async.rst:9\nmsgid \"Briefly worded, the `WSGI specification (pep 3333) <http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response circle as follows: The application callable is invoked once for each request and must return a body iterator. The server then iterates over the body and writes each chunk to the socket. As soon as the body iterator is exhausted, the client connection is closed.\"\nmsgstr \"\"\n\n#: ../../async.rst:11\nmsgid \"Simple enough, but there is a snag: All this happens synchronously. If your application needs to wait for data (IO, sockets, databases, ...), it must either yield empty strings (busy wait) or block the current thread. Both solutions occupy the handling thread and prevent it from answering new requests. There is consequently only one ongoing request per thread.\"\nmsgstr \"\"\n\n#: ../../async.rst:13\nmsgid \"Most servers limit the number of threads to avoid their relatively high overhead. Pools of 20 or less threads are common. As soon as all threads are occupied, any new connection is stalled. The server is effectively dead for everyone else. If you want to implement a chat that uses long-polling ajax requests to get real-time updates, you'd reach the limited at 20 concurrent connections. That's a pretty small chat.\"\nmsgstr \"\"\n\n#: ../../async.rst:16\nmsgid \"Greenlets to the rescue\"\nmsgstr \"\"\n\n#: ../../async.rst:18\nmsgid \"Most servers limit the size of their worker pools to a relatively low number of concurrent threads, due to the high overhead involved in switching between and creating new threads. While threads are cheap compared to processes (forks), they are still expensive to create for each new connection.\"\nmsgstr \"\"\n\n#: ../../async.rst:20\nmsgid \"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. Greenlets behave similar to traditional threads, but are very cheap to create. A gevent-based server can spawn thousands of greenlets (one for each connection) with almost no overhead. Blocking individual greenlets has no impact on the servers ability to accept new requests. The number of concurrent connections is virtually unlimited.\"\nmsgstr \"\"\n\n#: ../../async.rst:22\nmsgid \"This makes creating asynchronous applications incredibly easy, because they look and feel like synchronous applications. A gevent-based server is actually not asynchronous, but massively multi-threaded. Here is an example::\"\nmsgstr \"\"\n\n#: ../../async.rst:39\nmsgid \"The first line is important. It causes gevent to monkey-patch most of Python's blocking APIs to not block the current thread, but pass the CPU to the next greenlet instead. It actually replaces Python's threading with gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` which would normally block the whole thread. If you don't feel comfortable with monkey-patching python built-ins, you can use the corresponding gevent functions (``gevent.sleep()`` in this case).\"\nmsgstr \"\"\n\n#: ../../async.rst:41\nmsgid \"If you run this script and point your browser to ``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and `END` show up one by one (rather than waiting 8 seconds to see them all at once). It works exactly as with normal threads, but now your server can handle thousands of concurrent requests without any problems.\"\nmsgstr \"\"\n\n#: ../../async.rst:45\nmsgid \"Some browsers buffer a certain amount of data before they start rendering a page. You might need to yield more than a few bytes to see an effect in these browsers. Additionally, many browsers have a limit of one concurrent connection per URL. If this is the case, you can use a second browser or a benchmark tool (e.g. `ab` or `httperf`) to measure performance.\"\nmsgstr \"\"\n\n#: ../../async.rst:52\nmsgid \"Event Callbacks\"\nmsgstr \"\"\n\n#: ../../async.rst:54\nmsgid \"A very common design pattern in asynchronous frameworks (including tornado, twisted, node.js and friends) is to use non-blocking APIs and bind callbacks to asynchronous events. The socket object is kept open until it is closed explicitly to allow callbacks to write to the socket at a later point. Here is an example based on the `tornado library <http://www.tornadoweb.org/documentation#non-blocking-asynchronous-requests>`_::\"\nmsgstr \"\"\n\n#: ../../async.rst:63\nmsgid \"The main benefit is that the request handler terminates early. The handling thread can move on and accept new requests while the callbacks continue to write to sockets of previous requests. This is how these frameworks manage to process a lot of concurrent requests with only a small number of OS threads.\"\nmsgstr \"\"\n\n#: ../../async.rst:65\nmsgid \"With Gevent+WSGI, things are different: First, terminating early has no benefit because we have an unlimited pool of (pseudo)threads to accept new connections. Second, we cannot terminate early because that would close the socket (as required by WSGI). Third, we must return an iterable to conform to WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:67\nmsgid \"In order to conform to the WSGI standard, all we have to do is to return a body iterable that we can write to asynchronously. With the help of `gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate* a detached socket and rewrite the previous example as follows::\"\nmsgstr \"\"\n\n#: ../../async.rst:78\nmsgid \"From the server perspective, the queue object is iterable. It blocks if empty and stops as soon as it reaches ``StopIteration``. This conforms to WSGI. On the application side, the queue object behaves like a non-blocking socket. You can write to it at any time, pass it around and even start a new (pseudo)thread that writes to it asynchronously. This is how long-polling is implemented most of the time.\"\nmsgstr \"\"\n\n#: ../../async.rst:82\nmsgid \"Finally: WebSockets\"\nmsgstr \"\"\n\n#: ../../async.rst:84\nmsgid \"Lets forget about the low-level details for a while and speak about WebSockets. Since you are reading this article, you probably know what WebSockets are: A bidirectional communication channel between a browser (client) and a web application (server).\"\nmsgstr \"\"\n\n#: ../../async.rst:86\nmsgid \"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-websocket/>`_ package does all the hard work for us. Here is a simple WebSocket endpoint that receives messages and just sends them back to the client::\"\nmsgstr \"\"\n\n#: ../../async.rst:111\nmsgid \"The while-loop runs until the client closes the connection. You get the idea :)\"\nmsgstr \"\"\n\n#: ../../async.rst:113\nmsgid \"The client-site JavaScript API is really straight forward, too::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/changelog.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../changelog.rst:6\nmsgid \"Release Notes and Changelog\"\nmsgstr \"\"\n\n#: ../../changelog.rst:9\nmsgid \"Release 0.13\"\nmsgstr \"\"\n\n#: ../../changelog.rst:11\nmsgid \"Not released yet.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:14\nmsgid \"Dropped support for Python versions that reached their end-of-life.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:15\nmsgid \"Keeping up support for ancient Python versions hinders adaptation of new features and serves no real purpose. If you need support for older Python versions, you can stay on bottle-0.12. The updated list of tested and supported python releases is as follows:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:20\nmsgid \"Python 2.7 (>= 2.7.3)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:21\nmsgid \"Python 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:22\nmsgid \"Python 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:23\nmsgid \"Python 3.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:24\nmsgid \"Python 3.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:25\nmsgid \"PyPy 2.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:26\nmsgid \"PyPy 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:27\nmsgid \"PyPy 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:29\nmsgid \"Support for Python 2.5 was marked as deprecated since 0.12. We decided to go a step further and also remove support for 2.6 and 3.1 to 3.5 even if it was never deprecated explicitly in bottle. This means that this release is *not* backwards compatible in Python <2.7.3 or <3.6 environments. Maintainers for distributions or systems that still use these old python versions should not update to Bottle 0.13 and stick with 0.12 instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:35\nmsgid \"Stabilized APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:36\nmsgid \"The documented API of the :class:`ConfigDict` class is now considered stable and ready to use.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:38\nmsgid \"Deprecated APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:39\nmsgid \"The old route syntax (``/hello/:name``) is deprecated in favor of the more readable and flexible ``/hello/<name>`` syntax.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:40\nmsgid \":meth:`Bottle.mount` now recognizes Bottle instance and will warn about parameters that are not compatible with the new mounting behavior. The old behavior (mount applications as WSGI callable) still works and is used as a fallback automatically.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:41\nmsgid \"The undocumented :func:`local_property` helper is now deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:42\nmsgid \"The server adapter for google app engine is not useful anymore and marked as deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:43\nmsgid \"Bottle uses pickle to store arbitrary objects into signed cookies. This is safe, as long as the signature key remains a secret. Unfortunately, people tend to push code with signature keys to github all the time, so we decided to remove pickle-support from bottle. Signed cookies will now issue a deprecation warning if the value is not a string, and support for non-string values will be removed in 0.14. The global :func:`cookie_encode`, :func:`cookie_decode` and :func:`is_cookie_encoded` are now also deprecated. If you are using this feature, think about using json to serialize your objects before storing them into cookies, or switch to a session system that stores data server-side instead of client-side.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:45\nmsgid \"Removed APIs (deprecated since 0.12)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:46\nmsgid \"Plugins with the old API (``api=1`` or no api attribute) will no longer work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:47\nmsgid \"Parameter order of :meth:`Bottle.mount` changed in 0.10. The old order will now result in an error instead of a warning.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:48\nmsgid \"The :class:`ConfigDict` class was introduced in 0.11 and changed during 0.12. These changes are now final.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:50\nmsgid \"Attribute access and assignment was removed due to high overhead and limited usability.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:51\nmsgid \"Namespaced sub-instance creation was removed. ``config[\\\"a\\\"][\\\"b\\\"]`` has a high overhead and little benefit over ``config[\\\"a.b\\\"]``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:52\nmsgid \":class:`ConfigDict` instances are no longer callable. This was a shortcut for :meth:`ConfigDict.update`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:53\nmsgid \":class:`ConfigDict` constructor no longer accepts any parameters. Use the `load_*` methods instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:55\nmsgid \"Bottle 0.12 changed some aspects of the Simple Template Engine. These changes are now final and the old syntax will now longer work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:57\nmsgid \"The magic ``{{rebase()}}`` call was replaced by a ``base`` variable. Example: ``{{base}}``\"\nmsgstr \"\"\n\n#: ../../changelog.rst:58\nmsgid \"In STPL Templates, the 'rebase' and 'include' keywords were replaced with functions in 0.12.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:59\nmsgid \"PEP-263 encoding strings are no longer recognized. Templates are always utf-8.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:61\nmsgid \"The 'geventSocketIO' server adapter was removed without notice. It did not work anyway.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:63\nmsgid \"Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:64\nmsgid \"These changes might require special care when updating.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:66\nmsgid \"Signed cookies now use a stronger HMAC algorithm by default. This will result in old cookies to appear invalid after the update. Pass an explicit ``digestmod=hashlib.md5`` to :meth:`Request.get_cookie` and :meth:`Response.set_cookie` to get the old behavior.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:68\nmsgid \"Other Improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:69\nmsgid \"Bottle() instances are now context managers. If used in a with-statement, the default application changes to the specific instance and the shortcuts for many instance methods can be used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:70\nmsgid \"Added support for ``PATCH`` requests and the :meth:`Bottle.patch` decorator.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:71\nmsgid \"Added `aiohttp <http://aiohttp.readthedocs.io/en/stable/>`_ and `uvloop <https://github.com/MagicStack/uvloop>`_ server adapters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:72\nmsgid \"Added command-line arguments for config from json or ini files.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:73\nmsgid \":meth:`Bottle.mount` now recognizes instances of :class:`Bottle` and mounts them with significantly less overhead than other WSGI applications.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:74\nmsgid \"The :attr:`Request.json` property now accepts ``application/json-rpc`` requests.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:75\nmsgid \":func:`static_file` gained support for ``ETag`` headers. It will generate ETags and recognizes ``If-None-Match`` headers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:76\nmsgid \"Jinja2 templates will produce better error messages than before.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:82\nmsgid \"Release 0.12\"\nmsgstr \"\"\n\n#: ../../changelog.rst:84\nmsgid \"New SimpleTemplate parser implementation\"\nmsgstr \"\"\n\n#: ../../changelog.rst:86\nmsgid \"Support for multi-line code blocks (`<% ... %>`).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:87\nmsgid \"The keywords `include` and `rebase` are functions now and can accept variable template names.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:89\nmsgid \"The new :attr:`BaseRequest.route` property returns the :class:`Route` that originally matched the request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:90\nmsgid \"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in CPythons dict() implementation was fixed over a year ago. If you are still using Python 2.5 in production, consider upgrading or at least make sure that you get security fixed from your distributor.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:91\nmsgid \"New :class:`ConfigDict` API (see :doc:`configuration`)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:93\nmsgid \"More information can be found in this `development blog post <http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:97\nmsgid \"Release 0.11\"\nmsgstr \"\"\n\n#: ../../changelog.rst:99\nmsgid \"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:100\nmsgid \"Support for partial downloads (``Range`` header) in :func:`static_file`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:101\nmsgid \"The new :class:`ResourceManager` interface helps locating files bundled with an application.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:102\nmsgid \"Added a server adapter for `waitress <http://docs.pylonsproject.org/projects/waitress/en/latest/>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:103\nmsgid \"New :meth:`Bottle.merge` method to install all routes from one application into another.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:104\nmsgid \"New :attr:`BaseRequest.app` property to get the application object that handles a request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:105\nmsgid \"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by WTForms).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:106\nmsgid \":class:`MultiDict` and subclasses are now pickle-able.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:109\nmsgid \"API Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:110\nmsgid \":attr:`Response.status` is a read-write property that can be assigned either a numeric status code or a status string with a reason phrase (``200 OK``). The return value is now a string to better match existing APIs (WebOb, werkzeug). To be absolutely clear, you can use the read-only properties :attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:113\nmsgid \"API Deprecations\"\nmsgstr \"\"\n\n#: ../../changelog.rst:114\nmsgid \":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:117\nmsgid \"Release 0.10\"\nmsgstr \"\"\n\n#: ../../changelog.rst:119\nmsgid \"Plugin API v2\"\nmsgstr \"\"\n\n#: ../../changelog.rst:121\nmsgid \"To use the new API, set :attr:`Plugin.api` to ``2``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:122\nmsgid \":meth:`Plugin.apply` receives a :class:`Route` object instead of a context dictionary as second parameter. The new object offers some additional information and may be extended in the future.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:123\nmsgid \"Plugin names are considered unique now. The topmost plugin with a given name on a given route is installed, all other plugins with the same name are silently ignored.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:125\nmsgid \"The Request/Response Objects\"\nmsgstr \"\"\n\n#: ../../changelog.rst:127\nmsgid \"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, :attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and :attr:`BaseRequest.script_name`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:128\nmsgid \"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` attributes. In future releases, :attr:`BaseResponse.status` will return a string (e.g. ``200 OK``) instead of an integer to match the API of other common frameworks. To make the transition as smooth as possible, you should use the verbose attributes from now on.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:129\nmsgid \"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many places. The new dict implementation allows attribute access and handles unicode form values transparently.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:131\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../changelog.rst:133\nmsgid \"Added three new functions to the SimpleTemplate default namespace that handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and :func:`stpl.setdefault`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:134\nmsgid \"The default escape function for SimpleTemplate now additionally escapes single and double quotes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:136\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../changelog.rst:138\nmsgid \"A new route syntax (e.g. ``/object/<id:int>``) and support for route wildcard filters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:139\nmsgid \"Four new wildcard filters: `int`, `float`, `path` and `re`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:141\nmsgid \"Other changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:143\nmsgid \"Added command line interface to load applications and start servers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:144\nmsgid \"Introduced a :class:`ConfigDict` that makes accessing configuration a lot easier (attribute access and auto-expanding namespaces).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:145\nmsgid \"Added support for raw WSGI applications to :meth:`Bottle.mount`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:146\nmsgid \":meth:`Bottle.mount` parameter order changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:147\nmsgid \":meth:`Bottle.route` now accpets an import string for the ``callback`` parameter.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:148\nmsgid \"Dropped Gunicorn 0.8 support. Current supported version is 0.13.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:149\nmsgid \"Added custom options to Gunicorn server.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:150\nmsgid \"Finally dropped support for type filters. Replace with a custom plugin of needed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:154\nmsgid \"Release 0.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:157\nmsgid \"Whats new?\"\nmsgstr \"\"\n\n#: ../../changelog.rst:158\nmsgid \"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:159\nmsgid \"The :func:`route` decorator got a lot of new features. See :meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:160\nmsgid \"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld <http://meinheld.org/>`_ and `bjoern <https://github.com/jonashaag/bjoern>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:161\nmsgid \"Support for SimpleTAL templates.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:162\nmsgid \"Better runtime exception handling for mako templates in debug mode.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:163\nmsgid \"Lots of documentation, fixes and small improvements.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:164\nmsgid \"A new :data:`Request.urlparts` property.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:167\nmsgid \"Performance improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:168\nmsgid \"The :class:`Router` now special-cases ``wsgi.run_once`` environments to speed up CGI.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:169\nmsgid \"Reduced module load time by ~30% and optimized template parser. See `8ccb2d </commit/8ccb2d>`_, `f72a7c </commit/f72a7c>`_ and `b14b9a </commit/b14b9a>`_ for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:170\nmsgid \"Support for \\\"App Caching\\\" on Google App Engine. See `af93ec </commit/af93ec>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:171\nmsgid \"Some of the rarely used or deprecated features are now plugins that avoid overhead if the feature is not used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:174\n#: ../../changelog.rst:185\nmsgid \"API changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:175\nmsgid \"This release is mostly backward compatible, but some APIs are marked deprecated now and will be removed for the next release. Most noteworthy:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:177\nmsgid \"The ``static`` route parameter is deprecated. You can escape wild-cards with a backslash.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:178\nmsgid \"Type-based output filters are deprecated. They can easily be replaced with plugins.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:182\nmsgid \"Release 0.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:186\nmsgid \"These changes may break compatibility with previous versions.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:188\nmsgid \"The built-in Key/Value database is not available anymore. It is marked deprecated since 0.6.4\"\nmsgstr \"\"\n\n#: ../../changelog.rst:189\nmsgid \"The Route syntax and behaviour changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:191\nmsgid \"Regular expressions must be encapsulated with ``#``. In 0.6 all non-alphanumeric characters not present in the regular expression were allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:192\nmsgid \"Regular expressions not part of a route wildcard are escaped automatically. You don't have to escape dots or other regular control characters anymore. In 0.6 the whole URL was interpreted as a regular expression. You can use anonymous wildcards (``/index:#(\\\\.html)?#``) to achieve a similar behaviour.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:194\nmsgid \"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:195\nmsgid \"The :class:`SimpleTemplate` engine escapes HTML special characters in ``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` syntax to get old behaviour (no escaping).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:196\nmsgid \"The :class:`SimpleTemplate` engine returns unicode strings instead of lists of byte strings.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:197\nmsgid \"``bottle.optimize()`` and the automatic route optimization is obsolete.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:198\nmsgid \"Some functions and attributes were renamed:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:200\nmsgid \":attr:`Request._environ` is now :attr:`Request.environ`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:201\nmsgid \":attr:`Response.header` is now :attr:`Response.headers`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:202\nmsgid \":func:`default_app` is obsolete. Use :func:`app` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:204\nmsgid \"The default :func:`redirect` code changed from 307 to 303.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:205\nmsgid \"Removed support for ``@default``. Use ``@error(404)`` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:209\nmsgid \"New features\"\nmsgstr \"\"\n\n#: ../../changelog.rst:210\nmsgid \"This is an incomplete list of new features and improved functionality.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:212\nmsgid \"The :class:`Request` object got new properties: :attr:`Request.body`, :attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, :attr:`Request.forms`, :attr:`Request.files`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:213\nmsgid \"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are now able to encode and decode python objects. This is called a *secure cookie* because the encoded values are signed and protected from changes on client side. All pickle-able data structures are allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:214\nmsgid \"The new :class:`Router` class drastically improves performance for setups with lots of dynamic routes and supports named routes (named route + dict = URL string).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:215\nmsgid \"It is now possible (and recommended) to return :exc:`HTTPError` and :exc:`HTTPResponse` instances or other exception objects instead of raising them.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:216\nmsgid \"The new function :func:`static_file` equals :func:`send_file` but returns a :exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. :func:`send_file` is deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:217\nmsgid \"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:218\nmsgid \"The :class:`SimpleTemplate` engine got full unicode support.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:219\nmsgid \"Lots of non-critical bugfixes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:225\nmsgid \"Contributors\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:1\nmsgid \"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:3\nmsgid \"Thanks to all the people who found bugs, sent patches, spread the word, helped each other on the mailing-list and made this project possible. I hope the following (alphabetically sorted) list is complete. If you miss your name on that list (or want your name removed) please :doc:`tell me <contact>` or add it yourself.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:5\nmsgid \"acasajus\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:6\nmsgid \"Adam R. Smith\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:7\nmsgid \"Alexey Borzenkov\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:8\nmsgid \"Alexis Daboville\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:9\nmsgid \"Anton I. Sipos\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:10\nmsgid \"Anton Kolechkin\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:11\nmsgid \"apexi200sx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:12\nmsgid \"apheage\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:13\nmsgid \"BillMa\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:14\nmsgid \"Brad Greenlee\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:15\nmsgid \"Brandon Gilmore\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:16\nmsgid \"Branko Vukelic\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:17\nmsgid \"Brian Sierakowski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:18\nmsgid \"Brian Wickman\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:19\nmsgid \"Carl Scharenberg\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:20\nmsgid \"Damien Degois\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:21\nmsgid \"David Buxton\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:22\nmsgid \"Duane Johnson\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:23\nmsgid \"fcamel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:24\nmsgid \"Frank Murphy\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:25\nmsgid \"Frederic Junod\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:26\nmsgid \"goldfaber3012\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:27\nmsgid \"Greg Milby\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:28\nmsgid \"gstein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:29\nmsgid \"Ian Davis\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:30\nmsgid \"Itamar Nabriski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:31\nmsgid \"Iuri de Silvio\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:32\nmsgid \"Jaimie Murdock\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:33\nmsgid \"Jeff Nichols\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:34\nmsgid \"Jeremy Kelley\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:35\nmsgid \"joegester\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:36\nmsgid \"Johannes Krampf\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:37\nmsgid \"Jonas Haag\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:38\nmsgid \"Joshua Roesslein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:39\nmsgid \"Judson Neer\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:40\nmsgid \"Karl\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:41\nmsgid \"Kevin Zuber\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:42\nmsgid \"Kraken\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:43\nmsgid \"Kyle Fritz\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:44\nmsgid \"m35\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:45\nmsgid \"Marcos Neves\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:46\nmsgid \"masklinn\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:47\nmsgid \"Michael Labbe\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:48\nmsgid \"Michael Soulier\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:49\nmsgid \"`reddit <http://reddit.com/r/python>`_\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:50\nmsgid \"Nicolas Vanhoren\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:51\nmsgid \"Oz N Tiram\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:52\nmsgid \"Robert Rollins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:53\nmsgid \"rogererens\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:54\nmsgid \"rwxrwx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:55\nmsgid \"Santiago Gala\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:56\nmsgid \"Sean M. Collins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:57\nmsgid \"Sebastian Wollrath\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:58\nmsgid \"Seth\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:59\nmsgid \"Sigurd Høgsbro\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:60\nmsgid \"Stuart Rackham\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:61\nmsgid \"Sun Ning\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:62\nmsgid \"Tomás A. Schertel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:63\nmsgid \"Tristan Zajonc\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:64\nmsgid \"voltron\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:65\nmsgid \"Wieland Hoffmann\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:66\nmsgid \"zombat\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:67\nmsgid \"Thiago Avelino\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/configuration.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../configuration.rst:3\nmsgid \"Configuration (DRAFT)\"\nmsgstr \"\"\n\n#: ../../configuration.rst:8\nmsgid \"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_ what you think.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:10\nmsgid \"Bottle applications can store their configuration in :attr:`Bottle.config`, a dict-like object and central place for application specific settings. This dictionary controls many aspects of the framework, tells (newer) plugins what to do, and can be used to store your own configuration as well.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:13\nmsgid \"Configuration Basics\"\nmsgstr \"\"\n\n#: ../../configuration.rst:15\nmsgid \"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. All the common dict methods work as expected. Let us start with some examples::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:44\nmsgid \"The app object is not always available, but as long as you are within a request context, you can use the `request` object to get the current application and its configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:51\nmsgid \"Naming Convention\"\nmsgstr \"\"\n\n#: ../../configuration.rst:53\nmsgid \"To make life easier, plugins and applications should follow some simple rules when it comes to config parameter names:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:55\nmsgid \"All keys should be lowercase strings and follow the rules for python identifiers (no special characters but the underscore).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:56\nmsgid \"Namespaces are separated by dots (e.g. ``namespace.field`` or ``namespace.subnamespace.field``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:57\nmsgid \"Bottle uses the root namespace for its own configuration. Plugins should store all their variables in their own namespace (e.g. ``sqlite.db`` or ``werkzeug.use_debugger``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:58\nmsgid \"Your own application should use a separate namespace (e.g. ``myapp.*``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:62\nmsgid \"Loading Configuration from a File\"\nmsgstr \"\"\n\n#: ../../configuration.rst:66\nmsgid \"Configuration files are useful if you want to enable non-programmers to configure your application, or just don't want to hack python module files just to change the database port. A very common syntax for configuration files is shown here:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:78\nmsgid \"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style configuration files from disk and import their values into your existing configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:85\nmsgid \"Loading Configuration from a python module\"\nmsgstr \"\"\n\n#: ../../configuration.rst:89\nmsgid \"Loading configuration from a Python module is a common pattern for Python programs and frameworks. Bottle assumes that configuration keys are all upper case:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:98\nmsgid \"You can load the this Python module with :met:`ConfigDict.load_module`::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:107\nmsgid \"Note the second parameter to disable loading as namespaced items as in :meth:`ConfigDict.load_dict`. By default, loading from a Python module will call this method, unless you specifically call this method with `False` as the second argument.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:110\nmsgid \"Loading Configuration from a nested :class:`dict`\"\nmsgstr \"\"\n\n#: ../../configuration.rst:114\nmsgid \"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an entire structure of nested dictionaries and turns it into a flat list of keys and values with namespaced keys::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:135\nmsgid \"Listening to configuration changes\"\nmsgstr \"\"\n\n#: ../../configuration.rst:139\nmsgid \"The ``config`` hook on the application object is triggered each time a value in :attr:`Bottle.config` is changed. This hook can be used to react on configuration changes at runtime, for example reconnect to a new database, change the debug settings on a background service or resize worker thread pools. The hook callback receives two arguments (key, new_value) and is called before the value is actually changed in the dictionary. Raising an exception from a hook callback cancels the change and the old value is preserved.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:148\nmsgid \"The hook callbacks cannot *change* the value that is to be stored to the dictionary. That is what filters are for.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:154\nmsgid \"Filters and other Meta Data\"\nmsgstr \"\"\n\n#: ../../configuration.rst:158\nmsgid \":class:`ConfigDict` allows you to store meta data along with configuration keys. Two meta fields are currently defined:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:162\nmsgid \"help\"\nmsgstr \"\"\n\n#: ../../configuration.rst:161\nmsgid \"A help or description string. May be used by debugging, introspection or admin tools to help the site maintainer configuring their application.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"filter\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"A callable that accepts and returns a single value. If a filter is defined for a key, any new value stored to that key is first passed through the filter callback. The filter can be used to cast the value to a different type, check for invalid values (throw a ValueError) or trigger side effects.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:167\nmsgid \"This feature is most useful for plugins. They can validate their config parameters or trigger side effects using filters and document their configuration via ``help`` fields::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:189\nmsgid \"API Documentation\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict:1\nmsgid \"A dict-like configuration storage with additional support for namespaces, validators, meta-data, overlays and more.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict:4\nmsgid \"This dict-like class is heavily optimized for read access. All read-only methods as well as item access should be as fast as the built-in dict.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_module:1\nmsgid \"Load values from a Python module.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_module:3\nmsgid \"Example modue ``config.py``::\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_module:0\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_config:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_module:17\nmsgid \"If true (default), dictionary values are assumed to represent namespaces (see :meth:`load_dict`).\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_config:1\nmsgid \"Load values from an ``*.ini`` style config file.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_config:3\nmsgid \"A configuration file consists of sections, each led by a ``[section]`` header, followed by key/value entries separated by either ``=`` or ``:``. Section names and keys are case-insensitive. Leading and trailing whitespace is removed from keys and values. Values can be omitted, in which case the key/value delimiter may also be left out. Values can also span multiple lines, as long as they are indented deeper than the first line of the value. Commands are prefixed by ``#`` or ``;`` and may only appear on their own on an otherwise empty line.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_config:13\nmsgid \"Both section and key names may contain dots (``.``) as namespace separators. The actual configuration parameter name is constructed by joining section name and key name together and converting to lower case.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_config:18\nmsgid \"The special sections ``bottle`` and ``ROOT`` refer to the root namespace and the ``DEFAULT`` section defines default values for all other sections.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_config:22\nmsgid \"With Python 3, extended string interpolation is enabled.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_config:24\nmsgid \"The path of a config file, or a list of paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_config:25\nmsgid \"All keyword parameters are passed to the underlying :class:`python:configparser.ConfigParser` constructor call.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.load_dict:1\nmsgid \"Load values from a dictionary structure. Nesting can be used to represent namespaces.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.update:1\nmsgid \"If the first parameter is a string, all keys are prefixed with this namespace. Apart from that it works just as the usual dict.update().\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.setdefault:1\nmsgid \"Insert key with a value of default if key is not in the dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.setdefault:3\nmsgid \"Return the value for key if key is in the dictionary, else default.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.meta_get:1\nmsgid \"Return the value of a meta field for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.meta_set:1\nmsgid \"Set the meta field for a key to a new value.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.ConfigDict.meta_list:1\nmsgid \"Return an iterable of meta field names defined for a key.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/contact.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../contact.rst:3\nmsgid \"Contact\"\nmsgstr \"\"\n\n#: ../../contact.rst:6\nmsgid \"About the Author\"\nmsgstr \"\"\n\n#: ../../contact.rst:7\nmsgid \"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy behind this website. I'm 27 years old and studying computer science at the Georg-August-University in Göttingen, Germany. Python is my favorite language, but I also code in ruby and JavaScript a lot. Watch me on `twitter <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub <http://github.com/defnull>`_ to get in contact. A `mailinglist <http://groups.google.de/group/bottlepy>`_ is open for Bottle related questions, too.\"\nmsgstr \"\"\n\n#: ../../contact.rst:10\nmsgid \"About Bottle\"\nmsgstr \"\"\n\n#: ../../contact.rst:11\nmsgid \"This is my first open source project so far. It started and a small experiment but soon got so much positive feedback I decided to make something real out of it. Here it is.\"\nmsgstr \"\"\n\n#: ../../contact.rst:14\nmsgid \"Impressum und Kontaktdaten\"\nmsgstr \"\"\n\n#: ../../contact.rst:15\nmsgid \"(This is required by `German law <http://bundesrecht.juris.de/tmg/__5.html>`_)\"\nmsgstr \"\"\n\n#: ../../contact.rst:17\nmsgid \"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist ausdrücklich untersagt.\"\nmsgstr \"\"\n\n#: ../../contact.rst:22\nmsgid \"**Betreiber**: Marcel Hellkamp\"\nmsgstr \"\"\n\n#: ../../contact.rst:23\nmsgid \"**Ort**: D - 37075 Göttingen\"\nmsgstr \"\"\n\n#: ../../contact.rst:24\nmsgid \"**Strasse**: Theodor-Heuss Strasse 13\"\nmsgstr \"\"\n\n#: ../../contact.rst:25\nmsgid \"**Telefon**: +49 (0) 551 20005915\"\nmsgstr \"\"\n\n#: ../../contact.rst:26\nmsgid \"**E-Mail**: marc at gsites dot de\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/deployment.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../deployment.rst:27\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../deployment.rst:29\nmsgid \"The bottle :func:`run` function, when called without any parameters, starts a local development server on port 8080. You can access and test your application via http://localhost:8080/ if you are on the same host.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:31\nmsgid \"To get your application available to the outside world, specify the IP the server should listen to (e.g. ``run(host='192.168.0.1')``) or let the server listen to all interfaces at once (e.g. ``run(host='0.0.0.0')``). The listening port can be changed in a similar way, but you need root or admin rights to choose a port below 1024. Port 80 is the standard for HTTP servers::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:37\nmsgid \"Server Options\"\nmsgstr \"\"\n\n#: ../../deployment.rst:39\nmsgid \"The built-in default server is based on `wsgiref WSGIServer <http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine for development, but may become a performance bottleneck when server load increases. There are three ways to eliminate this bottleneck:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:41\nmsgid \"Use a different server that is either multi-threaded or supports asynchronous IO.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:42\nmsgid \"Start multiple server processes and spread the load with a load-balancer.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:43\nmsgid \"Do both.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:45\nmsgid \"**Multi-threaded** servers are the 'classic' way to do it. They are very robust, reasonably fast and easy to manage. As a drawback, they can only handle a limited number of connections at the same time and utilize only one CPU core due to the \\\"Global Interpreter Lock\\\" (GIL) of the Python runtime. This does not hurt most applications, they are waiting for network IO most of the time anyway, but may slow down CPU intensive tasks (e.g. image processing).\"\nmsgstr \"\"\n\n#: ../../deployment.rst:47\nmsgid \"**Asynchronous IO** servers are very fast, can handle a virtually unlimited number of concurrent connections and are easy to manage. To take full advantage of their potential, you need to design your application accordingly and understand the concepts of the specific server.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:49\nmsgid \"**Multi-processing** (forking) servers are not limited by the GIL and utilize more than one CPU core, but make communication between server instances more expensive. You need a database or external message query to share state between processes, or design your application so that it does not need any shared state. The setup is also a bit more complicated, but there are good tutorials available.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:52\nmsgid \"Switching the Server Backend\"\nmsgstr \"\"\n\n#: ../../deployment.rst:54\nmsgid \"The easiest way to increase performance is to install a multi-threaded server library like paste_ or cherrypy_ and tell Bottle to use that instead of the single-threaded default server::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:58\nmsgid \"Bottle ships with a lot of ready-to-use adapters for the most common WSGI servers and automates the setup process. Here is an incomplete list:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Name\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Homepage\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"cgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"Run as CGI script\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"Run as FastCGI process\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"Helper for Google App Engine deployments\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"Single-threaded default server\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"Multi-threaded and very stable\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"Multi-threaded, stable, tried and tested\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"Multi-threaded, poweres Pyramid\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"Pre-forked, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"Asynchronous framework with WSGI support.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\n#: ../../deployment.rst:73\nmsgid \"Asynchronous (greenlets)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"Asynchronous, powers some parts of Facebook\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"Asynchronous, well tested but... twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"Asynchronous, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"Asynchronous, very fast and written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"auto\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"Automatically selects an available server adapter\"\nmsgstr \"\"\n\n#: ../../deployment.rst:81\nmsgid \"The full list is available through :data:`server_names`.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:83\nmsgid \"If there is no adapter for your favorite server or if you need more control over the server setup, you may want to start the server manually. Refer to the server documentation on how to run WSGI applications. Here is an example for paste_::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:91\nmsgid \"Apache mod_wsgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:93\nmsgid \"Instead of running your own HTTP server from within Bottle, you can attach Bottle applications to an `Apache server <apache>`_ using mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:95\nmsgid \"All you need is an ``app.wsgi`` file that provides an ``application`` object. This object is used by mod_wsgi to start your application and should be a WSGI-compatible Python callable.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:97\nmsgid \"File ``/var/www/yourapp/app.wsgi``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:108\nmsgid \"The Apache configuration may look like this::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:126\nmsgid \"uWSGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:128\nmsgid \"uWSGI_ is a modern alternative to FastCGI and the recommended deployment option on servers like nginx_, lighttpd_, and cherokee_. The uWSGI project provides an application server that runs your application, and defines a protocol that frontend webservers can speak to. Have a look at the excellent `Quickstart for Python/WSGI applications <https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html>`_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:132\nmsgid \"Google AppEngine\"\nmsgstr \"\"\n\n#: ../../deployment.rst:136\nmsgid \"New App Engine applications using the Python 2.7 runtime environment support any WSGI application and should be configured to use the Bottle application object directly. For example suppose your application's main module is ``myapp.py``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:146\nmsgid \"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object like so::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:158\nmsgid \"It is always a good idea to let GAE serve static files directly. Here is example for a working  ``app.yaml`` (using the legacy Python 2.5 runtime environment)::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:175\nmsgid \"Load Balancer (Manual Setup)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:177\nmsgid \"A single Python process can utilize only one CPU at a time, even if there are more CPU cores available. The trick is to balance the load between multiple independent Python processes to utilize all of your CPU cores.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:179\nmsgid \"Instead of a single Bottle application server, you start one instance for each CPU core available using different local port (localhost:8080, 8081, 8082, ...). You can choose any server adapter you want, even asynchronous ones. Then a high performance load balancer acts as a reverse proxy and forwards each new requests to a random port, spreading the load between all available back-ends. This way you can use all of your CPU cores and even spread out the load between different physical servers.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:181\nmsgid \"One of the fastest load balancers available is Pound_ but most common web servers have a proxy-module that can do the work just fine.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:183\nmsgid \"Pound example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:201\nmsgid \"Apache example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:209\nmsgid \"Lighttpd example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:221\nmsgid \"Good old CGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:223\nmsgid \"A CGI server starts a new process for each request. This adds a lot of overhead but is sometimes the only option, especially on cheap hosting packages. The `cgi` server adapter does not actually start a CGI server, but transforms your bottle application into a valid CGI application::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/development.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../development.rst:2\nmsgid \"Developer Notes\"\nmsgstr \"\"\n\n#: ../../development.rst:4\nmsgid \"This document is intended for developers and package maintainers interested in the bottle development and release workflow. If you want to contribute, you are just right!\"\nmsgstr \"\"\n\n#: ../../development.rst:8\nmsgid \"Get involved\"\nmsgstr \"\"\n\n#: ../../development.rst:10\nmsgid \"There are several ways to join the community and stay up to date. Here are some of them:\"\nmsgstr \"\"\n\n#: ../../development.rst:12\nmsgid \"**Mailing list**: Join our mailing list by sending an email to `bottlepy+subscribe@googlegroups.com <mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required).\"\nmsgstr \"\"\n\n#: ../../development.rst:13\nmsgid \"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag.\"\nmsgstr \"\"\n\n#: ../../development.rst:14\nmsgid \"**IRC**: Join `#bottlepy on irc.freenode.net <irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface <http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:15\nmsgid \"**Google plus**: We sometimes `blog about Bottle, releases and technical stuff <https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_ on our Google+ page.\"\nmsgstr \"\"\n\n#: ../../development.rst:19\nmsgid \"Get the Sources\"\nmsgstr \"\"\n\n#: ../../development.rst:21\nmsgid \"The bottle `development repository <https://github.com/bottlepy/bottle>`_ and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan to contribute, it is a good idea to create an account there and fork the main repository. This way your changes and ideas are visible to other developers and can be discussed openly. Even without an account, you can clone the repository or just download the latest development version as a source archive.\"\nmsgstr \"\"\n\n#: ../../development.rst:23\nmsgid \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:24\nmsgid \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:25\nmsgid \"**Download:** Development branch as `tar archive <http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file <http://github.com/bottlepy/bottle/zipball/master>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:26\nmsgid \"**Translations:** `transifex.com/projects/p/bottle <https://www.transifex.com/projects/p/bottle/>`_\"\nmsgstr \"\"\n\n#: ../../development.rst:30\nmsgid \"Releases and Updates\"\nmsgstr \"\"\n\n#: ../../development.rst:32\nmsgid \"Bottle is released at irregular intervals and distributed through `PyPI <http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-revisions of outdated releases are only available from the git repository mentioned above. Some Linux distributions may offer packages for outdated releases, though.\"\nmsgstr \"\"\n\n#: ../../development.rst:34\nmsgid \"The Bottle version number splits into three parts (**major.minor.revision**). These are *not* used to promote new features but to indicate important bug-fixes and/or API changes. Critical bugs are fixed in at least the two latest minor releases and announced in all available channels (mailinglist, twitter, github). Non-critical bugs or features are not guaranteed to be backported. This may change in the future, through.\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"Major Release (x.0)\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"The major release number is increased on important milestones or updates that completely break backward compatibility. You probably have to work over your entire application to use a new release. These releases are very rare, through.\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"Minor Release (x.y)\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"The minor release number is increased on updates that change the API or behaviour in some way. You might get some depreciation warnings any may have to tweak some configuration settings to restore the old behaviour, but in most cases these changes are designed to be backward compatible for at least one minor release. You should update to stay up do date, but don't have to. An exception is 0.8, which *will* break backward compatibility hard. (This is why 0.7 was skipped). Sorry about that.\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"Revision (x.y.z)\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"The revision number is increased on bug-fixes and other patches that do not change the API or behaviour. You can safely update without editing your application code. In fact, you really should as soon as possible, because important security fixes are released this way.\"\nmsgstr \"\"\n\n#: ../../development.rst:47\nmsgid \"Pre-Release Versions\"\nmsgstr \"\"\n\n#: ../../development.rst:46\nmsgid \"Release candidates are marked by an ``rc`` in their revision number. These are API stable most of the time and open for testing, but not officially released yet. You should not use these for production.\"\nmsgstr \"\"\n\n#: ../../development.rst:50\nmsgid \"Repository Structure\"\nmsgstr \"\"\n\n#: ../../development.rst:52\nmsgid \"The source repository is structured as follows:\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"``master`` branch\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"This is the integration, testing and development branch. All changes that are planned to be part of the next release are merged and tested here.\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"``release-x.y`` branches\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"As soon as the master branch is (almost) ready for a new release, it is branched into a new release branch. This \\\"release candidate\\\" is feature-frozen but may receive bug-fixes and last-minute changes until it is considered production ready and officially released. From that point on it is called a \\\"support branch\\\" and still receives bug-fixes, but only important ones. The revision number is increased on each push to these branches, so you can keep up with important changes.\"\nmsgstr \"\"\n\n#: ../../development.rst:62\nmsgid \"Feature branches\"\nmsgstr \"\"\n\n#: ../../development.rst:61\nmsgid \"All other branches are feature branches. These are based on the master branch and only live as long as they are still active and not merged back into ``master``.\"\nmsgstr \"\"\n\n#: ../../development.rst:65\nmsgid \"What does this mean for a developer?\"\nmsgstr \"\"\n\n#: ../../development.rst:66\nmsgid \"If you want to add a feature, create a new branch from ``master``. If you want to fix a bug, branch ``release-x.y`` for each affected release. Please use a separate branch for each feature or bug to make integration as easy as possible. Thats all. There are git workflow examples at the bottom of this page.\"\nmsgstr \"\"\n\n#: ../../development.rst:68\nmsgid \"Oh, and never ever change the release number. We'll do that on integration. You never know in which order we pull pending requests anyway :)\"\nmsgstr \"\"\n\n#: ../../development.rst:72\nmsgid \"What does this mean for a maintainer ?\"\nmsgstr \"\"\n\n#: ../../development.rst:73\nmsgid \"Watch the tags (and the mailing list) for bug-fixes and new releases. If you want to fetch a specific release from the git repository, trust the tags, not the branches. A branch may contain changes that are not released yet, but a tag marks the exact commit which changed the version number.\"\nmsgstr \"\"\n\n#: ../../development.rst:77\nmsgid \"Submitting Patches\"\nmsgstr \"\"\n\n#: ../../development.rst:79\nmsgid \"The best way to get your changes integrated into the main development branch is to fork the main repository at github, create a new feature-branch, apply your changes and send a pull-request. Further down this page is a small collection of git workflow examples that may guide you. Submitting git-compatible patches to the mailing list is fine too. In any case, please follow some basic rules:\"\nmsgstr \"\"\n\n#: ../../development.rst:81\nmsgid \"**Documentation:** Tell us what your patch does. Comment your code. If you introduced a new feature, add to the documentation so others can learn about it.\"\nmsgstr \"\"\n\n#: ../../development.rst:82\nmsgid \"**Test:** Write tests to prove that your code works as expected and does not break anything. If you fixed a bug, write at least one test-case that triggers the bug. Make sure that all tests pass before you submit a patch.\"\nmsgstr \"\"\n\n#: ../../development.rst:83\nmsgid \"**One patch at a time:** Only fix one bug or add one feature at a time. Design your patches so that they can be applyed as a whole. Keep your patches clean, small and focused.\"\nmsgstr \"\"\n\n#: ../../development.rst:84\nmsgid \"**Sync with upstream:** If the ``upstream/master`` branch changed while you were working on your patch, rebase or pull to make sure that your patch still applies without conflicts.\"\nmsgstr \"\"\n\n#: ../../development.rst:88\nmsgid \"Building the Documentation\"\nmsgstr \"\"\n\n#: ../../development.rst:90\nmsgid \"You need a recent version of Sphinx to build the documentation. The recommended way is to install :command:`virtualenv` using your distribution package repository and install sphinx manually to get an up-to-date version.\"\nmsgstr \"\"\n\n#: ../../development.rst:121\nmsgid \"GIT Workflow Examples\"\nmsgstr \"\"\n\n#: ../../development.rst:123\nmsgid \"The following examples assume that you have an (free) `github account <https://github.com>`_. This is not mandatory, but makes things a lot easier.\"\nmsgstr \"\"\n\n#: ../../development.rst:125\nmsgid \"First of all you need to create a fork (a personal clone) of the official repository. To do this, you simply click the \\\"fork\\\" button on the `bottle project page <https://github.com/bottlepy/bottle>`_. When the fork is done, you will be presented with a short introduction to your new repository.\"\nmsgstr \"\"\n\n#: ../../development.rst:127\nmsgid \"The fork you just created is hosted at github and read-able by everyone, but write-able only by you. Now you need to clone the fork locally to actually make changes to it. Make sure you use the private (read-write) URL and *not* the public (read-only) one::\"\nmsgstr \"\"\n\n#: ../../development.rst:131\nmsgid \"Once the clone is complete your repository will have a remote named \\\"origin\\\" that points to your fork on github. Don’t let the name confuse you, this does not point to the original bottle repository, but to your own fork. To keep track of the official repository, add another remote named \\\"upstream\\\"::\"\nmsgstr \"\"\n\n#: ../../development.rst:137\nmsgid \"Note that \\\"upstream\\\" is a public clone URL, which is read-only. You cannot push changes directly to it. Instead, we will pull from your public repository. This is described later.\"\nmsgstr \"\"\n\n#: ../../development.rst:140\nmsgid \"Submit a Feature\"\nmsgstr \"\"\n\n#: ../../development.rst:141\nmsgid \"New features are developed in separate feature-branches to make integration easy. Because they are going to be integrated into the ``master`` branch, they must be based on ``upstream/master``. To create a new feature-branch, type the following::\"\nmsgstr \"\"\n\n#: ../../development.rst:145\nmsgid \"Now implement your feature, write tests, update the documentation, make sure that all tests pass and commit your changes::\"\nmsgstr \"\"\n\n#: ../../development.rst:149\nmsgid \"If the ``upstream/master`` branch changed in the meantime, there may be conflicts with your changes. To solve these, 'rebase' your feature-branch onto the top of the updated ``upstream/master`` branch::\"\nmsgstr \"\"\n\n#: ../../development.rst:154\nmsgid \"This is equivalent to undoing all your changes, updating your branch to the latest version and reapplying all your patches again. If you released your branch already (see next step), this is not an option because it rewrites your history. You can do a normal pull instead. Resolve any conflicts, run the tests again and commit.\"\nmsgstr \"\"\n\n#: ../../development.rst:156\nmsgid \"Now you are almost ready to send a pull request. But first you need to make your feature-branch public by pushing it to your github fork::\"\nmsgstr \"\"\n\n#: ../../development.rst:160\nmsgid \"After you’ve pushed your commit(s) you need to inform us about the new feature. One way is to send a pull-request using github. Another way would be to start a thread in the mailing-list, which is recommended. It allows other developers to see and discuss your patches and you get some feedback for free :)\"\nmsgstr \"\"\n\n#: ../../development.rst:162\nmsgid \"If we accept your patch, we will integrate it into the official development branch and make it part of the next release.\"\nmsgstr \"\"\n\n#: ../../development.rst:165\nmsgid \"Fix a Bug\"\nmsgstr \"\"\n\n#: ../../development.rst:166\nmsgid \"The workflow for bug-fixes is very similar to the one for features, but there are some differences:\"\nmsgstr \"\"\n\n#: ../../development.rst:168\nmsgid \"Branch off of the affected release branches instead of just the development branch.\"\nmsgstr \"\"\n\n#: ../../development.rst:169\nmsgid \"Write at least one test-case that triggers the bug.\"\nmsgstr \"\"\n\n#: ../../development.rst:170\nmsgid \"Do this for each affected branch including ``upstream/master`` if it is affected. ``git cherry-pick`` may help you reducing repetitive work.\"\nmsgstr \"\"\n\n#: ../../development.rst:171\nmsgid \"Name your branch after the release it is based on to avoid confusion. Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/faq.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../faq.rst:10\nmsgid \"Frequently Asked Questions\"\nmsgstr \"\"\n\n#: ../../faq.rst:13\nmsgid \"About Bottle\"\nmsgstr \"\"\n\n#: ../../faq.rst:16\nmsgid \"Is bottle suitable for complex applications?\"\nmsgstr \"\"\n\n#: ../../faq.rst:18\nmsgid \"Bottle is a *micro* framework designed for prototyping and building small web applications and services. It stays out of your way and allows you to get things done fast, but misses some advanced features and ready-to-use solutions found in other frameworks (MVC, ORM, form validation, scaffolding, XML-RPC). Although it *is* possible to add these features and build complex applications with Bottle, you should consider using a full-stack Web framework like pylons_ or paste_ instead.\"\nmsgstr \"\"\n\n#: ../../faq.rst:22\nmsgid \"Common Problems and Pitfalls\"\nmsgstr \"\"\n\n#: ../../faq.rst:29\nmsgid \"\\\"Template Not Found\\\" in mod_wsgi/mod_python\"\nmsgstr \"\"\n\n#: ../../faq.rst:31\nmsgid \"Bottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ or mod_wsgi_ environment, the working directory (``./``) depends on your Apache settings. You should add an absolute path to the template search path::\"\nmsgstr \"\"\n\n#: ../../faq.rst:35\nmsgid \"so bottle searches the right paths.\"\nmsgstr \"\"\n\n#: ../../faq.rst:38\nmsgid \"Dynamic Routes and Slashes\"\nmsgstr \"\"\n\n#: ../../faq.rst:40\nmsgid \"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder token (``<name>``) matches everything up to the next slash. This equals to ``[^/]+`` in regular expression syntax. To accept slashes too, you have to add a custom regular pattern to the placeholder. An example: ``/images/<filepath:path>`` would match ``/images/icons/error.png`` but ``/images/<filename>`` won't.\"\nmsgstr \"\"\n\n#: ../../faq.rst:43\nmsgid \"Problems with reverse proxies\"\nmsgstr \"\"\n\n#: ../../faq.rst:45\nmsgid \"Redirects and url-building only works if bottle knows the public address and location of your application. If you run bottle locally behind a reverse proxy or load balancer, some information might get lost along the way. For example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect the local request by your proxy, not the real request by the client. Here is a small WSGI middleware snippet that helps to fix these values::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/index.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../index.rst:20\nmsgid \"Bottle: Python Web Framework\"\nmsgstr \"\"\n\n#: ../../index.rst:22\nmsgid \"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_. It is distributed as a single file module and has no dependencies other than the `Python Standard Library <http://docs.python.org/library/>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:25\nmsgid \"**Routing:** Requests to function-call mapping with support for clean and  dynamic URLs.\"\nmsgstr \"\"\n\n#: ../../index.rst:26\nmsgid \"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-templates>` and support for mako_, jinja2_ and cheetah_ templates.\"\nmsgstr \"\"\n\n#: ../../index.rst:27\nmsgid \"**Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.\"\nmsgstr \"\"\n\n#: ../../index.rst:28\nmsgid \"**Server:** Built-in HTTP development server and support for paste_, bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server.\"\nmsgstr \"\"\n\n#: ../../index.rst:31\nmsgid \"Example: \\\"Hello World\\\" in a bottle\"\nmsgstr \"\"\n\n#: ../../index.rst:42\nmsgid \"Run this script or paste it into a Python console, then point your browser to `<http://localhost:8080/hello/world>`_. That's it.\"\nmsgstr \"\"\n\n#: ../../index.rst:45\nmsgid \"Download and Install\"\nmsgstr \"\"\n\n#: ../../index.rst:48\nmsgid \"Install the latest stable release with ``pip install bottle`` or download `bottle.py`__ (unstable) into your project directory. There are no hard [1]_ dependencies other than the Python standard library. Bottle supports **Python 2.7 and Python 3**.\"\nmsgstr \"\"\n\n#: ../../index.rst:50\nmsgid \"Support for Python 2.5 and 2.6 was dropped with this release.\"\nmsgstr \"\"\n\n#: ../../index.rst:55\nmsgid \"User's Guide\"\nmsgstr \"\"\n\n#: ../../index.rst:56\nmsgid \"Start here if you want to learn how to use the bottle framework for web development. If you have any questions not answered here, feel free to ask the `mailing list <mailto:bottlepy@googlegroups.com>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:71\nmsgid \"Knowledge Base\"\nmsgstr \"\"\n\n#: ../../index.rst:72\nmsgid \"A collection of articles, guides and HOWTOs.\"\nmsgstr \"\"\n\n#: ../../index.rst:84\nmsgid \"Development and Contribution\"\nmsgstr \"\"\n\n#: ../../index.rst:86\nmsgid \"These chapters are intended for developers interested in the bottle development and release workflow.\"\nmsgstr \"\"\n\n#: ../../index.rst:103\nmsgid \"License\"\nmsgstr \"\"\n\n#: ../../index.rst:105\nmsgid \"Code and documentation are available according to the MIT License:\"\nmsgstr \"\"\n\n#: ../../index.rst:110\nmsgid \"The Bottle logo however is *NOT* covered by that license. It is allowed to use the logo as a link to the bottle homepage or in direct context with the unmodified library. In all other cases please ask first.\"\nmsgstr \"\"\n\n#: ../../index.rst:115\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../index.rst:116\nmsgid \"Usage of the template or server adapter classes requires the corresponding template or server modules.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/plugindev.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../plugindev.rst:6\nmsgid \"Plugin Development Guide\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:8\nmsgid \"This guide explains the plugin API and how to write custom plugins. I suggest reading :ref:`plugins` first if you have not done that already. You might also want to have a look at the :doc:`/plugins/index` for some practical examples.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:12\nmsgid \"This is a draft. If you see any errors or find that a specific part is not explained clear enough, please tell the `mailing-list <mailto:bottlepy@googlegroups.com>`_ or file a `bug report <https://github.com/bottlepy/bottle/issues>`_.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:16\nmsgid \"How Plugins Work: The Basics\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:18\nmsgid \"The plugin API builds on the concept of `decorators <http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, a plugin is a decorator applied to every single route callback of an application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:20\nmsgid \"This is just a simplification. Plugins can do a lot more than just decorating route callbacks, but it is a good starting point. Lets have a look at some code::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:36\nmsgid \"This plugin measures the execution time for each request and adds an appropriate ``X-Exec-Time`` header to the response. As you can see, the plugin returns a wrapper and the wrapper calls the original callback recursively. This is how decorators usually work.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:38\nmsgid \"The last line tells Bottle to install the plugin to the default application. This causes the plugin to be automatically applied to all routes of that application. In other words, ``stopwatch()`` is called once for each route callback and the return value is used as a replacement for the original callback.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:40\nmsgid \"Plugins are applied on demand, that is, as soon as a route is requested for the first time. For this to work properly in multi-threaded environments, the plugin should be thread-safe. This is not a problem most of the time, but keep it in mind.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:42\nmsgid \"Once all plugins are applied to a route, the wrapped callback is cached and subsequent requests are handled by the cached version directly. This means that a plugin is usually applied only once to a specific route. That cache, however, is cleared every time the list of installed plugins changes. Your plugin should be able to decorate the same route more than once.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:44\nmsgid \"The decorator API is quite limited, though. You don't know anything about the route being decorated or the associated application object and have no way to efficiently store data that is shared among all routes. But fear not! Plugins are not limited to just decorator functions. Bottle accepts anything as a plugin as long as it is callable or implements an extended API. This API is described below and gives you a lot of control over the whole process.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:48\nmsgid \"Plugin API\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:50\nmsgid \":class:`Plugin` is not a real class (you cannot import it from :mod:`bottle`) but an interface that plugins are expected to implement. Bottle accepts any object of any type as a plugin, as long as it conforms to the following API.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:54\nmsgid \"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is defined, it is always preferred over calling the plugin directly. All other methods and attributes are optional.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:58\nmsgid \"Both :meth:`Bottle.uninstall` and the `skip` parameter of :meth:`Bottle.route()` accept a name string to refer to a plugin or plugin type. This works only for plugins that have a name attribute.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:62\nmsgid \"The Plugin API is still evolving. This integer attribute tells bottle which version to use. If it is missing, bottle defaults to the first version. The current version is ``2``. See :ref:`plugin-changelog` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:66\nmsgid \"Called as soon as the plugin is installed to an application (see :meth:`Bottle.install`). The only parameter is the associated application object.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:70\nmsgid \"As long as :meth:`apply` is not defined, the plugin itself is used as a decorator and applied directly to each route callback. The only parameter is the callback to decorate. Whatever is returned by this method replaces the original callback. If there is no need to wrap or replace a given callback, just return the unmodified callback parameter.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:74\nmsgid \"If defined, this method is used in favor of :meth:`__call__` to decorate route callbacks. The additional `route` parameter is an instance of :class:`Route` and provides a lot of meta-information and context for that route. See :ref:`route-context` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:78\nmsgid \"Called immediately before the plugin is uninstalled or the application is closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:81\nmsgid \"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for plugins that are applied directly to a route via the :meth:`Bottle.route()` decorator, but only for plugins installed to an application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:87\nmsgid \"Plugin API changes\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:89\nmsgid \"The Plugin API is still evolving and changed with Bottle 0.10 to address certain issues with the route context dictionary. To ensure backwards compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` attribute to tell bottle which API to use. The API differences are summarized here.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:91\nmsgid \"**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:93\nmsgid \"Original Plugin API as described in the 0.9 docs.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:95\nmsgid \"**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:97\nmsgid \"The `context` parameter of the :meth:`Plugin.apply` method is now an instance of :class:`Route` instead of a context dictionary.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:103\nmsgid \"The Route Context\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:105\nmsgid \"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed informations about the associated route. The most important attributes are summarized here:\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"app\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"The application object this route is installed to.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"rule\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"The rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"method\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"name\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"plugins\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"A list of route-specific plugins. These are applied in addition to application-wide plugins. (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"skiplist\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"A list of plugins to not apply to this route (again, see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"config\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"Additional keyword arguments passed to the :meth:`Bottle.route` decorator are stored in this dictionary. Used for route-specific configuration and meta-data.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:125\nmsgid \"For your plugin, :attr:`Route.config` is probably the most important attribute. Keep in mind that this dictionary is local to the route, but shared between all plugins. It is always a good idea to add a unique prefix or, if your plugin needs a lot of configuration, store it in a separate namespace within the `config` dictionary. This helps to avoid naming collisions between plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:129\nmsgid \"Changing the :class:`Route` object\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:131\nmsgid \"While some :class:`Route` attributes are mutable, changes may have unwanted effects on other plugins. It is most likely a bad idea to monkey-patch a broken route instead of providing a helpful error message and let the user fix the problem.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:133\nmsgid \"In some rare cases, however, it might be justifiable to break this rule. After you made your changes to the :class:`Route` instance, raise :exc:`RouteReset` as an exception. This removes the current route from the cache and causes all plugins to be re-applied. The router is not updated, however. Changes to `rule` or `method` values have no effect on the router, but only on plugins. This may change in the future, though.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:137\nmsgid \"Runtime optimizations\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:139\nmsgid \"Once all plugins are applied to a route, the wrapped route callback is cached to speed up subsequent requests. If the behavior of your plugin depends on configuration, and you want to be able to change that configuration at runtime, you need to read the configuration on each request. Easy enough.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:141\nmsgid \"For performance reasons, however, it might be worthwhile to choose a different wrapper based on current needs, work with closures, or enable or disable a plugin at runtime. Let's take the built-in HooksPlugin as an example: If no hooks are installed, the plugin removes itself from all affected routes and has virtually no overhead. As soon as you install the first hook, the plugin activates itself and takes effect again.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:143\nmsgid \"To achieve this, you need control over the callback cache: :meth:`Route.reset` clears the cache for a single route and :meth:`Bottle.reset` clears all caches for all routes of an application at once. On the next request, all plugins are re-applied to the route as if it were requested for the first time.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:145\nmsgid \"Both methods won't affect the current request if called from within a route callback, of cause. To force a restart of the current request, raise :exc:`RouteReset` as an exception.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:149\nmsgid \"Plugin Example: SQLitePlugin\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:151\nmsgid \"This plugin provides an sqlite3 database connection handle as an additional keyword argument to wrapped callbacks, but only if the callback expects it. If not, the route is ignored and no overhead is added. The wrapper does not affect the return value, but handles plugin-related exceptions properly. :meth:`Plugin.setup` is used to inspect the application and search for conflicting plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:218\nmsgid \"This plugin is actually useful and very similar to the version bundled with Bottle. Not bad for less than 60 lines of code, don't you think? Here is a usage example::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:239\nmsgid \"The first route needs a database connection and tells the plugin to create a handle by requesting a ``db`` keyword argument. The second route does not need a database and is therefore ignored by the plugin. The third route does expect a 'db' keyword argument, but explicitly skips the sqlite plugin. This way the argument is not overruled by the plugin and still contains the value of the same-named url argument.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/plugins/index.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../plugins/index.rst:5\nmsgid \"List of available Plugins\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:7\nmsgid \"This is a list of third-party plugins that add extend Bottles core functionality or integrate other libraries with the Bottle framework.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:9\nmsgid \"Have a look at :ref:`plugins` for general questions about plugins (installation, usage). If you plan to develop a new plugin, the :doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"Beaker to session and caching library with WSGI Middleware\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"`Bottle-Cork <http://cork.firelet.net/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"Cork provides a simple set of methods to implement Authentication and Authorization in web applications based on Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"`Bottle-Cors-plugin <http://pypi.org/project/bottle-cors-plugin/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"Cors-plugin is the easiest way to implement cors on your bottle web application\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"Meta package to install the bottle plugin collection.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"flash plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"FIFO Queue for Bottle built upon redis\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"`Macaron <http://nobrin.github.com/macaron/webapp.html>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"Macaron is an object-relational mapper (ORM) for SQLite.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"Memcache integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"MongoDB integration for Bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"`Bottle-OAuthlib <http://pypi.python.org/pypi/bottle-oauthlib/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"Adapter for oauthlib - create your own OAuth2.0 implementation\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"Redis integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"Renderer plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"A reusable app that serves static files for bottle apps\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"SQLAlchemy integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"SQLite3 database integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"Web2py Dal integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"Integrates the `werkzeug` library (alternative request and response objects, advanced debugging middleware and more).\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"`bottle-smart-filters <https://github.com/agile4you/bottle-smart-filters/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"Bottle Querystring smart guessing.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"`bottle-jwt <https://github.com/agile4you/bottle-jwt/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"JSON Web Token authentication plugin for bottle.py\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"`Bottle-jwt <https://github.com/agalera/bottlejwt>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"JWT integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"`canister <https://github.com/dagnelies/canister>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"a bottle wrapper to provide logging, sessions and authentication\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"`bottle-cerberus <https://github.com/agalera/bottle-cerberus>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"Cerberus integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"`Bottle-errorsrest <https://github.com/agalera/bottle-errorsrest>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"All errors generated from bottle are returned in json\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:82\nmsgid \"`Bottle-tools <https://github.com/theSage21/bottle-tools>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:81\nmsgid \"Decorators that auto-supply function arguments using POST/query string data.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:84\nmsgid \"Plugins listed here are not part of Bottle or the Bottle project, but developed and maintained by third parties.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/recipes.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../recipes.rst:16\nmsgid \"Recipes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:18\nmsgid \"This is a collection of code snippets and examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:21\nmsgid \"Keeping track of Sessions\"\nmsgstr \"\"\n\n#: ../../recipes.rst:23\nmsgid \"There is no built-in support for sessions because there is no *right* way to do it (in a micro framework). Depending on requirements and environment you could use beaker_ middleware with a fitting backend or implement it yourself. Here is an example for beaker sessions with a file-based backend::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:45\nmsgid \"WARNING: Beaker's SessionMiddleware is not thread safe.  If two concurrent requests modify the same session at the same time, one of the updates might get lost. For this reason, sessions should only be populated once and treated as a read-only store after that. If you find yourself updating sessions regularly, and don't want to risk losing any updates, think about using a real database instead or seek alternative session middleware libraries.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:49\nmsgid \"Debugging with Style: Debugging Middleware\"\nmsgstr \"\"\n\n#: ../../recipes.rst:51\nmsgid \"Bottle catches all Exceptions raised in your app code to prevent your WSGI server from crashing. If the built-in :func:`debug` mode is not enough and you need exceptions to propagate to a debugging middleware, you can turn off this behaviour::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:59\nmsgid \"Now, bottle only catches its own exceptions (:exc:`HTTPError`, :exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can handle the rest.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:61\nmsgid \"The werkzeug_ and paste_ libraries both ship with very powerful debugging WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for paste_. They both allow you do inspect the stack and even execute python code within the stack context, so **do not use them in production**.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:65\nmsgid \"Unit-Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:67\nmsgid \"Unit-testing is usually performed against methods defined in your web application without running a WSGI environment.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:69\nmsgid \"A simple example using `Nose <http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:80\n#: ../../recipes.rst:97\nmsgid \"Test script::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:87\nmsgid \"In the example the Bottle route() method is never executed - only index() is tested.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:89\nmsgid \"If the code being tested requires access to ``bottle.request`` you can mock it using `Boddle <https://github.com/keredson/boddle>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:108\nmsgid \"Functional Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:110\nmsgid \"Any HTTP-based testing system can be used with a running WSGI server, but some testing frameworks work more intimately with WSGI, and provide the ability the call WSGI applications in a controlled environment, with tracebacks and full use of debugging tools. `Testing tools for WSGI <http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:112\nmsgid \"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose <http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:132\nmsgid \"Embedding other WSGI Apps\"\nmsgstr \"\"\n\n#: ../../recipes.rst:134\nmsgid \"This is not the recommend way (you should use a middleware in front of bottle to do this) but you can call other WSGI applications from within your bottle app and let bottle act as a pseudo-middleware. Here is an example::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:150\nmsgid \"Again, this is not the recommend way to implement subprojects. It is only here because many people asked for this and to show how bottle maps to WSGI.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:154\nmsgid \"Ignore trailing slashes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:156\nmsgid \"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To treat both URLs the same you can add two ``@route`` decorators::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:162\nmsgid \"add a WSGI middleware that strips trailing slashes from all URLs::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:175\nmsgid \"or add a ``before_request`` hook to strip the trailing slashes::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:182\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:183\nmsgid \"Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>\"\nmsgstr \"\"\n\n#: ../../recipes.rst:187\nmsgid \"Keep-alive requests\"\nmsgstr \"\"\n\n#: ../../recipes.rst:191\nmsgid \"For a more detailed explanation, see :doc:`async`.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:193\nmsgid \"Several \\\"push\\\" mechanisms like XHR multipart need the ability to write response data without closing the connection in conjunction with the response header \\\"Connection: keep-alive\\\". WSGI does not easily lend itself to this behavior, but it is still possible to do so in Bottle by using the gevent_ async framework. Here is a sample that works with either the gevent_ HTTP server or the paste_ HTTP server (it may work with others, but I have not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the paste_ server::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:210\nmsgid \"If you browse to ``http://localhost:8080/stream``, you should see 'START', 'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to see them all at once).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:213\nmsgid \"Gzip Compression in Bottle\"\nmsgstr \"\"\n\n#: ../../recipes.rst:216\nmsgid \"For a detailed discussion, see compression_\"\nmsgstr \"\"\n\n#: ../../recipes.rst:218\nmsgid \"A common feature request is for Bottle to support Gzip compression, which speeds up sites by compressing static resources (like CSS and JS files) during a request.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:220\nmsgid \"Supporting Gzip compression is not a straightforward proposition, due to a number of corner cases that crop up frequently. A proper Gzip implementation must:\"\nmsgstr \"\"\n\n#: ../../recipes.rst:222\nmsgid \"Compress on the fly and be fast doing so.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:223\nmsgid \"Do not compress for browsers that don't support it.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:224\nmsgid \"Do not compress files that are compressed already (images, videos).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:225\nmsgid \"Do not compress dynamic files.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:226\nmsgid \"Support two differed compression algorithms (gzip and deflate).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:227\nmsgid \"Cache compressed files that don't change often.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:228\nmsgid \"De-validate the cache if one of the files changed anyway.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:229\nmsgid \"Make sure the cache does not get to big.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:230\nmsgid \"Do not cache small files because a disk seek would take longer than on-the-fly compression.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:232\nmsgid \"Because of these requirements, it is the recommendation of the Bottle project that Gzip compression is best handled by the WSGI server Bottle runs on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware that can be used to accomplish this.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:236\nmsgid \"Using the hooks plugin\"\nmsgstr \"\"\n\n#: ../../recipes.rst:238\nmsgid \"For example, if you want to allow Cross-Origin Resource Sharing for the content returned by all of your URL, you can use the hook decorator and setup a callback function::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:256\nmsgid \"You can also use the ``before_request`` to take an action before every function gets called.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:261\nmsgid \"Using Bottle with Heroku\"\nmsgstr \"\"\n\n#: ../../recipes.rst:263\nmsgid \"Heroku_, a popular cloud application platform now provides support for running Python applications on their infastructure.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:266\nmsgid \"This recipe is based upon the `Heroku Quickstart <http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific code replacing the `Write Your App <http://devcenter.heroku.com/articles/python#write_your_app>`_ section of the `Getting Started with Python on Heroku/Cedar <http://devcenter.heroku.com/articles/python>`_ guide::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:282\nmsgid \"Heroku's app stack passes the port that the application needs to listen on for requests, using the `os.environ` dictionary.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/routing.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../routing.rst:3\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../routing.rst:5\nmsgid \"Bottle uses a powerful routing engine to find the right callback for each request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This document covers advanced techniques and rule mechanics in detail.\"\nmsgstr \"\"\n\n#: ../../routing.rst:8\nmsgid \"Rule Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:10\nmsgid \"The :class:`Router` distinguishes between two basic types of routes: **static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. ``/hello/<name>``). A route that contains one or more *wildcards* it is considered dynamic. All other routes are static.\"\nmsgstr \"\"\n\n#: ../../routing.rst:14\nmsgid \"The simplest form of a wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``). The name should be unique for a given route and form a valid python identifier (alphanumeric, starting with a letter). This is because wildcards are used as keyword arguments for the request callback later.\"\nmsgstr \"\"\n\n#: ../../routing.rst:16\nmsgid \"Each wildcard matches one or more characters, but stops at the first slash (``/``). This equals a regular expression of ``[^/]+`` and ensures that only one path segment is matched and routes with more than one wildcard stay unambiguous.\"\nmsgstr \"\"\n\n#: ../../routing.rst:18\nmsgid \"The rule ``/<action>/<item>`` matches as follows:\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Path\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Result\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"/save/123\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"``{'action': 'save', 'item': '123'}``\"\nmsgstr \"\"\n\n#: ../../routing.rst:24\nmsgid \"/save/123/\"\nmsgstr \"\"\n\n#: ../../routing.rst:24\n#: ../../routing.rst:25\n#: ../../routing.rst:26\nmsgid \"`No Match`\"\nmsgstr \"\"\n\n#: ../../routing.rst:25\nmsgid \"/save/\"\nmsgstr \"\"\n\n#: ../../routing.rst:26\nmsgid \"//123\"\nmsgstr \"\"\n\n#: ../../routing.rst:29\nmsgid \"Is it possible to escape characters like colon ``:`` with a backslash ``\\\\``. This will prevent to trigger the old syntax in case you need to use ``:``. For example: the rule ``/<action>/item:<id>`` triggers the old syntax, (see below) but ``/action/item\\\\:<id>`` works as intended with the new syntax.\"\nmsgstr \"\"\n\n#: ../../routing.rst:33\nmsgid \"You can change the exact behaviour in many ways using filters. This is described in the next section.\"\nmsgstr \"\"\n\n#: ../../routing.rst:36\nmsgid \"Wildcard Filters\"\nmsgstr \"\"\n\n#: ../../routing.rst:40\nmsgid \"Filters are used to define more specific wildcards, and/or transform the matched part of the URL before it is passed to the callback. A filtered wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../routing.rst:42\nmsgid \"The following standard filters are implemented:\"\nmsgstr \"\"\n\n#: ../../routing.rst:44\nmsgid \"**:int** matches (signed) digits and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../routing.rst:45\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../routing.rst:46\nmsgid \"**:path** matches all characters including the slash character in a non-greedy way and may be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../routing.rst:47\nmsgid \"**:re[:exp]** allows you to specify a custom regular expression in the config field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../routing.rst:49\nmsgid \"You can add your own filters to the router. All you need is a function that returns three elements: A regular expression string, a callable to convert the URL fragment to a python value, and a callable that does the opposite. The filter function is called with the configuration string as the only parameter and may parse it as needed::\"\nmsgstr \"\"\n\n#: ../../routing.rst:75\nmsgid \"Legacy Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:79\nmsgid \"The new rule syntax was introduce in **Bottle 0.10** to simplify some common use cases, but the old syntax still works and you can find lot code examples still using it. The differences are best described by example:\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"Old Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"New Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:90\nmsgid \"Try to avoid the old syntax in future projects if you can. It is not currently deprecated, but will be eventually.\"\nmsgstr \"\"\n\n#: ../../routing.rst:95\nmsgid \"Explicit routing configuration\"\nmsgstr \"\"\n\n#: ../../routing.rst:97\nmsgid \"Route decorator can also be directly called as method. This way provides flexibility in complex setups, allowing you to directly control, when and how routing configuration done.\"\nmsgstr \"\"\n\n#: ../../routing.rst:99\nmsgid \"Here is a basic example of explicit routing configuration for default bottle application::\"\nmsgstr \"\"\n\n#: ../../routing.rst:105\nmsgid \"In fact, any :class:`Bottle` instance routing can be configured same way::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/stpl.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../stpl.rst:3\nmsgid \"SimpleTemplate Engine\"\nmsgstr \"\"\n\n#: ../../stpl.rst:7\nmsgid \"Bottle comes with a fast, powerful and easy to learn built-in template engine called *SimpleTemplate* or *stpl* for short. It is the default engine used by the :func:`view` and :func:`template` helpers but can be used as a stand-alone general purpose template engine too. This document explains the template syntax and shows examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:10\nmsgid \"Basic API Usage:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:11\nmsgid \":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:18\nmsgid \"In this document we use the :func:`template` helper in examples for the sake of simplicity::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:24\nmsgid \"You can also pass a dictionary into the template using keyword arguments::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:31\nmsgid \"Just keep in mind that compiling and rendering templates are two different actions, even if the :func:`template` helper hides this fact. Templates are usually compiled only once and cached internally, but rendered many times with different keyword arguments.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:34\nmsgid \":class:`SimpleTemplate` Syntax\"\nmsgstr \"\"\n\n#: ../../stpl.rst:36\nmsgid \"Python is a very powerful language but its whitespace-aware syntax makes it difficult to use as a template language. SimpleTemplate removes some of these restrictions and allows you to write clean, readable and maintainable templates while preserving full access to the features, libraries and speed of the Python language.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:40\nmsgid \"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and is executed on each :meth:`SimpleTemplate.render` call. Do not render untrusted templates! They may contain and execute harmful python code.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:43\nmsgid \"Inline Expressions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:45\nmsgid \"You already learned the use of the ``{{...}}`` syntax from the \\\"Hello World!\\\" example above, but there is more: any python expression is allowed within the curly brackets as long as it evaluates to a string or something that has a string representation::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:54\nmsgid \"The contained python expression is executed at render-time and has access to all keyword arguments passed to the :meth:`SimpleTemplate.render` method. HTML special characters are escaped automatically to prevent `XSS <http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start the expression with an exclamation mark to disable escaping for that expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:62\nmsgid \"Embedded python code\"\nmsgstr \"\"\n\n#: ../../stpl.rst:66\nmsgid \"The template engine allows you to embed lines or blocks of python code within your template. Code lines start with ``%`` and code blocks are surrounded by ``<%`` and ``%>`` tokens::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:76\nmsgid \"Embedded python code follows regular python syntax, but with two additional syntax rules:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:78\nmsgid \"**Indentation is ignored.** You can put as much whitespace in front of statements as you want. This allows you to align your code with the surrounding markup and can greatly improve readability.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:79\nmsgid \"Blocks that are normally indented now have to be closed explicitly with an ``end`` keyword.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:89\nmsgid \"Both the ``%`` and the ``<%`` tokens are only recognized if they are the first non-whitespace characters in a line. You don't have to escape them if they appear mid-text in your template markup. Only if a line of text starts with one of these tokens, you have to escape it with a backslash. In the rare case where the backslash + token combination appears in your markup at the beginning of a line, you can always help yourself with a string literal in an inline expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:96\nmsgid \"If you find yourself needing to escape a lot, consider using :ref:`custom tokens <stpl-custom-tokens>`.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:98\nmsgid \"Note that ``%`` and ``<% %>`` work in *exactly* the same way. The latter is only a convenient way to type less and avoid clutter for longer code segments. This means that in ``<% %>`` blocks, all indented code must be terminated with an ``end``, as in the following example::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:114\nmsgid \"Whitespace Control\"\nmsgstr \"\"\n\n#: ../../stpl.rst:116\nmsgid \"Code blocks and code lines always span the whole line. Whitespace in front of after a code segment is stripped away. You won't see empty lines or dangling whitespace in your template because of embedded code::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:124\nmsgid \"This snippet renders to clean and compact html::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:130\nmsgid \"But embedding code still requires you to start a new line, which may not what you want to see in your rendered template. To skip the newline in front of a code segment, end the text line with a double-backslash::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:138\nmsgid \"This time the rendered template looks like this::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:142\nmsgid \"This only works directly in front of code segments. In all other places you can control the whitespace yourself and don't need any special syntax.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:145\nmsgid \"Template Functions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:147\nmsgid \"Each template is preloaded with a bunch of functions that help with the most common use cases. These functions are always available. You don't have to import or provide them yourself. For everything not covered here there are probably good python libraries available. Remember that you can ``import`` anything you want within your templates. They are python programs after all.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:151\nmsgid \"Prior to this release, :func:`include` and :func:`rebase` were syntax keywords, not functions.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:156\nmsgid \"Render a sub-template with the specified variables and insert the resulting text into the current template. The function returns a dictionary containing the local variables passed to or defined within the sub-template::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:164\nmsgid \"Mark the current template to be later included into a different template. After the current template is rendered, its resulting text is stored in a variable named ``base`` and passed to the base-template, which is then rendered. This can be used to `wrap` a template with surrounding text, or simulate the inheritance feature found in other template engines::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:169\nmsgid \"This can be combined with the following ``base.tpl``::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:181\nmsgid \"Accessing undefined variables in a template raises :exc:`NameError` and stops rendering immediately. This is standard python behavior and nothing new, but vanilla python lacks an easy way to check the availability of a variable. This quickly gets annoying if you want to support flexible inputs or use the same template in different situations. These functions may help:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:189\nmsgid \"Return True if the variable is defined in the current template namespace, False otherwise.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:194\nmsgid \"Return the variable, or a default value.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:198\nmsgid \"If the variable is not defined, create it with the given default value. Return the variable.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:201\nmsgid \"Here is an example that uses all three functions to implement optional template variables in different ways::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:215\nmsgid \":class:`SimpleTemplate` API\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.SimpleTemplate.prepare:1\nmsgid \"Run preparations (parsing, caching, ...). It should be possible to call this again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.py:docstring of bottle.SimpleTemplate.render:1\nmsgid \"Render the template using keyword arguments as local variables.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/tutorial.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../tutorial.rst:24\nmsgid \"Tutorial\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:26\nmsgid \"This tutorial introduces you to the concepts and features of the Bottle web framework and covers basic and advanced topics alike. You can read it from start to end, or use it as a reference later on. The automatically generated :doc:`api` may be interesting for you, too. It covers more details, but explains less than this tutorial. Solutions for the most common questions can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If you need any help, join our `mailing list <mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel <http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:31\nmsgid \"Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:33\nmsgid \"Bottle does not depend on any external libraries. You can just download `bottle.py </bottle.py>`_ into your project directory and start coding:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:39\nmsgid \"This will get you the latest development snapshot that includes all the new features. If you prefer a more stable environment, you should stick with the stable releases. These are available on `PyPI <http://pypi.python.org/pypi/bottle>`_ and can be installed via :command:`pip` (recommended), :command:`easy_install` or your package manager:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:47\nmsgid \"Either way, you'll need Python 2.7 or newer (including 3.4+) to run bottle applications. If you do not have permissions to install packages system-wide or simply don't want to, create a `virtualenv <http://pypi.python.org/pypi/virtualenv>`_ first:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:55\nmsgid \"Or, if virtualenv is not installed on your system:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:67\nmsgid \"Quickstart: \\\"Hello World\\\"\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:69\nmsgid \"This tutorial assumes you have Bottle either :ref:`installed <installation>` or copied into your project directory. Let's start with a very basic \\\"Hello World\\\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:79\nmsgid \"This is it. Run this script, visit http://localhost:8080/hello and you will see \\\"Hello World!\\\" in your browser. Here is how it works:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:81\nmsgid \"The :func:`route` decorator binds a piece of code to an URL path. In this case, we link the ``/hello`` path to the ``hello()`` function. This is called a `route` (hence the decorator name) and is the most important concept of this framework. You can define as many routes as you want. Whenever a browser requests a URL, the associated function is called and the return value is sent back to the browser. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:83\nmsgid \"The :func:`run` call in the last line starts a built-in development server. It runs on ``localhost`` port ``8080`` and serves requests until you hit :kbd:`Control-c`. You can switch the server backend later, but for now a development server is all we need. It requires no setup at all and is an incredibly painless way to get your application up and running for local tests.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:85\nmsgid \"The :ref:`tutorial-debugging` is very helpful during early development, but should be switched off for public applications. Keep that in mind.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:87\nmsgid \"This is just a demonstration of the basic concept of how applications are built with Bottle. Continue reading and you'll see what else is possible.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:92\nmsgid \"The Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:94\nmsgid \"For the sake of simplicity, most examples in this tutorial use a module-level :func:`route` decorator to define routes. This adds routes to a global \\\"default application\\\", an instance of :class:`Bottle` that is automatically created the first time you call :func:`route`. Several other module-level decorators and functions relate to this default application, but if you prefer a more object oriented approach and don't mind the extra typing, you can create a separate application object and use that instead of the global one::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:106\nmsgid \"The object-oriented approach is further described in the :ref:`default-app` section. Just keep in mind that you have a choice.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:114\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:116\nmsgid \"In the last chapter we built a very simple web application with only a single route. Here is the routing part of the \\\"Hello World\\\" example again::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:122\nmsgid \"The :func:`route` decorator links an URL path to a callback function, and adds a new route to the :ref:`default application <tutorial-default>`. An application with just one route is kind of boring, though. Let's add some more (don't forget ``from bottle import template``)::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:129\nmsgid \"This example demonstrates two things: You can bind more than one route to a single callback, and you can add wildcards to URLs and access them via keyword arguments.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:136\nmsgid \"Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:138\nmsgid \"Routes that contain wildcards are called `dynamic routes` (as opposed to `static routes`) and match more than one URL at the same time. A simple wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and accepts one or more characters up to the next slash (``/``). For example, the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:140\nmsgid \"Each wildcard passes the covered part of the URL as a keyword argument to the request callback. You can use them right away and implement RESTful, nice-looking and meaningful URLs with ease. Here are some other examples along with the URLs they'd match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:150\nmsgid \"Filters can be used to define more specific wildcards, and/or transform the covered part of the URL before it is passed to the callback. A filtered wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:152\nmsgid \"The following filters are implemented by default and more may be added:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:154\nmsgid \"**:int** matches (signed) digits only and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:155\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:156\nmsgid \"**:path** matches all characters including the slash character in a non-greedy way and can be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:157\nmsgid \"**:re** allows you to specify a custom regular expression in the config field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:159\nmsgid \"Let's have a look at some practical examples::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:173\nmsgid \"You can add your own filters as well. See :doc:`routing` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:177\nmsgid \"HTTP Request Methods\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:181\nmsgid \"The HTTP protocol defines several `request methods`__ (sometimes referred to as \\\"verbs\\\") for different tasks. GET is the default for all routes with no other method specified. These routes will match GET requests only. To handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` keyword argument to the :func:`route` decorator or use one of the five alternative decorators: :func:`get`, :func:`post`, :func:`put`, :func:`delete` or :func:`patch`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:183\nmsgid \"The POST method is commonly used for HTML form submission. This example shows how to handle a login form using POST::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:206\nmsgid \"In this example the ``/login`` URL is linked to two distinct callbacks, one for GET requests and another for POST requests. The first one displays a HTML form to the user. The second callback is invoked on a form submission and checks the login credentials the user entered into the form. The use of :attr:`Request.forms` is further described in the :ref:`tutorial-request` section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:209\nmsgid \"Special Methods: HEAD and ANY\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:210\nmsgid \"The HEAD method is used to ask for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information about a resource without having to download the entire document. Bottle handles these requests automatically by falling back to the corresponding GET route and cutting off the request body, if present. You don't have to specify any HEAD routes yourself.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:212\nmsgid \"Additionally, the non-standard ANY method works as a low priority fallback: Routes that listen to ANY will match requests regardless of their HTTP method but only if no other more specific route is defined. This is helpful for *proxy-routes* that redirect requests to more specific sub-applications.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:214\nmsgid \"To sum it up: HEAD requests fall back to GET routes and all requests fall back to ANY routes, but only if there is no matching route for the original request method. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:219\nmsgid \"Routing Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:221\nmsgid \"Static files such as images or CSS files are not served automatically. You have to add a route and a callback to control which files get served and where to find them::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:228\nmsgid \"The :func:`static_file` function is a helper to serve files in a safe and convenient way (see :ref:`tutorial-static-files`). This example is limited to files directly within the ``/path/to/your/static/files`` directory because the ``<filename>`` wildcard won't match a path with a slash in it. To serve files in subdirectories, change the wildcard to use the `path` filter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:234\nmsgid \"Be careful when specifying a relative root-path such as ``root='./static/files'``. The working directory (``./``) and the project directory are not always the same.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:242\nmsgid \"Error Pages\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:244\nmsgid \"If anything goes wrong, Bottle displays an informative but fairly plain error page. You can override the default for a specific HTTP status code with the :func:`error` decorator::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:251\nmsgid \"From now on, `404 File not Found` errors will display a custom error page to the user. The only parameter passed to the error-handler is an instance of :exc:`HTTPError`. Apart from that, an error-handler is quite similar to a regular request callback. You can read from :data:`request`, write to :data:`response` and return any supported data-type except for :exc:`HTTPError` instances.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:253\nmsgid \"Error handlers are used only if your application returns or raises an :exc:`HTTPError` exception (:func:`abort` does just that). Changing :attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the error handler.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:263\nmsgid \"Generating content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:265\nmsgid \"In pure WSGI, the range of types you may return from your application is very limited. Applications must return an iterable yielding byte strings. You may return a string (because strings are iterable) but this causes most servers to transmit your content char by char. Unicode strings are not allowed at all. This is not very practical.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:267\nmsgid \"Bottle is much more flexible and supports a wide range of types. It even adds a ``Content-Length`` header if possible and encodes unicode automatically, so you don't have to. What follows is a list of data types you may return from your application callbacks and a short description of how these are handled by the framework:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"Dictionaries\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"As mentioned above, Python dictionaries (or subclasses thereof) are automatically transformed into JSON strings and returned to the browser with the ``Content-Type`` header set to ``application/json``. This makes it easy to implement json-based APIs. Data formats other than json are supported too. See the :ref:`tutorial-output-filter` to learn more.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"Empty Strings, ``False``, ``None`` or other non-true values:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"These produce an empty output with the ``Content-Length`` header set to 0.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"Unicode strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"Unicode strings (or iterables yielding unicode strings) are automatically encoded with the codec specified in the ``Content-Type`` header (utf8 by default) and then treated as normal byte strings (see below).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"Byte strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"Bottle returns strings as a whole (instead of iterating over each char) and adds a ``Content-Length`` header based on the string length. Lists of byte strings are joined first. Other iterables yielding byte strings are not joined because they may grow too big to fit into memory. The ``Content-Length`` header is not set in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"Instances of :exc:`HTTPError` or :exc:`HTTPResponse`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"Returning these has the same effect as when raising them as an exception. In case of an :exc:`HTTPError`, the error handler is applied. See :ref:`tutorial-errorhandling` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"File objects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"Everything that has a ``.read()`` method is treated as a file or file-like object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI server framework. Some WSGI server implementations can make use of optimized system calls (sendfile) to transmit files more efficiently. In other cases this just iterates over chunks that fit into memory. Optional headers such as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use :func:`send_file` if possible. See :ref:`tutorial-static-files` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"Iterables and generators\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"You are allowed to use ``yield`` within your callbacks or return an iterable, as long as the iterable yields byte strings, unicode strings, :exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not supported, sorry. Please note that the HTTP status code and the headers are sent to the browser as soon as the iterable yields its first non-empty value. Changing these later has no effect.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:290\nmsgid \"The ordering of this list is significant. You may for example return a subclass of :class:`str` with a ``read()`` method. It is still treated as a string instead of a file, because strings are handled first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:293\nmsgid \"Changing the Default Encoding\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:294\nmsgid \"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide how to encode unicode strings. This header defaults to ``text/html; charset=UTF8`` and can be changed using the :attr:`Response.content_type` attribute or by setting the :attr:`Response.charset` attribute directly. (The :class:`Response` object is described in the section :ref:`tutorial-response`.)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:309\nmsgid \"In some rare cases the Python encoding names differ from the names supported by the HTTP specification. Then, you have to do both: first set the :attr:`Response.content_type` header (which is sent to the client unchanged) and then set the :attr:`Response.charset` attribute (which is used to encode unicode).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:314\nmsgid \"Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:316\nmsgid \"You can directly return file objects, but :func:`static_file` is the recommended way to serve static files. It automatically guesses a mime-type, adds a ``Last-Modified`` header, restricts paths to a ``root`` directory for security reasons and generates appropriate error responses (403 on permission errors, 404 on missing files). It even supports the ``If-Modified-Since`` header and eventually generates a ``304 Not Modified`` response. You can pass a custom MIME type to disable guessing.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:329\nmsgid \"You can raise the return value of :func:`static_file` as an exception if you really need to.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:332\nmsgid \"Forced Download\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:333\nmsgid \"Most browsers try to open downloaded files if the MIME type is known and assigned to an application (e.g. PDF files). If this is not what you want, you can force a download dialog and even suggest a filename to the user::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:339\nmsgid \"If the ``download`` parameter is just ``True``, the original filename is used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:344\nmsgid \"HTTP Errors and Redirects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:346\nmsgid \"The :func:`abort` function is a shortcut for generating HTTP error pages.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:355\nmsgid \"To redirect a client to a different URL, you can send a ``303 See Other`` response with the ``Location`` header set to the new URL. :func:`redirect` does that for you::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:362\nmsgid \"You may provide a different HTTP status code as a second parameter.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:365\nmsgid \"Both functions will interrupt your callback code by raising an :exc:`HTTPResponse` exception.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:368\nmsgid \"Other Exceptions\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:369\nmsgid \"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will result in a ``500 Internal Server Error`` response, so they won't crash your WSGI server. You can turn off this behavior to handle exceptions in your middleware by setting ``bottle.app().catchall`` to ``False``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:375\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:377\nmsgid \"Response metadata such as the HTTP status code, response headers and cookies are stored in an object called :data:`response` up to the point where they are transmitted to the browser. You can manipulate these metadata directly or use the predefined helper methods to do so. The full API and feature list is described in the API section (see :class:`Response`), but the most common use cases and features are covered here, too.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:380\nmsgid \"Status Code\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:381\nmsgid \"The `HTTP status code <http_code>`_ controls the behavior of the browser and defaults to ``200 OK``. In most scenarios you won't need to set the :attr:`Response.status` attribute manually, but use the :func:`abort` helper or return an :exc:`HTTPResponse` instance with the appropriate status code. Any integer is allowed, but codes other than the ones defined by the `HTTP specification <http_code>`_ will only confuse the browser and break standards.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:384\nmsgid \"Response Header\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:385\nmsgid \"Response headers such as ``Cache-Control`` or ``Location`` are defined via :meth:`Response.set_header`. This method takes two parameters, a header name and a value. The name part is case-insensitive::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:392\nmsgid \"Most headers are unique, meaning that only one header per name is send to the client. Some special headers however are allowed to appear more than once in a response. To add an additional header, use :meth:`Response.add_header` instead of :meth:`Response.set_header`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:397\nmsgid \"Please note that this is just an example. If you want to work with cookies, read :ref:`ahead <tutorial-cookies>`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:403\n#: ../../tutorial.rst:533\nmsgid \"Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:405\nmsgid \"A cookie is a named piece of text stored in the user's browser profile. You can access previously defined cookies via :meth:`Request.get_cookie` and set new cookies with :meth:`Response.set_cookie`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:415\nmsgid \"The :meth:`Response.set_cookie` method accepts a number of additional keyword arguments that control the cookies lifetime and behavior. Some of the most common settings are described here:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:417\nmsgid \"**max_age:**    Maximum age in seconds. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:418\nmsgid \"**expires:**    A datetime object or UNIX timestamp. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:419\nmsgid \"**domain:**     The domain that is allowed to read the cookie. (default: current domain)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:420\nmsgid \"**path:**       Limit the cookie to a given path (default: ``/``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:421\nmsgid \"**secure:**     Limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:422\nmsgid \"**httponly:**   Prevent client-side javascript to read this cookie (default: off, requires Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:423\nmsgid \"**same_site:**  Disables third-party use for a cookie. Allowed attributes: `lax` and `strict`. In strict mode the cookie will never be sent. In lax mode the cookie is only sent with a top-level GET request.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:425\nmsgid \"If neither `expires` nor `max_age` is set, the cookie expires at the end of the browser session or as soon as the browser window is closed. There are some other gotchas you should consider when using cookies:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:427\nmsgid \"Cookies are limited to 4 KB of text in most browsers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:428\nmsgid \"Some users configure their browsers to not accept cookies at all. Most search engines ignore cookies too. Make sure that your application still works without cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:429\nmsgid \"Cookies are stored at client side and are not encrypted in any way. Whatever you store in a cookie, the user can read it. Worse than that, an attacker might be able to steal a user's cookies through `XSS <http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_ vulnerabilities on your side. Some viruses are known to read the browser cookies, too. Thus, never store confidential information in cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:430\nmsgid \"Cookies are easily forged by malicious clients. Do not trust cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:435\nmsgid \"Signed Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:436\nmsgid \"As mentioned above, cookies are easily forged by malicious clients. Bottle can cryptographically sign your cookies to prevent this kind of manipulation. All you have to do is to provide a signature key via the `secret` keyword argument whenever you read or set a cookie and keep that key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` if the cookie is not signed or the signature keys don't match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:456\nmsgid \"In addition, Bottle automatically pickles and unpickles any data stored to signed cookies. This allows you to store any pickle-able object (not only strings) to cookies, as long as the pickled data does not exceed the 4 KB limit.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:458\nmsgid \"Signed cookies are not encrypted (the client can still see the content) and not copy-protected (the client can restore an old cookie). The main intention is to make pickling and unpickling safe and prevent manipulation, not to store secret information at client side.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:471\nmsgid \"Request Data\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:473\nmsgid \"Cookies, HTTP header, HTML ``<form>`` fields and other request data is available through the global :data:`request` object. This special object always refers to the *current* request, even in multi-threaded environments where multiple client connections are handled at the same time::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:482\nmsgid \"The :data:`request` object is a subclass of :class:`BaseRequest` and has a very rich API to access data. We only cover the most commonly used features here, but it should be enough to get started.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:487\nmsgid \"Introducing :class:`FormsDict`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:489\nmsgid \"Bottle uses a special type of dictionary to store form data and cookies. :class:`FormsDict` behaves like a normal dictionary, but has some additional features to make your life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:491\nmsgid \"**Attribute access**: All values in the dictionary are also accessible as attributes. These virtual attributes return unicode strings, even if the value is missing or unicode decoding fails. In that case, the string is empty, but still present::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:506\nmsgid \"**Multiple values per key:** :class:`FormsDict` is a subclass of :class:`MultiDict` and can store more than one value per key. The standard dictionary access methods will only return a single value, but the :meth:`~MultiDict.getall` method returns a (possibly empty) list of all values for a specific key::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:511\nmsgid \"**WTForms support:** Some libraries (e.g. `WTForms <http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input. :meth:`FormsDict.decode` does that for you. It decodes all values and returns a copy of itself, while preserving multiple values per key and all the other features.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:515\nmsgid \"In **Python 2** all keys and values are byte-strings. If you need unicode, you can call :meth:`FormsDict.getunicode` or fetch values via attribute access. Both methods try to decode the string (default: utf8) and return an empty string if that fails. No need to catch :exc:`UnicodeError`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:522\nmsgid \"In **Python 3** all strings are unicode, but HTTP is a byte-based wire protocol. The server has to decode the byte strings somehow before they are passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 (aka latin1), a reversible single-byte codec that can be re-encoded with a different encoding later. Bottle does that for :meth:`FormsDict.getunicode` and attribute access, but not for the dict-access methods. These return the unchanged values as provided by the server implementation, which is probably not what you want.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:529\nmsgid \"If you need the whole dictionary with correctly decoded values (e.g. for WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:535\nmsgid \"Cookies are small pieces of text stored in the clients browser and sent back to the server with each request. They are useful to keep some state around for more than one request (HTTP itself is stateless), but should not be used for security related stuff. They can be easily forged by the client.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:537\nmsgid \"All cookies sent by the client are available through :attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a simple cookie-based view counter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:547\nmsgid \"The :meth:`BaseRequest.get_cookie` method is a different way do access cookies. It supports decoding :ref:`signed cookies <tutorial-signed-cookies>` as described in a separate section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:550\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:552\nmsgid \"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or ``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict` is basically a dictionary with case-insensitive keys::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:564\nmsgid \"Query Variables\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:566\nmsgid \"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit a small number of key/value pairs to the server. You can use the :attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these values and the :attr:`BaseRequest.query_string` attribute to get the whole string.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:579\nmsgid \"HTML `<form>` Handling\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:581\nmsgid \"Let us start from the beginning. In HTML, a typical ``<form>`` looks something like this:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:591\nmsgid \"The ``action`` attribute specifies the URL that will receive the form data. ``method`` defines the HTTP method to use (``GET`` or ``POST``). With ``method=\\\"get\\\"`` the form values are appended to the URL and available through :attr:`BaseRequest.query` as described above. This is considered insecure and has other limitations, so we use ``method=\\\"post\\\"`` here. If in doubt, use ``POST`` forms.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:593\nmsgid \"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms` as a :class:`FormsDict`. The server side code may look like this::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:616\nmsgid \"There are several other attributes used to access form data. Some of them combine values from different sources for easier access. The following table should give you a decent overview.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"GET Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"POST Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"File Uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621\nmsgid \":attr:`BaseRequest.query`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621\n#: ../../tutorial.rst:622\n#: ../../tutorial.rst:623\n#: ../../tutorial.rst:624\n#: ../../tutorial.rst:624\n#: ../../tutorial.rst:625\n#: ../../tutorial.rst:626\n#: ../../tutorial.rst:626\nmsgid \"yes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621\n#: ../../tutorial.rst:621\n#: ../../tutorial.rst:622\n#: ../../tutorial.rst:622\n#: ../../tutorial.rst:623\n#: ../../tutorial.rst:623\n#: ../../tutorial.rst:624\n#: ../../tutorial.rst:625\n#: ../../tutorial.rst:625\n#: ../../tutorial.rst:626\nmsgid \"no\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:622\nmsgid \":attr:`BaseRequest.forms`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:623\nmsgid \":attr:`BaseRequest.files`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:624\nmsgid \":attr:`BaseRequest.params`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:625\nmsgid \":attr:`BaseRequest.GET`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:626\nmsgid \":attr:`BaseRequest.POST`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:631\nmsgid \"File uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:633\nmsgid \"To support file uploads, we have to change the ``<form>`` tag a bit. First, we tell the browser to encode the form data in a different way by adding an ``enctype=\\\"multipart/form-data\\\"`` attribute to the ``<form>`` tag. Then, we add ``<input type=\\\"file\\\" />`` tags to allow the user to select a file. Here is an example:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:643\nmsgid \"Bottle stores file uploads in :attr:`BaseRequest.files` as :class:`FileUpload` instances, along with some metadata about the upload. Let us assume you just want to save the file to disk::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:657\nmsgid \":attr:`FileUpload.filename` contains the name of the file on the clients file system, but is cleaned up and normalized to prevent bugs caused by unsupported characters or path segments in the filename. If you need the unmodified name as sent by the client, have a look at :attr:`FileUpload.raw_filename`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:659\nmsgid \"The :attr:`FileUpload.save` method is highly recommended if you want to store the file to disk. It prevents some common errors (e.g. it does not overwrite existing files unless you tell it to) and stores the file in a memory efficient way. You can access the file object directly via :attr:`FileUpload.file`. Just be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:663\nmsgid \"JSON Content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:665\nmsgid \"Some JavaScript or REST clients send ``application/json`` content to the server. The :attr:`BaseRequest.json` attribute contains the parsed data structure, if available.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:669\nmsgid \"The raw request body\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:671\nmsgid \"You can access the raw body data as a file-like object via :attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` setting. In both cases the body is completely buffered before you can access the attribute. If you expect huge amounts of data and want to get direct unbuffered access to the stream, have a look at ``request['wsgi.input']``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:676\nmsgid \"WSGI Environment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:678\nmsgid \"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The original is stored in :attr:`BaseRequest.environ`, but the request object itself behaves like a dictionary, too. Most of the interesting data is exposed through special methods or attributes, but if you want to access `WSGI environ variables <WSGI_Specification>`_ directly, you can do so::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:696\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:698\nmsgid \"Bottle comes with a fast and powerful built-in template engine called :doc:`stpl`. To render a template you can use the :func:`template` function or the :func:`view` decorator. All you have to do is to provide the name of the template and the variables you want to pass to the template as keyword arguments. Here’s a simple example of how to render a template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:705\nmsgid \"This will load the template file ``hello_template.tpl`` and render it with the ``name`` variable set. Bottle will look for templates in the ``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` list.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:707\nmsgid \"The :func:`view` decorator allows you to return a dictionary with the template variables instead of calling :func:`template`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:716\nmsgid \"Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:719\nmsgid \"The template syntax is a very thin layer around the Python language. Its main purpose is to ensure correct indentation of blocks, so you can format your template without worrying about indentation. Follow the link for a full syntax description: :doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:721\nmsgid \"Here is an example template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:732\nmsgid \"Caching\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:733\nmsgid \"Templates are cached in memory after compilation. Modifications made to the template files will have no affect until you clear the template cache. Call ``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:743\nmsgid \"Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:747\nmsgid \"Bottle's core features cover most common use-cases, but as a micro-framework it has its limits. This is where \\\"Plugins\\\" come into play. Plugins add missing functionality to the framework, integrate third party libraries, or just automate some repetitive work.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:749\nmsgid \"We have a growing :doc:`/plugins/index` and most plugins are designed to be portable and re-usable across applications. The chances are high that your problem has already been solved and a ready-to-use plugin exists. If not, the :doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:751\nmsgid \"The effects and APIs of plugins are manifold and depend on the specific plugin. The ``SQLitePlugin`` plugin for example detects callbacks that require a ``db`` keyword argument and creates a fresh database connection object every time the callback is called. This makes it very convenient to use a database::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:771\nmsgid \"Other plugin may populate the thread-safe :data:`local` object, change details of the :data:`request` object, filter the data returned by the callback or bypass the callback completely. An \\\"auth\\\" plugin for example could check for a valid session and return a login page instead of calling the original callback. What happens exactly depends on the plugin.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:775\nmsgid \"Application-wide Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:777\nmsgid \"Plugins can be installed application-wide or just to some specific routes that need additional functionality. Most plugins can safely be installed to all routes and are smart enough to not add overhead to callbacks that do not need their functionality.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:779\nmsgid \"Let us take the ``SQLitePlugin`` plugin for example. It only affects route callbacks that need a database connection. Other routes are left alone. Because of this, we can install the plugin application-wide with no additional overhead.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:781\nmsgid \"To install a plugin, just call :func:`install` with the plugin as first argument::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:786\nmsgid \"The plugin is not applied to the route callbacks yet. This is delayed to make sure no routes are missed. You can install plugins first and add routes later, if you want to. The order of installed plugins is significant, though. If a plugin requires a database connection, you need to install the database plugin first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:790\nmsgid \"Uninstall Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:791\nmsgid \"You can use a name, class or instance to :func:`uninstall` a previously installed plugin::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:801\nmsgid \"Plugins can be installed and removed at any time, even at runtime while serving requests. This enables some neat tricks (installing slow debugging or profiling plugins only when needed) but should not be overused. Each time the list of plugins changes, the route cache is flushed and all plugins are re-applied.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:804\nmsgid \"The module-level :func:`install` and :func:`uninstall` functions affect the :ref:`default-app`. To manage plugins for a specific application, use the corresponding methods on the :class:`Bottle` application object.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:808\nmsgid \"Route-specific Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:810\nmsgid \"The ``apply`` parameter of the :func:`route` decorator comes in handy if you want to install plugins to only a small number of routes::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:820\nmsgid \"Blacklisting Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:822\nmsgid \"You may want to explicitly disable a plugin for a number of routes. The :func:`route` decorator has a ``skip`` parameter for this purpose::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:844\nmsgid \"The ``skip`` parameter accepts a single value or a list of values. You can use a name, class or instance to identify the plugin that is to be skipped. Set ``skip=True`` to skip all plugins at once.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:847\nmsgid \"Plugins and Sub-Applications\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:849\nmsgid \"Most plugins are specific to the application they were installed to. Consequently, they should not affect sub-applications mounted with :meth:`Bottle.mount`. Here is an example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:860\nmsgid \"Whenever you mount an application, Bottle creates a proxy-route on the main-application that forwards all requests to the sub-application. Plugins are disabled for this kind of proxy-route by default. As a result, our (fictional) `WTForms` plugin affects the ``/contact`` route, but does not affect the routes of the ``/blog`` sub-application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:862\nmsgid \"This behavior is intended as a sane default, but can be overridden. The following example re-activates all plugins for a specific proxy-route::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:866\nmsgid \"But there is a snag: The plugin sees the whole sub-application as a single route, namely the proxy-route mentioned above. In order to affect each individual route of the sub-application, you have to install the plugin to the mounted application explicitly.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:871\nmsgid \"Development\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:873\nmsgid \"So you have learned the basics and want to write your own application? Here are some tips that might help you being more productive.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:879\nmsgid \"Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:881\nmsgid \"Bottle maintains a global stack of :class:`Bottle` instances and uses the top of the stack as a default for some of the module-level functions and decorators. The :func:`route` decorator, for example, is a shortcut for calling :meth:`Bottle.route` on the default application::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:889\nmsgid \"This is very convenient for small applications and saves you some typing, but also means that, as soon as your module is imported, routes are installed to the global default application. To avoid this kind of import side-effects, Bottle offers a second, more explicit way to build applications::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:899\nmsgid \"Separating the application object improves re-usability a lot, too. Other developers can safely import the ``app`` object from your module and use :meth:`Bottle.mount` to merge applications together.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:904\nmsgid \"Starting with bottle-0.13 you can use :class:`Bottle` instances as context managers::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:929\nmsgid \"Debug Mode\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:931\nmsgid \"During early development, the debug mode can be very helpful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:939\nmsgid \"In this mode, Bottle is much more verbose and provides helpful debugging information whenever an error occurs. It also disables some optimisations that might get in your way and adds some checks that warn you about possible misconfiguration.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:941\nmsgid \"Here is an incomplete list of things that change in debug mode:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:943\nmsgid \"The default error page shows a traceback.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:944\nmsgid \"Templates are not cached.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:945\nmsgid \"Plugins are applied immediately.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:947\nmsgid \"Just make sure not to use the debug mode on a production server.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:950\nmsgid \"Auto Reloading\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:952\nmsgid \"During development, you have to restart the server a lot to test your recent changes. The auto reloader can do this for you. Every time you edit a module file, the reloader restarts the server process and loads the newest version of your code.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:962\nmsgid \"How it works: the main process will not start a server, but spawn a new child process using the same command line arguments used to start the main process. All module-level code is executed at least twice! Be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:967\nmsgid \"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` and start as a normal non-reloading app server. As soon as any of the loaded modules changes, the child process is terminated and re-spawned by the main process. Changes in template files will not trigger a reload. Please use debug mode to deactivate template caching.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:973\nmsgid \"The reloading depends on the ability to stop the child process. If you are running on Windows or any other operating system not supporting ``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), ``signal.SIGTERM`` is used to kill the child. Note that exit handlers and finally clauses, etc., are not executed after a ``SIGTERM``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:981\nmsgid \"Command Line Interface\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:985\nmsgid \"Starting with version 0.10 you can use bottle as a command-line tool:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1009\nmsgid \"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to ``localhost:8080``. The other parameters should be self-explanatory.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1011\nmsgid \"Both plugins and applications are specified via import expressions. These consist of an import path (e.g. ``package.module``) and an expression to be evaluated in the namespace of that module, separated by a colon. See :func:`load` for details. Here are some examples:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1032\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1034\nmsgid \"Bottle runs on the built-in `wsgiref WSGIServer <http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_  by default. This non-threading HTTP server is perfectly fine for development, but may become a performance bottleneck when server load increases.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1036\nmsgid \"The easiest way to increase performance is to install a multi-threaded server library like paste_ or cherrypy_ and tell Bottle to use that instead of the single-threaded server::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1040\nmsgid \"This, and many other deployment options are described in a separate article: :doc:`deployment`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1048\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1051\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1053\nmsgid \"Programmer code that is to be called when some external action happens. In the context of web frameworks, the mapping between URL paths and application code is often achieved by specifying a callback function for each URL.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1057\nmsgid \"decorator\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1059\nmsgid \"A function returning another function, usually applied as a function transformation using the ``@decorator`` syntax. See `python documentation for function definition  <http://docs.python.org/reference/compound_stmts.html#function>`_ for more about decorators.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1060\nmsgid \"environ\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1062\nmsgid \"A structure where information about all documents under the root is saved, and used for cross-referencing.  The environment is pickled after the parsing stage, so that successive runs only need to read and parse new and changed documents.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1066\nmsgid \"handler function\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1068\nmsgid \"A function to handle some specific event or situation. In a web framework, the application is developed by attaching a handler function as callback for each specific URL comprising the application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1071\nmsgid \"source directory\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1073\nmsgid \"The directory which, including its subdirectories, contains all source files for one Sphinx project.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/_pot/tutorial_app.pot",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../tutorial_app.rst:19\nmsgid \"Tutorial: Todo-List Application\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:23\nmsgid \"This tutorial is a work in progress and written by `noisefloor <http://github.com/noisefloor>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:26\nmsgid \"This tutorial should give a brief introduction to the Bottle_ WSGI Framework. The main goal is to be able, after reading through this tutorial, to create a project using Bottle. Within this document, not all abilities will be shown, but at least the main and important ones like routing, utilizing the Bottle template abilities to format output and handling GET / POST parameters.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:28\nmsgid \"To understand the content here, it is not necessary to have a basic knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. You should have a fair understanding of the Python_ programming language. Furthermore, the example used in the tutorial retrieves and stores data in a SQL database, so a basic idea about SQL helps, but is not a must to understand the concepts of Bottle. Right here, SQLite_ is used. The output of Bottle sent to the browser is formatted in some examples by the help of HTML. Thus, a basic idea about the common HTML tags does help as well.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:30\nmsgid \"For the sake of introducing Bottle, the Python code \\\"in between\\\" is kept short, in order to keep the focus. Also all code within the tutorial is working fine, but you may not necessarily use it \\\"in the wild\\\", e.g. on a public web server. In order to do so, you may add e.g. more error handling, protect the database with a password, test and escape the input etc.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:32\nmsgid \"Table of Contents\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:35\nmsgid \"Goals\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:37\nmsgid \"At the end of this tutorial, we will have a simple, web-based ToDo list. The list contains a text (with max 100 characters) and a status (0 for closed, 1 for open) for each item. Through the web-based user interface, open items can be view and edited and new items can be added.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:39\nmsgid \"During development, all pages will be available on ``localhost`` only, but later on it will be shown how to adapt the application for a \\\"real\\\" server, including how to use with Apache's mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:41\nmsgid \"Bottle will do the routing and format the output, with the help of templates. The items of the list will be stored inside a SQLite database. Reading and  writing the database will be done by Python code.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:43\nmsgid \"We will end up with an application with the following pages and functionality:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:45\nmsgid \"start page ``http://localhost:8080/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:46\nmsgid \"adding new items to the list: ``http://localhost:8080/new``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:47\nmsgid \"page for editing items: ``http://localhost:8080/edit/<no:int>``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:48\nmsgid \"catching errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:51\nmsgid \"Before We Start...\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:55\nmsgid \"Install Bottle\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:56\nmsgid \"Assuming that you have a fairly new installation of Python (version 2.5 or higher), you only need to install Bottle in addition to that. Bottle has no other dependencies than Python itself.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:58\nmsgid \"You can either manually install Bottle or use Python's easy_install: ``easy_install bottle``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:62\nmsgid \"Further Software Necessities\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:63\nmsgid \"As we use SQLite3 as a database, make sure it is installed. On Linux systems, most distributions have SQLite3 installed by default. SQLite is available for Windows and MacOS X as well and the `sqlite3` module is part of the python standard library.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:66\nmsgid \"Create An SQL Database\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:67\nmsgid \"First, we need to create the database we use later on. To do so, save the following script in your project directory and run it with python. You can use the interactive interpreter too::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:78\nmsgid \"This generates a database-file `todo.db` with tables called ``todo`` and three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for each row, which is used later on to reference the rows. The column ``task`` holds the text which describes the task, it can be max 100 characters long. Finally, the column ``status`` is used to mark a task as open (value 1) or closed (value 0).\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:81\nmsgid \"Using Bottle for a Web-Based ToDo List\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:83\nmsgid \"Now it is time to introduce Bottle in order to create a web-based application. But first, we need to look into a basic concept of Bottle: routes.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:87\nmsgid \"Understanding routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:88\nmsgid \"Basically, each page visible in the browser is dynamically generated when the page address is called. Thus, there is no static content. That is exactly what is called a \\\"route\\\" within Bottle: a certain address on the server. So, for example, when the page ``http://localhost:8080/todo`` is called from the browser, Bottle \\\"grabs\\\" the call and checks if there is any (Python) function defined for the route \\\"todo\\\". If so, Bottle will execute the corresponding Python code and return its result.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:92\nmsgid \"First Step - Showing All Open Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:93\nmsgid \"So, after understanding the concept of routes, let's create the first one. The goal is to see all open items from the ToDo list::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:108\nmsgid \"Save the code a ``todo.py``, preferably in the same directory as the file ``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the ``sqlite3.connect()`` statement.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:110\nmsgid \"Let's have a look what we just did: We imported the necessary module ``sqlite3`` to access to SQLite database and from Bottle we imported ``route`` and ``run``. The ``run()`` statement simply starts the web server included in Bottle. By default, the web server serves the pages on localhost and port 8080. Furthermore, we imported ``route``, which is the function responsible for Bottle's routing. As you can see, we defined one function, ``todo_list()``, with a few lines of code reading from the database. The important point is the `decorator statement`_ ``@route('/todo')`` right before the ``def todo_list()`` statement. By doing this, we bind this function to the route ``/todo``, so every time the browsers calls ``http://localhost:8080/todo``, Bottle returns the result of the function ``todo_list()``. That is how routing within bottle works.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:112\nmsgid \"Actually you can bind more than one route to a function. So the following code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:119\nmsgid \"will work fine, too. What will not work is to bind one route to more than one function.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:121\nmsgid \"What you will see in the browser is what is returned, thus the value given by the ``return`` statement. In this example, we need to convert ``result`` in to a string by ``str()``, as Bottle expects a string or a list of strings from the return statement. But here, the result of the database query is a list of tuples, which is the standard defined by the `Python DB API`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:123\nmsgid \"Now, after understanding the little script above, it is time to execute it and watch the result yourself. Remember that on Linux- / Unix-based systems the file ``todo.py`` needs to be executable first. Then, just run ``python todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. In case you made no mistake writing the script, the output should look like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:127\nmsgid \"If so - congratulations! You are now a successful user of Bottle. In case it did not work and you need to make some changes to the script, remember to stop Bottle serving the page, otherwise the revised version will not be loaded.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:129\nmsgid \"Actually, the output is not really exciting nor nice to read. It is the raw result returned from the SQL query.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:131\nmsgid \"So, in the next step we format the output in a nicer way. But before we do that, we make our life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:135\nmsgid \"Debugging and Auto-Reload\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:136\nmsgid \"Maybe you already noticed that Bottle sends a short error message to the browser in case something within the script is wrong, e.g. the connection to the database is not working. For debugging purposes it is quite helpful to get more details. This can be easily achieved by adding the following statement to the script::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:144\nmsgid \"By enabling \\\"debug\\\", you will get a full stacktrace of the Python interpreter, which usually contains useful information for finding bugs. Furthermore, templates (see below) are not cached, thus changes to templates will take effect without stopping the server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:148\nmsgid \"That ``debug(True)`` is supposed to be used for development only, it should *not* be used in production environments.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:152\nmsgid \"Another quite nice feature is auto-reloading, which is enabled by modifying the ``run()`` statement to\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:158\nmsgid \"This will automatically detect changes to the script and reload the new version once it is called again, without the need to stop and start the server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:160\nmsgid \"Again, the feature is mainly supposed to be used while developing, not on production systems.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:164\nmsgid \"Bottle Template To Format The Output\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:165\nmsgid \"Now let's have a look at casting the output of the script into a proper format.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:167\nmsgid \"Actually Bottle expects to receive a string or a list of strings from a function and returns them by the help of the built-in server to the browser. Bottle does not bother about the content of the string itself, so it can be text formatted with HTML markup, too.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:169\nmsgid \"Bottle brings its own easy-to-use template engine with it. Templates are stored as separate files having a ``.tpl`` extension. The template can be called then from within a function. Templates can contain any type of text (which will be most likely HTML-markup mixed with Python statements). Furthermore, templates can take arguments, e.g. the result set of a database query, which will be then formatted nicely within the template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:171\nmsgid \"Right here, we are going to cast the result of our query showing the open ToDo items into a simple table with two columns: the first column will contain the ID of the item, the second column the text. The result set is, as seen above, a list of tuples, each tuple contains one set of results.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:173\nmsgid \"To include the template in our example, just add the following lines::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:183\nmsgid \"So we do here two things: first, we import ``template`` from Bottle in order to be able to use templates. Second, we assign the output of the template ``make_table`` to the variable ``output``, which is then returned. In addition to calling the template, we assign ``result``, which we received from the database query, to the variable ``rows``, which is later on used within the template. If necessary, you can assign more than one variable / value to a template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:185\nmsgid \"Templates always return a list of strings, thus there is no need to convert anything. We can save one line of code by writing ``return template('make_table', rows=result)``, which gives exactly the same result as above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:187\nmsgid \"Now it is time to write the corresponding template, which looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:201\nmsgid \"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` is stored.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:203\nmsgid \"Let's have a look at the code: every line starting with % is interpreted as Python code. Because it is effectively Python, only valid Python statements are allowed. The template will raise exceptions, just as any other Python code would. The other lines are plain HTML markup.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:205\nmsgid \"As you can see, we use Python's ``for`` statement two times, in order to go through ``rows``. As seen above, ``rows`` is a variable which holds the result of the database query, so it is a list of tuples. The first ``for`` statement accesses the tuples within the list, the second one the items within the tuple, which are put each into a cell of the table. It is important that you close all ``for``, ``if``, ``while`` etc. statements with ``%end``, otherwise the output may not be what you expect.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:207\nmsgid \"If you need to access a variable within a non-Python code line inside the template, you need to put it into double curly braces. This tells the template to insert the actual value of the variable right in place.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:209\nmsgid \"Run the script again and look at the output. Still not really nice, but at least more readable than the list of tuples. You can spice-up the very simple HTML markup above, e.g. by using in-line styles to get a better looking output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:213\nmsgid \"Using GET and POST Values\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:214\nmsgid \"As we can review all open items properly, we move to the next step, which is adding new items to the ToDo list. The new item should be received from a regular HTML-based form, which sends its data by the GET method.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:216\nmsgid \"To do so, we first add a new route to our script and tell the route that it should get GET data::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:239\nmsgid \"To access GET (or POST) data, we need to import ``request`` from Bottle. To assign the actual data to a variable, we use the statement ``request.GET.task.strip()`` statement, where ``task`` is the name of the GET data we want to access. That's all. If your GET data has more than one variable, multiple ``request.GET.get()`` statements can be used and assigned to other variables.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:241\nmsgid \"The rest of this piece of code is just processing of the gained data: writing to the database, retrieve the corresponding id from the database and generate the output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:243\nmsgid \"But where do we get the GET data from? Well, we can use a static HTML page holding the form. Or, what we do right now, is to use a template which is output when the route ``/new`` is called without GET data.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:245\nmsgid \"The code needs to be extended to::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:268\nmsgid \"``new_task.tpl`` looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:276\nmsgid \"That's all. As you can see, the template is plain HTML this time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:278\nmsgid \"Now we are able to extend our to do list.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:280\nmsgid \"By the way, if you prefer to use POST data: this works exactly the same way, just use ``request.POST.get()`` instead.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:284\nmsgid \"Editing Existing Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:285\nmsgid \"The last point to do is to enable editing of existing items.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:287\nmsgid \"By using only the routes we know so far it is possible, but may be quite tricky. But Bottle knows something called \\\"dynamic routes\\\", which makes this task quite easy.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:289\nmsgid \"The basic statement for a dynamic route looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:293\nmsgid \"This tells Bottle to accept for ``<something>`` any string up to the next slash. Furthermore, the value of ``something`` will be passed to the function assigned to that route, so the data can be processed within the function, like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:321\nmsgid \"It is basically pretty much the same what we already did above when adding new items, like using ``GET`` data etc. The main addition here is using the dynamic route ``<no:int>``, which here passes the number to the corresponding function. As you can see, ``no`` is integer ID and used within the function to access the right row of data within the database.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:324\nmsgid \"The template ``edit_task.tpl`` called within the function looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:339\nmsgid \"Again, this template is a mix of Python statements and HTML, as already explained above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:341\nmsgid \"A last word on dynamic routes: you can even use a regular expression for a dynamic route, as demonstrated later.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:345\nmsgid \"Validating Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:346\nmsgid \"Using dynamic routes is fine, but for many cases it makes sense to validate the dynamic part of the route. For example, we expect an integer number in our route for editing above. But if a float, characters or so are received, the Python interpreter throws an exception, which is not what we want.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:348\nmsgid \"For those cases, Bottle offers the ``<name:int>`` wildcard filter, which matches (signed) digits and converts the value to integer. In order to apply the wildcard filter, extend the code as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:356\nmsgid \"Save the code and call the page again using incorrect value for ``<no:int>``, e.g. a float. You will receive not an exception, but a \\\"404 Not Found\\\" error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:360\nmsgid \"Dynamic Routes Using Regular Expressions\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:361\nmsgid \"Bottle can also handle dynamic routes, where the \\\"dynamic part\\\" of the route can be a regular expression.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:363\nmsgid \"So, just to demonstrate that, let's assume that all single items in our ToDo list should be accessible by their plain number, by a term like e.g. \\\"item1\\\". For obvious reasons, you do not want to create a route for every item. Furthermore, the simple dynamic routes do not work either, as part of the route, the term \\\"item\\\" is static.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:365\nmsgid \"As said above, the solution is a regular expression::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:380\nmsgid \"The line ``@route(/item<item:re:[0-9]+>)`` starts like a normal route, but the third part of the wildcard is interpreted as a regular expression, which is the dynamic part of the route. So in this case, we want to match any digit between 0 and 9. The following function \\\"show_item\\\" just checks whether the given item is present in the database or not. In case it is present, the corresponding text of the task is returned. As you can see, only the regular expression part of the route is passed forward. Furthermore, it is always forwarded as a string, even if it is a plain integer number, like in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:384\nmsgid \"Returning Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:385\nmsgid \"Sometimes it may become necessary to associate a route not to a Python function, but just return a static file. So if you have for example a help page for your application, you may want to return this page as plain HTML. This works as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:393\nmsgid \"At first, we need to import the ``static_file`` function from Bottle. As you can see, the ``return static_file`` statement replaces the ``return`` statement. It takes at least two arguments: the name of the file to be returned and the path to the file. Even if the file is in the same directory as your application, the path needs to be stated. But in this case, you can use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file automatically, but in case you like to state it explicitly, add a third argument to ``static_file``, which would be here ``mimetype='text/html'``. ``static_file`` works with any type of route, including the dynamic ones.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:397\nmsgid \"Returning JSON Data\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:398\nmsgid \"There may be cases where you do not want your application to generate the output directly, but return data to be processed further on, e.g. by JavaScript. For those cases, Bottle offers the possibility to return JSON objects, which is sort of standard for exchanging data between web applications. Furthermore, JSON can be processed by many programming languages, including Python\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:400\nmsgid \"So, let's assume we want to return the data generated in the regular expression route example as a JSON object. The code looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:415\nmsgid \"As you can, that is fairly simple: just return a regular Python dictionary and Bottle will convert it automatically into a JSON object prior to sending. So if you e.g. call \\\"http://localhost/json1\\\" Bottle should in this case return the JSON object ``{\\\"task\\\": [\\\"Read A-byte-of-python to get a good introduction into Python\\\"]}``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:420\nmsgid \"Catching Errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:421\nmsgid \"The next step may is to catch the error with Bottle itself, to keep away any type of error message from the user of your application. To do that, Bottle has an \\\"error-route\\\", which can be a assigned to a HTML-error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:423\nmsgid \"In our case, we want to catch a 403 error. The code is as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:431\nmsgid \"So, at first we need to import ``error`` from Bottle and define a route by ``error(403)``, which catches all \\\"403 forbidden\\\" errors. The function \\\"mistake\\\" is assigned to that. Please note that ``error()`` always passes the error-code to the function - even if you do not need it. Thus, the function always needs to accept one argument, otherwise it will not work.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:433\nmsgid \"Again, you can assign more than one error-route to a function, or catch various errors with one function each. So this code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:440\nmsgid \"works fine, the following one as well::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:452\nmsgid \"Summary\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:453\nmsgid \"After going through all the sections above, you should have a brief understanding how the Bottle WSGI framework works. Furthermore you have all the knowledge necessary to use Bottle for your applications.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:455\nmsgid \"The following chapter give a short introduction how to adapt Bottle for larger projects. Furthermore, we will show how to operate Bottle with web servers which perform better on a higher load / more web traffic than the one we used so far.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:458\nmsgid \"Server Setup\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:460\nmsgid \"So far, we used the standard server used by Bottle, which is the `WSGI reference Server`_ shipped along with Python. Although this server is perfectly suitable for development purposes, it is not really suitable for larger applications. But before we have a look at the alternatives, let's have a look how to tweak the settings of the standard server first.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:464\nmsgid \"Running Bottle on a different port and IP\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:465\nmsgid \"As standard, Bottle serves the pages on the IP address 127.0.0.1, also known as ``localhost``, and on port ``8080``. To modify the setting is pretty simple, as additional parameters can be passed to Bottle's ``run()`` function to change the port and the address.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:467\nmsgid \"To change the port, just add ``port=portnumber`` to the run command. So, for example::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:471\nmsgid \"would make Bottle listen to port 80.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:473\nmsgid \"To change the IP address where Bottle is listening::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:477\nmsgid \"If needed, both parameters can be combined, like::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:481\nmsgid \"The ``port`` and ``host`` parameter can also be applied when Bottle is running with a different server, as shown in the following section.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:485\nmsgid \"Running Bottle with a different server\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:486\nmsgid \"As said above, the standard server is perfectly suitable for development, personal use or a small group of people only using your application based on Bottle. For larger tasks, the standard server may become a bottleneck, as it is single-threaded, thus it can only serve one request at a time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:488\nmsgid \"But Bottle has already various adapters to multi-threaded servers on board, which perform better on higher load. Bottle supports Cherrypy_, Flup_ and Paste_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:490\nmsgid \"If you want to run for example Bottle with the Paste server, use the following code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:496\nmsgid \"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and ``FapwsServer``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:500\nmsgid \"Running Bottle on Apache with mod_wsgi\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:501\nmsgid \"Maybe you already have an Apache_ or you want to run a Bottle-based application large scale - then it is time to think about Apache with mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:503\nmsgid \"We assume that your Apache server is up and running and mod_wsgi is working fine as well. On a lot of Linux distributions, mod_wsgi can be easily installed via whatever package management system is in use.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:505\nmsgid \"Bottle brings an adapter for mod_wsgi with it, so serving your application is an easy task.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:507\nmsgid \"In the following example, we assume that you want to make your application \\\"ToDo list\\\" accessible through ``http://www.mypage.com/todo`` and your code, templates and SQLite database are stored in the path ``/var/www/todo``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:509\nmsgid \"When you run your application via mod_wsgi, it is imperative to remove the ``run()`` statement from your code, otherwise it won't work here.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:511\nmsgid \"After that, create a file called ``adapter.wsgi`` with the following content::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:522\nmsgid \"and save it in the same path, ``/var/www/todo``. Actually the name of the file can be anything, as long as the extension is ``.wsgi``. The name is only used to reference the file from your virtual host.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:524\nmsgid \"Finally, we need to add a virtual host to the Apache configuration, which looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:540\nmsgid \"After restarting the server, your ToDo list should be accessible at ``http://www.mypage.com/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:543\nmsgid \"Final Words\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:545\nmsgid \"Now we are at the end of this introduction and tutorial to Bottle. We learned about the basic concepts of Bottle and wrote a first application using the Bottle framework. In addition to that, we saw how to adapt Bottle for large tasks and serve Bottle through an Apache web server with mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:547\nmsgid \"As said in the introduction, this tutorial is not showing all shades and possibilities of Bottle. What we skipped here is e.g. receiving file objects and streams and how to handle authentication data. Furthermore, we did not show how templates can be called from within another template. For an introduction into those points, please refer to the full `Bottle documentation`_ .\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:550\nmsgid \"Complete Example Listing\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:552\nmsgid \"As the ToDo list example was developed piece by piece, here is the complete listing:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:554\nmsgid \"Main code for the application ``todo.py``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:675\nmsgid \"Template ``make_table.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:689\nmsgid \"Template ``edit_task.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:704\nmsgid \"Template ``new_task.tpl``::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/api.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# defnull <marc@gsites.de>, 2015\n# defnull <marc@gsites.de>, 2015\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../api.rst:3\nmsgid \"API Reference\"\nmsgstr \"API Referenz\"\n\n#: ../../api.rst:10\nmsgid \"\"\n\"This is a mostly auto-generated API. If you are new to bottle, you might \"\n\"find the narrative :doc:`tutorial` more helpful.\"\nmsgstr \"Diese API wurde größtenteils automatisch generiert. Wenn Bottle für dich neu ist, bietet :doc:`tutorial` einen guten Einstieg.\"\n\n#: ../../api.rst:17\nmsgid \"Module Contents\"\nmsgstr \"\"\n\n#: ../../api.rst:19\nmsgid \"The module defines several functions, constants, and an exception.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.debug:1\nmsgid \"\"\n\"Change the debug level. There is only one debug level supported at the \"\n\"moment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:1\nmsgid \"\"\n\"Start a server instance. This method blocks until the server terminates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:0 ../../../bottle.pydocstring of\n#: bottle.path_shift:0 ../../../bottle.pydocstring of bottle.MultiDict.get:0\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:0\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:0\n#: ../../../bottle.pydocstring of bottle.Bottle:0 ../../../bottle.pydocstring\n#: of bottle.Bottle.mount:0 ../../../bottle.pydocstring of\n#: bottle.Bottle.route:0 ../../../bottle.pydocstring of\n#: bottle.BaseRequest.path_shift:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:3\nmsgid \"\"\n\"WSGI application or target string supported by :func:`load_app`. (default: \"\n\":func:`default_app`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:5\nmsgid \"\"\n\"Server adapter to use. See :data:`server_names` keys for valid names or pass\"\n\" a :class:`ServerAdapter` subclass. (default: `wsgiref`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:8\nmsgid \"\"\n\"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces \"\n\"including the external one. (default: 127.0.0.1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:10\nmsgid \"\"\n\"Server port to bind to. Values below 1024 require root privileges. (default:\"\n\" 8080)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:12\nmsgid \"Start auto-reloading server? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:13\nmsgid \"Auto-reloader interval in seconds (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:14\nmsgid \"Suppress output to stdout and stderr? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:15\nmsgid \"Options passed to the server adapter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:1\nmsgid \"Import a module or fetch an object from a module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:3\nmsgid \"``package.module`` returns `module` as a module object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:4\nmsgid \"``pack.mod:name`` returns the module variable `name` from `pack.mod`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:5\nmsgid \"``pack.mod:func()`` calls `pack.mod.func()` and returns the result.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:7\nmsgid \"\"\n\"The last form accepts not only function calls, but any type of expression. \"\n\"Keyword arguments passed to this function are available as local variables. \"\n\"Example: ``import_string('re:compile(x)', x='[a-z]')``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load_app:1\nmsgid \"\"\n\"Load a bottle application from a module and make sure that the import does \"\n\"not affect the current default application, but returns a separate \"\n\"application object. See :func:`load` for the target parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.request:1 ../../../bottle.pydocstring\n#: of bottle.request:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalRequest`. If accessed from within a \"\n\"request callback, this instance always refers to the *current* request (even\"\n\" on a multi-threaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.response:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalResponse`. It is used to change the \"\n\"HTTP response for the *current* request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HTTP_CODES:1\nmsgid \"\"\n\"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')\"\nmsgstr \"\"\n\n#: ../../api.rst:38\nmsgid \"\"\n\"Return the current :ref:`default-app`. Actually, these are callable \"\n\"instances of :class:`AppStack` and implement a stack-like API.\"\nmsgstr \"\"\n\n#: ../../api.rst:42\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../api.rst:44\nmsgid \"\"\n\"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and \"\n\":class:`AppStack`) and uses the top of the stack as a *default application* \"\n\"for some of the module-level functions and decorators.\"\nmsgstr \"\"\n\n#: ../../api.rst:54\nmsgid \"\"\n\"Decorator to install a route to the current default application. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:59\nmsgid \"\"\n\"Decorator to install an error handler to the current default application. \"\n\"See :meth:`Bottle.error` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:63\nmsgid \"WSGI and HTTP Utilities\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_date:1\nmsgid \"Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_auth:1\nmsgid \"\"\n\"Parse rfc2617 HTTP authentication header string (basic) and return \"\n\"(user,pass) tuple or None\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_encode:1\nmsgid \"Encode and sign a pickle-able object. Return a (byte) string\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_decode:1\nmsgid \"Verify and decode an encoded string. Return an object or None.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_is_encoded:1\nmsgid \"Return True if the argument looks like a encoded cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.yieldroutes:1\nmsgid \"\"\n\"Return a generator for routes that match the signature (name, args) of the \"\n\"func parameter. This may yield more than one route if the function takes \"\n\"optional keyword arguments. The output is best described by example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:1\nmsgid \"Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:0\nmsgid \"Returns\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:3\nmsgid \"The modified paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:4\nmsgid \"The SCRIPT_NAME path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:5\nmsgid \"The PATH_INFO path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:6\nmsgid \"\"\n\"The number of path fragments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../api.rst:81\nmsgid \"Data Structures\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict:1\nmsgid \"\"\n\"This dict stores multiple values per key, but behaves exactly like a normal \"\n\"dict in that it returns only the newest value for any given key. There are \"\n\"special methods available to access the full list of values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.keys:1\nmsgid \"D.keys() -> a set-like object providing a view on D's keys\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.values:1\nmsgid \"D.values() -> an object providing a view on D's values\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.items:1\nmsgid \"D.items() -> a set-like object providing a view on D's items\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:1\nmsgid \"Return the most recent value for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:3\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:3\nmsgid \"\"\n\"The default value to be returned if the key is not present or the type \"\n\"conversion fails.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:5\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:5\nmsgid \"An index for the list of available values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:6\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:6\nmsgid \"\"\n\"If defined, this callable is used to cast the value into a specific type. \"\n\"Exception are suppressed and result in the default value to be returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.append:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.append:1\nmsgid \"Add a new value to the list of values for this key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.replace:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.replace:1\nmsgid \"Replace the list of values with a single value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.getall:1\nmsgid \"Return a (possibly empty) list of values for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\nmsgid \"Aliases for WTForms to mimic other multi-dict APIs (Django)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HeaderDict:1\nmsgid \"\"\n\"A case-insensitive version of :class:`MultiDict` that defaults to replace \"\n\"the old value instead of appending it.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict:1\nmsgid \"\"\n\"This :class:`MultiDict` subclass is used to store request form data. \"\n\"Additionally to the normal dict-like item access methods (which return \"\n\"unmodified data as native strings), this container also supports attribute-\"\n\"like access to its values. Attributes are automatically de- or recoded to \"\n\"match :attr:`input_encoding` (default: 'utf8'). Missing attributes default \"\n\"to an empty string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.input_encoding:1\nmsgid \"Encoding used for attribute values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.recode_unicode:1\nmsgid \"\"\n\"If true (default), unicode strings are first encoded with `latin1` and then \"\n\"decoded to match :attr:`input_encoding`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.decode:1\nmsgid \"\"\n\"Returns a copy with all keys and values de- or recoded to match \"\n\":attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode \"\n\"dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.getunicode:1\nmsgid \"Return the value as a unicode string, or the default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:1\nmsgid \"\"\n\"This dict-like class wraps a WSGI environ dict and provides convenient \"\n\"access to HTTP_* fields. Keys and values are native strings (2.x bytes or \"\n\"3.x unicode) and keys are case-insensitive. If the WSGI environment contains\"\n\" non-native string values, these are de- or encoded using a lossless \"\n\"'latin1' character set.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:7\nmsgid \"\"\n\"The API will remain stable even on changes to the relevant PEPs. Currently \"\n\"PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-\"\n\"native strings.)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.cgikeys:1\nmsgid \"List of keys that do not have a ``HTTP_`` prefix.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.raw:1\nmsgid \"Return the header value as is (may be bytes or unicode).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack:1\nmsgid \"A stack-like list. Calling it returns the head of the stack.\"\nmsgstr \"\"\n\n#: ../../api.rst:100\nmsgid \"Return the current default application and remove it from the stack.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\nmsgid \"Add a new :class:`Bottle` instance to the stack\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:1\nmsgid \"\"\n\"This class manages a list of search paths and helps to find and open \"\n\"application-bound resources (files).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:4\nmsgid \"default value for :meth:`add_path` calls.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:5\nmsgid \"callable used to open resources.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:6\nmsgid \"controls which lookups are cached. One of 'all', 'found' or 'none'.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.path:1\nmsgid \"A list of search paths. See :meth:`add_path` for details.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.cache:1\nmsgid \"A cache for resolved paths. ``res.cache.clear()`` clears the cache.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:1\nmsgid \"\"\n\"Add a new path to the list of search paths. Return False if the path does \"\n\"not exist.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:4\nmsgid \"\"\n\"The new search path. Relative paths are turned into an absolute and \"\n\"normalized form. If the path looks like a file (not ending in `/`), the \"\n\"filename is stripped off.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:7\nmsgid \"\"\n\"Path used to absolutize relative search paths. Defaults to :attr:`base` \"\n\"which defaults to ``os.getcwd()``.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:9\nmsgid \"\"\n\"Position within the list of search paths. Defaults to last index (appends to\"\n\" the list).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:12\nmsgid \"\"\n\"The `base` parameter makes it easy to reference files installed along with a\"\n\" python module or package::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:1\nmsgid \"Search for a resource and return an absolute file path, or `None`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:3\nmsgid \"\"\n\"The :attr:`path` list is searched in order. The first match is returned. \"\n\"Symlinks are followed. The result is cached to speed up future lookups.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.open:1\nmsgid \"Find a resource and return a file object, or raise IOError.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.file:1\nmsgid \"Open file(-like) object (BytesIO buffer or temporary file)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.name:1\nmsgid \"Name of the upload form field\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.raw_filename:1\nmsgid \"Raw filename as sent by the client (may contain unsafe characters)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.headers:1\nmsgid \"A :class:`HeaderDict` with additional headers (e.g. content-type)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_type:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_type:1\nmsgid \"Current value of the 'Content-Type' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_length:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_length:1\nmsgid \"Current value of the 'Content-Length' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.get_header:1\nmsgid \"Return the value of a header within the mulripart part.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:1\nmsgid \"\"\n\"Name of the file on the client file system, but normalized to ensure file \"\n\"system compatibility. An empty filename is returned as 'empty'.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:4\nmsgid \"\"\n\"Only ASCII letters, digits, dashes, underscores and dots are allowed in the \"\n\"final filename. Accents are removed, if possible. Whitespace is replaced by \"\n\"a single dash. Leading or tailing dots or dashes are removed. The filename \"\n\"is limited to 255 characters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:1\nmsgid \"\"\n\"Save file to disk or copy its content to an open file(-like) object. If \"\n\"*destination* is a directory, :attr:`filename` is added to the path. \"\n\"Existing files are not overwritten by default (IOError).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:5\nmsgid \"File path, directory or file(-like) object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:6\nmsgid \"If True, replace existing files. (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:7\nmsgid \"Bytes to read at a time. (default: 64kb)\"\nmsgstr \"\"\n\n#: ../../api.rst:109\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BottleException:1\nmsgid \"A base class for exceptions used by bottle.\"\nmsgstr \"\"\n\n#: ../../api.rst:117\nmsgid \"The :class:`Bottle` Class\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:1\nmsgid \"\"\n\"Each Bottle object represents a single, distinct web application and \"\n\"consists of routes, callbacks, plugins, resources and configuration. \"\n\"Instances are callable WSGI applications.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:5\nmsgid \"\"\n\"If true (default), handle all exceptions. Turn off to let debugging \"\n\"middleware handle exceptions.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.config:1\nmsgid \"A :class:`ConfigDict` for app specific configuration.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.resources:1\nmsgid \"A :class:`ResourceManager` for application files\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.catchall:1\nmsgid \"If true, most exceptions are caught and returned as :exc:`HTTPError`\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:1\nmsgid \"Attach a callback to a hook. Three hooks are currently implemented:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"before_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"\"\n\"Executed once before each request. The request context is available, but no \"\n\"routing has happened yet.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:6\nmsgid \"after_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:7\nmsgid \"Executed once after each request regardless of its outcome.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:8\nmsgid \"app_reset\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:9\nmsgid \"Called whenever :meth:`Bottle.reset` is called.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.remove_hook:1\nmsgid \"Remove a callback from a hook.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.trigger_hook:1\nmsgid \"Trigger a hook and return a list of results.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.hook:1\nmsgid \"\"\n\"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` \"\n\"for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:1\nmsgid \"\"\n\"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL \"\n\"prefix. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:6\nmsgid \"path prefix or `mount-point`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:7\nmsgid \"an instance of :class:`Bottle` or a WSGI application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:9\nmsgid \"\"\n\"Plugins from the parent application are not applied to the routes of the \"\n\"mounted child application. If you need plugins in the child application, \"\n\"install them separately.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:13\nmsgid \"\"\n\"While it is possible to use path wildcards within the prefix path \"\n\"(:class:`Bottle` childs only), it is highly discouraged.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:16\nmsgid \"\"\n\"The prefix path must end with a slash. If you want to access the root of the\"\n\" child application via `/prefix` in addition to `/prefix/`, consider adding \"\n\"a route with a 307 redirect to the parent application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.merge:1\nmsgid \"\"\n\"Merge the routes of another :class:`Bottle` application or a list of \"\n\":class:`Route` objects into this application. The routes keep their 'owner',\"\n\" meaning that the :data:`Route.app` attribute is not changed.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.install:1\nmsgid \"\"\n\"Add a plugin to the list of plugins and prepare it for being applied to all \"\n\"routes of this application. A plugin may be a simple decorator or an object \"\n\"that implements the :class:`Plugin` API.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.uninstall:1\nmsgid \"\"\n\"Uninstall plugins. Pass an instance to remove a specific plugin, a type \"\n\"object to remove all plugins that match that type, a string to remove all \"\n\"plugins with a matching ``name`` attribute or ``True`` to remove all \"\n\"plugins. Return the list of removed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.reset:1\nmsgid \"\"\n\"Reset all routes (force plugins to be re-applied) and clear all caches. If \"\n\"an ID or route object is given, only that specific route is affected.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.close:1\nmsgid \"Close the application and all installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.run:1\nmsgid \"Calls :func:`run` with the same parameters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.match:1\nmsgid \"\"\n\"Search for a matching route and return a (:class:`Route`, urlargs) tuple. \"\n\"The second value is a dictionary with parameters extracted from the URL. \"\n\"Raise :exc:`HTTPError` (404/405) on a non-match.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get_url:1\nmsgid \"Return a string that matches a named route\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_route:1\nmsgid \"Add a route object, but do not change the :data:`Route.app` attribute.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:1\nmsgid \"A decorator to bind a function to a request URL. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:7\nmsgid \"\"\n\"The ``<name>`` part is a wildcard. See :class:`Router` for syntax details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:10\nmsgid \"\"\n\"Request path or a list of paths to listen to. If no path is specified, it is\"\n\" automatically generated from the signature of the function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:13\nmsgid \"\"\n\"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. \"\n\"(default: `GET`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:15\nmsgid \"\"\n\"An optional shortcut to avoid the decorator syntax. ``route(..., \"\n\"callback=func)`` equals ``route(...)(func)``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:17\nmsgid \"The name for this route. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:18\nmsgid \"\"\n\"A decorator or plugin or a list of plugins. These are applied to the route \"\n\"callback in addition to installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:20\nmsgid \"\"\n\"A list of plugins, plugin classes or names. Matching plugins are not \"\n\"installed to this route. ``True`` skips all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:23\nmsgid \"\"\n\"Any additional keyword arguments are stored as route-specific configuration \"\n\"and passed to plugins (see :meth:`Plugin.apply`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get:1\nmsgid \"Equals :meth:`route`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.post:1\nmsgid \"Equals :meth:`route` with a ``POST`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.put:1\nmsgid \"Equals :meth:`route` with a ``PUT`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.delete:1\nmsgid \"Equals :meth:`route` with a ``DELETE`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.patch:1\nmsgid \"Equals :meth:`route` with a ``PATCH`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.error:1\nmsgid \"\"\n\"Register an output handler for a HTTP error code. Can be used as a decorator\"\n\" or called directly ::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.wsgi:1\nmsgid \"The bottle WSGI-interface.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route:1\nmsgid \"\"\n\"This class wraps a route callback along with route specific metadata and \"\n\"configuration and applies Plugins on demand. It is also responsible for \"\n\"turning an URL path rule into a regular expression usable by the Router.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.app:1\nmsgid \"The application this route is installed to.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.rule:1\nmsgid \"The path-rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.method:1\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.callback:1\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.name:1\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.plugins:1\nmsgid \"A list of route-specific plugins (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.skiplist:1\nmsgid \"\"\n\"A list of plugins to not apply to this route (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.config:1\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific plugin configuration \"\n\"and meta-data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.call:1\nmsgid \"\"\n\"The route callback with all plugins applied. This property is created on \"\n\"demand and then cached to speed up subsequent requests.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.reset:1\nmsgid \"\"\n\"Forget any cached values. The next time :attr:`call` is accessed, all \"\n\"plugins are re-applied.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.prepare:1\nmsgid \"Do all on-demand work immediately (useful for debugging).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.all_plugins:1\nmsgid \"Yield all Plugins affecting this route.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_undecorated_callback:1\nmsgid \"\"\n\"Return the callback. If the callback is a decorated function, try to recover\"\n\" the original function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_callback_args:1\nmsgid \"\"\n\"Return a list of argument names the callback (most likely) accepts as \"\n\"keyword arguments. If the callback is a decorated function, try to recover \"\n\"the original function before inspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_config:1\nmsgid \"\"\n\"Lookup a config field and return its value, first checking the route.config,\"\n\" then route.app.config.\"\nmsgstr \"\"\n\n#: ../../api.rst:127\nmsgid \"The :class:`Request` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:129\nmsgid \"\"\n\"The :class:`Request` class wraps a WSGI environment and provides helpful \"\n\"methods to parse and access form data, cookies, file uploads and other \"\n\"metadata. Most of the attributes are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:1\nmsgid \"\"\n\"A wrapper for WSGI environment dictionaries that adds a lot of convenient \"\n\"access methods and properties. Most of them are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:4\nmsgid \"\"\n\"Adding new attributes to a request actually adds them to the environ \"\n\"dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to \"\n\"store and access request-specific data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.MEMFILE_MAX:1\nmsgid \"Maximum size of memory buffer for :attr:`body` in bytes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.environ:1\nmsgid \"\"\n\"The wrapped WSGI environ dictionary. This is the only real attribute. All \"\n\"other attributes actually are read-only properties.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.app:1\nmsgid \"Bottle application handling this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.route:1\nmsgid \"The bottle :class:`Route` object that matches this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url_args:1\nmsgid \"The arguments extracted from the URL.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path:1\nmsgid \"\"\n\"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken \"\n\"clients and avoid the \\\"empty path\\\" edge case).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.method:1\nmsgid \"The ``REQUEST_METHOD`` value as an uppercase string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.headers:1\nmsgid \"\"\n\"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP \"\n\"request headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_header:1\nmsgid \"Return the value of a request header, or a given default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.cookies:1\nmsgid \"\"\n\"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. \"\n\"Use :meth:`get_cookie` if you expect signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_cookie:1\nmsgid \"\"\n\"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must\"\n\" match the one used to create the cookie (see \"\n\":meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or \"\n\"wrong signature), return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"\"\n\"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are \"\n\"sometimes called \\\"URL arguments\\\" or \\\"GET parameters\\\", but not to be \"\n\"confused with \\\"URL wildcards\\\" as they are provided by the :class:`Router`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.forms:1\nmsgid \"\"\n\"Form values parsed from an `url-encoded` or `multipart/form-data` encoded \"\n\"POST or PUT request body. The result is returned as a :class:`FormsDict`. \"\n\"All keys and values are strings. File uploads are stored separately in \"\n\":attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.params:1\nmsgid \"\"\n\"A :class:`FormsDict` with the combined values of :attr:`query` and \"\n\":attr:`forms`. File uploads are stored in :attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.files:1\nmsgid \"\"\n\"File uploads parsed from `multipart/form-data` encoded POST or PUT request \"\n\"body. The values are instances of :class:`FileUpload`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.json:1\nmsgid \"\"\n\"If the ``Content-Type`` header is ``application/json`` or ``application\"\n\"/json-rpc``, this property holds the parsed content of the request body. \"\n\"Only requests smaller than :attr:`MEMFILE_MAX` are processed to avoid memory\"\n\" exhaustion. Invalid JSON raises a 400 error response.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.body:1\nmsgid \"\"\n\"The HTTP request body as a seek-able file-like object. Depending on \"\n\":attr:`MEMFILE_MAX`, this is either a temporary file or a \"\n\":class:`io.BytesIO` instance. Accessing this property for the first time \"\n\"reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses \"\n\"just do a `seek(0)` on the file object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.chunked:1\nmsgid \"True if Chunked transfer encoding was.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"An alias for :attr:`query`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.POST:1\nmsgid \"\"\n\"The values of :attr:`forms` and :attr:`files` combined into a single \"\n\":class:`FormsDict`. Values are either strings (form values) or instances of \"\n\":class:`cgi.FieldStorage` (file uploads).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url:1\nmsgid \"\"\n\"The full request URI including hostname and scheme. If your app lives behind\"\n\" a reverse proxy or load balancer and you get confusing results, make sure \"\n\"that the ``X-Forwarded-Host`` header is set correctly.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.urlparts:1\nmsgid \"\"\n\"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple \"\n\"contains (scheme, host, path, query_string and fragment), but the fragment \"\n\"is always empty because it is not visible to the server.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.fullpath:1\nmsgid \"Request path including :attr:`script_name` (if present).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query_string:1\nmsgid \"\"\n\"The raw :attr:`query` part of the URL (everything in between ``?`` and \"\n\"``#``) as a string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.script_name:1\nmsgid \"\"\n\"The initial portion of the URL's `path` that was removed by a higher level \"\n\"(server or routing middleware) before the application was called. This \"\n\"script path is returned with leading and tailing slashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"Shift path segments from :attr:`path` to :attr:`script_name` and\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:4\nmsgid \"\"\n\"The number of path segments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_length:1\nmsgid \"\"\n\"The request body length as an integer. The client is responsible to set this\"\n\" header. Otherwise, the real length of the body is unknown and -1 is \"\n\"returned. In this case, :attr:`body` will be empty.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_type:1\nmsgid \"The Content-Type header as a lowercase-string (default: empty).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_xhr:1\nmsgid \"\"\n\"True if the request was triggered by a XMLHttpRequest. This only works with \"\n\"JavaScript libraries that support the `X-Requested-With` header (most of the\"\n\" popular libraries do).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_ajax:1\nmsgid \"Alias for :attr:`is_xhr`. \\\"Ajax\\\" is not the right term.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.auth:1\nmsgid \"\"\n\"HTTP authentication data as a (user, password) tuple. This implementation \"\n\"currently supports basic (not digest) authentication only. If the \"\n\"authentication happened at a higher level (e.g. in the front web-server or a\"\n\" middleware), the password field is None, but the user field is looked up \"\n\"from the ``REMOTE_USER`` environ variable. On any errors, None is returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_route:1\nmsgid \"\"\n\"A list of all IPs that were involved in this request, starting with the \"\n\"client IP and followed by zero or more proxies. This does only work if all \"\n\"proxies support the ```X-Forwarded-For`` header. Note that this information \"\n\"can be forged by malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_addr:1\nmsgid \"\"\n\"The client IP as a string. Note that this information can be forged by \"\n\"malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.copy:1\nmsgid \"Return a new :class:`Request` with a shallow :attr:`environ` copy.\"\nmsgstr \"\"\n\n#: ../../api.rst:137\nmsgid \"\"\n\"The module-level :data:`bottle.request` is a proxy object (implemented in \"\n\":class:`LocalRequest`) and always refers to the `current` request, or in \"\n\"other words, the request that is currently processed by the request handler \"\n\"in the current thread. This `thread locality` ensures that you can safely \"\n\"use a global instance in a multi-threaded environment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseRequest` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`request`). If accessed during a request/response cycle, \"\n\"this instance always refers to the *current* request (even on a \"\n\"multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.__init__:1\nmsgid \"Wrap a WSGI environ dictionary.\"\nmsgstr \"\"\n\n#: ../../api.rst:146\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:148\nmsgid \"\"\n\"The :class:`Response` class stores the HTTP status code as well as headers \"\n\"and cookies that are to be sent to the client. Similar to \"\n\":data:`bottle.request` there is a thread-local :data:`bottle.response` \"\n\"instance that can be used to adjust the `current` response. Moreover, you \"\n\"can instantiate :class:`Response` and return it from your request handler. \"\n\"In this case, the custom instance overrules the headers and cookies defined \"\n\"in the global one.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:1\nmsgid \"Storage class for a response body as well as headers and cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:3\nmsgid \"\"\n\"This class does support dict-like case-insensitive item-access to headers, \"\n\"but is NOT a dict. Most notably, iterating over a response yields parts of \"\n\"the body and not the headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:7\nmsgid \"The response body as one of the supported types.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:8\nmsgid \"\"\n\"Either an HTTP status code (e.g. 200) or a status line including the reason \"\n\"phrase (e.g. '200 OK').\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:10\nmsgid \"A dictionary or a list of name-value pairs.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:12\nmsgid \"\"\n\"Additional keyword arguments are added to the list of headers. Underscores \"\n\"in the header name are replaced with dashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.copy:1\nmsgid \"Returns a copy of self.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_line:1\nmsgid \"The HTTP status line as a string (e.g. ``404 Not Found``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_code:1\nmsgid \"The HTTP status code as an integer (e.g. 404).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status:1\nmsgid \"\"\n\"A writeable property to change the HTTP response status. It accepts either a\"\n\" numeric code (100-999) or a string with a custom reason phrase (e.g. \\\"404 \"\n\"Brain not found\\\"). Both :data:`status_line` and :data:`status_code` are \"\n\"updated accordingly. The return value is always a status string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headers:1\nmsgid \"\"\n\"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the\"\n\" response headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.get_header:1\nmsgid \"\"\n\"Return the value of a previously defined header. If there is no header with \"\n\"that name, return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_header:1\nmsgid \"\"\n\"Create a new response header, replacing any previously defined headers with \"\n\"the same name.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.add_header:1\nmsgid \"Add an additional response header, not removing duplicates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.iter_headers:1\nmsgid \"\"\n\"Yield (header, value) tuples, skipping headers that are not allowed with the\"\n\" current response status code.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headerlist:1\nmsgid \"WSGI conform list of (header, value) tuples.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.expires:1\nmsgid \"Current value of the 'Expires' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.charset:1\nmsgid \"\"\n\"Return the charset specified in the content-type header (default: utf8).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:1\nmsgid \"\"\n\"Create a new cookie or replace an old one. If the `secret` parameter is set,\"\n\" create a `Signed Cookie` (described below).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:4\nmsgid \"the name of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:5\nmsgid \"the value of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:6\nmsgid \"a signature key required for signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:8\nmsgid \"\"\n\"Additionally, this method accepts all RFC 2109 attributes that are supported\"\n\" by :class:`cookie.Morsel`, including:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:11\nmsgid \"maximum age in seconds. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:12\nmsgid \"a datetime object or UNIX timestamp. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:13\nmsgid \"\"\n\"the domain that is allowed to read the cookie. (default: current domain)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:15\nmsgid \"limits the cookie to a given path (default: current path)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:16\nmsgid \"limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:17\nmsgid \"\"\n\"prevents client-side javascript to read this cookie (default: off, requires \"\n\"Python 2.6 or newer).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:19\nmsgid \"\"\n\"Control or disable third-party use for this cookie. Possible values: `lax`, \"\n\"`strict` or `none` (default).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:22\nmsgid \"\"\n\"If neither `expires` nor `maxage` is set (default), the cookie will expire \"\n\"at the end of the browser session (as soon as the browser window is closed).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:26\nmsgid \"\"\n\"Signed cookies may store any pickle-able object and are cryptographically \"\n\"signed to prevent manipulation. Keep in mind that cookies are limited to 4kb\"\n\" in most browsers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:30\nmsgid \"\"\n\"Warning: Pickle is a potentially dangerous format. If an attacker gains \"\n\"access to the secret key, he could forge cookies that execute code on server\"\n\" side if unpickled. Using pickle is discouraged and support for it will be \"\n\"removed in later versions of bottle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:35\nmsgid \"\"\n\"Warning: Signed cookies are not encrypted (the client can still see the \"\n\"content) and not copy-protected (the client can restore an old cookie). The \"\n\"main intention is to make pickling and unpickling save, not to store secret \"\n\"information at client side.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.delete_cookie:1\nmsgid \"\"\n\"Delete a cookie. Be sure to use the same `domain` and `path` settings as \"\n\"used to create the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseResponse` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`response`). Its attributes are used to build the HTTP \"\n\"response at the end of the request/response cycle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.__init__:1\nmsgid \"Initialize self.  See help(type(self)) for accurate signature.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse.body:1\nmsgid \"Thread-local property\"\nmsgstr \"\"\n\n#: ../../api.rst:160\nmsgid \"\"\n\"The following two classes can be raised as an exception. The most noticeable\"\n\" difference is that bottle invokes error handlers for :class:`HTTPError`, \"\n\"but not for :class:`HTTPResponse` or other response types.\"\nmsgstr \"\"\n\n#: ../../api.rst:172\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../api.rst:174\nmsgid \"\"\n\"All template engines supported by :mod:`bottle` implement the \"\n\":class:`BaseTemplate` API. This way it is possible to switch and mix \"\n\"template engines without changing the application code at all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate:1\nmsgid \"Base class and minimal API for template adapters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.__init__:1\nmsgid \"\"\n\"Create a new template. If the source parameter (str or buffer) is missing, \"\n\"the name argument is used to guess a template filename. Subclasses can \"\n\"assume that self.source and/or self.filename are set. Both are strings. The \"\n\"lookup, encoding and settings parameters are stored as instance variables. \"\n\"The lookup parameter stores a list containing directory paths. The encoding \"\n\"parameter should be used to decode byte strings or files. The settings \"\n\"parameter contains a dict for engine-specific settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.search:1\nmsgid \"\"\n\"Search name in all directories specified in lookup. First without, then with\"\n\" common extensions. Return first hit.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.global_config:1\nmsgid \"This reads or sets the global settings stored in class.settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.render:1\nmsgid \"\"\n\"Render the template with the specified local variables and return a single \"\n\"byte or unicode string. If it is a byte string, the encoding must match \"\n\"self.encoding. This method must be thread-safe! Local variables may be \"\n\"provided in dictionaries (args) or directly, as keywords (kwargs).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:1\nmsgid \"\"\n\"Decorator: renders a template for a handler. The handler can control its \"\n\"behavior like that:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:4\nmsgid \"return a dict of template vars to fill out the template\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:5\nmsgid \"\"\n\"return something other than a dict and the view decorator will not process \"\n\"the template, but return the handler result as is. This includes returning a\"\n\" HTTPResponse(dict) to get, for instance, JSON with autojson or other \"\n\"castfilters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.template:1\nmsgid \"\"\n\"Get a rendered template as a string iterator. You can use a name, a filename\"\n\" or a template string as first parameter. Template rendering arguments can \"\n\"be passed as dictionaries or directly (as keyword arguments).\"\nmsgstr \"\"\n\n#: ../../api.rst:185\nmsgid \"\"\n\"You can write your own adapter for your favourite template engine or use one\"\n\" of the predefined adapters. Currently there are four fully supported \"\n\"template engines:\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Class\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"URL\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Decorator\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Render function\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":class:`SimpleTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`view`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`template`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":class:`MakoTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \"http://www.makotemplates.org\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":class:`CheetahTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \"http://www.cheetahtemplate.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":class:`Jinja2Template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \"http://jinja.pocoo.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:196\nmsgid \"\"\n\"To use :class:`MakoTemplate` as your default template engine, just import \"\n\"its specialised decorator and render function::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/async.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2017-08-03 11:49+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../async.rst:2\nmsgid \"Primer to Asynchronous Applications\"\nmsgstr \"\"\n\n#: ../../async.rst:4\nmsgid \"\"\n\"Asynchronous design patterns don't mix well with the synchronous nature of \"\n\"`WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most \"\n\"asynchronous frameworks (tornado, twisted, ...) implement a specialized API \"\n\"to expose their asynchronous features. Bottle is a WSGI framework and shares\"\n\" the synchronous nature of WSGI, but thanks to the awesome `gevent project \"\n\"<http://www.gevent.org/>`_, it is still possible to write asynchronous \"\n\"applications with bottle. This article documents the usage of Bottle with \"\n\"Asynchronous WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:7\nmsgid \"The Limits of Synchronous WSGI\"\nmsgstr \"\"\n\n#: ../../async.rst:9\nmsgid \"\"\n\"Briefly worded, the `WSGI specification (pep 3333) \"\n\"<http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response \"\n\"circle as follows: The application callable is invoked once for each request\"\n\" and must return a body iterator. The server then iterates over the body and\"\n\" writes each chunk to the socket. As soon as the body iterator is exhausted,\"\n\" the client connection is closed.\"\nmsgstr \"\"\n\n#: ../../async.rst:11\nmsgid \"\"\n\"Simple enough, but there is a snag: All this happens synchronously. If your \"\n\"application needs to wait for data (IO, sockets, databases, ...), it must \"\n\"either yield empty strings (busy wait) or block the current thread. Both \"\n\"solutions occupy the handling thread and prevent it from answering new \"\n\"requests. There is consequently only one ongoing request per thread.\"\nmsgstr \"\"\n\n#: ../../async.rst:13\nmsgid \"\"\n\"Most servers limit the number of threads to avoid their relatively high \"\n\"overhead. Pools of 20 or less threads are common. As soon as all threads are\"\n\" occupied, any new connection is stalled. The server is effectively dead for\"\n\" everyone else. If you want to implement a chat that uses long-polling ajax \"\n\"requests to get real-time updates, you'd reach the limited at 20 concurrent \"\n\"connections. That's a pretty small chat.\"\nmsgstr \"\"\n\n#: ../../async.rst:16\nmsgid \"Greenlets to the rescue\"\nmsgstr \"\"\n\n#: ../../async.rst:18\nmsgid \"\"\n\"Most servers limit the size of their worker pools to a relatively low number\"\n\" of concurrent threads, due to the high overhead involved in switching \"\n\"between and creating new threads. While threads are cheap compared to \"\n\"processes (forks), they are still expensive to create for each new \"\n\"connection.\"\nmsgstr \"\"\n\n#: ../../async.rst:20\nmsgid \"\"\n\"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. \"\n\"Greenlets behave similar to traditional threads, but are very cheap to \"\n\"create. A gevent-based server can spawn thousands of greenlets (one for each\"\n\" connection) with almost no overhead. Blocking individual greenlets has no \"\n\"impact on the servers ability to accept new requests. The number of \"\n\"concurrent connections is virtually unlimited.\"\nmsgstr \"\"\n\n#: ../../async.rst:22\nmsgid \"\"\n\"This makes creating asynchronous applications incredibly easy, because they \"\n\"look and feel like synchronous applications. A gevent-based server is \"\n\"actually not asynchronous, but massively multi-threaded. Here is an \"\n\"example::\"\nmsgstr \"\"\n\n#: ../../async.rst:39\nmsgid \"\"\n\"The first line is important. It causes gevent to monkey-patch most of \"\n\"Python's blocking APIs to not block the current thread, but pass the CPU to \"\n\"the next greenlet instead. It actually replaces Python's threading with \"\n\"gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` \"\n\"which would normally block the whole thread. If you don't feel comfortable \"\n\"with monkey-patching python built-ins, you can use the corresponding gevent \"\n\"functions (``gevent.sleep()`` in this case).\"\nmsgstr \"\"\n\n#: ../../async.rst:41\nmsgid \"\"\n\"If you run this script and point your browser to \"\n\"``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and \"\n\"`END` show up one by one (rather than waiting 8 seconds to see them all at \"\n\"once). It works exactly as with normal threads, but now your server can \"\n\"handle thousands of concurrent requests without any problems.\"\nmsgstr \"\"\n\n#: ../../async.rst:45\nmsgid \"\"\n\"Some browsers buffer a certain amount of data before they start rendering a \"\n\"page. You might need to yield more than a few bytes to see an effect in \"\n\"these browsers. Additionally, many browsers have a limit of one concurrent \"\n\"connection per URL. If this is the case, you can use a second browser or a \"\n\"benchmark tool (e.g. `ab` or `httperf`) to measure performance.\"\nmsgstr \"\"\n\n#: ../../async.rst:52\nmsgid \"Event Callbacks\"\nmsgstr \"\"\n\n#: ../../async.rst:54\nmsgid \"\"\n\"A very common design pattern in asynchronous frameworks (including tornado, \"\n\"twisted, node.js and friends) is to use non-blocking APIs and bind callbacks\"\n\" to asynchronous events. The socket object is kept open until it is closed \"\n\"explicitly to allow callbacks to write to the socket at a later point. Here \"\n\"is an example based on the `tornado library \"\n\"<http://www.tornadoweb.org/documentation#non-blocking-asynchronous-\"\n\"requests>`_::\"\nmsgstr \"\"\n\n#: ../../async.rst:63\nmsgid \"\"\n\"The main benefit is that the request handler terminates early. The handling \"\n\"thread can move on and accept new requests while the callbacks continue to \"\n\"write to sockets of previous requests. This is how these frameworks manage \"\n\"to process a lot of concurrent requests with only a small number of OS \"\n\"threads.\"\nmsgstr \"\"\n\n#: ../../async.rst:65\nmsgid \"\"\n\"With Gevent+WSGI, things are different: First, terminating early has no \"\n\"benefit because we have an unlimited pool of (pseudo)threads to accept new \"\n\"connections. Second, we cannot terminate early because that would close the \"\n\"socket (as required by WSGI). Third, we must return an iterable to conform \"\n\"to WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:67\nmsgid \"\"\n\"In order to conform to the WSGI standard, all we have to do is to return a \"\n\"body iterable that we can write to asynchronously. With the help of \"\n\"`gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate*\"\n\" a detached socket and rewrite the previous example as follows::\"\nmsgstr \"\"\n\n#: ../../async.rst:78\nmsgid \"\"\n\"From the server perspective, the queue object is iterable. It blocks if \"\n\"empty and stops as soon as it reaches ``StopIteration``. This conforms to \"\n\"WSGI. On the application side, the queue object behaves like a non-blocking \"\n\"socket. You can write to it at any time, pass it around and even start a new\"\n\" (pseudo)thread that writes to it asynchronously. This is how long-polling \"\n\"is implemented most of the time.\"\nmsgstr \"\"\n\n#: ../../async.rst:82\nmsgid \"Finally: WebSockets\"\nmsgstr \"\"\n\n#: ../../async.rst:84\nmsgid \"\"\n\"Lets forget about the low-level details for a while and speak about \"\n\"WebSockets. Since you are reading this article, you probably know what \"\n\"WebSockets are: A bidirectional communication channel between a browser \"\n\"(client) and a web application (server).\"\nmsgstr \"\"\n\n#: ../../async.rst:86\nmsgid \"\"\n\"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-\"\n\"websocket/>`_ package does all the hard work for us. Here is a simple \"\n\"WebSocket endpoint that receives messages and just sends them back to the \"\n\"client::\"\nmsgstr \"\"\n\n#: ../../async.rst:111\nmsgid \"\"\n\"The while-loop runs until the client closes the connection. You get the idea\"\n\" :)\"\nmsgstr \"\"\n\n#: ../../async.rst:113\nmsgid \"The client-site JavaScript API is really straight forward, too::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/changelog.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../changelog.rst:6\nmsgid \"Release Notes and Changelog\"\nmsgstr \"\"\n\n#: ../../changelog.rst:9\nmsgid \"Release 0.13\"\nmsgstr \"\"\n\n#: ../../changelog.rst:11\nmsgid \"Not released yet.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:14\nmsgid \"Dropped support for Python versions that reached their end-of-life.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:15\nmsgid \"\"\n\"Keeping up support for ancient Python versions hinders adaptation of new \"\n\"features and serves no real purpose. If you need support for older Python \"\n\"versions, you can stay on bottle-0.12. The updated list of tested and \"\n\"supported python releases is as follows:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:20\nmsgid \"Python 2.7 (>= 2.7.3)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:21\nmsgid \"Python 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:22\nmsgid \"Python 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:23\nmsgid \"Python 3.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:24\nmsgid \"Python 3.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:25\nmsgid \"PyPy 2.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:26\nmsgid \"PyPy 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:27\nmsgid \"PyPy 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:29\nmsgid \"\"\n\"Support for Python 2.5 was marked as deprecated since 0.12. We decided to go\"\n\" a step further and also remove support for 2.6 and 3.1 to 3.5 even if it \"\n\"was never deprecated explicitly in bottle. This means that this release is \"\n\"*not* backwards compatible in Python <2.7.3 or <3.6 environments. \"\n\"Maintainers for distributions or systems that still use these old python \"\n\"versions should not update to Bottle 0.13 and stick with 0.12 instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:35\nmsgid \"Stabilized APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:36\nmsgid \"\"\n\"The documented API of the :class:`ConfigDict` class is now considered stable\"\n\" and ready to use.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:38\nmsgid \"Deprecated APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:39\nmsgid \"\"\n\"The old route syntax (``/hello/:name``) is deprecated in favor of the more \"\n\"readable and flexible ``/hello/<name>`` syntax.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:40\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes Bottle instance and will warn about \"\n\"parameters that are not compatible with the new mounting behavior. The old \"\n\"behavior (mount applications as WSGI callable) still works and is used as a \"\n\"fallback automatically.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:41\nmsgid \"The undocumented :func:`local_property` helper is now deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:42\nmsgid \"\"\n\"The server adapter for google app engine is not useful anymore and marked as\"\n\" deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:43\nmsgid \"\"\n\"Bottle uses pickle to store arbitrary objects into signed cookies. This is \"\n\"safe, as long as the signature key remains a secret. Unfortunately, people \"\n\"tend to push code with signature keys to github all the time, so we decided \"\n\"to remove pickle-support from bottle. Signed cookies will now issue a \"\n\"deprecation warning if the value is not a string, and support for non-string\"\n\" values will be removed in 0.14. The global :func:`cookie_encode`, \"\n\":func:`cookie_decode` and :func:`is_cookie_encoded` are now also deprecated.\"\n\" If you are using this feature, think about using json to serialize your \"\n\"objects before storing them into cookies, or switch to a session system that\"\n\" stores data server-side instead of client-side.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:45\nmsgid \"Removed APIs (deprecated since 0.12)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:46\nmsgid \"\"\n\"Plugins with the old API (``api=1`` or no api attribute) will no longer \"\n\"work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:47\nmsgid \"\"\n\"Parameter order of :meth:`Bottle.mount` changed in 0.10. The old order will \"\n\"now result in an error instead of a warning.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:48\nmsgid \"\"\n\"The :class:`ConfigDict` class was introduced in 0.11 and changed during \"\n\"0.12. These changes are now final.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:50\nmsgid \"\"\n\"Attribute access and assignment was removed due to high overhead and limited\"\n\" usability.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:51\nmsgid \"\"\n\"Namespaced sub-instance creation was removed. ``config[\\\"a\\\"][\\\"b\\\"]`` has a\"\n\" high overhead and little benefit over ``config[\\\"a.b\\\"]``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:52\nmsgid \"\"\n\":class:`ConfigDict` instances are no longer callable. This was a shortcut \"\n\"for :meth:`ConfigDict.update`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:53\nmsgid \"\"\n\":class:`ConfigDict` constructor no longer accepts any parameters. Use the \"\n\"`load_*` methods instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:55\nmsgid \"\"\n\"Bottle 0.12 changed some aspects of the Simple Template Engine. These \"\n\"changes are now final and the old syntax will now longer work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:57\nmsgid \"\"\n\"The magic ``{{rebase()}}`` call was replaced by a ``base`` variable. \"\n\"Example: ``{{base}}``\"\nmsgstr \"\"\n\n#: ../../changelog.rst:58\nmsgid \"\"\n\"In STPL Templates, the 'rebase' and 'include' keywords were replaced with \"\n\"functions in 0.12.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:59\nmsgid \"\"\n\"PEP-263 encoding strings are no longer recognized. Templates are always \"\n\"utf-8.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:61\nmsgid \"\"\n\"The 'geventSocketIO' server adapter was removed without notice. It did not \"\n\"work anyway.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:63\nmsgid \"Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:64\nmsgid \"These changes might require special care when updating.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:66\nmsgid \"\"\n\"Signed cookies now use a stronger HMAC algorithm by default. This will \"\n\"result in old cookies to appear invalid after the update. Pass an explicit \"\n\"``digestmod=hashlib.md5`` to :meth:`Request.get_cookie` and \"\n\":meth:`Response.set_cookie` to get the old behavior.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:68\nmsgid \"Other Improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:69\nmsgid \"\"\n\"Bottle() instances are now context managers. If used in a with-statement, \"\n\"the default application changes to the specific instance and the shortcuts \"\n\"for many instance methods can be used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:70\nmsgid \"\"\n\"Added support for ``PATCH`` requests and the :meth:`Bottle.patch` decorator.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:71\nmsgid \"\"\n\"Added `aiohttp <http://aiohttp.readthedocs.io/en/stable/>`_ and `uvloop \"\n\"<https://github.com/MagicStack/uvloop>`_ server adapters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:72\nmsgid \"Added command-line arguments for config from json or ini files.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:73\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes instances of :class:`Bottle` and mounts \"\n\"them with significantly less overhead than other WSGI applications.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:74\nmsgid \"\"\n\"The :attr:`Request.json` property now accepts ``application/json-rpc`` \"\n\"requests.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:75\nmsgid \"\"\n\":func:`static_file` gained support for ``ETag`` headers. It will generate \"\n\"ETags and recognizes ``If-None-Match`` headers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:76\nmsgid \"Jinja2 templates will produce better error messages than before.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:82\nmsgid \"Release 0.12\"\nmsgstr \"\"\n\n#: ../../changelog.rst:84\nmsgid \"New SimpleTemplate parser implementation\"\nmsgstr \"\"\n\n#: ../../changelog.rst:86\nmsgid \"Support for multi-line code blocks (`<% ... %>`).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:87\nmsgid \"\"\n\"The keywords `include` and `rebase` are functions now and can accept \"\n\"variable template names.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:89\nmsgid \"\"\n\"The new :attr:`BaseRequest.route` property returns the :class:`Route` that \"\n\"originally matched the request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:90\nmsgid \"\"\n\"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in \"\n\"CPythons dict() implementation was fixed over a year ago. If you are still \"\n\"using Python 2.5 in production, consider upgrading or at least make sure \"\n\"that you get security fixed from your distributor.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:91\nmsgid \"New :class:`ConfigDict` API (see :doc:`configuration`)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:93\nmsgid \"\"\n\"More information can be found in this `development blog post \"\n\"<http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:97\nmsgid \"Release 0.11\"\nmsgstr \"\"\n\n#: ../../changelog.rst:99\nmsgid \"\"\n\"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:100\nmsgid \"\"\n\"Support for partial downloads (``Range`` header) in :func:`static_file`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:101\nmsgid \"\"\n\"The new :class:`ResourceManager` interface helps locating files bundled with\"\n\" an application.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:102\nmsgid \"\"\n\"Added a server adapter for `waitress \"\n\"<http://docs.pylonsproject.org/projects/waitress/en/latest/>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:103\nmsgid \"\"\n\"New :meth:`Bottle.merge` method to install all routes from one application \"\n\"into another.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:104\nmsgid \"\"\n\"New :attr:`BaseRequest.app` property to get the application object that \"\n\"handles a request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:105\nmsgid \"\"\n\"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by \"\n\"WTForms).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:106\nmsgid \":class:`MultiDict` and subclasses are now pickle-able.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:109\nmsgid \"API Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:110\nmsgid \"\"\n\":attr:`Response.status` is a read-write property that can be assigned either\"\n\" a numeric status code or a status string with a reason phrase (``200 OK``).\"\n\" The return value is now a string to better match existing APIs (WebOb, \"\n\"werkzeug). To be absolutely clear, you can use the read-only properties \"\n\":attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:113\nmsgid \"API Deprecations\"\nmsgstr \"\"\n\n#: ../../changelog.rst:114\nmsgid \"\"\n\":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:117\nmsgid \"Release 0.10\"\nmsgstr \"\"\n\n#: ../../changelog.rst:119\nmsgid \"Plugin API v2\"\nmsgstr \"\"\n\n#: ../../changelog.rst:121\nmsgid \"To use the new API, set :attr:`Plugin.api` to ``2``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:122\nmsgid \"\"\n\":meth:`Plugin.apply` receives a :class:`Route` object instead of a context \"\n\"dictionary as second parameter. The new object offers some additional \"\n\"information and may be extended in the future.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:123\nmsgid \"\"\n\"Plugin names are considered unique now. The topmost plugin with a given name\"\n\" on a given route is installed, all other plugins with the same name are \"\n\"silently ignored.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:125\nmsgid \"The Request/Response Objects\"\nmsgstr \"\"\n\n#: ../../changelog.rst:127\nmsgid \"\"\n\"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, \"\n\":attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and \"\n\":attr:`BaseRequest.script_name`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:128\nmsgid \"\"\n\"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` \"\n\"attributes. In future releases, :attr:`BaseResponse.status` will return a \"\n\"string (e.g. ``200 OK``) instead of an integer to match the API of other \"\n\"common frameworks. To make the transition as smooth as possible, you should \"\n\"use the verbose attributes from now on.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:129\nmsgid \"\"\n\"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many \"\n\"places. The new dict implementation allows attribute access and handles \"\n\"unicode form values transparently.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:131\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../changelog.rst:133\nmsgid \"\"\n\"Added three new functions to the SimpleTemplate default namespace that \"\n\"handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and \"\n\":func:`stpl.setdefault`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:134\nmsgid \"\"\n\"The default escape function for SimpleTemplate now additionally escapes \"\n\"single and double quotes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:136\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../changelog.rst:138\nmsgid \"\"\n\"A new route syntax (e.g. ``/object/<id:int>``) and support for route \"\n\"wildcard filters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:139\nmsgid \"Four new wildcard filters: `int`, `float`, `path` and `re`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:141\nmsgid \"Other changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:143\nmsgid \"Added command line interface to load applications and start servers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:144\nmsgid \"\"\n\"Introduced a :class:`ConfigDict` that makes accessing configuration a lot \"\n\"easier (attribute access and auto-expanding namespaces).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:145\nmsgid \"Added support for raw WSGI applications to :meth:`Bottle.mount`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:146\nmsgid \":meth:`Bottle.mount` parameter order changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:147\nmsgid \"\"\n\":meth:`Bottle.route` now accpets an import string for the ``callback`` \"\n\"parameter.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:148\nmsgid \"Dropped Gunicorn 0.8 support. Current supported version is 0.13.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:149\nmsgid \"Added custom options to Gunicorn server.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:150\nmsgid \"\"\n\"Finally dropped support for type filters. Replace with a custom plugin of \"\n\"needed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:154\nmsgid \"Release 0.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:157\nmsgid \"Whats new?\"\nmsgstr \"\"\n\n#: ../../changelog.rst:158\nmsgid \"\"\n\"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:159\nmsgid \"\"\n\"The :func:`route` decorator got a lot of new features. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:160\nmsgid \"\"\n\"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld \"\n\"<http://meinheld.org/>`_ and `bjoern \"\n\"<https://github.com/jonashaag/bjoern>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:161\nmsgid \"Support for SimpleTAL templates.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:162\nmsgid \"Better runtime exception handling for mako templates in debug mode.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:163\nmsgid \"Lots of documentation, fixes and small improvements.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:164\nmsgid \"A new :data:`Request.urlparts` property.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:167\nmsgid \"Performance improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:168\nmsgid \"\"\n\"The :class:`Router` now special-cases ``wsgi.run_once`` environments to \"\n\"speed up CGI.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:169\nmsgid \"\"\n\"Reduced module load time by ~30% and optimized template parser. See `8ccb2d \"\n\"</commit/8ccb2d>`_, `f72a7c </commit/f72a7c>`_ and `b14b9a \"\n\"</commit/b14b9a>`_ for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:170\nmsgid \"\"\n\"Support for \\\"App Caching\\\" on Google App Engine. See `af93ec \"\n\"</commit/af93ec>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:171\nmsgid \"\"\n\"Some of the rarely used or deprecated features are now plugins that avoid \"\n\"overhead if the feature is not used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:174 ../../changelog.rst:185\nmsgid \"API changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:175\nmsgid \"\"\n\"This release is mostly backward compatible, but some APIs are marked \"\n\"deprecated now and will be removed for the next release. Most noteworthy:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:177\nmsgid \"\"\n\"The ``static`` route parameter is deprecated. You can escape wild-cards with\"\n\" a backslash.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:178\nmsgid \"\"\n\"Type-based output filters are deprecated. They can easily be replaced with \"\n\"plugins.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:182\nmsgid \"Release 0.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:186\nmsgid \"These changes may break compatibility with previous versions.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:188\nmsgid \"\"\n\"The built-in Key/Value database is not available anymore. It is marked \"\n\"deprecated since 0.6.4\"\nmsgstr \"\"\n\n#: ../../changelog.rst:189\nmsgid \"The Route syntax and behaviour changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:191\nmsgid \"\"\n\"Regular expressions must be encapsulated with ``#``. In 0.6 all non-\"\n\"alphanumeric characters not present in the regular expression were allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:192\nmsgid \"\"\n\"Regular expressions not part of a route wildcard are escaped automatically. \"\n\"You don't have to escape dots or other regular control characters anymore. \"\n\"In 0.6 the whole URL was interpreted as a regular expression. You can use \"\n\"anonymous wildcards (``/index:#(\\\\.html)?#``) to achieve a similar \"\n\"behaviour.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:194\nmsgid \"\"\n\"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:195\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine escapes HTML special characters in \"\n\"``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` \"\n\"syntax to get old behaviour (no escaping).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:196\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine returns unicode strings instead of lists \"\n\"of byte strings.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:197\nmsgid \"\"\n\"``bottle.optimize()`` and the automatic route optimization is obsolete.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:198\nmsgid \"Some functions and attributes were renamed:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:200\nmsgid \":attr:`Request._environ` is now :attr:`Request.environ`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:201\nmsgid \":attr:`Response.header` is now :attr:`Response.headers`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:202\nmsgid \":func:`default_app` is obsolete. Use :func:`app` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:204\nmsgid \"The default :func:`redirect` code changed from 307 to 303.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:205\nmsgid \"Removed support for ``@default``. Use ``@error(404)`` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:209\nmsgid \"New features\"\nmsgstr \"\"\n\n#: ../../changelog.rst:210\nmsgid \"This is an incomplete list of new features and improved functionality.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:212\nmsgid \"\"\n\"The :class:`Request` object got new properties: :attr:`Request.body`, \"\n\":attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, \"\n\":attr:`Request.forms`, :attr:`Request.files`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:213\nmsgid \"\"\n\"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are \"\n\"now able to encode and decode python objects. This is called a *secure \"\n\"cookie* because the encoded values are signed and protected from changes on \"\n\"client side. All pickle-able data structures are allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:214\nmsgid \"\"\n\"The new :class:`Router` class drastically improves performance for setups \"\n\"with lots of dynamic routes and supports named routes (named route + dict = \"\n\"URL string).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:215\nmsgid \"\"\n\"It is now possible (and recommended) to return :exc:`HTTPError` and \"\n\":exc:`HTTPResponse` instances or other exception objects instead of raising \"\n\"them.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:216\nmsgid \"\"\n\"The new function :func:`static_file` equals :func:`send_file` but returns a \"\n\":exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. \"\n\":func:`send_file` is deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:217\nmsgid \"\"\n\"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:218\nmsgid \"The :class:`SimpleTemplate` engine got full unicode support.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:219\nmsgid \"Lots of non-critical bugfixes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:225\nmsgid \"Contributors\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:1\nmsgid \"\"\n\"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:3\nmsgid \"\"\n\"Thanks to all the people who found bugs, sent patches, spread the word, \"\n\"helped each other on the mailing-list and made this project possible. I hope\"\n\" the following (alphabetically sorted) list is complete. If you miss your \"\n\"name on that list (or want your name removed) please :doc:`tell me \"\n\"<contact>` or add it yourself.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:5\nmsgid \"acasajus\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:6\nmsgid \"Adam R. Smith\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:7\nmsgid \"Alexey Borzenkov\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:8\nmsgid \"Alexis Daboville\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:9\nmsgid \"Anton I. Sipos\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:10\nmsgid \"Anton Kolechkin\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:11\nmsgid \"apexi200sx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:12\nmsgid \"apheage\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:13\nmsgid \"BillMa\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:14\nmsgid \"Brad Greenlee\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:15\nmsgid \"Brandon Gilmore\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:16\nmsgid \"Branko Vukelic\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:17\nmsgid \"Brian Sierakowski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:18\nmsgid \"Brian Wickman\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:19\nmsgid \"Carl Scharenberg\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:20\nmsgid \"Damien Degois\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:21\nmsgid \"David Buxton\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:22\nmsgid \"Duane Johnson\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:23\nmsgid \"fcamel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:24\nmsgid \"Frank Murphy\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:25\nmsgid \"Frederic Junod\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:26\nmsgid \"goldfaber3012\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:27\nmsgid \"Greg Milby\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:28\nmsgid \"gstein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:29\nmsgid \"Ian Davis\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:30\nmsgid \"Itamar Nabriski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:31\nmsgid \"Iuri de Silvio\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:32\nmsgid \"Jaimie Murdock\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:33\nmsgid \"Jeff Nichols\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:34\nmsgid \"Jeremy Kelley\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:35\nmsgid \"joegester\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:36\nmsgid \"Johannes Krampf\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:37\nmsgid \"Jonas Haag\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:38\nmsgid \"Joshua Roesslein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:39\nmsgid \"Judson Neer\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:40\nmsgid \"Karl\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:41\nmsgid \"Kevin Zuber\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:42\nmsgid \"Kraken\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:43\nmsgid \"Kyle Fritz\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:44\nmsgid \"m35\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:45\nmsgid \"Marcos Neves\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:46\nmsgid \"masklinn\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:47\nmsgid \"Michael Labbe\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:48\nmsgid \"Michael Soulier\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:49\nmsgid \"`reddit <http://reddit.com/r/python>`_\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:50\nmsgid \"Nicolas Vanhoren\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:51\nmsgid \"Oz N Tiram\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:52\nmsgid \"Robert Rollins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:53\nmsgid \"rogererens\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:54\nmsgid \"rwxrwx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:55\nmsgid \"Santiago Gala\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:56\nmsgid \"Sean M. Collins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:57\nmsgid \"Sebastian Wollrath\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:58\nmsgid \"Seth\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:59\nmsgid \"Sigurd Høgsbro\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:60\nmsgid \"Stuart Rackham\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:61\nmsgid \"Sun Ning\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:62\nmsgid \"Tomás A. Schertel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:63\nmsgid \"Tristan Zajonc\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:64\nmsgid \"voltron\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:65\nmsgid \"Wieland Hoffmann\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:66\nmsgid \"zombat\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:67\nmsgid \"Thiago Avelino\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/configuration.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../configuration.rst:3\nmsgid \"Configuration (DRAFT)\"\nmsgstr \"\"\n\n#: ../../configuration.rst:8\nmsgid \"\"\n\"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_\"\n\" what you think.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:10\nmsgid \"\"\n\"Bottle applications can store their configuration in :attr:`Bottle.config`, \"\n\"a dict-like object and central place for application specific settings. This\"\n\" dictionary controls many aspects of the framework, tells (newer) plugins \"\n\"what to do, and can be used to store your own configuration as well.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:13\nmsgid \"Configuration Basics\"\nmsgstr \"\"\n\n#: ../../configuration.rst:15\nmsgid \"\"\n\"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. \"\n\"All the common dict methods work as expected. Let us start with some \"\n\"examples::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:44\nmsgid \"\"\n\"The app object is not always available, but as long as you are within a \"\n\"request context, you can use the `request` object to get the current \"\n\"application and its configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:51\nmsgid \"Naming Convention\"\nmsgstr \"\"\n\n#: ../../configuration.rst:53\nmsgid \"\"\n\"To make life easier, plugins and applications should follow some simple \"\n\"rules when it comes to config parameter names:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:55\nmsgid \"\"\n\"All keys should be lowercase strings and follow the rules for python \"\n\"identifiers (no special characters but the underscore).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:56\nmsgid \"\"\n\"Namespaces are separated by dots (e.g. ``namespace.field`` or \"\n\"``namespace.subnamespace.field``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:57\nmsgid \"\"\n\"Bottle uses the root namespace for its own configuration. Plugins should \"\n\"store all their variables in their own namespace (e.g. ``sqlite.db`` or \"\n\"``werkzeug.use_debugger``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:58\nmsgid \"\"\n\"Your own application should use a separate namespace (e.g. ``myapp.*``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:62\nmsgid \"Loading Configuration from a File\"\nmsgstr \"\"\n\n#: ../../configuration.rst:66\nmsgid \"\"\n\"Configuration files are useful if you want to enable non-programmers to \"\n\"configure your application, or just don't want to hack python module files \"\n\"just to change the database port. A very common syntax for configuration \"\n\"files is shown here:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:78\nmsgid \"\"\n\"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style \"\n\"configuration files from disk and import their values into your existing \"\n\"configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:85\nmsgid \"Loading Configuration from a python module\"\nmsgstr \"\"\n\n#: ../../configuration.rst:89\nmsgid \"\"\n\"Loading configuration from a Python module is a common pattern for Python \"\n\"programs and frameworks. Bottle assumes that configuration keys are all \"\n\"upper case:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:98\nmsgid \"\"\n\"You can load the this Python module with :met:`ConfigDict.load_module`::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:107\nmsgid \"\"\n\"Note the second parameter to disable loading as namespaced items as in \"\n\":meth:`ConfigDict.load_dict`. By default, loading from a Python module will \"\n\"call this method, unless you specifically call this method with `False` as \"\n\"the second argument.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:110\nmsgid \"Loading Configuration from a nested :class:`dict`\"\nmsgstr \"\"\n\n#: ../../configuration.rst:114\nmsgid \"\"\n\"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an \"\n\"entire structure of nested dictionaries and turns it into a flat list of \"\n\"keys and values with namespaced keys::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:135\nmsgid \"Listening to configuration changes\"\nmsgstr \"\"\n\n#: ../../configuration.rst:139\nmsgid \"\"\n\"The ``config`` hook on the application object is triggered each time a value\"\n\" in :attr:`Bottle.config` is changed. This hook can be used to react on \"\n\"configuration changes at runtime, for example reconnect to a new database, \"\n\"change the debug settings on a background service or resize worker thread \"\n\"pools. The hook callback receives two arguments (key, new_value) and is \"\n\"called before the value is actually changed in the dictionary. Raising an \"\n\"exception from a hook callback cancels the change and the old value is \"\n\"preserved.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:148\nmsgid \"\"\n\"The hook callbacks cannot *change* the value that is to be stored to the \"\n\"dictionary. That is what filters are for.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:154\nmsgid \"Filters and other Meta Data\"\nmsgstr \"\"\n\n#: ../../configuration.rst:158\nmsgid \"\"\n\":class:`ConfigDict` allows you to store meta data along with configuration \"\n\"keys. Two meta fields are currently defined:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:162\nmsgid \"help\"\nmsgstr \"\"\n\n#: ../../configuration.rst:161\nmsgid \"\"\n\"A help or description string. May be used by debugging, introspection or \"\n\"admin tools to help the site maintainer configuring their application.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"filter\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"\"\n\"A callable that accepts and returns a single value. If a filter is defined \"\n\"for a key, any new value stored to that key is first passed through the \"\n\"filter callback. The filter can be used to cast the value to a different \"\n\"type, check for invalid values (throw a ValueError) or trigger side effects.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:167\nmsgid \"\"\n\"This feature is most useful for plugins. They can validate their config \"\n\"parameters or trigger side effects using filters and document their \"\n\"configuration via ``help`` fields::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:189\nmsgid \"API Documentation\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:1\nmsgid \"\"\n\"A dict-like configuration storage with additional support for namespaces, \"\n\"validators, meta-data, overlays and more.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:4\nmsgid \"\"\n\"This dict-like class is heavily optimized for read access. All read-only \"\n\"methods as well as item access should be as fast as the built-in dict.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:1\nmsgid \"Load values from a Python module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:3\nmsgid \"Example modue ``config.py``::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:0\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:17\nmsgid \"\"\n\"If true (default), dictionary values are assumed to represent namespaces \"\n\"(see :meth:`load_dict`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:1\nmsgid \"Load values from an ``*.ini`` style config file.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:3\nmsgid \"\"\n\"A configuration file consists of sections, each led by a ``[section]`` \"\n\"header, followed by key/value entries separated by either ``=`` or ``:``. \"\n\"Section names and keys are case-insensitive. Leading and trailing whitespace\"\n\" is removed from keys and values. Values can be omitted, in which case the \"\n\"key/value delimiter may also be left out. Values can also span multiple \"\n\"lines, as long as they are indented deeper than the first line of the value.\"\n\" Commands are prefixed by ``#`` or ``;`` and may only appear on their own on\"\n\" an otherwise empty line.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:13\nmsgid \"\"\n\"Both section and key names may contain dots (``.``) as namespace separators.\"\n\" The actual configuration parameter name is constructed by joining section \"\n\"name and key name together and converting to lower case.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:18\nmsgid \"\"\n\"The special sections ``bottle`` and ``ROOT`` refer to the root namespace and\"\n\" the ``DEFAULT`` section defines default values for all other sections.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:22\nmsgid \"With Python 3, extended string interpolation is enabled.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:24\nmsgid \"The path of a config file, or a list of paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:25\nmsgid \"\"\n\"All keyword parameters are passed to the underlying \"\n\":class:`python:configparser.ConfigParser` constructor call.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_dict:1\nmsgid \"\"\n\"Load values from a dictionary structure. Nesting can be used to represent \"\n\"namespaces.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.update:1\nmsgid \"\"\n\"If the first parameter is a string, all keys are prefixed with this \"\n\"namespace. Apart from that it works just as the usual dict.update().\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:1\nmsgid \"Insert key with a value of default if key is not in the dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:3\nmsgid \"Return the value for key if key is in the dictionary, else default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_get:1\nmsgid \"Return the value of a meta field for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_set:1\nmsgid \"Set the meta field for a key to a new value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_list:1\nmsgid \"Return an iterable of meta field names defined for a key.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/contact.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Charles LeMagne, 2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../contact.rst:3\nmsgid \"Contact\"\nmsgstr \"\"\n\n#: ../../contact.rst:6\nmsgid \"About the Author\"\nmsgstr \"\"\n\n#: ../../contact.rst:7\nmsgid \"\"\n\"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy \"\n\"behind this website. I'm 27 years old and studying computer science at the \"\n\"Georg-August-University in Göttingen, Germany. Python is my favorite \"\n\"language, but I also code in ruby and JavaScript a lot. Watch me on `twitter\"\n\" <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub \"\n\"<http://github.com/defnull>`_ to get in contact. A `mailinglist \"\n\"<http://groups.google.de/group/bottlepy>`_ is open for Bottle related \"\n\"questions, too.\"\nmsgstr \"\"\n\n#: ../../contact.rst:10\nmsgid \"About Bottle\"\nmsgstr \"Über Bottle\"\n\n#: ../../contact.rst:11\nmsgid \"\"\n\"This is my first open source project so far. It started and a small \"\n\"experiment but soon got so much positive feedback I decided to make \"\n\"something real out of it. Here it is.\"\nmsgstr \"Dies ist soweit mein erstes Open Source Projekt.\"\n\n#: ../../contact.rst:14\nmsgid \"Impressum und Kontaktdaten\"\nmsgstr \"\"\n\n#: ../../contact.rst:15\nmsgid \"\"\n\"(This is required by `German law \"\n\"<http://bundesrecht.juris.de/tmg/__5.html>`_)\"\nmsgstr \"\"\n\n#: ../../contact.rst:17\nmsgid \"\"\n\"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die \"\n\"Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen \"\n\"vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist \"\n\"ausdrücklich untersagt.\"\nmsgstr \"\"\n\n#: ../../contact.rst:22\nmsgid \"**Betreiber**: Marcel Hellkamp\"\nmsgstr \"\"\n\n#: ../../contact.rst:23\nmsgid \"**Ort**: D - 37075 Göttingen\"\nmsgstr \"\"\n\n#: ../../contact.rst:24\nmsgid \"**Strasse**: Theodor-Heuss Strasse 13\"\nmsgstr \"\"\n\n#: ../../contact.rst:25\nmsgid \"**Telefon**: +49 (0) 551 20005915\"\nmsgstr \"\"\n\n#: ../../contact.rst:26\nmsgid \"**E-Mail**: marc at gsites dot de\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/deployment.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../deployment.rst:27\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../deployment.rst:29\nmsgid \"\"\n\"The bottle :func:`run` function, when called without any parameters, starts \"\n\"a local development server on port 8080. You can access and test your \"\n\"application via http://localhost:8080/ if you are on the same host.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:31\nmsgid \"\"\n\"To get your application available to the outside world, specify the IP the \"\n\"server should listen to (e.g. ``run(host='192.168.0.1')``) or let the server\"\n\" listen to all interfaces at once (e.g. ``run(host='0.0.0.0')``). The \"\n\"listening port can be changed in a similar way, but you need root or admin \"\n\"rights to choose a port below 1024. Port 80 is the standard for HTTP \"\n\"servers::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:37\nmsgid \"Server Options\"\nmsgstr \"\"\n\n#: ../../deployment.rst:39\nmsgid \"\"\n\"The built-in default server is based on `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-\"\n\"wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine \"\n\"for development, but may become a performance bottleneck when server load \"\n\"increases. There are three ways to eliminate this bottleneck:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:41\nmsgid \"\"\n\"Use a different server that is either multi-threaded or supports \"\n\"asynchronous IO.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:42\nmsgid \"\"\n\"Start multiple server processes and spread the load with a load-balancer.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:43\nmsgid \"Do both.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:45\nmsgid \"\"\n\"**Multi-threaded** servers are the 'classic' way to do it. They are very \"\n\"robust, reasonably fast and easy to manage. As a drawback, they can only \"\n\"handle a limited number of connections at the same time and utilize only one\"\n\" CPU core due to the \\\"Global Interpreter Lock\\\" (GIL) of the Python \"\n\"runtime. This does not hurt most applications, they are waiting for network \"\n\"IO most of the time anyway, but may slow down CPU intensive tasks (e.g. \"\n\"image processing).\"\nmsgstr \"\"\n\n#: ../../deployment.rst:47\nmsgid \"\"\n\"**Asynchronous IO** servers are very fast, can handle a virtually unlimited \"\n\"number of concurrent connections and are easy to manage. To take full \"\n\"advantage of their potential, you need to design your application \"\n\"accordingly and understand the concepts of the specific server.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:49\nmsgid \"\"\n\"**Multi-processing** (forking) servers are not limited by the GIL and \"\n\"utilize more than one CPU core, but make communication between server \"\n\"instances more expensive. You need a database or external message query to \"\n\"share state between processes, or design your application so that it does \"\n\"not need any shared state. The setup is also a bit more complicated, but \"\n\"there are good tutorials available.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:52\nmsgid \"Switching the Server Backend\"\nmsgstr \"\"\n\n#: ../../deployment.rst:54\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded default server::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:58\nmsgid \"\"\n\"Bottle ships with a lot of ready-to-use adapters for the most common WSGI \"\n\"servers and automates the setup process. Here is an incomplete list:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Name\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Homepage\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"cgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"Run as CGI script\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"Run as FastCGI process\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"Helper for Google App Engine deployments\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"Single-threaded default server\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"Multi-threaded and very stable\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"Multi-threaded, stable, tried and tested\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"Multi-threaded, poweres Pyramid\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"Pre-forked, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"Asynchronous framework with WSGI support.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72 ../../deployment.rst:73\nmsgid \"Asynchronous (greenlets)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"Asynchronous, powers some parts of Facebook\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"Asynchronous, well tested but... twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"Asynchronous, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"Asynchronous, very fast and written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"auto\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"Automatically selects an available server adapter\"\nmsgstr \"\"\n\n#: ../../deployment.rst:81\nmsgid \"The full list is available through :data:`server_names`.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:83\nmsgid \"\"\n\"If there is no adapter for your favorite server or if you need more control \"\n\"over the server setup, you may want to start the server manually. Refer to \"\n\"the server documentation on how to run WSGI applications. Here is an example\"\n\" for paste_::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:91\nmsgid \"Apache mod_wsgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:93\nmsgid \"\"\n\"Instead of running your own HTTP server from within Bottle, you can attach \"\n\"Bottle applications to an `Apache server <apache>`_ using mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:95\nmsgid \"\"\n\"All you need is an ``app.wsgi`` file that provides an ``application`` \"\n\"object. This object is used by mod_wsgi to start your application and should\"\n\" be a WSGI-compatible Python callable.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:97\nmsgid \"File ``/var/www/yourapp/app.wsgi``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:108\nmsgid \"The Apache configuration may look like this::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:126\nmsgid \"uWSGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:128\nmsgid \"\"\n\"uWSGI_ is a modern alternative to FastCGI and the recommended deployment \"\n\"option on servers like nginx_, lighttpd_, and cherokee_. The uWSGI project \"\n\"provides an application server that runs your application, and defines a \"\n\"protocol that frontend webservers can speak to. Have a look at the excellent\"\n\" `Quickstart for Python/WSGI applications <https://uwsgi-\"\n\"docs.readthedocs.io/en/latest/WSGIquickstart.html>`_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:132\nmsgid \"Google AppEngine\"\nmsgstr \"\"\n\n#: ../../deployment.rst:136\nmsgid \"\"\n\"New App Engine applications using the Python 2.7 runtime environment support\"\n\" any WSGI application and should be configured to use the Bottle application\"\n\" object directly. For example suppose your application's main module is \"\n\"``myapp.py``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:146\nmsgid \"\"\n\"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object \"\n\"like so::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:158\nmsgid \"\"\n\"It is always a good idea to let GAE serve static files directly. Here is \"\n\"example for a working  ``app.yaml`` (using the legacy Python 2.5 runtime \"\n\"environment)::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:175\nmsgid \"Load Balancer (Manual Setup)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:177\nmsgid \"\"\n\"A single Python process can utilize only one CPU at a time, even if there \"\n\"are more CPU cores available. The trick is to balance the load between \"\n\"multiple independent Python processes to utilize all of your CPU cores.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:179\nmsgid \"\"\n\"Instead of a single Bottle application server, you start one instance for \"\n\"each CPU core available using different local port (localhost:8080, 8081, \"\n\"8082, ...). You can choose any server adapter you want, even asynchronous \"\n\"ones. Then a high performance load balancer acts as a reverse proxy and \"\n\"forwards each new requests to a random port, spreading the load between all \"\n\"available back-ends. This way you can use all of your CPU cores and even \"\n\"spread out the load between different physical servers.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:181\nmsgid \"\"\n\"One of the fastest load balancers available is Pound_ but most common web \"\n\"servers have a proxy-module that can do the work just fine.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:183\nmsgid \"Pound example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:201\nmsgid \"Apache example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:209\nmsgid \"Lighttpd example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:221\nmsgid \"Good old CGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:223\nmsgid \"\"\n\"A CGI server starts a new process for each request. This adds a lot of \"\n\"overhead but is sometimes the only option, especially on cheap hosting \"\n\"packages. The `cgi` server adapter does not actually start a CGI server, but\"\n\" transforms your bottle application into a valid CGI application::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/development.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Charles LeMagne, 2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: Charles LeMagne\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../development.rst:2\nmsgid \"Developer Notes\"\nmsgstr \"Entwicklernotizen\"\n\n#: ../../development.rst:4\nmsgid \"\"\n\"This document is intended for developers and package maintainers interested \"\n\"in the bottle development and release workflow. If you want to contribute, \"\n\"you are just right!\"\nmsgstr \"Dieses Dokument ist für Entwickler und Paketbetreuer gedacht die Interesse an der Entwicklung und dem Veröffentlichungsworkflow von bottle haben.\\nWenn du etwas beitragen möchtest, dann bist du genau richtig!\"\n\n#: ../../development.rst:8\nmsgid \"Get involved\"\nmsgstr \"Beteiligen\"\n\n#: ../../development.rst:10\nmsgid \"\"\n\"There are several ways to join the community and stay up to date. Here are \"\n\"some of them:\"\nmsgstr \"Es gibt einige Wege der Community beizutreten und auf dem neuesten Stand zu bleiben. Hier sind ein paar davon:\"\n\n#: ../../development.rst:12\nmsgid \"\"\n\"**Mailing list**: Join our mailing list by sending an email to \"\n\"`bottlepy+subscribe@googlegroups.com \"\n\"<mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required).\"\nmsgstr \"**Mailing list**: Tritt unserer Mailingliste bei indem du eine e-Mail an `bottlepy+subscribe@googlegroups.com <mailto:bottlepy+subscribe@googlegroups.com>` sendest. (Ein Google Account wird nicht benötigt)\"\n\n#: ../../development.rst:13\nmsgid \"\"\n\"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or \"\n\"search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag.\"\nmsgstr \"**Twitter**: `Folge uns auf Twitter <https://twitter.com/bottlepy>`_ oder suche nach dem `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag.\"\n\n#: ../../development.rst:14\nmsgid \"\"\n\"**IRC**: Join `#bottlepy on irc.freenode.net \"\n\"<irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"**IRC**: Tritt `#bottlepy auf irc.freenode.net bei <irc://irc.freenode.net/bottlepy>`_ oder nutze die `Webchat Oberfläche <http://webchat.freenode.net/?channels=bottlepy>`_.\"\n\n#: ../../development.rst:15\nmsgid \"\"\n\"**Google plus**: We sometimes `blog about Bottle, releases and technical \"\n\"stuff \"\n\"<https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_\"\n\" on our Google+ page.\"\nmsgstr \"**Google plus**: Ab und an `blogen wir über Bottle, Veröffentlichungen und technischen Kram <https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_ auf unserer Google+ Seite.\"\n\n#: ../../development.rst:19\nmsgid \"Get the Sources\"\nmsgstr \"Die Quelldateien holen\"\n\n#: ../../development.rst:21\nmsgid \"\"\n\"The bottle `development repository <https://github.com/bottlepy/bottle>`_ \"\n\"and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are \"\n\"both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan \"\n\"to contribute, it is a good idea to create an account there and fork the \"\n\"main repository. This way your changes and ideas are visible to other \"\n\"developers and can be discussed openly. Even without an account, you can \"\n\"clone the repository or just download the latest development version as a \"\n\"source archive.\"\nmsgstr \"Das bottle `Entwicklungs-repository <https://github.com/bottlepy/bottle>`_ und der `Issue-tracker <https://github.com/bottlepy/bottle/issues>`_ sind beide auf `github <https://github.com/bottlepy/bottle>`_ zu finden.\"\n\n#: ../../development.rst:23\nmsgid \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\nmsgstr \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\n\n#: ../../development.rst:24\nmsgid \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\nmsgstr \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\n\n#: ../../development.rst:25\nmsgid \"\"\n\"**Download:** Development branch as `tar archive \"\n\"<http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file \"\n\"<http://github.com/bottlepy/bottle/zipball/master>`_.\"\nmsgstr \"**Download:** Entwicklungs branch als `tar Archiv <http://github.com/bottlepy/bottle/tarball/master>`_ oder `zip Datei <http://github.com/bottlepy/bottle/zipball/master>`_.\"\n\n#: ../../development.rst:26\nmsgid \"\"\n\"**Translations:** `transifex.com/projects/p/bottle \"\n\"<https://www.transifex.com/projects/p/bottle/>`_\"\nmsgstr \"**Übersetzungen:** `transifex.com/projects/p/bottle <https://www.transifex.com/projects/p/bottle/>`_\"\n\n#: ../../development.rst:30\nmsgid \"Releases and Updates\"\nmsgstr \"Veröffentlichungen und Updates\"\n\n#: ../../development.rst:32\nmsgid \"\"\n\"Bottle is released at irregular intervals and distributed through `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-\"\n\"revisions of outdated releases are only available from the git repository \"\n\"mentioned above. Some Linux distributions may offer packages for outdated \"\n\"releases, though.\"\nmsgstr \"Bottle wird in unregelmäßigen Abständen veröffentlicht und über `PyPI <http://pypi.python.org/pypi/bottle>`_ verteilt. Veröffentlichungskandidaten und bugfix-Revisionen von veralteten Veröffentlichungen sind nur über das oben genannte Git-Repository verfügbar. Einige Linux-Distributionen bieten jedoch möglicherweise Paket aus veralteten Veröffentlichungen an.\"\n\n#: ../../development.rst:34\nmsgid \"\"\n\"The Bottle version number splits into three parts \"\n\"(**major.minor.revision**). These are *not* used to promote new features but\"\n\" to indicate important bug-fixes and/or API changes. Critical bugs are fixed\"\n\" in at least the two latest minor releases and announced in all available \"\n\"channels (mailinglist, twitter, github). Non-critical bugs or features are \"\n\"not guaranteed to be backported. This may change in the future, through.\"\nmsgstr \"Die Bottle Versionsnummer ist in drei Teile unterteilt (**major.minor.revision**). Diese werden *nicht* dazu genutzt um neue Funktionen zu bewerben, sondern um wichtige bug-fixes und/oder Änderungen an der API zu indizieren. Kritische Fehler werden in den letzten zwei stabilen Veröffentlichungen behoben und über alle Kanäle mitgeteilt (Mailinglisten, Twitter, Github). Nicht kritische Fehler oder Features  werden garantiert zurückgestellt. Dies wird sich eventuell in der Zukunft ändern. \"\n\n#: ../../development.rst:37\nmsgid \"Major Release (x.0)\"\nmsgstr \"Major Release (x.0)\"\n\n#: ../../development.rst:37\nmsgid \"\"\n\"The major release number is increased on important milestones or updates \"\n\"that completely break backward compatibility. You probably have to work over\"\n\" your entire application to use a new release. These releases are very rare,\"\n\" through.\"\nmsgstr \"Die major release Nummer vergrößert sich bei wichtigen Meilensteinen oder Aktualisierungen die die Abwärtskompatibilität vollständig unterbrechen. Du musst wahrscheinlich deine komplette Anwendung überarbeiten um mit einer neuen Veröffentlichung zu arbeiten. Diese Veröffentlichungen sind allerdings sehr selten.\"\n\n#: ../../development.rst:40\nmsgid \"Minor Release (x.y)\"\nmsgstr \"Minor Release (x.y)\"\n\n#: ../../development.rst:40\nmsgid \"\"\n\"The minor release number is increased on updates that change the API or \"\n\"behaviour in some way. You might get some depreciation warnings any may have\"\n\" to tweak some configuration settings to restore the old behaviour, but in \"\n\"most cases these changes are designed to be backward compatible for at least\"\n\" one minor release. You should update to stay up do date, but don't have to.\"\n\" An exception is 0.8, which *will* break backward compatibility hard. (This \"\n\"is why 0.7 was skipped). Sorry about that.\"\nmsgstr \"Die minor release Nummer vergrößert sich bei Aktualisierungen welche die API oder das Verhalten in irgendeiner Weise beeinflussen. Es kann zu deprecation Warnungen kommen und eventuell musst du einige Einstellungen anpassen um das alte Verhalten wiederherzustellen, in den meisten Fällen sind diese Änderungen jedoch so entwickelt dass mindestens zum letzten minor release abwärtskompatibel sind. Du solltest updaten, um up-to-date zu bleiben, musst allerdings nicht. Eine Ausnahme stellt 0.8 dar, welches hart mit der Abwärtskompatibilität brechen *wird*. (Dies ist der Grund warum 0.7 übersprungen wurde.) Das tut mir Leid.\"\n\n#: ../../development.rst:43\nmsgid \"Revision (x.y.z)\"\nmsgstr \"Revision (x.y.z)\"\n\n#: ../../development.rst:43\nmsgid \"\"\n\"The revision number is increased on bug-fixes and other patches that do not \"\n\"change the API or behaviour. You can safely update without editing your \"\n\"application code. In fact, you really should as soon as possible, because \"\n\"important security fixes are released this way.\"\nmsgstr \"Die Revisionsnummer erhöht sich bei Fehlerbehebungen und anderen Patches welche das API-Verhalten nicht beeinflussen. Du kannst sicher updaten ohne den Code deiner Applikation bearbeiten zu müssen. In der Tat solltest du dies auch so schnell wie möglich tun, da auf diese Art wichtige Sicherheitsfixes veröffentlicht werden.\"\n\n#: ../../development.rst:47\nmsgid \"Pre-Release Versions\"\nmsgstr \"Pre-Release Versionen\"\n\n#: ../../development.rst:46\nmsgid \"\"\n\"Release candidates are marked by an ``rc`` in their revision number. These \"\n\"are API stable most of the time and open for testing, but not officially \"\n\"released yet. You should not use these for production.\"\nmsgstr \"Veröffentlichungskandidaten sind durch ein ``rc`` in ihrer Versionsnummer gekennzeichnet. Diese sind meistens API stabil und offen zur Prüfung, jedoch noch nicht offiziell veröffentlicht. Du solltest sie nicht in einer Produktivumgebung einsetzen.\"\n\n#: ../../development.rst:50\nmsgid \"Repository Structure\"\nmsgstr \"Repositorystruktur\"\n\n#: ../../development.rst:52\nmsgid \"The source repository is structured as follows:\"\nmsgstr \"Die Struktur des Quellrepositorys ist wie folgt:\"\n\n#: ../../development.rst:55\nmsgid \"``master`` branch\"\nmsgstr \"``master`` Branch\"\n\n#: ../../development.rst:55\nmsgid \"\"\n\"This is the integration, testing and development branch. All changes that \"\n\"are planned to be part of the next release are merged and tested here.\"\nmsgstr \"Dies ist der Integrations-, Test und Entwicklungsbranch. Alle Änderungen die planmäßig Teil der nächsten Veröffentlichung werden, werden hier zusammengeführt und getestet.\"\n\n#: ../../development.rst:58\nmsgid \"``release-x.y`` branches\"\nmsgstr \"``release-x.y`` Branches\"\n\n#: ../../development.rst:58\nmsgid \"\"\n\"As soon as the master branch is (almost) ready for a new release, it is \"\n\"branched into a new release branch. This \\\"release candidate\\\" is feature-\"\n\"frozen but may receive bug-fixes and last-minute changes until it is \"\n\"considered production ready and officially released. From that point on it \"\n\"is called a \\\"support branch\\\" and still receives bug-fixes, but only \"\n\"important ones. The revision number is increased on each push to these \"\n\"branches, so you can keep up with important changes.\"\nmsgstr \"Sobald ein Master Branch (fast) bereit zur Veröffentlichung ist wird er in einen neuen Veröffentlichungs Branch verzweigt. Dieser \\\"Veröffentlichungskandidat\\\" ist feature-frozen, erfährt allerdings möglicherweise noch Fehlerbehebungen und Änderungen in letzter Minute bevor er als Produktionsreif angesehen und offiziell veröffentlicht wird. Von diesem Punkt an wird er \\\"support branch\\\" genannt und erhält immer noch Fehlerbehebungen, allerdings nur wichtige. Die Revisionsnummer wird mit jedem push in diesem Branch erhöht, sodass du mit wichtigen Änderungen mithalten kannst.\"\n\n#: ../../development.rst:62\nmsgid \"Feature branches\"\nmsgstr \"Feature Branches\"\n\n#: ../../development.rst:61\nmsgid \"\"\n\"All other branches are feature branches. These are based on the master \"\n\"branch and only live as long as they are still active and not merged back \"\n\"into ``master``.\"\nmsgstr \"Alle anderen Branches sind Feature Branches. Diese basieren auf dem Master Branch und leben nur solange sie noch aktiv sind und nicht wieder mit ``master`` zusammengeführt wurden.\"\n\n#: ../../development.rst:65\nmsgid \"What does this mean for a developer?\"\nmsgstr \"Was bedeutet dies für den Entwickler?\"\n\n#: ../../development.rst:66\nmsgid \"\"\n\"If you want to add a feature, create a new branch from ``master``. If you \"\n\"want to fix a bug, branch ``release-x.y`` for each affected release. Please \"\n\"use a separate branch for each feature or bug to make integration as easy as\"\n\" possible. Thats all. There are git workflow examples at the bottom of this \"\n\"page.\"\nmsgstr \"Wenn du ein Feature hinzufügen willst, erstelle einen neuen Branch aus ``master``. Wenn du einen Fehler beheben möchtest, branche `release-x.y`` für jede betroffene Veröffentlichung. Bitte nutze einen separaten Branch für jedes Feature und jeden Fehler um die Integration so einfach wie möglich zu halten. Das ist alles. Es gibt git-workflow am Ende dieser Seite.\"\n\n#: ../../development.rst:68\nmsgid \"\"\n\"Oh, and never ever change the release number. We'll do that on integration. \"\n\"You never know in which order we pull pending requests anyway :)\"\nmsgstr \"Oh, und ändere niemals die Releasenummer. Wir machen dies während der Integration. Du weißt eh nie in welcher Reihenfolge wir die ausstehenden Anfragen einbeziehen :)\"\n\n#: ../../development.rst:72\nmsgid \"What does this mean for a maintainer ?\"\nmsgstr \"Was bedeutet dies für den Betreuer?\"\n\n#: ../../development.rst:73\nmsgid \"\"\n\"Watch the tags (and the mailing list) for bug-fixes and new releases. If you\"\n\" want to fetch a specific release from the git repository, trust the tags, \"\n\"not the branches. A branch may contain changes that are not released yet, \"\n\"but a tag marks the exact commit which changed the version number.\"\nmsgstr \"Behalte die Tags (und die Mailingliste) im Auge um Fehlerkorrekturen und neue Veröffentlichungen mitzubekommen. Wenn du eine bestimmte Version aus dem git-Repository holen willst vertraue den Tags, nicht den branches. Ein Branch enthält möglicherweise Änderungen die noch nicht veröffentlicht sind, Tags hingegen indizieren das exakte Commit welches die Versionsnummer geändert hat.\"\n\n#: ../../development.rst:77\nmsgid \"Submitting Patches\"\nmsgstr \"Patches Einreichen\"\n\n#: ../../development.rst:79\nmsgid \"\"\n\"The best way to get your changes integrated into the main development branch\"\n\" is to fork the main repository at github, create a new feature-branch, \"\n\"apply your changes and send a pull-request. Further down this page is a \"\n\"small collection of git workflow examples that may guide you. Submitting \"\n\"git-compatible patches to the mailing list is fine too. In any case, please \"\n\"follow some basic rules:\"\nmsgstr \"Der beste Weg um deine Änderungen in den Hauptentwicklungsbranch zu integrieren ist, das Hauptrepository zu forken, einen neuen Feature Branch zu erstellen, deine Änderungen vorzunehmen und ein pull-request zu senden. Weiter unten auf dieser Seite befindet sich eine kleine Sammlung von git workflow Beispielislen die dir behilflich sein können. Git-kompatible patches über die Mailingliste einzurichen ist auch gut. In jedem Fall beachte bitte folgende Regeln:\"\n\n#: ../../development.rst:81\nmsgid \"\"\n\"**Documentation:** Tell us what your patch does. Comment your code. If you \"\n\"introduced a new feature, add to the documentation so others can learn about\"\n\" it.\"\nmsgstr \"**Dukomentation:** Sag uns was dein patch macht. Kommentiere deinen Code. Wenn du ein neues Feature vorstellst, füge es der Dokumentation hinzu, sodass Anderes etwas darüber lernen können.\"\n\n#: ../../development.rst:82\nmsgid \"\"\n\"**Test:** Write tests to prove that your code works as expected and does not\"\n\" break anything. If you fixed a bug, write at least one test-case that \"\n\"triggers the bug. Make sure that all tests pass before you submit a patch.\"\nmsgstr \"**Test:** Schreibe Tests um nachzuweisen dass dein Code wie geplant funktioniert und nichts kaputt macht. Wenn du einen Fehler behoben hast, schreibe mindestens einen Testfall, welcher den Fehler auslöst. Stelle sicher dass alle Tests durchlaufen bevor du ein Patch einreichst.\"\n\n#: ../../development.rst:83\nmsgid \"\"\n\"**One patch at a time:** Only fix one bug or add one feature at a time. \"\n\"Design your patches so that they can be applyed as a whole. Keep your \"\n\"patches clean, small and focused.\"\nmsgstr \"**Ein Patch zur selben Zeit:** Behebe nur einen Fehler oder füge nur ein Feature zur selben Zeit hinzu. Entwickle deine Patches so, dass sie als Ganzes angewendet werden können. Halte deine Patches sauber, klein und fokussiert.\"\n\n#: ../../development.rst:84\nmsgid \"\"\n\"**Sync with upstream:** If the ``upstream/master`` branch changed while you \"\n\"were working on your patch, rebase or pull to make sure that your patch \"\n\"still applies without conflicts.\"\nmsgstr \"**Synchronisere mit upstream:** Wenn sich der ``upstream/master`` Branch geändert hat während du an deinem Patch gearbeitet hast, führe ein rebase oder pull durch um sicherzustellen dass dein Patch noch zu dem Konflikt passt.\"\n\n#: ../../development.rst:88\nmsgid \"Building the Documentation\"\nmsgstr \"Die Dokumentation erstellen\"\n\n#: ../../development.rst:90\nmsgid \"\"\n\"You need a recent version of Sphinx to build the documentation. The \"\n\"recommended way is to install :command:`virtualenv` using your distribution \"\n\"package repository and install sphinx manually to get an up-to-date version.\"\nmsgstr \"Du brauchst eine aktuelle Version von Sphinx um die Dokumentation zu erstellen. Der empfohlene Ablauf ist ` :command:`virtualenv`  aus deinem Distributionspackage Repository und Sphinx manuell zu installieren um eine aktuelle Version zu erhalten.\"\n\n#: ../../development.rst:121\nmsgid \"GIT Workflow Examples\"\nmsgstr \"GIT Workflow Beispiele\"\n\n#: ../../development.rst:123\nmsgid \"\"\n\"The following examples assume that you have an (free) `github account \"\n\"<https://github.com>`_. This is not mandatory, but makes things a lot \"\n\"easier.\"\nmsgstr \"Die folgenden Beispiele nehmen an dass du einen (kostnelosen) `Github Account <https://github.com>`_ besitzt. Dies ist nicht notwendig, erleichtert die Dinge jedoch sehr.\"\n\n#: ../../development.rst:125\nmsgid \"\"\n\"First of all you need to create a fork (a personal clone) of the official \"\n\"repository. To do this, you simply click the \\\"fork\\\" button on the `bottle \"\n\"project page <https://github.com/bottlepy/bottle>`_. When the fork is done, \"\n\"you will be presented with a short introduction to your new repository.\"\nmsgstr \"Als Erstes musst du eine Fork (ein persönlicher Klon) des offiziellen Repositorys erstellen. Um dies zu tun klicke einfach auf den \\\"fork\\\" Button auf der `bottle Projektseite <https://github.com/bottlepy/bottle>`_. Wenn das Forken erledigt ist, wirst du eine kurze Einführung in dein neues Repository präsentiert bekommen. \"\n\n#: ../../development.rst:127\nmsgid \"\"\n\"The fork you just created is hosted at github and read-able by everyone, but\"\n\" write-able only by you. Now you need to clone the fork locally to actually \"\n\"make changes to it. Make sure you use the private (read-write) URL and *not*\"\n\" the public (read-only) one::\"\nmsgstr \"Die Fork die du erstellt hast ist auf github gehostet und lesbar für jeden, schreibbar jedoch nur für dich. Jetzt musst du die Fork lokal klonen um tatsächlich Änderungen daran vorzunehmen. Stelle sicher dass du die private (lesen-schreiben) URL und *nicht* die öffentliche (nur lesen) nutzt::\"\n\n#: ../../development.rst:131\nmsgid \"\"\n\"Once the clone is complete your repository will have a remote named \"\n\"\\\"origin\\\" that points to your fork on github. Don’t let the name confuse \"\n\"you, this does not point to the original bottle repository, but to your own \"\n\"fork. To keep track of the official repository, add another remote named \"\n\"\\\"upstream\\\"::\"\nmsgstr \"Sobald dein Klon vollständig ist wird dein Repository eine remote namens \\\"origin\\\" haben die auf deine Fork auf github zeigt. Lass dich nicht von den Namen irritieren, sie zeigt nicht auf das originale bottle Repository, sondern auf deine eigene Fork. Um mit Änderungen an dem offiziellen repository auf dem Laufenden zu bleiben füge eine weitere remote namens \\\"upstream\\\" hinzu::\"\n\n#: ../../development.rst:137\nmsgid \"\"\n\"Note that \\\"upstream\\\" is a public clone URL, which is read-only. You cannot\"\n\" push changes directly to it. Instead, we will pull from your public \"\n\"repository. This is described later.\"\nmsgstr \"Bedenke dass \\\"upstream\\\" eine öffentliche Klon-URL ist und nur lesbar. Du kannst keine Änderungen direkt dorthin pushen. Stattdessen werden wir von deinem öffentlichen Repository pullen. Dies wird später beschrieben.\"\n\n#: ../../development.rst:140\nmsgid \"Submit a Feature\"\nmsgstr \"Ein Feature einreichen\"\n\n#: ../../development.rst:141\nmsgid \"\"\n\"New features are developed in separate feature-branches to make integration \"\n\"easy. Because they are going to be integrated into the ``master`` branch, \"\n\"they must be based on ``upstream/master``. To create a new feature-branch, \"\n\"type the following::\"\nmsgstr \"Neue Features werden in separaten Feature-Branches entwickelt um deren Integration zu vereinfachen. Da sie in den ``master``  Branch integriert werden müssen sie auf ``upstream/master`` basieren. Um einen neuen Feature-Branch zu erstellen, gib das Folgende ein:\"\n\n#: ../../development.rst:145\nmsgid \"\"\n\"Now implement your feature, write tests, update the documentation, make sure\"\n\" that all tests pass and commit your changes::\"\nmsgstr \"Jetzt implementiere dein Feature, schreibe Tests, aktualisiere die Dokumentation, stelle sicher dass alle Tests durchlaufen und committe deine Änderungen.\"\n\n#: ../../development.rst:149\nmsgid \"\"\n\"If the ``upstream/master`` branch changed in the meantime, there may be \"\n\"conflicts with your changes. To solve these, 'rebase' your feature-branch \"\n\"onto the top of the updated ``upstream/master`` branch::\"\nmsgstr \"Wenn sich ``upstream/master`` zwischenzeitlich geändert hat können Konflikte mit deinen Änderungen entstehen. Um diese zu lösen 'rebase' deinen Feature-Branch auf den aktualisieren ``upstream/master`` Branch::\"\n\n#: ../../development.rst:154\nmsgid \"\"\n\"This is equivalent to undoing all your changes, updating your branch to the \"\n\"latest version and reapplying all your patches again. If you released your \"\n\"branch already (see next step), this is not an option because it rewrites \"\n\"your history. You can do a normal pull instead. Resolve any conflicts, run \"\n\"the tests again and commit.\"\nmsgstr \"Dies ist gleichbedeutend mit der Rückgängigmachung all deiner Änderungen, deinen Branch upzudaten und deine Patches erneut anzuwenden. Wenn du deinen Branch bereits veröffentlicht hast (siehe nächster Schritt) ist dies keine Option, da es deinen Verlauf neu schreibt. Du kannst stattdessen einen normalen Pull machen. Löse alle Konflikte, führe die Tests durch und committe erneut.\"\n\n#: ../../development.rst:156\nmsgid \"\"\n\"Now you are almost ready to send a pull request. But first you need to make \"\n\"your feature-branch public by pushing it to your github fork::\"\nmsgstr \"Jetzt bist du beinahe bereit ein pull-request zu senden. Aber als ersten muss du deinen Feature-Branch öffentlich machen indem du ihn in deine Github-Fork pushst. \"\n\n#: ../../development.rst:160\nmsgid \"\"\n\"After you’ve pushed your commit(s) you need to inform us about the new \"\n\"feature. One way is to send a pull-request using github. Another way would \"\n\"be to start a thread in the mailing-list, which is recommended. It allows \"\n\"other developers to see and discuss your patches and you get some feedback \"\n\"for free :)\"\nmsgstr \"Nachdem du deinen commit gepusht hast musst du uns über das neue Feature informieren. Eine Möglichkeit ist, ein pull-request über Github zu senden. Eine Andere wäre, einen neuen Thread in der Mailingliste zu starten, was empfohlen wird. Es erlaubt anderen Entwicklern deine Patches zu sehen und zu diskutieren und du bekommst gratis Feedback :)\"\n\n#: ../../development.rst:162\nmsgid \"\"\n\"If we accept your patch, we will integrate it into the official development \"\n\"branch and make it part of the next release.\"\nmsgstr \"Wenn wir dein Patch akzeptieren werden wir es in den offiziellen Entwickungs Branch integrieren und es wird Teil der nächsten Veröffentlichung.\"\n\n#: ../../development.rst:165\nmsgid \"Fix a Bug\"\nmsgstr \"Einen Fehler beheben\"\n\n#: ../../development.rst:166\nmsgid \"\"\n\"The workflow for bug-fixes is very similar to the one for features, but \"\n\"there are some differences:\"\nmsgstr \"Der Workflow für Fehlerbehebungen ist dem für Features sehr ähnlich, jedoch gibt es ein paar Unterschiede:\"\n\n#: ../../development.rst:168\nmsgid \"\"\n\"Branch off of the affected release branches instead of just the development \"\n\"branch.\"\nmsgstr \"Branche von dem betroffenen Release-Branch anstelle des Entwicklungs-Branches.\"\n\n#: ../../development.rst:169\nmsgid \"Write at least one test-case that triggers the bug.\"\nmsgstr \"Schreibe mindestens einen Testfall der den Fehler auslöst.\"\n\n#: ../../development.rst:170\nmsgid \"\"\n\"Do this for each affected branch including ``upstream/master`` if it is \"\n\"affected. ``git cherry-pick`` may help you reducing repetitive work.\"\nmsgstr \"Tue dies für jeden betroffenen Branch, eingeschlossen ``upstream/master`` sofern dieser betroffen ist. ``git cherry-pick`` kann dir eventuell helfen sich wiederholende Arbeitsschritte zu minimieren.\"\n\n#: ../../development.rst:171\nmsgid \"\"\n\"Name your branch after the release it is based on to avoid confusion. \"\n\"Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``.\"\nmsgstr \"Benenne deinen Branch nach der Veröffentlichung auf der er basiert um Verwechslungen zu vermeiden. \\nBeispiele: ``my_bugfix-x.y`` oder ``my_bugfix-dev``.\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/faq.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Charles LeMagne, 2017\n# Charles LeMagne, 2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../faq.rst:10\nmsgid \"Frequently Asked Questions\"\nmsgstr \"Häufig gestellte Fragen\"\n\n#: ../../faq.rst:13\nmsgid \"About Bottle\"\nmsgstr \"Über Bottle\"\n\n#: ../../faq.rst:16\nmsgid \"Is bottle suitable for complex applications?\"\nmsgstr \"Ist Bottle für komplexe Anwendungen geeignet?\"\n\n#: ../../faq.rst:18\nmsgid \"\"\n\"Bottle is a *micro* framework designed for prototyping and building small \"\n\"web applications and services. It stays out of your way and allows you to \"\n\"get things done fast, but misses some advanced features and ready-to-use \"\n\"solutions found in other frameworks (MVC, ORM, form validation, scaffolding,\"\n\" XML-RPC). Although it *is* possible to add these features and build complex\"\n\" applications with Bottle, you should consider using a full-stack Web \"\n\"framework like pylons_ or paste_ instead.\"\nmsgstr \"Bottle ist ein *micro*-Framework, entworfen für Prototyping und kleine Webanwendungen und -services.\\nEs hält sich im Hintergrund und erlaubt es dir die Dinge schnell erledigt zu bekommen, ihm fehlen allerdings einige fortgeschnittenere Eigenschaften und ready-to-use Lösungen wie sie in anderen Frameworks zu finden sind (MVC, ORM, Formularvalidierung, Scaffolding, CML-RPC). Auch *wenn* es möglich ist diese hinzuzufügen und komplexere Anwendungen mit Bottle zu entwickeln, solltest du in Betracht ziehen ein vollwertiges Web-Framework wie pylons oder paste zu benutzen.\"\n\n#: ../../faq.rst:22\nmsgid \"Common Problems and Pitfalls\"\nmsgstr \"Häufige Probleme und Fallstricke\"\n\n#: ../../faq.rst:29\nmsgid \"\\\"Template Not Found\\\" in mod_wsgi/mod_python\"\nmsgstr \"\\\"Template nicht gefunden\\\" in mod_wsgi/mod_python\"\n\n#: ../../faq.rst:31\nmsgid \"\"\n\"Bottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ \"\n\"or mod_wsgi_ environment, the working directory (``./``) depends on your \"\n\"Apache settings. You should add an absolute path to the template search \"\n\"path::\"\nmsgstr \"Bottle sucht in  ``./`` und ``./views/`` nach Templates. In einer mod_python_ oder mod_wsgi_ Umgebung hängt das Arbeitsverzeichnis  (``./``) von deinen Apache Einstellungen ab. Du solltest dem Templatepfad einen absoluten Pfad hinzufügen\"\n\n#: ../../faq.rst:35\nmsgid \"so bottle searches the right paths.\"\nmsgstr \"damit Bottle den richtigen Pfad nutzt.\"\n\n#: ../../faq.rst:38\nmsgid \"Dynamic Routes and Slashes\"\nmsgstr \"Dynamische Routen und Schrägstriche\"\n\n#: ../../faq.rst:40\nmsgid \"\"\n\"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder \"\n\"token (``<name>``) matches everything up to the next slash. This equals to \"\n\"``[^/]+`` in regular expression syntax. To accept slashes too, you have to \"\n\"add a custom regular pattern to the placeholder. An example: \"\n\"``/images/<filepath:path>`` would match ``/images/icons/error.png`` but \"\n\"``/images/<filename>`` won't.\"\nmsgstr \"\"\n\n#: ../../faq.rst:43\nmsgid \"Problems with reverse proxies\"\nmsgstr \"Probleme mit Reverse-Proxies\"\n\n#: ../../faq.rst:45\nmsgid \"\"\n\"Redirects and url-building only works if bottle knows the public address and\"\n\" location of your application. If you run bottle locally behind a reverse \"\n\"proxy or load balancer, some information might get lost along the way. For \"\n\"example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect \"\n\"the local request by your proxy, not the real request by the client. Here is\"\n\" a small WSGI middleware snippet that helps to fix these values::\"\nmsgstr \"Umleitungen und URL-building funktioniert nur wenn Bottle die öffentliche Adresse und den Ort deiner Anwendung kennt. Nutzt du Bottle lokal hinter einem Reverse-Proxie oder einem Load-Balancer können auf dem Weg Informationen verloren gehen.\\nZum Beispiel könnte der ``wsgi.url_scheme``-Wert oder der ``Host``-Header die lokale Anfrage deines Proxys widerspiegeln und nicht die echte Anfrage des Clients.\\nHier ist eine kleines WSGI-Middleware Snipptes welches dir hilft diese Werte zu korrigieren:\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../index.rst:20\nmsgid \"Bottle: Python Web Framework\"\nmsgstr \"\"\n\n#: ../../index.rst:22\nmsgid \"\"\n\"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for \"\n\"Python_. It is distributed as a single file module and has no dependencies \"\n\"other than the `Python Standard Library <http://docs.python.org/library/>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:25\nmsgid \"\"\n\"**Routing:** Requests to function-call mapping with support for clean and  \"\n\"dynamic URLs.\"\nmsgstr \"\"\n\n#: ../../index.rst:26\nmsgid \"\"\n\"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-\"\n\"templates>` and support for mako_, jinja2_ and cheetah_ templates.\"\nmsgstr \"\"\n\n#: ../../index.rst:27\nmsgid \"\"\n\"**Utilities:** Convenient access to form data, file uploads, cookies, \"\n\"headers and other HTTP-related metadata.\"\nmsgstr \"\"\n\n#: ../../index.rst:28\nmsgid \"\"\n\"**Server:** Built-in HTTP development server and support for paste_, \"\n\"bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server.\"\nmsgstr \"\"\n\n#: ../../index.rst:31\nmsgid \"Example: \\\"Hello World\\\" in a bottle\"\nmsgstr \"\"\n\n#: ../../index.rst:42\nmsgid \"\"\n\"Run this script or paste it into a Python console, then point your browser \"\n\"to `<http://localhost:8080/hello/world>`_. That's it.\"\nmsgstr \"\"\n\n#: ../../index.rst:45\nmsgid \"Download and Install\"\nmsgstr \"\"\n\n#: ../../index.rst:48\nmsgid \"\"\n\"Install the latest stable release with ``pip install bottle`` or download \"\n\"`bottle.py`__ (unstable) into your project directory. There are no hard [1]_\"\n\" dependencies other than the Python standard library. Bottle supports \"\n\"**Python 2.7 and Python 3**.\"\nmsgstr \"\"\n\n#: ../../index.rst:50\nmsgid \"Support for Python 2.5 and 2.6 was dropped with this release.\"\nmsgstr \"\"\n\n#: ../../index.rst:55\nmsgid \"User's Guide\"\nmsgstr \"\"\n\n#: ../../index.rst:56\nmsgid \"\"\n\"Start here if you want to learn how to use the bottle framework for web \"\n\"development. If you have any questions not answered here, feel free to ask \"\n\"the `mailing list <mailto:bottlepy@googlegroups.com>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:71\nmsgid \"Knowledge Base\"\nmsgstr \"\"\n\n#: ../../index.rst:72\nmsgid \"A collection of articles, guides and HOWTOs.\"\nmsgstr \"\"\n\n#: ../../index.rst:84\nmsgid \"Development and Contribution\"\nmsgstr \"\"\n\n#: ../../index.rst:86\nmsgid \"\"\n\"These chapters are intended for developers interested in the bottle \"\n\"development and release workflow.\"\nmsgstr \"\"\n\n#: ../../index.rst:103\nmsgid \"License\"\nmsgstr \"\"\n\n#: ../../index.rst:105\nmsgid \"Code and documentation are available according to the MIT License:\"\nmsgstr \"\"\n\n#: ../../index.rst:110\nmsgid \"\"\n\"The Bottle logo however is *NOT* covered by that license. It is allowed to \"\n\"use the logo as a link to the bottle homepage or in direct context with the \"\n\"unmodified library. In all other cases please ask first.\"\nmsgstr \"\"\n\n#: ../../index.rst:115\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../index.rst:116\nmsgid \"\"\n\"Usage of the template or server adapter classes requires the corresponding \"\n\"template or server modules.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/plugindev.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../plugindev.rst:6\nmsgid \"Plugin Development Guide\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:8\nmsgid \"\"\n\"This guide explains the plugin API and how to write custom plugins. I \"\n\"suggest reading :ref:`plugins` first if you have not done that already. You \"\n\"might also want to have a look at the :doc:`/plugins/index` for some \"\n\"practical examples.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:12\nmsgid \"\"\n\"This is a draft. If you see any errors or find that a specific part is not \"\n\"explained clear enough, please tell the `mailing-list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or file a `bug report \"\n\"<https://github.com/bottlepy/bottle/issues>`_.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:16\nmsgid \"How Plugins Work: The Basics\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:18\nmsgid \"\"\n\"The plugin API builds on the concept of `decorators \"\n\"<http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, \"\n\"a plugin is a decorator applied to every single route callback of an \"\n\"application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:20\nmsgid \"\"\n\"This is just a simplification. Plugins can do a lot more than just \"\n\"decorating route callbacks, but it is a good starting point. Lets have a \"\n\"look at some code::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:36\nmsgid \"\"\n\"This plugin measures the execution time for each request and adds an \"\n\"appropriate ``X-Exec-Time`` header to the response. As you can see, the \"\n\"plugin returns a wrapper and the wrapper calls the original callback \"\n\"recursively. This is how decorators usually work.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:38\nmsgid \"\"\n\"The last line tells Bottle to install the plugin to the default application.\"\n\" This causes the plugin to be automatically applied to all routes of that \"\n\"application. In other words, ``stopwatch()`` is called once for each route \"\n\"callback and the return value is used as a replacement for the original \"\n\"callback.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:40\nmsgid \"\"\n\"Plugins are applied on demand, that is, as soon as a route is requested for \"\n\"the first time. For this to work properly in multi-threaded environments, \"\n\"the plugin should be thread-safe. This is not a problem most of the time, \"\n\"but keep it in mind.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:42\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped callback is cached and \"\n\"subsequent requests are handled by the cached version directly. This means \"\n\"that a plugin is usually applied only once to a specific route. That cache, \"\n\"however, is cleared every time the list of installed plugins changes. Your \"\n\"plugin should be able to decorate the same route more than once.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:44\nmsgid \"\"\n\"The decorator API is quite limited, though. You don't know anything about \"\n\"the route being decorated or the associated application object and have no \"\n\"way to efficiently store data that is shared among all routes. But fear not!\"\n\" Plugins are not limited to just decorator functions. Bottle accepts \"\n\"anything as a plugin as long as it is callable or implements an extended \"\n\"API. This API is described below and gives you a lot of control over the \"\n\"whole process.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:48\nmsgid \"Plugin API\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:50\nmsgid \"\"\n\":class:`Plugin` is not a real class (you cannot import it from \"\n\":mod:`bottle`) but an interface that plugins are expected to implement. \"\n\"Bottle accepts any object of any type as a plugin, as long as it conforms to\"\n\" the following API.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:54\nmsgid \"\"\n\"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is \"\n\"defined, it is always preferred over calling the plugin directly. All other \"\n\"methods and attributes are optional.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:58\nmsgid \"\"\n\"Both :meth:`Bottle.uninstall` and the `skip` parameter of \"\n\":meth:`Bottle.route()` accept a name string to refer to a plugin or plugin \"\n\"type. This works only for plugins that have a name attribute.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:62\nmsgid \"\"\n\"The Plugin API is still evolving. This integer attribute tells bottle which \"\n\"version to use. If it is missing, bottle defaults to the first version. The \"\n\"current version is ``2``. See :ref:`plugin-changelog` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:66\nmsgid \"\"\n\"Called as soon as the plugin is installed to an application (see \"\n\":meth:`Bottle.install`). The only parameter is the associated application \"\n\"object.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:70\nmsgid \"\"\n\"As long as :meth:`apply` is not defined, the plugin itself is used as a \"\n\"decorator and applied directly to each route callback. The only parameter is\"\n\" the callback to decorate. Whatever is returned by this method replaces the \"\n\"original callback. If there is no need to wrap or replace a given callback, \"\n\"just return the unmodified callback parameter.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:74\nmsgid \"\"\n\"If defined, this method is used in favor of :meth:`__call__` to decorate \"\n\"route callbacks. The additional `route` parameter is an instance of \"\n\":class:`Route` and provides a lot of meta-information and context for that \"\n\"route. See :ref:`route-context` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:78\nmsgid \"\"\n\"Called immediately before the plugin is uninstalled or the application is \"\n\"closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:81\nmsgid \"\"\n\"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for \"\n\"plugins that are applied directly to a route via the :meth:`Bottle.route()` \"\n\"decorator, but only for plugins installed to an application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:87\nmsgid \"Plugin API changes\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:89\nmsgid \"\"\n\"The Plugin API is still evolving and changed with Bottle 0.10 to address \"\n\"certain issues with the route context dictionary. To ensure backwards \"\n\"compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` \"\n\"attribute to tell bottle which API to use. The API differences are \"\n\"summarized here.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:91\nmsgid \"**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:93\nmsgid \"Original Plugin API as described in the 0.9 docs.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:95\nmsgid \"**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:97\nmsgid \"\"\n\"The `context` parameter of the :meth:`Plugin.apply` method is now an \"\n\"instance of :class:`Route` instead of a context dictionary.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:103\nmsgid \"The Route Context\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:105\nmsgid \"\"\n\"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed\"\n\" informations about the associated route. The most important attributes are \"\n\"summarized here:\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"app\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"The application object this route is installed to.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"rule\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"The rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"method\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"name\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"plugins\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"\"\n\"A list of route-specific plugins. These are applied in addition to \"\n\"application-wide plugins. (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"skiplist\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"\"\n\"A list of plugins to not apply to this route (again, see \"\n\":meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"config\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific configuration and \"\n\"meta-data.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:125\nmsgid \"\"\n\"For your plugin, :attr:`Route.config` is probably the most important \"\n\"attribute. Keep in mind that this dictionary is local to the route, but \"\n\"shared between all plugins. It is always a good idea to add a unique prefix \"\n\"or, if your plugin needs a lot of configuration, store it in a separate \"\n\"namespace within the `config` dictionary. This helps to avoid naming \"\n\"collisions between plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:129\nmsgid \"Changing the :class:`Route` object\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:131\nmsgid \"\"\n\"While some :class:`Route` attributes are mutable, changes may have unwanted \"\n\"effects on other plugins. It is most likely a bad idea to monkey-patch a \"\n\"broken route instead of providing a helpful error message and let the user \"\n\"fix the problem.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:133\nmsgid \"\"\n\"In some rare cases, however, it might be justifiable to break this rule. \"\n\"After you made your changes to the :class:`Route` instance, raise \"\n\":exc:`RouteReset` as an exception. This removes the current route from the \"\n\"cache and causes all plugins to be re-applied. The router is not updated, \"\n\"however. Changes to `rule` or `method` values have no effect on the router, \"\n\"but only on plugins. This may change in the future, though.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:137\nmsgid \"Runtime optimizations\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:139\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped route callback is \"\n\"cached to speed up subsequent requests. If the behavior of your plugin \"\n\"depends on configuration, and you want to be able to change that \"\n\"configuration at runtime, you need to read the configuration on each \"\n\"request. Easy enough.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:141\nmsgid \"\"\n\"For performance reasons, however, it might be worthwhile to choose a \"\n\"different wrapper based on current needs, work with closures, or enable or \"\n\"disable a plugin at runtime. Let's take the built-in HooksPlugin as an \"\n\"example: If no hooks are installed, the plugin removes itself from all \"\n\"affected routes and has virtually no overhead. As soon as you install the \"\n\"first hook, the plugin activates itself and takes effect again.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:143\nmsgid \"\"\n\"To achieve this, you need control over the callback cache: \"\n\":meth:`Route.reset` clears the cache for a single route and \"\n\":meth:`Bottle.reset` clears all caches for all routes of an application at \"\n\"once. On the next request, all plugins are re-applied to the route as if it \"\n\"were requested for the first time.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:145\nmsgid \"\"\n\"Both methods won't affect the current request if called from within a route \"\n\"callback, of cause. To force a restart of the current request, raise \"\n\":exc:`RouteReset` as an exception.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:149\nmsgid \"Plugin Example: SQLitePlugin\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:151\nmsgid \"\"\n\"This plugin provides an sqlite3 database connection handle as an additional \"\n\"keyword argument to wrapped callbacks, but only if the callback expects it. \"\n\"If not, the route is ignored and no overhead is added. The wrapper does not \"\n\"affect the return value, but handles plugin-related exceptions properly. \"\n\":meth:`Plugin.setup` is used to inspect the application and search for \"\n\"conflicting plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:218\nmsgid \"\"\n\"This plugin is actually useful and very similar to the version bundled with \"\n\"Bottle. Not bad for less than 60 lines of code, don't you think? Here is a \"\n\"usage example::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:239\nmsgid \"\"\n\"The first route needs a database connection and tells the plugin to create a\"\n\" handle by requesting a ``db`` keyword argument. The second route does not \"\n\"need a database and is therefore ignored by the plugin. The third route does\"\n\" expect a 'db' keyword argument, but explicitly skips the sqlite plugin. \"\n\"This way the argument is not overruled by the plugin and still contains the \"\n\"value of the same-named url argument.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/plugins/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../plugins/index.rst:5\nmsgid \"List of available Plugins\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:7\nmsgid \"\"\n\"This is a list of third-party plugins that add extend Bottles core \"\n\"functionality or integrate other libraries with the Bottle framework.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:9\nmsgid \"\"\n\"Have a look at :ref:`plugins` for general questions about plugins \"\n\"(installation, usage). If you plan to develop a new plugin, the \"\n\":doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"Beaker to session and caching library with WSGI Middleware\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"`Bottle-Cork <http://cork.firelet.net/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"\"\n\"Cork provides a simple set of methods to implement Authentication and \"\n\"Authorization in web applications based on Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"`Bottle-Cors-plugin <http://pypi.org/project/bottle-cors-plugin/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"\"\n\"Cors-plugin is the easiest way to implement cors on your bottle web \"\n\"application\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"Meta package to install the bottle plugin collection.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"flash plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"FIFO Queue for Bottle built upon redis\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"`Macaron <http://nobrin.github.com/macaron/webapp.html>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"Macaron is an object-relational mapper (ORM) for SQLite.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"Memcache integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"MongoDB integration for Bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"`Bottle-OAuthlib <http://pypi.python.org/pypi/bottle-oauthlib/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"Adapter for oauthlib - create your own OAuth2.0 implementation\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"Redis integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"Renderer plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"A reusable app that serves static files for bottle apps\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"SQLAlchemy integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"SQLite3 database integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"Web2py Dal integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"\"\n\"Integrates the `werkzeug` library (alternative request and response objects,\"\n\" advanced debugging middleware and more).\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"\"\n\"`bottle-smart-filters <https://github.com/agile4you/bottle-smart-filters/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"Bottle Querystring smart guessing.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"`bottle-jwt <https://github.com/agile4you/bottle-jwt/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"JSON Web Token authentication plugin for bottle.py\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"`Bottle-jwt <https://github.com/agalera/bottlejwt>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"JWT integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"`canister <https://github.com/dagnelies/canister>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"a bottle wrapper to provide logging, sessions and authentication\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"`bottle-cerberus <https://github.com/agalera/bottle-cerberus>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"Cerberus integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"`Bottle-errorsrest <https://github.com/agalera/bottle-errorsrest>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"All errors generated from bottle are returned in json\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:82\nmsgid \"`Bottle-tools <https://github.com/theSage21/bottle-tools>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:81\nmsgid \"\"\n\"Decorators that auto-supply function arguments using POST/query string data.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:84\nmsgid \"\"\n\"Plugins listed here are not part of Bottle or the Bottle project, but \"\n\"developed and maintained by third parties.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/recipes.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../recipes.rst:16\nmsgid \"Recipes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:18\nmsgid \"\"\n\"This is a collection of code snippets and examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:21\nmsgid \"Keeping track of Sessions\"\nmsgstr \"\"\n\n#: ../../recipes.rst:23\nmsgid \"\"\n\"There is no built-in support for sessions because there is no *right* way to\"\n\" do it (in a micro framework). Depending on requirements and environment you\"\n\" could use beaker_ middleware with a fitting backend or implement it \"\n\"yourself. Here is an example for beaker sessions with a file-based backend::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:45\nmsgid \"\"\n\"WARNING: Beaker's SessionMiddleware is not thread safe.  If two concurrent \"\n\"requests modify the same session at the same time, one of the updates might \"\n\"get lost. For this reason, sessions should only be populated once and \"\n\"treated as a read-only store after that. If you find yourself updating \"\n\"sessions regularly, and don't want to risk losing any updates, think about \"\n\"using a real database instead or seek alternative session middleware \"\n\"libraries.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:49\nmsgid \"Debugging with Style: Debugging Middleware\"\nmsgstr \"\"\n\n#: ../../recipes.rst:51\nmsgid \"\"\n\"Bottle catches all Exceptions raised in your app code to prevent your WSGI \"\n\"server from crashing. If the built-in :func:`debug` mode is not enough and \"\n\"you need exceptions to propagate to a debugging middleware, you can turn off\"\n\" this behaviour::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:59\nmsgid \"\"\n\"Now, bottle only catches its own exceptions (:exc:`HTTPError`, \"\n\":exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can \"\n\"handle the rest.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:61\nmsgid \"\"\n\"The werkzeug_ and paste_ libraries both ship with very powerful debugging \"\n\"WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for \"\n\"werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for \"\n\"paste_. They both allow you do inspect the stack and even execute python \"\n\"code within the stack context, so **do not use them in production**.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:65\nmsgid \"Unit-Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:67\nmsgid \"\"\n\"Unit-testing is usually performed against methods defined in your web \"\n\"application without running a WSGI environment.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:69\nmsgid \"A simple example using `Nose <http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:80 ../../recipes.rst:97\nmsgid \"Test script::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:87\nmsgid \"\"\n\"In the example the Bottle route() method is never executed - only index() is\"\n\" tested.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:89\nmsgid \"\"\n\"If the code being tested requires access to ``bottle.request`` you can mock \"\n\"it using `Boddle <https://github.com/keredson/boddle>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:108\nmsgid \"Functional Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:110\nmsgid \"\"\n\"Any HTTP-based testing system can be used with a running WSGI server, but \"\n\"some testing frameworks work more intimately with WSGI, and provide the \"\n\"ability the call WSGI applications in a controlled environment, with \"\n\"tracebacks and full use of debugging tools. `Testing tools for WSGI \"\n\"<http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:112\nmsgid \"\"\n\"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose \"\n\"<http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:132\nmsgid \"Embedding other WSGI Apps\"\nmsgstr \"\"\n\n#: ../../recipes.rst:134\nmsgid \"\"\n\"This is not the recommend way (you should use a middleware in front of \"\n\"bottle to do this) but you can call other WSGI applications from within your\"\n\" bottle app and let bottle act as a pseudo-middleware. Here is an example::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:150\nmsgid \"\"\n\"Again, this is not the recommend way to implement subprojects. It is only \"\n\"here because many people asked for this and to show how bottle maps to WSGI.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:154\nmsgid \"Ignore trailing slashes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:156\nmsgid \"\"\n\"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To\"\n\" treat both URLs the same you can add two ``@route`` decorators::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:162\nmsgid \"add a WSGI middleware that strips trailing slashes from all URLs::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:175\nmsgid \"or add a ``before_request`` hook to strip the trailing slashes::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:182\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:183\nmsgid \"Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>\"\nmsgstr \"\"\n\n#: ../../recipes.rst:187\nmsgid \"Keep-alive requests\"\nmsgstr \"\"\n\n#: ../../recipes.rst:191\nmsgid \"For a more detailed explanation, see :doc:`async`.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:193\nmsgid \"\"\n\"Several \\\"push\\\" mechanisms like XHR multipart need the ability to write \"\n\"response data without closing the connection in conjunction with the \"\n\"response header \\\"Connection: keep-alive\\\". WSGI does not easily lend itself\"\n\" to this behavior, but it is still possible to do so in Bottle by using the \"\n\"gevent_ async framework. Here is a sample that works with either the gevent_\"\n\" HTTP server or the paste_ HTTP server (it may work with others, but I have \"\n\"not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the\"\n\" paste_ server::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:210\nmsgid \"\"\n\"If you browse to ``http://localhost:8080/stream``, you should see 'START', \"\n\"'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to \"\n\"see them all at once).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:213\nmsgid \"Gzip Compression in Bottle\"\nmsgstr \"\"\n\n#: ../../recipes.rst:216\nmsgid \"For a detailed discussion, see compression_\"\nmsgstr \"\"\n\n#: ../../recipes.rst:218\nmsgid \"\"\n\"A common feature request is for Bottle to support Gzip compression, which \"\n\"speeds up sites by compressing static resources (like CSS and JS files) \"\n\"during a request.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:220\nmsgid \"\"\n\"Supporting Gzip compression is not a straightforward proposition, due to a \"\n\"number of corner cases that crop up frequently. A proper Gzip implementation\"\n\" must:\"\nmsgstr \"\"\n\n#: ../../recipes.rst:222\nmsgid \"Compress on the fly and be fast doing so.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:223\nmsgid \"Do not compress for browsers that don't support it.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:224\nmsgid \"Do not compress files that are compressed already (images, videos).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:225\nmsgid \"Do not compress dynamic files.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:226\nmsgid \"Support two differed compression algorithms (gzip and deflate).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:227\nmsgid \"Cache compressed files that don't change often.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:228\nmsgid \"De-validate the cache if one of the files changed anyway.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:229\nmsgid \"Make sure the cache does not get to big.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:230\nmsgid \"\"\n\"Do not cache small files because a disk seek would take longer than on-the-\"\n\"fly compression.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:232\nmsgid \"\"\n\"Because of these requirements, it is the recommendation of the Bottle \"\n\"project that Gzip compression is best handled by the WSGI server Bottle runs\"\n\" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware \"\n\"that can be used to accomplish this.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:236\nmsgid \"Using the hooks plugin\"\nmsgstr \"\"\n\n#: ../../recipes.rst:238\nmsgid \"\"\n\"For example, if you want to allow Cross-Origin Resource Sharing for the \"\n\"content returned by all of your URL, you can use the hook decorator and \"\n\"setup a callback function::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:256\nmsgid \"\"\n\"You can also use the ``before_request`` to take an action before every \"\n\"function gets called.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:261\nmsgid \"Using Bottle with Heroku\"\nmsgstr \"\"\n\n#: ../../recipes.rst:263\nmsgid \"\"\n\"Heroku_, a popular cloud application platform now provides support for \"\n\"running Python applications on their infastructure.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:266\nmsgid \"\"\n\"This recipe is based upon the `Heroku Quickstart \"\n\"<http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific \"\n\"code replacing the `Write Your App \"\n\"<http://devcenter.heroku.com/articles/python#write_your_app>`_ section of \"\n\"the `Getting Started with Python on Heroku/Cedar \"\n\"<http://devcenter.heroku.com/articles/python>`_ guide::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:282\nmsgid \"\"\n\"Heroku's app stack passes the port that the application needs to listen on \"\n\"for requests, using the `os.environ` dictionary.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/routing.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../routing.rst:3\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../routing.rst:5\nmsgid \"\"\n\"Bottle uses a powerful routing engine to find the right callback for each \"\n\"request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This \"\n\"document covers advanced techniques and rule mechanics in detail.\"\nmsgstr \"\"\n\n#: ../../routing.rst:8\nmsgid \"Rule Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:10\nmsgid \"\"\n\"The :class:`Router` distinguishes between two basic types of routes: \"\n\"**static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. \"\n\"``/hello/<name>``). A route that contains one or more *wildcards* it is \"\n\"considered dynamic. All other routes are static.\"\nmsgstr \"\"\n\n#: ../../routing.rst:14\nmsgid \"\"\n\"The simplest form of a wildcard consists of a name enclosed in angle \"\n\"brackets (e.g. ``<name>``). The name should be unique for a given route and \"\n\"form a valid python identifier (alphanumeric, starting with a letter). This \"\n\"is because wildcards are used as keyword arguments for the request callback \"\n\"later.\"\nmsgstr \"\"\n\n#: ../../routing.rst:16\nmsgid \"\"\n\"Each wildcard matches one or more characters, but stops at the first slash \"\n\"(``/``). This equals a regular expression of ``[^/]+`` and ensures that only\"\n\" one path segment is matched and routes with more than one wildcard stay \"\n\"unambiguous.\"\nmsgstr \"\"\n\n#: ../../routing.rst:18\nmsgid \"The rule ``/<action>/<item>`` matches as follows:\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Path\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Result\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"/save/123\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"``{'action': 'save', 'item': '123'}``\"\nmsgstr \"\"\n\n#: ../../routing.rst:24\nmsgid \"/save/123/\"\nmsgstr \"\"\n\n#: ../../routing.rst:24 ../../routing.rst:25 ../../routing.rst:26\nmsgid \"`No Match`\"\nmsgstr \"\"\n\n#: ../../routing.rst:25\nmsgid \"/save/\"\nmsgstr \"\"\n\n#: ../../routing.rst:26\nmsgid \"//123\"\nmsgstr \"\"\n\n#: ../../routing.rst:29\nmsgid \"\"\n\"Is it possible to escape characters like colon ``:`` with a backslash \"\n\"``\\\\``. This will prevent to trigger the old syntax in case you need to use \"\n\"``:``. For example: the rule ``/<action>/item:<id>`` triggers the old \"\n\"syntax, (see below) but ``/action/item\\\\:<id>`` works as intended with the \"\n\"new syntax.\"\nmsgstr \"\"\n\n#: ../../routing.rst:33\nmsgid \"\"\n\"You can change the exact behaviour in many ways using filters. This is \"\n\"described in the next section.\"\nmsgstr \"\"\n\n#: ../../routing.rst:36\nmsgid \"Wildcard Filters\"\nmsgstr \"\"\n\n#: ../../routing.rst:40\nmsgid \"\"\n\"Filters are used to define more specific wildcards, and/or transform the \"\n\"matched part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../routing.rst:42\nmsgid \"The following standard filters are implemented:\"\nmsgstr \"\"\n\n#: ../../routing.rst:44\nmsgid \"**:int** matches (signed) digits and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../routing.rst:45\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../routing.rst:46\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and may be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../routing.rst:47\nmsgid \"\"\n\"**:re[:exp]** allows you to specify a custom regular expression in the \"\n\"config field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../routing.rst:49\nmsgid \"\"\n\"You can add your own filters to the router. All you need is a function that \"\n\"returns three elements: A regular expression string, a callable to convert \"\n\"the URL fragment to a python value, and a callable that does the opposite. \"\n\"The filter function is called with the configuration string as the only \"\n\"parameter and may parse it as needed::\"\nmsgstr \"\"\n\n#: ../../routing.rst:75\nmsgid \"Legacy Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:79\nmsgid \"\"\n\"The new rule syntax was introduce in **Bottle 0.10** to simplify some common\"\n\" use cases, but the old syntax still works and you can find lot code \"\n\"examples still using it. The differences are best described by example:\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"Old Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"New Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:90\nmsgid \"\"\n\"Try to avoid the old syntax in future projects if you can. It is not \"\n\"currently deprecated, but will be eventually.\"\nmsgstr \"\"\n\n#: ../../routing.rst:95\nmsgid \"Explicit routing configuration\"\nmsgstr \"\"\n\n#: ../../routing.rst:97\nmsgid \"\"\n\"Route decorator can also be directly called as method. This way provides \"\n\"flexibility in complex setups, allowing you to directly control, when and \"\n\"how routing configuration done.\"\nmsgstr \"\"\n\n#: ../../routing.rst:99\nmsgid \"\"\n\"Here is a basic example of explicit routing configuration for default bottle\"\n\" application::\"\nmsgstr \"\"\n\n#: ../../routing.rst:105\nmsgid \"\"\n\"In fact, any :class:`Bottle` instance routing can be configured same way::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/stpl.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../stpl.rst:3\nmsgid \"SimpleTemplate Engine\"\nmsgstr \"\"\n\n#: ../../stpl.rst:7\nmsgid \"\"\n\"Bottle comes with a fast, powerful and easy to learn built-in template \"\n\"engine called *SimpleTemplate* or *stpl* for short. It is the default engine\"\n\" used by the :func:`view` and :func:`template` helpers but can be used as a \"\n\"stand-alone general purpose template engine too. This document explains the \"\n\"template syntax and shows examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:10\nmsgid \"Basic API Usage:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:11\nmsgid \":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:18\nmsgid \"\"\n\"In this document we use the :func:`template` helper in examples for the sake\"\n\" of simplicity::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:24\nmsgid \"\"\n\"You can also pass a dictionary into the template using keyword arguments::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:31\nmsgid \"\"\n\"Just keep in mind that compiling and rendering templates are two different \"\n\"actions, even if the :func:`template` helper hides this fact. Templates are \"\n\"usually compiled only once and cached internally, but rendered many times \"\n\"with different keyword arguments.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:34\nmsgid \":class:`SimpleTemplate` Syntax\"\nmsgstr \"\"\n\n#: ../../stpl.rst:36\nmsgid \"\"\n\"Python is a very powerful language but its whitespace-aware syntax makes it \"\n\"difficult to use as a template language. SimpleTemplate removes some of \"\n\"these restrictions and allows you to write clean, readable and maintainable \"\n\"templates while preserving full access to the features, libraries and speed \"\n\"of the Python language.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:40\nmsgid \"\"\n\"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and \"\n\"is executed on each :meth:`SimpleTemplate.render` call. Do not render \"\n\"untrusted templates! They may contain and execute harmful python code.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:43\nmsgid \"Inline Expressions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:45\nmsgid \"\"\n\"You already learned the use of the ``{{...}}`` syntax from the \\\"Hello \"\n\"World!\\\" example above, but there is more: any python expression is allowed \"\n\"within the curly brackets as long as it evaluates to a string or something \"\n\"that has a string representation::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:54\nmsgid \"\"\n\"The contained python expression is executed at render-time and has access to\"\n\" all keyword arguments passed to the :meth:`SimpleTemplate.render` method. \"\n\"HTML special characters are escaped automatically to prevent `XSS \"\n\"<http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start\"\n\" the expression with an exclamation mark to disable escaping for that \"\n\"expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:62\nmsgid \"Embedded python code\"\nmsgstr \"\"\n\n#: ../../stpl.rst:66\nmsgid \"\"\n\"The template engine allows you to embed lines or blocks of python code \"\n\"within your template. Code lines start with ``%`` and code blocks are \"\n\"surrounded by ``<%`` and ``%>`` tokens::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:76\nmsgid \"\"\n\"Embedded python code follows regular python syntax, but with two additional \"\n\"syntax rules:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:78\nmsgid \"\"\n\"**Indentation is ignored.** You can put as much whitespace in front of \"\n\"statements as you want. This allows you to align your code with the \"\n\"surrounding markup and can greatly improve readability.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:79\nmsgid \"\"\n\"Blocks that are normally indented now have to be closed explicitly with an \"\n\"``end`` keyword.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:89\nmsgid \"\"\n\"Both the ``%`` and the ``<%`` tokens are only recognized if they are the \"\n\"first non-whitespace characters in a line. You don't have to escape them if \"\n\"they appear mid-text in your template markup. Only if a line of text starts \"\n\"with one of these tokens, you have to escape it with a backslash. In the \"\n\"rare case where the backslash + token combination appears in your markup at \"\n\"the beginning of a line, you can always help yourself with a string literal \"\n\"in an inline expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:96\nmsgid \"\"\n\"If you find yourself needing to escape a lot, consider using :ref:`custom \"\n\"tokens <stpl-custom-tokens>`.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:98\nmsgid \"\"\n\"Note that ``%`` and ``<% %>`` work in *exactly* the same way. The latter is \"\n\"only a convenient way to type less and avoid clutter for longer code \"\n\"segments. This means that in ``<% %>`` blocks, all indented code must be \"\n\"terminated with an ``end``, as in the following example::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:114\nmsgid \"Whitespace Control\"\nmsgstr \"\"\n\n#: ../../stpl.rst:116\nmsgid \"\"\n\"Code blocks and code lines always span the whole line. Whitespace in front \"\n\"of after a code segment is stripped away. You won't see empty lines or \"\n\"dangling whitespace in your template because of embedded code::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:124\nmsgid \"This snippet renders to clean and compact html::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:130\nmsgid \"\"\n\"But embedding code still requires you to start a new line, which may not \"\n\"what you want to see in your rendered template. To skip the newline in front\"\n\" of a code segment, end the text line with a double-backslash::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:138\nmsgid \"This time the rendered template looks like this::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:142\nmsgid \"\"\n\"This only works directly in front of code segments. In all other places you \"\n\"can control the whitespace yourself and don't need any special syntax.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:145\nmsgid \"Template Functions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:147\nmsgid \"\"\n\"Each template is preloaded with a bunch of functions that help with the most\"\n\" common use cases. These functions are always available. You don't have to \"\n\"import or provide them yourself. For everything not covered here there are \"\n\"probably good python libraries available. Remember that you can ``import`` \"\n\"anything you want within your templates. They are python programs after all.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:151\nmsgid \"\"\n\"Prior to this release, :func:`include` and :func:`rebase` were syntax \"\n\"keywords, not functions.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:156\nmsgid \"\"\n\"Render a sub-template with the specified variables and insert the resulting \"\n\"text into the current template. The function returns a dictionary containing\"\n\" the local variables passed to or defined within the sub-template::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:164\nmsgid \"\"\n\"Mark the current template to be later included into a different template. \"\n\"After the current template is rendered, its resulting text is stored in a \"\n\"variable named ``base`` and passed to the base-template, which is then \"\n\"rendered. This can be used to `wrap` a template with surrounding text, or \"\n\"simulate the inheritance feature found in other template engines::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:169\nmsgid \"This can be combined with the following ``base.tpl``::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:181\nmsgid \"\"\n\"Accessing undefined variables in a template raises :exc:`NameError` and \"\n\"stops rendering immediately. This is standard python behavior and nothing \"\n\"new, but vanilla python lacks an easy way to check the availability of a \"\n\"variable. This quickly gets annoying if you want to support flexible inputs \"\n\"or use the same template in different situations. These functions may help:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:189\nmsgid \"\"\n\"Return True if the variable is defined in the current template namespace, \"\n\"False otherwise.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:194\nmsgid \"Return the variable, or a default value.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:198\nmsgid \"\"\n\"If the variable is not defined, create it with the given default value. \"\n\"Return the variable.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:201\nmsgid \"\"\n\"Here is an example that uses all three functions to implement optional \"\n\"template variables in different ways::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:215\nmsgid \":class:`SimpleTemplate` API\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.render:1\nmsgid \"Render the template using keyword arguments as local variables.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/tutorial.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Charles LeMagne, 2017\n# Charles LeMagne, 2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../tutorial.rst:24\nmsgid \"Tutorial\"\nmsgstr \"Tutorial\"\n\n#: ../../tutorial.rst:26\nmsgid \"\"\n\"This tutorial introduces you to the concepts and features of the Bottle web \"\n\"framework and covers basic and advanced topics alike. You can read it from \"\n\"start to end, or use it as a reference later on. The automatically generated\"\n\" :doc:`api` may be interesting for you, too. It covers more details, but \"\n\"explains less than this tutorial. Solutions for the most common questions \"\n\"can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If \"\n\"you need any help, join our `mailing list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"Dieses Tutorial führt dich in die Konzepte und Eigenschaften des Bottle Web-Frameworks ein und deckt grundlegende und fortgeschnittene Themenbereiche ab. Du kannst es dir von Anfang bis Ende durchlesen oder später als Referenz nutzen. Die automatisch generierte :doc:`api` könnte dich ebenfalls interessieren. Sie deckt mehr Details ab, erklärt im Gegensatz zu diesem Tutorial aber weniger. Lösungen für die meistgestellten Fragen sind in der :doc:`recipes` Sammlung oder der :doc:`faq`  Seite zu finden. Wenn du Hilfe brauchst, tritt unserem Mailverteiler <mailto:bottlepy@googlegroups.com>`_  bei oder besuche unsere IRC-Kanal <http://webchat.freenode.net/?channels=bottlepy>`_.\"\n\n#: ../../tutorial.rst:31\nmsgid \"Installation\"\nmsgstr \"Installation\"\n\n#: ../../tutorial.rst:33\nmsgid \"\"\n\"Bottle does not depend on any external libraries. You can just download \"\n\"`bottle.py </bottle.py>`_ into your project directory and start coding:\"\nmsgstr \"Bottle hängt von keinerlei externen Bibliotheken ab. Du kannst einfach `bottle.py </bottle.py>`_ in dein Projektverzeichnis herunterladen und anfangen zu coden.\"\n\n#: ../../tutorial.rst:39\nmsgid \"\"\n\"This will get you the latest development snapshot that includes all the new \"\n\"features. If you prefer a more stable environment, you should stick with the\"\n\" stable releases. These are available on `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_ and can be installed via \"\n\":command:`pip` (recommended), :command:`easy_install` or your package \"\n\"manager:\"\nmsgstr \"So bekommst du den aktuellsten Entwicklungsschnappschuss, welcher alle neuen Features enthält . Wenn du eine stabilere Umgebung bevorzugst solltest du bei den stabilen Veröffentlichungen bleiben. Diese sind auf `PyPI <http://pypi.python.org/pypi/bottle>`_ verfügbar und können einfach via :command:`pip` (empfohlen), :command:`easy_install` oder deinem Paketmanager installiert werden.\"\n\n#: ../../tutorial.rst:47\nmsgid \"\"\n\"Either way, you'll need Python 2.7 or newer (including 3.4+) to run bottle \"\n\"applications. If you do not have permissions to install packages system-wide\"\n\" or simply don't want to, create a `virtualenv \"\n\"<http://pypi.python.org/pypi/virtualenv>`_ first:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:55\nmsgid \"Or, if virtualenv is not installed on your system:\"\nmsgstr \"Oder wenn virtualenv nicht auf deinem System installiert ist:\"\n\n#: ../../tutorial.rst:67\nmsgid \"Quickstart: \\\"Hello World\\\"\"\nmsgstr \"Schnellstart: \\\"Hallo Welt\\\"\"\n\n#: ../../tutorial.rst:69\nmsgid \"\"\n\"This tutorial assumes you have Bottle either :ref:`installed <installation>`\"\n\" or copied into your project directory. Let's start with a very basic \"\n\"\\\"Hello World\\\" example::\"\nmsgstr \"Dieses Tutorial setzt voraus dass du entweder :ref:`installiert <installation>`  oder in dein Projektverzeichnis kopiert hast.\\nLass uns mit einem sehr grundlegenden \\\"Hallo Welt\\\" Beispiel starten::\"\n\n#: ../../tutorial.rst:79\nmsgid \"\"\n\"This is it. Run this script, visit http://localhost:8080/hello and you will \"\n\"see \\\"Hello World!\\\" in your browser. Here is how it works:\"\nmsgstr \"Das ist es. Starte dieses Skript, besuche visit http://localhost:8080/hello und du wirst \\\"Hello World!\\\" in deinem Browser sehen. Und so funktioniert es:\"\n\n#: ../../tutorial.rst:81\nmsgid \"\"\n\"The :func:`route` decorator binds a piece of code to an URL path. In this \"\n\"case, we link the ``/hello`` path to the ``hello()`` function. This is \"\n\"called a `route` (hence the decorator name) and is the most important \"\n\"concept of this framework. You can define as many routes as you want. \"\n\"Whenever a browser requests a URL, the associated function is called and the\"\n\" return value is sent back to the browser. It's as simple as that.\"\nmsgstr \"Der  :func:`route` Dekorator bindet ein stück Code anneinen URL-Pfad.\\nIn diesem Fall verlinken wir den ``/hello``-Pfad mit der  ``hello()``-Funktion.\\nDies wird `route`  genannt (daher auch der Dekoratorname) und ist das wichtigste Konzept dieses Frameworks.\\nDu kannst so viele Routen definieren wie du willst.\\nWann immer ein Browser eine URL anfragt wird die damit verbundene Funktion aufgerufen und die Rückgabe an den Browser gesendet. So einfach ist das.\"\n\n#: ../../tutorial.rst:83\nmsgid \"\"\n\"The :func:`run` call in the last line starts a built-in development server. \"\n\"It runs on ``localhost`` port ``8080`` and serves requests until you hit \"\n\":kbd:`Control-c`. You can switch the server backend later, but for now a \"\n\"development server is all we need. It requires no setup at all and is an \"\n\"incredibly painless way to get your application up and running for local \"\n\"tests.\"\nmsgstr \"Der :func:`run` Aufruf in der letzten Zeile startet einen eingebauten Entwicklungsserver. Er läuft auf ``localhost``, Port ``8080`` und bedient Anfragen, bist du :kbd:`Control-c` drückst. Du kannst das Server-Backend später ändern, doch im Augenblick ist dieser Entwicklungsserver alles was wir brauchen. Er benötigt kein Setup und ist ein sehr schmerzfreier Weg um deine Anwendung zum lokalen Testen ans Laufen zu bringen.\"\n\n#: ../../tutorial.rst:85\nmsgid \"\"\n\"The :ref:`tutorial-debugging` is very helpful during early development, but \"\n\"should be switched off for public applications. Keep that in mind.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:87\nmsgid \"\"\n\"This is just a demonstration of the basic concept of how applications are \"\n\"built with Bottle. Continue reading and you'll see what else is possible.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:92\nmsgid \"The Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:94\nmsgid \"\"\n\"For the sake of simplicity, most examples in this tutorial use a module-\"\n\"level :func:`route` decorator to define routes. This adds routes to a global\"\n\" \\\"default application\\\", an instance of :class:`Bottle` that is \"\n\"automatically created the first time you call :func:`route`. Several other \"\n\"module-level decorators and functions relate to this default application, \"\n\"but if you prefer a more object oriented approach and don't mind the extra \"\n\"typing, you can create a separate application object and use that instead of\"\n\" the global one::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:106\nmsgid \"\"\n\"The object-oriented approach is further described in the :ref:`default-app` \"\n\"section. Just keep in mind that you have a choice.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:114\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:116\nmsgid \"\"\n\"In the last chapter we built a very simple web application with only a \"\n\"single route. Here is the routing part of the \\\"Hello World\\\" example \"\n\"again::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:122\nmsgid \"\"\n\"The :func:`route` decorator links an URL path to a callback function, and \"\n\"adds a new route to the :ref:`default application <tutorial-default>`. An \"\n\"application with just one route is kind of boring, though. Let's add some \"\n\"more (don't forget ``from bottle import template``)::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:129\nmsgid \"\"\n\"This example demonstrates two things: You can bind more than one route to a \"\n\"single callback, and you can add wildcards to URLs and access them via \"\n\"keyword arguments.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:136\nmsgid \"Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:138\nmsgid \"\"\n\"Routes that contain wildcards are called `dynamic routes` (as opposed to \"\n\"`static routes`) and match more than one URL at the same time. A simple \"\n\"wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and\"\n\" accepts one or more characters up to the next slash (``/``). For example, \"\n\"the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as\"\n\" ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:140\nmsgid \"\"\n\"Each wildcard passes the covered part of the URL as a keyword argument to \"\n\"the request callback. You can use them right away and implement RESTful, \"\n\"nice-looking and meaningful URLs with ease. Here are some other examples \"\n\"along with the URLs they'd match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:150\nmsgid \"\"\n\"Filters can be used to define more specific wildcards, and/or transform the \"\n\"covered part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:152\nmsgid \"\"\n\"The following filters are implemented by default and more may be added:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:154\nmsgid \"\"\n\"**:int** matches (signed) digits only and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:155\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:156\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and can be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:157\nmsgid \"\"\n\"**:re** allows you to specify a custom regular expression in the config \"\n\"field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:159\nmsgid \"Let's have a look at some practical examples::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:173\nmsgid \"You can add your own filters as well. See :doc:`routing` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:177\nmsgid \"HTTP Request Methods\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:181\nmsgid \"\"\n\"The HTTP protocol defines several `request methods`__ (sometimes referred to\"\n\" as \\\"verbs\\\") for different tasks. GET is the default for all routes with \"\n\"no other method specified. These routes will match GET requests only. To \"\n\"handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` \"\n\"keyword argument to the :func:`route` decorator or use one of the five \"\n\"alternative decorators: :func:`get`, :func:`post`, :func:`put`, \"\n\":func:`delete` or :func:`patch`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:183\nmsgid \"\"\n\"The POST method is commonly used for HTML form submission. This example \"\n\"shows how to handle a login form using POST::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:206\nmsgid \"\"\n\"In this example the ``/login`` URL is linked to two distinct callbacks, one \"\n\"for GET requests and another for POST requests. The first one displays a \"\n\"HTML form to the user. The second callback is invoked on a form submission \"\n\"and checks the login credentials the user entered into the form. The use of \"\n\":attr:`Request.forms` is further described in the :ref:`tutorial-request` \"\n\"section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:209\nmsgid \"Special Methods: HEAD and ANY\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:210\nmsgid \"\"\n\"The HEAD method is used to ask for the response identical to the one that \"\n\"would correspond to a GET request, but without the response body. This is \"\n\"useful for retrieving meta-information about a resource without having to \"\n\"download the entire document. Bottle handles these requests automatically by\"\n\" falling back to the corresponding GET route and cutting off the request \"\n\"body, if present. You don't have to specify any HEAD routes yourself.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:212\nmsgid \"\"\n\"Additionally, the non-standard ANY method works as a low priority fallback: \"\n\"Routes that listen to ANY will match requests regardless of their HTTP \"\n\"method but only if no other more specific route is defined. This is helpful \"\n\"for *proxy-routes* that redirect requests to more specific sub-applications.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:214\nmsgid \"\"\n\"To sum it up: HEAD requests fall back to GET routes and all requests fall \"\n\"back to ANY routes, but only if there is no matching route for the original \"\n\"request method. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:219\nmsgid \"Routing Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:221\nmsgid \"\"\n\"Static files such as images or CSS files are not served automatically. You \"\n\"have to add a route and a callback to control which files get served and \"\n\"where to find them::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:228\nmsgid \"\"\n\"The :func:`static_file` function is a helper to serve files in a safe and \"\n\"convenient way (see :ref:`tutorial-static-files`). This example is limited \"\n\"to files directly within the ``/path/to/your/static/files`` directory \"\n\"because the ``<filename>`` wildcard won't match a path with a slash in it. \"\n\"To serve files in subdirectories, change the wildcard to use the `path` \"\n\"filter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:234\nmsgid \"\"\n\"Be careful when specifying a relative root-path such as \"\n\"``root='./static/files'``. The working directory (``./``) and the project \"\n\"directory are not always the same.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:242\nmsgid \"Error Pages\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:244\nmsgid \"\"\n\"If anything goes wrong, Bottle displays an informative but fairly plain \"\n\"error page. You can override the default for a specific HTTP status code \"\n\"with the :func:`error` decorator::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:251\nmsgid \"\"\n\"From now on, `404 File not Found` errors will display a custom error page to\"\n\" the user. The only parameter passed to the error-handler is an instance of \"\n\":exc:`HTTPError`. Apart from that, an error-handler is quite similar to a \"\n\"regular request callback. You can read from :data:`request`, write to \"\n\":data:`response` and return any supported data-type except for \"\n\":exc:`HTTPError` instances.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:253\nmsgid \"\"\n\"Error handlers are used only if your application returns or raises an \"\n\":exc:`HTTPError` exception (:func:`abort` does just that). Changing \"\n\":attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the \"\n\"error handler.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:263\nmsgid \"Generating content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:265\nmsgid \"\"\n\"In pure WSGI, the range of types you may return from your application is \"\n\"very limited. Applications must return an iterable yielding byte strings. \"\n\"You may return a string (because strings are iterable) but this causes most \"\n\"servers to transmit your content char by char. Unicode strings are not \"\n\"allowed at all. This is not very practical.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:267\nmsgid \"\"\n\"Bottle is much more flexible and supports a wide range of types. It even \"\n\"adds a ``Content-Length`` header if possible and encodes unicode \"\n\"automatically, so you don't have to. What follows is a list of data types \"\n\"you may return from your application callbacks and a short description of \"\n\"how these are handled by the framework:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"Dictionaries\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"\"\n\"As mentioned above, Python dictionaries (or subclasses thereof) are \"\n\"automatically transformed into JSON strings and returned to the browser with\"\n\" the ``Content-Type`` header set to ``application/json``. This makes it easy\"\n\" to implement json-based APIs. Data formats other than json are supported \"\n\"too. See the :ref:`tutorial-output-filter` to learn more.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"Empty Strings, ``False``, ``None`` or other non-true values:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"\"\n\"These produce an empty output with the ``Content-Length`` header set to 0.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"Unicode strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"\"\n\"Unicode strings (or iterables yielding unicode strings) are automatically \"\n\"encoded with the codec specified in the ``Content-Type`` header (utf8 by \"\n\"default) and then treated as normal byte strings (see below).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"Byte strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"\"\n\"Bottle returns strings as a whole (instead of iterating over each char) and \"\n\"adds a ``Content-Length`` header based on the string length. Lists of byte \"\n\"strings are joined first. Other iterables yielding byte strings are not \"\n\"joined because they may grow too big to fit into memory. The ``Content-\"\n\"Length`` header is not set in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"Instances of :exc:`HTTPError` or :exc:`HTTPResponse`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"\"\n\"Returning these has the same effect as when raising them as an exception. In\"\n\" case of an :exc:`HTTPError`, the error handler is applied. See :ref\"\n\":`tutorial-errorhandling` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"File objects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"\"\n\"Everything that has a ``.read()`` method is treated as a file or file-like \"\n\"object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI \"\n\"server framework. Some WSGI server implementations can make use of optimized\"\n\" system calls (sendfile) to transmit files more efficiently. In other cases \"\n\"this just iterates over chunks that fit into memory. Optional headers such \"\n\"as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use \"\n\":func:`send_file` if possible. See :ref:`tutorial-static-files` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"Iterables and generators\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"\"\n\"You are allowed to use ``yield`` within your callbacks or return an \"\n\"iterable, as long as the iterable yields byte strings, unicode strings, \"\n\":exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not \"\n\"supported, sorry. Please note that the HTTP status code and the headers are \"\n\"sent to the browser as soon as the iterable yields its first non-empty \"\n\"value. Changing these later has no effect.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:290\nmsgid \"\"\n\"The ordering of this list is significant. You may for example return a \"\n\"subclass of :class:`str` with a ``read()`` method. It is still treated as a \"\n\"string instead of a file, because strings are handled first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:293\nmsgid \"Changing the Default Encoding\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:294\nmsgid \"\"\n\"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide\"\n\" how to encode unicode strings. This header defaults to ``text/html; \"\n\"charset=UTF8`` and can be changed using the :attr:`Response.content_type` \"\n\"attribute or by setting the :attr:`Response.charset` attribute directly. \"\n\"(The :class:`Response` object is described in the section :ref:`tutorial-\"\n\"response`.)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:309\nmsgid \"\"\n\"In some rare cases the Python encoding names differ from the names supported\"\n\" by the HTTP specification. Then, you have to do both: first set the \"\n\":attr:`Response.content_type` header (which is sent to the client unchanged)\"\n\" and then set the :attr:`Response.charset` attribute (which is used to \"\n\"encode unicode).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:314\nmsgid \"Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:316\nmsgid \"\"\n\"You can directly return file objects, but :func:`static_file` is the \"\n\"recommended way to serve static files. It automatically guesses a mime-type,\"\n\" adds a ``Last-Modified`` header, restricts paths to a ``root`` directory \"\n\"for security reasons and generates appropriate error responses (403 on \"\n\"permission errors, 404 on missing files). It even supports the ``If-\"\n\"Modified-Since`` header and eventually generates a ``304 Not Modified`` \"\n\"response. You can pass a custom MIME type to disable guessing.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:329\nmsgid \"\"\n\"You can raise the return value of :func:`static_file` as an exception if you\"\n\" really need to.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:332\nmsgid \"Forced Download\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:333\nmsgid \"\"\n\"Most browsers try to open downloaded files if the MIME type is known and \"\n\"assigned to an application (e.g. PDF files). If this is not what you want, \"\n\"you can force a download dialog and even suggest a filename to the user::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:339\nmsgid \"\"\n\"If the ``download`` parameter is just ``True``, the original filename is \"\n\"used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:344\nmsgid \"HTTP Errors and Redirects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:346\nmsgid \"\"\n\"The :func:`abort` function is a shortcut for generating HTTP error pages.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:355\nmsgid \"\"\n\"To redirect a client to a different URL, you can send a ``303 See Other`` \"\n\"response with the ``Location`` header set to the new URL. :func:`redirect` \"\n\"does that for you::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:362\nmsgid \"You may provide a different HTTP status code as a second parameter.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:365\nmsgid \"\"\n\"Both functions will interrupt your callback code by raising an \"\n\":exc:`HTTPResponse` exception.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:368\nmsgid \"Other Exceptions\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:369\nmsgid \"\"\n\"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will \"\n\"result in a ``500 Internal Server Error`` response, so they won't crash your\"\n\" WSGI server. You can turn off this behavior to handle exceptions in your \"\n\"middleware by setting ``bottle.app().catchall`` to ``False``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:375\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:377\nmsgid \"\"\n\"Response metadata such as the HTTP status code, response headers and cookies\"\n\" are stored in an object called :data:`response` up to the point where they \"\n\"are transmitted to the browser. You can manipulate these metadata directly \"\n\"or use the predefined helper methods to do so. The full API and feature list\"\n\" is described in the API section (see :class:`Response`), but the most \"\n\"common use cases and features are covered here, too.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:380\nmsgid \"Status Code\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:381\nmsgid \"\"\n\"The `HTTP status code <http_code>`_ controls the behavior of the browser and\"\n\" defaults to ``200 OK``. In most scenarios you won't need to set the \"\n\":attr:`Response.status` attribute manually, but use the :func:`abort` helper\"\n\" or return an :exc:`HTTPResponse` instance with the appropriate status code.\"\n\" Any integer is allowed, but codes other than the ones defined by the `HTTP \"\n\"specification <http_code>`_ will only confuse the browser and break \"\n\"standards.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:384\nmsgid \"Response Header\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:385\nmsgid \"\"\n\"Response headers such as ``Cache-Control`` or ``Location`` are defined via \"\n\":meth:`Response.set_header`. This method takes two parameters, a header name\"\n\" and a value. The name part is case-insensitive::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:392\nmsgid \"\"\n\"Most headers are unique, meaning that only one header per name is send to \"\n\"the client. Some special headers however are allowed to appear more than \"\n\"once in a response. To add an additional header, use \"\n\":meth:`Response.add_header` instead of :meth:`Response.set_header`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:397\nmsgid \"\"\n\"Please note that this is just an example. If you want to work with cookies, \"\n\"read :ref:`ahead <tutorial-cookies>`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:403 ../../tutorial.rst:533\nmsgid \"Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:405\nmsgid \"\"\n\"A cookie is a named piece of text stored in the user's browser profile. You \"\n\"can access previously defined cookies via :meth:`Request.get_cookie` and set\"\n\" new cookies with :meth:`Response.set_cookie`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:415\nmsgid \"\"\n\"The :meth:`Response.set_cookie` method accepts a number of additional \"\n\"keyword arguments that control the cookies lifetime and behavior. Some of \"\n\"the most common settings are described here:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:417\nmsgid \"**max_age:**    Maximum age in seconds. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:418\nmsgid \"\"\n\"**expires:**    A datetime object or UNIX timestamp. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:419\nmsgid \"\"\n\"**domain:**     The domain that is allowed to read the cookie. (default: \"\n\"current domain)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:420\nmsgid \"**path:**       Limit the cookie to a given path (default: ``/``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:421\nmsgid \"**secure:**     Limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:422\nmsgid \"\"\n\"**httponly:**   Prevent client-side javascript to read this cookie (default:\"\n\" off, requires Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:423\nmsgid \"\"\n\"**same_site:**  Disables third-party use for a cookie. Allowed attributes: \"\n\"`lax` and `strict`. In strict mode the cookie will never be sent. In lax \"\n\"mode the cookie is only sent with a top-level GET request.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:425\nmsgid \"\"\n\"If neither `expires` nor `max_age` is set, the cookie expires at the end of \"\n\"the browser session or as soon as the browser window is closed. There are \"\n\"some other gotchas you should consider when using cookies:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:427\nmsgid \"Cookies are limited to 4 KB of text in most browsers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:428\nmsgid \"\"\n\"Some users configure their browsers to not accept cookies at all. Most \"\n\"search engines ignore cookies too. Make sure that your application still \"\n\"works without cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:429\nmsgid \"\"\n\"Cookies are stored at client side and are not encrypted in any way. Whatever\"\n\" you store in a cookie, the user can read it. Worse than that, an attacker \"\n\"might be able to steal a user's cookies through `XSS \"\n\"<http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_\"\n\" vulnerabilities on your side. Some viruses are known to read the browser \"\n\"cookies, too. Thus, never store confidential information in cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:430\nmsgid \"Cookies are easily forged by malicious clients. Do not trust cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:435\nmsgid \"Signed Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:436\nmsgid \"\"\n\"As mentioned above, cookies are easily forged by malicious clients. Bottle \"\n\"can cryptographically sign your cookies to prevent this kind of \"\n\"manipulation. All you have to do is to provide a signature key via the \"\n\"`secret` keyword argument whenever you read or set a cookie and keep that \"\n\"key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` \"\n\"if the cookie is not signed or the signature keys don't match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:456\nmsgid \"\"\n\"In addition, Bottle automatically pickles and unpickles any data stored to \"\n\"signed cookies. This allows you to store any pickle-able object (not only \"\n\"strings) to cookies, as long as the pickled data does not exceed the 4 KB \"\n\"limit.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:458\nmsgid \"\"\n\"Signed cookies are not encrypted (the client can still see the content) and \"\n\"not copy-protected (the client can restore an old cookie). The main \"\n\"intention is to make pickling and unpickling safe and prevent manipulation, \"\n\"not to store secret information at client side.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:471\nmsgid \"Request Data\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:473\nmsgid \"\"\n\"Cookies, HTTP header, HTML ``<form>`` fields and other request data is \"\n\"available through the global :data:`request` object. This special object \"\n\"always refers to the *current* request, even in multi-threaded environments \"\n\"where multiple client connections are handled at the same time::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:482\nmsgid \"\"\n\"The :data:`request` object is a subclass of :class:`BaseRequest` and has a \"\n\"very rich API to access data. We only cover the most commonly used features \"\n\"here, but it should be enough to get started.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:487\nmsgid \"Introducing :class:`FormsDict`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:489\nmsgid \"\"\n\"Bottle uses a special type of dictionary to store form data and cookies. \"\n\":class:`FormsDict` behaves like a normal dictionary, but has some additional\"\n\" features to make your life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:491\nmsgid \"\"\n\"**Attribute access**: All values in the dictionary are also accessible as \"\n\"attributes. These virtual attributes return unicode strings, even if the \"\n\"value is missing or unicode decoding fails. In that case, the string is \"\n\"empty, but still present::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:506\nmsgid \"\"\n\"**Multiple values per key:** :class:`FormsDict` is a subclass of \"\n\":class:`MultiDict` and can store more than one value per key. The standard \"\n\"dictionary access methods will only return a single value, but the \"\n\":meth:`~MultiDict.getall` method returns a (possibly empty) list of all \"\n\"values for a specific key::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:511\nmsgid \"\"\n\"**WTForms support:** Some libraries (e.g. `WTForms \"\n\"<http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input.\"\n\" :meth:`FormsDict.decode` does that for you. It decodes all values and \"\n\"returns a copy of itself, while preserving multiple values per key and all \"\n\"the other features.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:515\nmsgid \"\"\n\"In **Python 2** all keys and values are byte-strings. If you need unicode, \"\n\"you can call :meth:`FormsDict.getunicode` or fetch values via attribute \"\n\"access. Both methods try to decode the string (default: utf8) and return an \"\n\"empty string if that fails. No need to catch :exc:`UnicodeError`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:522\nmsgid \"\"\n\"In **Python 3** all strings are unicode, but HTTP is a byte-based wire \"\n\"protocol. The server has to decode the byte strings somehow before they are \"\n\"passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 \"\n\"(aka latin1), a reversible single-byte codec that can be re-encoded with a \"\n\"different encoding later. Bottle does that for :meth:`FormsDict.getunicode` \"\n\"and attribute access, but not for the dict-access methods. These return the \"\n\"unchanged values as provided by the server implementation, which is probably\"\n\" not what you want.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:529\nmsgid \"\"\n\"If you need the whole dictionary with correctly decoded values (e.g. for \"\n\"WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:535\nmsgid \"\"\n\"Cookies are small pieces of text stored in the clients browser and sent back\"\n\" to the server with each request. They are useful to keep some state around \"\n\"for more than one request (HTTP itself is stateless), but should not be used\"\n\" for security related stuff. They can be easily forged by the client.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:537\nmsgid \"\"\n\"All cookies sent by the client are available through \"\n\":attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a \"\n\"simple cookie-based view counter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:547\nmsgid \"\"\n\"The :meth:`BaseRequest.get_cookie` method is a different way do access \"\n\"cookies. It supports decoding :ref:`signed cookies <tutorial-signed-\"\n\"cookies>` as described in a separate section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:550\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:552\nmsgid \"\"\n\"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or \"\n\"``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible \"\n\"through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict`\"\n\" is basically a dictionary with case-insensitive keys::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:564\nmsgid \"Query Variables\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:566\nmsgid \"\"\n\"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit\"\n\" a small number of key/value pairs to the server. You can use the \"\n\":attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these \"\n\"values and the :attr:`BaseRequest.query_string` attribute to get the whole \"\n\"string.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:579\nmsgid \"HTML `<form>` Handling\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:581\nmsgid \"\"\n\"Let us start from the beginning. In HTML, a typical ``<form>`` looks \"\n\"something like this:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:591\nmsgid \"\"\n\"The ``action`` attribute specifies the URL that will receive the form data. \"\n\"``method`` defines the HTTP method to use (``GET`` or ``POST``). With \"\n\"``method=\\\"get\\\"`` the form values are appended to the URL and available \"\n\"through :attr:`BaseRequest.query` as described above. This is considered \"\n\"insecure and has other limitations, so we use ``method=\\\"post\\\"`` here. If \"\n\"in doubt, use ``POST`` forms.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:593\nmsgid \"\"\n\"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms`\"\n\" as a :class:`FormsDict`. The server side code may look like this::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:616\nmsgid \"\"\n\"There are several other attributes used to access form data. Some of them \"\n\"combine values from different sources for easier access. The following table\"\n\" should give you a decent overview.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"GET Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"POST Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"File Uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621\nmsgid \":attr:`BaseRequest.query`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:622 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:624 ../../tutorial.rst:625\n#: ../../tutorial.rst:626 ../../tutorial.rst:626\nmsgid \"yes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:621 ../../tutorial.rst:622\n#: ../../tutorial.rst:622 ../../tutorial.rst:623 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:625 ../../tutorial.rst:625\n#: ../../tutorial.rst:626\nmsgid \"no\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:622\nmsgid \":attr:`BaseRequest.forms`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:623\nmsgid \":attr:`BaseRequest.files`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:624\nmsgid \":attr:`BaseRequest.params`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:625\nmsgid \":attr:`BaseRequest.GET`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:626\nmsgid \":attr:`BaseRequest.POST`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:631\nmsgid \"File uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:633\nmsgid \"\"\n\"To support file uploads, we have to change the ``<form>`` tag a bit. First, \"\n\"we tell the browser to encode the form data in a different way by adding an \"\n\"``enctype=\\\"multipart/form-data\\\"`` attribute to the ``<form>`` tag. Then, \"\n\"we add ``<input type=\\\"file\\\" />`` tags to allow the user to select a file. \"\n\"Here is an example:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:643\nmsgid \"\"\n\"Bottle stores file uploads in :attr:`BaseRequest.files` as \"\n\":class:`FileUpload` instances, along with some metadata about the upload. \"\n\"Let us assume you just want to save the file to disk::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:657\nmsgid \"\"\n\":attr:`FileUpload.filename` contains the name of the file on the clients \"\n\"file system, but is cleaned up and normalized to prevent bugs caused by \"\n\"unsupported characters or path segments in the filename. If you need the \"\n\"unmodified name as sent by the client, have a look at \"\n\":attr:`FileUpload.raw_filename`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:659\nmsgid \"\"\n\"The :attr:`FileUpload.save` method is highly recommended if you want to \"\n\"store the file to disk. It prevents some common errors (e.g. it does not \"\n\"overwrite existing files unless you tell it to) and stores the file in a \"\n\"memory efficient way. You can access the file object directly via \"\n\":attr:`FileUpload.file`. Just be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:663\nmsgid \"JSON Content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:665\nmsgid \"\"\n\"Some JavaScript or REST clients send ``application/json`` content to the \"\n\"server. The :attr:`BaseRequest.json` attribute contains the parsed data \"\n\"structure, if available.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:669\nmsgid \"The raw request body\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:671\nmsgid \"\"\n\"You can access the raw body data as a file-like object via \"\n\":attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary \"\n\"file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` \"\n\"setting. In both cases the body is completely buffered before you can access\"\n\" the attribute. If you expect huge amounts of data and want to get direct \"\n\"unbuffered access to the stream, have a look at ``request['wsgi.input']``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:676\nmsgid \"WSGI Environment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:678\nmsgid \"\"\n\"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The \"\n\"original is stored in :attr:`BaseRequest.environ`, but the request object \"\n\"itself behaves like a dictionary, too. Most of the interesting data is \"\n\"exposed through special methods or attributes, but if you want to access \"\n\"`WSGI environ variables <WSGI_Specification>`_ directly, you can do so::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:696\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:698\nmsgid \"\"\n\"Bottle comes with a fast and powerful built-in template engine called \"\n\":doc:`stpl`. To render a template you can use the :func:`template` function \"\n\"or the :func:`view` decorator. All you have to do is to provide the name of \"\n\"the template and the variables you want to pass to the template as keyword \"\n\"arguments. Here’s a simple example of how to render a template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:705\nmsgid \"\"\n\"This will load the template file ``hello_template.tpl`` and render it with \"\n\"the ``name`` variable set. Bottle will look for templates in the \"\n\"``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` \"\n\"list.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:707\nmsgid \"\"\n\"The :func:`view` decorator allows you to return a dictionary with the \"\n\"template variables instead of calling :func:`template`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:716\nmsgid \"Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:719\nmsgid \"\"\n\"The template syntax is a very thin layer around the Python language. Its \"\n\"main purpose is to ensure correct indentation of blocks, so you can format \"\n\"your template without worrying about indentation. Follow the link for a full\"\n\" syntax description: :doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:721\nmsgid \"Here is an example template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:732\nmsgid \"Caching\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:733\nmsgid \"\"\n\"Templates are cached in memory after compilation. Modifications made to the \"\n\"template files will have no affect until you clear the template cache. Call \"\n\"``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:743\nmsgid \"Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:747\nmsgid \"\"\n\"Bottle's core features cover most common use-cases, but as a micro-framework\"\n\" it has its limits. This is where \\\"Plugins\\\" come into play. Plugins add \"\n\"missing functionality to the framework, integrate third party libraries, or \"\n\"just automate some repetitive work.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:749\nmsgid \"\"\n\"We have a growing :doc:`/plugins/index` and most plugins are designed to be \"\n\"portable and re-usable across applications. The chances are high that your \"\n\"problem has already been solved and a ready-to-use plugin exists. If not, \"\n\"the :doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:751\nmsgid \"\"\n\"The effects and APIs of plugins are manifold and depend on the specific \"\n\"plugin. The ``SQLitePlugin`` plugin for example detects callbacks that \"\n\"require a ``db`` keyword argument and creates a fresh database connection \"\n\"object every time the callback is called. This makes it very convenient to \"\n\"use a database::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:771\nmsgid \"\"\n\"Other plugin may populate the thread-safe :data:`local` object, change \"\n\"details of the :data:`request` object, filter the data returned by the \"\n\"callback or bypass the callback completely. An \\\"auth\\\" plugin for example \"\n\"could check for a valid session and return a login page instead of calling \"\n\"the original callback. What happens exactly depends on the plugin.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:775\nmsgid \"Application-wide Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:777\nmsgid \"\"\n\"Plugins can be installed application-wide or just to some specific routes \"\n\"that need additional functionality. Most plugins can safely be installed to \"\n\"all routes and are smart enough to not add overhead to callbacks that do not\"\n\" need their functionality.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:779\nmsgid \"\"\n\"Let us take the ``SQLitePlugin`` plugin for example. It only affects route \"\n\"callbacks that need a database connection. Other routes are left alone. \"\n\"Because of this, we can install the plugin application-wide with no \"\n\"additional overhead.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:781\nmsgid \"\"\n\"To install a plugin, just call :func:`install` with the plugin as first \"\n\"argument::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:786\nmsgid \"\"\n\"The plugin is not applied to the route callbacks yet. This is delayed to \"\n\"make sure no routes are missed. You can install plugins first and add routes\"\n\" later, if you want to. The order of installed plugins is significant, \"\n\"though. If a plugin requires a database connection, you need to install the \"\n\"database plugin first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:790\nmsgid \"Uninstall Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:791\nmsgid \"\"\n\"You can use a name, class or instance to :func:`uninstall` a previously \"\n\"installed plugin::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:801\nmsgid \"\"\n\"Plugins can be installed and removed at any time, even at runtime while \"\n\"serving requests. This enables some neat tricks (installing slow debugging \"\n\"or profiling plugins only when needed) but should not be overused. Each time\"\n\" the list of plugins changes, the route cache is flushed and all plugins are\"\n\" re-applied.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:804\nmsgid \"\"\n\"The module-level :func:`install` and :func:`uninstall` functions affect the \"\n\":ref:`default-app`. To manage plugins for a specific application, use the \"\n\"corresponding methods on the :class:`Bottle` application object.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:808\nmsgid \"Route-specific Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:810\nmsgid \"\"\n\"The ``apply`` parameter of the :func:`route` decorator comes in handy if you\"\n\" want to install plugins to only a small number of routes::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:820\nmsgid \"Blacklisting Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:822\nmsgid \"\"\n\"You may want to explicitly disable a plugin for a number of routes. The \"\n\":func:`route` decorator has a ``skip`` parameter for this purpose::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:844\nmsgid \"\"\n\"The ``skip`` parameter accepts a single value or a list of values. You can \"\n\"use a name, class or instance to identify the plugin that is to be skipped. \"\n\"Set ``skip=True`` to skip all plugins at once.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:847\nmsgid \"Plugins and Sub-Applications\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:849\nmsgid \"\"\n\"Most plugins are specific to the application they were installed to. \"\n\"Consequently, they should not affect sub-applications mounted with \"\n\":meth:`Bottle.mount`. Here is an example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:860\nmsgid \"\"\n\"Whenever you mount an application, Bottle creates a proxy-route on the main-\"\n\"application that forwards all requests to the sub-application. Plugins are \"\n\"disabled for this kind of proxy-route by default. As a result, our \"\n\"(fictional) `WTForms` plugin affects the ``/contact`` route, but does not \"\n\"affect the routes of the ``/blog`` sub-application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:862\nmsgid \"\"\n\"This behavior is intended as a sane default, but can be overridden. The \"\n\"following example re-activates all plugins for a specific proxy-route::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:866\nmsgid \"\"\n\"But there is a snag: The plugin sees the whole sub-application as a single \"\n\"route, namely the proxy-route mentioned above. In order to affect each \"\n\"individual route of the sub-application, you have to install the plugin to \"\n\"the mounted application explicitly.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:871\nmsgid \"Development\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:873\nmsgid \"\"\n\"So you have learned the basics and want to write your own application? Here \"\n\"are some tips that might help you being more productive.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:879\nmsgid \"Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:881\nmsgid \"\"\n\"Bottle maintains a global stack of :class:`Bottle` instances and uses the \"\n\"top of the stack as a default for some of the module-level functions and \"\n\"decorators. The :func:`route` decorator, for example, is a shortcut for \"\n\"calling :meth:`Bottle.route` on the default application::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:889\nmsgid \"\"\n\"This is very convenient for small applications and saves you some typing, \"\n\"but also means that, as soon as your module is imported, routes are \"\n\"installed to the global default application. To avoid this kind of import \"\n\"side-effects, Bottle offers a second, more explicit way to build \"\n\"applications::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:899\nmsgid \"\"\n\"Separating the application object improves re-usability a lot, too. Other \"\n\"developers can safely import the ``app`` object from your module and use \"\n\":meth:`Bottle.mount` to merge applications together.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:904\nmsgid \"\"\n\"Starting with bottle-0.13 you can use :class:`Bottle` instances as context \"\n\"managers::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:929\nmsgid \"Debug Mode\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:931\nmsgid \"During early development, the debug mode can be very helpful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:939\nmsgid \"\"\n\"In this mode, Bottle is much more verbose and provides helpful debugging \"\n\"information whenever an error occurs. It also disables some optimisations \"\n\"that might get in your way and adds some checks that warn you about possible\"\n\" misconfiguration.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:941\nmsgid \"Here is an incomplete list of things that change in debug mode:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:943\nmsgid \"The default error page shows a traceback.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:944\nmsgid \"Templates are not cached.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:945\nmsgid \"Plugins are applied immediately.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:947\nmsgid \"Just make sure not to use the debug mode on a production server.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:950\nmsgid \"Auto Reloading\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:952\nmsgid \"\"\n\"During development, you have to restart the server a lot to test your recent\"\n\" changes. The auto reloader can do this for you. Every time you edit a \"\n\"module file, the reloader restarts the server process and loads the newest \"\n\"version of your code.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:962\nmsgid \"\"\n\"How it works: the main process will not start a server, but spawn a new \"\n\"child process using the same command line arguments used to start the main \"\n\"process. All module-level code is executed at least twice! Be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:967\nmsgid \"\"\n\"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` \"\n\"and start as a normal non-reloading app server. As soon as any of the loaded\"\n\" modules changes, the child process is terminated and re-spawned by the main\"\n\" process. Changes in template files will not trigger a reload. Please use \"\n\"debug mode to deactivate template caching.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:973\nmsgid \"\"\n\"The reloading depends on the ability to stop the child process. If you are \"\n\"running on Windows or any other operating system not supporting \"\n\"``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), \"\n\"``signal.SIGTERM`` is used to kill the child. Note that exit handlers and \"\n\"finally clauses, etc., are not executed after a ``SIGTERM``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:981\nmsgid \"Command Line Interface\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:985\nmsgid \"Starting with version 0.10 you can use bottle as a command-line tool:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1009\nmsgid \"\"\n\"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to \"\n\"``localhost:8080``. The other parameters should be self-explanatory.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1011\nmsgid \"\"\n\"Both plugins and applications are specified via import expressions. These \"\n\"consist of an import path (e.g. ``package.module``) and an expression to be \"\n\"evaluated in the namespace of that module, separated by a colon. See \"\n\":func:`load` for details. Here are some examples:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1032\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1034\nmsgid \"\"\n\"Bottle runs on the built-in `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_\"\n\"  by default. This non-threading HTTP server is perfectly fine for \"\n\"development, but may become a performance bottleneck when server load \"\n\"increases.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1036\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded server::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1040\nmsgid \"\"\n\"This, and many other deployment options are described in a separate article:\"\n\" :doc:`deployment`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1048\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1051\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1053\nmsgid \"\"\n\"Programmer code that is to be called when some external action happens. In \"\n\"the context of web frameworks, the mapping between URL paths and application\"\n\" code is often achieved by specifying a callback function for each URL.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1057\nmsgid \"decorator\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1059\nmsgid \"\"\n\"A function returning another function, usually applied as a function \"\n\"transformation using the ``@decorator`` syntax. See `python documentation \"\n\"for function definition  \"\n\"<http://docs.python.org/reference/compound_stmts.html#function>`_ for more \"\n\"about decorators.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1060\nmsgid \"environ\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1062\nmsgid \"\"\n\"A structure where information about all documents under the root is saved, \"\n\"and used for cross-referencing.  The environment is pickled after the \"\n\"parsing stage, so that successive runs only need to read and parse new and \"\n\"changed documents.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1066\nmsgid \"handler function\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1068\nmsgid \"\"\n\"A function to handle some specific event or situation. In a web framework, \"\n\"the application is developed by attaching a handler function as callback for\"\n\" each specific URL comprising the application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1071\nmsgid \"source directory\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1073\nmsgid \"\"\n\"The directory which, including its subdirectories, contains all source files\"\n\" for one Sphinx project.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/de_DE/LC_MESSAGES/tutorial_app.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: German (Germany) (http://www.transifex.com/bottle/bottle/language/de_DE/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de_DE\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: ../../tutorial_app.rst:19\nmsgid \"Tutorial: Todo-List Application\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:23\nmsgid \"\"\n\"This tutorial is a work in progress and written by `noisefloor \"\n\"<http://github.com/noisefloor>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:26\nmsgid \"\"\n\"This tutorial should give a brief introduction to the Bottle_ WSGI \"\n\"Framework. The main goal is to be able, after reading through this tutorial,\"\n\" to create a project using Bottle. Within this document, not all abilities \"\n\"will be shown, but at least the main and important ones like routing, \"\n\"utilizing the Bottle template abilities to format output and handling GET / \"\n\"POST parameters.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:28\nmsgid \"\"\n\"To understand the content here, it is not necessary to have a basic \"\n\"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. \"\n\"You should have a fair understanding of the Python_ programming language. \"\n\"Furthermore, the example used in the tutorial retrieves and stores data in a\"\n\" SQL database, so a basic idea about SQL helps, but is not a must to \"\n\"understand the concepts of Bottle. Right here, SQLite_ is used. The output \"\n\"of Bottle sent to the browser is formatted in some examples by the help of \"\n\"HTML. Thus, a basic idea about the common HTML tags does help as well.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:30\nmsgid \"\"\n\"For the sake of introducing Bottle, the Python code \\\"in between\\\" is kept \"\n\"short, in order to keep the focus. Also all code within the tutorial is \"\n\"working fine, but you may not necessarily use it \\\"in the wild\\\", e.g. on a \"\n\"public web server. In order to do so, you may add e.g. more error handling, \"\n\"protect the database with a password, test and escape the input etc.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:32\nmsgid \"Table of Contents\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:35\nmsgid \"Goals\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:37\nmsgid \"\"\n\"At the end of this tutorial, we will have a simple, web-based ToDo list. The\"\n\" list contains a text (with max 100 characters) and a status (0 for closed, \"\n\"1 for open) for each item. Through the web-based user interface, open items \"\n\"can be view and edited and new items can be added.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:39\nmsgid \"\"\n\"During development, all pages will be available on ``localhost`` only, but \"\n\"later on it will be shown how to adapt the application for a \\\"real\\\" \"\n\"server, including how to use with Apache's mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:41\nmsgid \"\"\n\"Bottle will do the routing and format the output, with the help of \"\n\"templates. The items of the list will be stored inside a SQLite database. \"\n\"Reading and  writing the database will be done by Python code.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:43\nmsgid \"\"\n\"We will end up with an application with the following pages and \"\n\"functionality:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:45\nmsgid \"start page ``http://localhost:8080/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:46\nmsgid \"adding new items to the list: ``http://localhost:8080/new``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:47\nmsgid \"page for editing items: ``http://localhost:8080/edit/<no:int>``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:48\nmsgid \"catching errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:51\nmsgid \"Before We Start...\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:55\nmsgid \"Install Bottle\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:56\nmsgid \"\"\n\"Assuming that you have a fairly new installation of Python (version 2.5 or \"\n\"higher), you only need to install Bottle in addition to that. Bottle has no \"\n\"other dependencies than Python itself.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:58\nmsgid \"\"\n\"You can either manually install Bottle or use Python's easy_install: \"\n\"``easy_install bottle``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:62\nmsgid \"Further Software Necessities\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:63\nmsgid \"\"\n\"As we use SQLite3 as a database, make sure it is installed. On Linux \"\n\"systems, most distributions have SQLite3 installed by default. SQLite is \"\n\"available for Windows and MacOS X as well and the `sqlite3` module is part \"\n\"of the python standard library.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:66\nmsgid \"Create An SQL Database\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:67\nmsgid \"\"\n\"First, we need to create the database we use later on. To do so, save the \"\n\"following script in your project directory and run it with python. You can \"\n\"use the interactive interpreter too::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:78\nmsgid \"\"\n\"This generates a database-file `todo.db` with tables called ``todo`` and \"\n\"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for \"\n\"each row, which is used later on to reference the rows. The column ``task`` \"\n\"holds the text which describes the task, it can be max 100 characters long. \"\n\"Finally, the column ``status`` is used to mark a task as open (value 1) or \"\n\"closed (value 0).\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:81\nmsgid \"Using Bottle for a Web-Based ToDo List\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:83\nmsgid \"\"\n\"Now it is time to introduce Bottle in order to create a web-based \"\n\"application. But first, we need to look into a basic concept of Bottle: \"\n\"routes.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:87\nmsgid \"Understanding routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:88\nmsgid \"\"\n\"Basically, each page visible in the browser is dynamically generated when \"\n\"the page address is called. Thus, there is no static content. That is \"\n\"exactly what is called a \\\"route\\\" within Bottle: a certain address on the \"\n\"server. So, for example, when the page ``http://localhost:8080/todo`` is \"\n\"called from the browser, Bottle \\\"grabs\\\" the call and checks if there is \"\n\"any (Python) function defined for the route \\\"todo\\\". If so, Bottle will \"\n\"execute the corresponding Python code and return its result.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:92\nmsgid \"First Step - Showing All Open Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:93\nmsgid \"\"\n\"So, after understanding the concept of routes, let's create the first one. \"\n\"The goal is to see all open items from the ToDo list::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:108\nmsgid \"\"\n\"Save the code a ``todo.py``, preferably in the same directory as the file \"\n\"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the \"\n\"``sqlite3.connect()`` statement.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:110\nmsgid \"\"\n\"Let's have a look what we just did: We imported the necessary module \"\n\"``sqlite3`` to access to SQLite database and from Bottle we imported \"\n\"``route`` and ``run``. The ``run()`` statement simply starts the web server \"\n\"included in Bottle. By default, the web server serves the pages on localhost\"\n\" and port 8080. Furthermore, we imported ``route``, which is the function \"\n\"responsible for Bottle's routing. As you can see, we defined one function, \"\n\"``todo_list()``, with a few lines of code reading from the database. The \"\n\"important point is the `decorator statement`_ ``@route('/todo')`` right \"\n\"before the ``def todo_list()`` statement. By doing this, we bind this \"\n\"function to the route ``/todo``, so every time the browsers calls \"\n\"``http://localhost:8080/todo``, Bottle returns the result of the function \"\n\"``todo_list()``. That is how routing within bottle works.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:112\nmsgid \"\"\n\"Actually you can bind more than one route to a function. So the following \"\n\"code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:119\nmsgid \"\"\n\"will work fine, too. What will not work is to bind one route to more than \"\n\"one function.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:121\nmsgid \"\"\n\"What you will see in the browser is what is returned, thus the value given \"\n\"by the ``return`` statement. In this example, we need to convert ``result`` \"\n\"in to a string by ``str()``, as Bottle expects a string or a list of strings\"\n\" from the return statement. But here, the result of the database query is a \"\n\"list of tuples, which is the standard defined by the `Python DB API`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:123\nmsgid \"\"\n\"Now, after understanding the little script above, it is time to execute it \"\n\"and watch the result yourself. Remember that on Linux- / Unix-based systems \"\n\"the file ``todo.py`` needs to be executable first. Then, just run ``python \"\n\"todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. \"\n\"In case you made no mistake writing the script, the output should look like \"\n\"this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:127\nmsgid \"\"\n\"If so - congratulations! You are now a successful user of Bottle. In case it\"\n\" did not work and you need to make some changes to the script, remember to \"\n\"stop Bottle serving the page, otherwise the revised version will not be \"\n\"loaded.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:129\nmsgid \"\"\n\"Actually, the output is not really exciting nor nice to read. It is the raw \"\n\"result returned from the SQL query.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:131\nmsgid \"\"\n\"So, in the next step we format the output in a nicer way. But before we do \"\n\"that, we make our life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:135\nmsgid \"Debugging and Auto-Reload\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:136\nmsgid \"\"\n\"Maybe you already noticed that Bottle sends a short error message to the \"\n\"browser in case something within the script is wrong, e.g. the connection to\"\n\" the database is not working. For debugging purposes it is quite helpful to \"\n\"get more details. This can be easily achieved by adding the following \"\n\"statement to the script::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:144\nmsgid \"\"\n\"By enabling \\\"debug\\\", you will get a full stacktrace of the Python \"\n\"interpreter, which usually contains useful information for finding bugs. \"\n\"Furthermore, templates (see below) are not cached, thus changes to templates\"\n\" will take effect without stopping the server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:148\nmsgid \"\"\n\"That ``debug(True)`` is supposed to be used for development only, it should \"\n\"*not* be used in production environments.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:152\nmsgid \"\"\n\"Another quite nice feature is auto-reloading, which is enabled by modifying \"\n\"the ``run()`` statement to\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:158\nmsgid \"\"\n\"This will automatically detect changes to the script and reload the new \"\n\"version once it is called again, without the need to stop and start the \"\n\"server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:160\nmsgid \"\"\n\"Again, the feature is mainly supposed to be used while developing, not on \"\n\"production systems.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:164\nmsgid \"Bottle Template To Format The Output\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:165\nmsgid \"\"\n\"Now let's have a look at casting the output of the script into a proper \"\n\"format.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:167\nmsgid \"\"\n\"Actually Bottle expects to receive a string or a list of strings from a \"\n\"function and returns them by the help of the built-in server to the browser.\"\n\" Bottle does not bother about the content of the string itself, so it can be\"\n\" text formatted with HTML markup, too.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:169\nmsgid \"\"\n\"Bottle brings its own easy-to-use template engine with it. Templates are \"\n\"stored as separate files having a ``.tpl`` extension. The template can be \"\n\"called then from within a function. Templates can contain any type of text \"\n\"(which will be most likely HTML-markup mixed with Python statements). \"\n\"Furthermore, templates can take arguments, e.g. the result set of a database\"\n\" query, which will be then formatted nicely within the template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:171\nmsgid \"\"\n\"Right here, we are going to cast the result of our query showing the open \"\n\"ToDo items into a simple table with two columns: the first column will \"\n\"contain the ID of the item, the second column the text. The result set is, \"\n\"as seen above, a list of tuples, each tuple contains one set of results.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:173\nmsgid \"To include the template in our example, just add the following lines::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:183\nmsgid \"\"\n\"So we do here two things: first, we import ``template`` from Bottle in order\"\n\" to be able to use templates. Second, we assign the output of the template \"\n\"``make_table`` to the variable ``output``, which is then returned. In \"\n\"addition to calling the template, we assign ``result``, which we received \"\n\"from the database query, to the variable ``rows``, which is later on used \"\n\"within the template. If necessary, you can assign more than one variable / \"\n\"value to a template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:185\nmsgid \"\"\n\"Templates always return a list of strings, thus there is no need to convert \"\n\"anything. We can save one line of code by writing ``return \"\n\"template('make_table', rows=result)``, which gives exactly the same result \"\n\"as above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:187\nmsgid \"\"\n\"Now it is time to write the corresponding template, which looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:201\nmsgid \"\"\n\"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` \"\n\"is stored.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:203\nmsgid \"\"\n\"Let's have a look at the code: every line starting with % is interpreted as \"\n\"Python code. Because it is effectively Python, only valid Python statements \"\n\"are allowed. The template will raise exceptions, just as any other Python \"\n\"code would. The other lines are plain HTML markup.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:205\nmsgid \"\"\n\"As you can see, we use Python's ``for`` statement two times, in order to go \"\n\"through ``rows``. As seen above, ``rows`` is a variable which holds the \"\n\"result of the database query, so it is a list of tuples. The first ``for`` \"\n\"statement accesses the tuples within the list, the second one the items \"\n\"within the tuple, which are put each into a cell of the table. It is \"\n\"important that you close all ``for``, ``if``, ``while`` etc. statements with\"\n\" ``%end``, otherwise the output may not be what you expect.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:207\nmsgid \"\"\n\"If you need to access a variable within a non-Python code line inside the \"\n\"template, you need to put it into double curly braces. This tells the \"\n\"template to insert the actual value of the variable right in place.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:209\nmsgid \"\"\n\"Run the script again and look at the output. Still not really nice, but at \"\n\"least more readable than the list of tuples. You can spice-up the very \"\n\"simple HTML markup above, e.g. by using in-line styles to get a better \"\n\"looking output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:213\nmsgid \"Using GET and POST Values\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:214\nmsgid \"\"\n\"As we can review all open items properly, we move to the next step, which is\"\n\" adding new items to the ToDo list. The new item should be received from a \"\n\"regular HTML-based form, which sends its data by the GET method.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:216\nmsgid \"\"\n\"To do so, we first add a new route to our script and tell the route that it \"\n\"should get GET data::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:239\nmsgid \"\"\n\"To access GET (or POST) data, we need to import ``request`` from Bottle. To \"\n\"assign the actual data to a variable, we use the statement \"\n\"``request.GET.task.strip()`` statement, where ``task`` is the name of the \"\n\"GET data we want to access. That's all. If your GET data has more than one \"\n\"variable, multiple ``request.GET.get()`` statements can be used and assigned\"\n\" to other variables.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:241\nmsgid \"\"\n\"The rest of this piece of code is just processing of the gained data: \"\n\"writing to the database, retrieve the corresponding id from the database and\"\n\" generate the output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:243\nmsgid \"\"\n\"But where do we get the GET data from? Well, we can use a static HTML page \"\n\"holding the form. Or, what we do right now, is to use a template which is \"\n\"output when the route ``/new`` is called without GET data.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:245\nmsgid \"The code needs to be extended to::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:268\nmsgid \"``new_task.tpl`` looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:276\nmsgid \"That's all. As you can see, the template is plain HTML this time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:278\nmsgid \"Now we are able to extend our to do list.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:280\nmsgid \"\"\n\"By the way, if you prefer to use POST data: this works exactly the same way,\"\n\" just use ``request.POST.get()`` instead.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:284\nmsgid \"Editing Existing Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:285\nmsgid \"The last point to do is to enable editing of existing items.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:287\nmsgid \"\"\n\"By using only the routes we know so far it is possible, but may be quite \"\n\"tricky. But Bottle knows something called \\\"dynamic routes\\\", which makes \"\n\"this task quite easy.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:289\nmsgid \"The basic statement for a dynamic route looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:293\nmsgid \"\"\n\"This tells Bottle to accept for ``<something>`` any string up to the next \"\n\"slash. Furthermore, the value of ``something`` will be passed to the \"\n\"function assigned to that route, so the data can be processed within the \"\n\"function, like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:321\nmsgid \"\"\n\"It is basically pretty much the same what we already did above when adding \"\n\"new items, like using ``GET`` data etc. The main addition here is using the \"\n\"dynamic route ``<no:int>``, which here passes the number to the \"\n\"corresponding function. As you can see, ``no`` is integer ID and used within\"\n\" the function to access the right row of data within the database.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:324\nmsgid \"\"\n\"The template ``edit_task.tpl`` called within the function looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:339\nmsgid \"\"\n\"Again, this template is a mix of Python statements and HTML, as already \"\n\"explained above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:341\nmsgid \"\"\n\"A last word on dynamic routes: you can even use a regular expression for a \"\n\"dynamic route, as demonstrated later.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:345\nmsgid \"Validating Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:346\nmsgid \"\"\n\"Using dynamic routes is fine, but for many cases it makes sense to validate \"\n\"the dynamic part of the route. For example, we expect an integer number in \"\n\"our route for editing above. But if a float, characters or so are received, \"\n\"the Python interpreter throws an exception, which is not what we want.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:348\nmsgid \"\"\n\"For those cases, Bottle offers the ``<name:int>`` wildcard filter, which \"\n\"matches (signed) digits and converts the value to integer. In order to apply\"\n\" the wildcard filter, extend the code as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:356\nmsgid \"\"\n\"Save the code and call the page again using incorrect value for \"\n\"``<no:int>``, e.g. a float. You will receive not an exception, but a \\\"404 \"\n\"Not Found\\\" error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:360\nmsgid \"Dynamic Routes Using Regular Expressions\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:361\nmsgid \"\"\n\"Bottle can also handle dynamic routes, where the \\\"dynamic part\\\" of the \"\n\"route can be a regular expression.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:363\nmsgid \"\"\n\"So, just to demonstrate that, let's assume that all single items in our ToDo\"\n\" list should be accessible by their plain number, by a term like e.g. \"\n\"\\\"item1\\\". For obvious reasons, you do not want to create a route for every \"\n\"item. Furthermore, the simple dynamic routes do not work either, as part of \"\n\"the route, the term \\\"item\\\" is static.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:365\nmsgid \"As said above, the solution is a regular expression::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:380\nmsgid \"\"\n\"The line ``@route(/item<item:re:[0-9]+>)`` starts like a normal route, but \"\n\"the third part of the wildcard is interpreted as a regular expression, which\"\n\" is the dynamic part of the route. So in this case, we want to match any \"\n\"digit between 0 and 9. The following function \\\"show_item\\\" just checks \"\n\"whether the given item is present in the database or not. In case it is \"\n\"present, the corresponding text of the task is returned. As you can see, \"\n\"only the regular expression part of the route is passed forward. \"\n\"Furthermore, it is always forwarded as a string, even if it is a plain \"\n\"integer number, like in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:384\nmsgid \"Returning Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:385\nmsgid \"\"\n\"Sometimes it may become necessary to associate a route not to a Python \"\n\"function, but just return a static file. So if you have for example a help \"\n\"page for your application, you may want to return this page as plain HTML. \"\n\"This works as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:393\nmsgid \"\"\n\"At first, we need to import the ``static_file`` function from Bottle. As you\"\n\" can see, the ``return static_file`` statement replaces the ``return`` \"\n\"statement. It takes at least two arguments: the name of the file to be \"\n\"returned and the path to the file. Even if the file is in the same directory\"\n\" as your application, the path needs to be stated. But in this case, you can\"\n\" use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file \"\n\"automatically, but in case you like to state it explicitly, add a third \"\n\"argument to ``static_file``, which would be here ``mimetype='text/html'``. \"\n\"``static_file`` works with any type of route, including the dynamic ones.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:397\nmsgid \"Returning JSON Data\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:398\nmsgid \"\"\n\"There may be cases where you do not want your application to generate the \"\n\"output directly, but return data to be processed further on, e.g. by \"\n\"JavaScript. For those cases, Bottle offers the possibility to return JSON \"\n\"objects, which is sort of standard for exchanging data between web \"\n\"applications. Furthermore, JSON can be processed by many programming \"\n\"languages, including Python\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:400\nmsgid \"\"\n\"So, let's assume we want to return the data generated in the regular \"\n\"expression route example as a JSON object. The code looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:415\nmsgid \"\"\n\"As you can, that is fairly simple: just return a regular Python dictionary \"\n\"and Bottle will convert it automatically into a JSON object prior to \"\n\"sending. So if you e.g. call \\\"http://localhost/json1\\\" Bottle should in \"\n\"this case return the JSON object ``{\\\"task\\\": [\\\"Read A-byte-of-python to \"\n\"get a good introduction into Python\\\"]}``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:420\nmsgid \"Catching Errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:421\nmsgid \"\"\n\"The next step may is to catch the error with Bottle itself, to keep away any\"\n\" type of error message from the user of your application. To do that, Bottle\"\n\" has an \\\"error-route\\\", which can be a assigned to a HTML-error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:423\nmsgid \"In our case, we want to catch a 403 error. The code is as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:431\nmsgid \"\"\n\"So, at first we need to import ``error`` from Bottle and define a route by \"\n\"``error(403)``, which catches all \\\"403 forbidden\\\" errors. The function \"\n\"\\\"mistake\\\" is assigned to that. Please note that ``error()`` always passes \"\n\"the error-code to the function - even if you do not need it. Thus, the \"\n\"function always needs to accept one argument, otherwise it will not work.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:433\nmsgid \"\"\n\"Again, you can assign more than one error-route to a function, or catch \"\n\"various errors with one function each. So this code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:440\nmsgid \"works fine, the following one as well::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:452\nmsgid \"Summary\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:453\nmsgid \"\"\n\"After going through all the sections above, you should have a brief \"\n\"understanding how the Bottle WSGI framework works. Furthermore you have all \"\n\"the knowledge necessary to use Bottle for your applications.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:455\nmsgid \"\"\n\"The following chapter give a short introduction how to adapt Bottle for \"\n\"larger projects. Furthermore, we will show how to operate Bottle with web \"\n\"servers which perform better on a higher load / more web traffic than the \"\n\"one we used so far.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:458\nmsgid \"Server Setup\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:460\nmsgid \"\"\n\"So far, we used the standard server used by Bottle, which is the `WSGI \"\n\"reference Server`_ shipped along with Python. Although this server is \"\n\"perfectly suitable for development purposes, it is not really suitable for \"\n\"larger applications. But before we have a look at the alternatives, let's \"\n\"have a look how to tweak the settings of the standard server first.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:464\nmsgid \"Running Bottle on a different port and IP\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:465\nmsgid \"\"\n\"As standard, Bottle serves the pages on the IP address 127.0.0.1, also known\"\n\" as ``localhost``, and on port ``8080``. To modify the setting is pretty \"\n\"simple, as additional parameters can be passed to Bottle's ``run()`` \"\n\"function to change the port and the address.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:467\nmsgid \"\"\n\"To change the port, just add ``port=portnumber`` to the run command. So, for\"\n\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:471\nmsgid \"would make Bottle listen to port 80.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:473\nmsgid \"To change the IP address where Bottle is listening::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:477\nmsgid \"If needed, both parameters can be combined, like::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:481\nmsgid \"\"\n\"The ``port`` and ``host`` parameter can also be applied when Bottle is \"\n\"running with a different server, as shown in the following section.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:485\nmsgid \"Running Bottle with a different server\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:486\nmsgid \"\"\n\"As said above, the standard server is perfectly suitable for development, \"\n\"personal use or a small group of people only using your application based on\"\n\" Bottle. For larger tasks, the standard server may become a bottleneck, as \"\n\"it is single-threaded, thus it can only serve one request at a time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:488\nmsgid \"\"\n\"But Bottle has already various adapters to multi-threaded servers on board, \"\n\"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and \"\n\"Paste_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:490\nmsgid \"\"\n\"If you want to run for example Bottle with the Paste server, use the \"\n\"following code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:496\nmsgid \"\"\n\"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and \"\n\"``FapwsServer``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:500\nmsgid \"Running Bottle on Apache with mod_wsgi\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:501\nmsgid \"\"\n\"Maybe you already have an Apache_ or you want to run a Bottle-based \"\n\"application large scale - then it is time to think about Apache with \"\n\"mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:503\nmsgid \"\"\n\"We assume that your Apache server is up and running and mod_wsgi is working \"\n\"fine as well. On a lot of Linux distributions, mod_wsgi can be easily \"\n\"installed via whatever package management system is in use.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:505\nmsgid \"\"\n\"Bottle brings an adapter for mod_wsgi with it, so serving your application \"\n\"is an easy task.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:507\nmsgid \"\"\n\"In the following example, we assume that you want to make your application \"\n\"\\\"ToDo list\\\" accessible through ``http://www.mypage.com/todo`` and your \"\n\"code, templates and SQLite database are stored in the path \"\n\"``/var/www/todo``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:509\nmsgid \"\"\n\"When you run your application via mod_wsgi, it is imperative to remove the \"\n\"``run()`` statement from your code, otherwise it won't work here.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:511\nmsgid \"\"\n\"After that, create a file called ``adapter.wsgi`` with the following \"\n\"content::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:522\nmsgid \"\"\n\"and save it in the same path, ``/var/www/todo``. Actually the name of the \"\n\"file can be anything, as long as the extension is ``.wsgi``. The name is \"\n\"only used to reference the file from your virtual host.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:524\nmsgid \"\"\n\"Finally, we need to add a virtual host to the Apache configuration, which \"\n\"looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:540\nmsgid \"\"\n\"After restarting the server, your ToDo list should be accessible at \"\n\"``http://www.mypage.com/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:543\nmsgid \"Final Words\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:545\nmsgid \"\"\n\"Now we are at the end of this introduction and tutorial to Bottle. We \"\n\"learned about the basic concepts of Bottle and wrote a first application \"\n\"using the Bottle framework. In addition to that, we saw how to adapt Bottle \"\n\"for large tasks and serve Bottle through an Apache web server with mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:547\nmsgid \"\"\n\"As said in the introduction, this tutorial is not showing all shades and \"\n\"possibilities of Bottle. What we skipped here is e.g. receiving file objects\"\n\" and streams and how to handle authentication data. Furthermore, we did not \"\n\"show how templates can be called from within another template. For an \"\n\"introduction into those points, please refer to the full `Bottle \"\n\"documentation`_ .\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:550\nmsgid \"Complete Example Listing\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:552\nmsgid \"\"\n\"As the ToDo list example was developed piece by piece, here is the complete \"\n\"listing:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:554\nmsgid \"Main code for the application ``todo.py``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:675\nmsgid \"Template ``make_table.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:689\nmsgid \"Template ``edit_task.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:704\nmsgid \"Template ``new_task.tpl``::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/api.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../api.rst:3\nmsgid \"API Reference\"\nmsgstr \"\"\n\n#: ../../api.rst:10\nmsgid \"\"\n\"This is a mostly auto-generated API. If you are new to bottle, you might \"\n\"find the narrative :doc:`tutorial` more helpful.\"\nmsgstr \"\"\n\n#: ../../api.rst:17\nmsgid \"Module Contents\"\nmsgstr \"\"\n\n#: ../../api.rst:19\nmsgid \"The module defines several functions, constants, and an exception.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.debug:1\nmsgid \"\"\n\"Change the debug level. There is only one debug level supported at the \"\n\"moment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:1\nmsgid \"\"\n\"Start a server instance. This method blocks until the server terminates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:0 ../../../bottle.pydocstring of\n#: bottle.path_shift:0 ../../../bottle.pydocstring of bottle.MultiDict.get:0\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:0\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:0\n#: ../../../bottle.pydocstring of bottle.Bottle:0 ../../../bottle.pydocstring\n#: of bottle.Bottle.mount:0 ../../../bottle.pydocstring of\n#: bottle.Bottle.route:0 ../../../bottle.pydocstring of\n#: bottle.BaseRequest.path_shift:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:3\nmsgid \"\"\n\"WSGI application or target string supported by :func:`load_app`. (default: \"\n\":func:`default_app`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:5\nmsgid \"\"\n\"Server adapter to use. See :data:`server_names` keys for valid names or pass\"\n\" a :class:`ServerAdapter` subclass. (default: `wsgiref`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:8\nmsgid \"\"\n\"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces \"\n\"including the external one. (default: 127.0.0.1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:10\nmsgid \"\"\n\"Server port to bind to. Values below 1024 require root privileges. (default:\"\n\" 8080)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:12\nmsgid \"Start auto-reloading server? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:13\nmsgid \"Auto-reloader interval in seconds (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:14\nmsgid \"Suppress output to stdout and stderr? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:15\nmsgid \"Options passed to the server adapter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:1\nmsgid \"Import a module or fetch an object from a module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:3\nmsgid \"``package.module`` returns `module` as a module object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:4\nmsgid \"``pack.mod:name`` returns the module variable `name` from `pack.mod`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:5\nmsgid \"``pack.mod:func()`` calls `pack.mod.func()` and returns the result.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:7\nmsgid \"\"\n\"The last form accepts not only function calls, but any type of expression. \"\n\"Keyword arguments passed to this function are available as local variables. \"\n\"Example: ``import_string('re:compile(x)', x='[a-z]')``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load_app:1\nmsgid \"\"\n\"Load a bottle application from a module and make sure that the import does \"\n\"not affect the current default application, but returns a separate \"\n\"application object. See :func:`load` for the target parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.request:1 ../../../bottle.pydocstring\n#: of bottle.request:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalRequest`. If accessed from within a \"\n\"request callback, this instance always refers to the *current* request (even\"\n\" on a multi-threaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.response:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalResponse`. It is used to change the \"\n\"HTTP response for the *current* request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HTTP_CODES:1\nmsgid \"\"\n\"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')\"\nmsgstr \"\"\n\n#: ../../api.rst:38\nmsgid \"\"\n\"Return the current :ref:`default-app`. Actually, these are callable \"\n\"instances of :class:`AppStack` and implement a stack-like API.\"\nmsgstr \"\"\n\n#: ../../api.rst:42\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../api.rst:44\nmsgid \"\"\n\"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and \"\n\":class:`AppStack`) and uses the top of the stack as a *default application* \"\n\"for some of the module-level functions and decorators.\"\nmsgstr \"\"\n\n#: ../../api.rst:54\nmsgid \"\"\n\"Decorator to install a route to the current default application. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:59\nmsgid \"\"\n\"Decorator to install an error handler to the current default application. \"\n\"See :meth:`Bottle.error` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:63\nmsgid \"WSGI and HTTP Utilities\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_date:1\nmsgid \"Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_auth:1\nmsgid \"\"\n\"Parse rfc2617 HTTP authentication header string (basic) and return \"\n\"(user,pass) tuple or None\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_encode:1\nmsgid \"Encode and sign a pickle-able object. Return a (byte) string\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_decode:1\nmsgid \"Verify and decode an encoded string. Return an object or None.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_is_encoded:1\nmsgid \"Return True if the argument looks like a encoded cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.yieldroutes:1\nmsgid \"\"\n\"Return a generator for routes that match the signature (name, args) of the \"\n\"func parameter. This may yield more than one route if the function takes \"\n\"optional keyword arguments. The output is best described by example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:1\nmsgid \"Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:0\nmsgid \"Returns\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:3\nmsgid \"The modified paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:4\nmsgid \"The SCRIPT_NAME path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:5\nmsgid \"The PATH_INFO path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:6\nmsgid \"\"\n\"The number of path fragments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../api.rst:81\nmsgid \"Data Structures\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict:1\nmsgid \"\"\n\"This dict stores multiple values per key, but behaves exactly like a normal \"\n\"dict in that it returns only the newest value for any given key. There are \"\n\"special methods available to access the full list of values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.keys:1\nmsgid \"D.keys() -> a set-like object providing a view on D's keys\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.values:1\nmsgid \"D.values() -> an object providing a view on D's values\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.items:1\nmsgid \"D.items() -> a set-like object providing a view on D's items\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:1\nmsgid \"Return the most recent value for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:3\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:3\nmsgid \"\"\n\"The default value to be returned if the key is not present or the type \"\n\"conversion fails.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:5\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:5\nmsgid \"An index for the list of available values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:6\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:6\nmsgid \"\"\n\"If defined, this callable is used to cast the value into a specific type. \"\n\"Exception are suppressed and result in the default value to be returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.append:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.append:1\nmsgid \"Add a new value to the list of values for this key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.replace:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.replace:1\nmsgid \"Replace the list of values with a single value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.getall:1\nmsgid \"Return a (possibly empty) list of values for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\nmsgid \"Aliases for WTForms to mimic other multi-dict APIs (Django)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HeaderDict:1\nmsgid \"\"\n\"A case-insensitive version of :class:`MultiDict` that defaults to replace \"\n\"the old value instead of appending it.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict:1\nmsgid \"\"\n\"This :class:`MultiDict` subclass is used to store request form data. \"\n\"Additionally to the normal dict-like item access methods (which return \"\n\"unmodified data as native strings), this container also supports attribute-\"\n\"like access to its values. Attributes are automatically de- or recoded to \"\n\"match :attr:`input_encoding` (default: 'utf8'). Missing attributes default \"\n\"to an empty string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.input_encoding:1\nmsgid \"Encoding used for attribute values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.recode_unicode:1\nmsgid \"\"\n\"If true (default), unicode strings are first encoded with `latin1` and then \"\n\"decoded to match :attr:`input_encoding`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.decode:1\nmsgid \"\"\n\"Returns a copy with all keys and values de- or recoded to match \"\n\":attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode \"\n\"dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.getunicode:1\nmsgid \"Return the value as a unicode string, or the default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:1\nmsgid \"\"\n\"This dict-like class wraps a WSGI environ dict and provides convenient \"\n\"access to HTTP_* fields. Keys and values are native strings (2.x bytes or \"\n\"3.x unicode) and keys are case-insensitive. If the WSGI environment contains\"\n\" non-native string values, these are de- or encoded using a lossless \"\n\"'latin1' character set.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:7\nmsgid \"\"\n\"The API will remain stable even on changes to the relevant PEPs. Currently \"\n\"PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-\"\n\"native strings.)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.cgikeys:1\nmsgid \"List of keys that do not have a ``HTTP_`` prefix.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.raw:1\nmsgid \"Return the header value as is (may be bytes or unicode).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack:1\nmsgid \"A stack-like list. Calling it returns the head of the stack.\"\nmsgstr \"\"\n\n#: ../../api.rst:100\nmsgid \"Return the current default application and remove it from the stack.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\nmsgid \"Add a new :class:`Bottle` instance to the stack\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:1\nmsgid \"\"\n\"This class manages a list of search paths and helps to find and open \"\n\"application-bound resources (files).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:4\nmsgid \"default value for :meth:`add_path` calls.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:5\nmsgid \"callable used to open resources.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:6\nmsgid \"controls which lookups are cached. One of 'all', 'found' or 'none'.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.path:1\nmsgid \"A list of search paths. See :meth:`add_path` for details.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.cache:1\nmsgid \"A cache for resolved paths. ``res.cache.clear()`` clears the cache.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:1\nmsgid \"\"\n\"Add a new path to the list of search paths. Return False if the path does \"\n\"not exist.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:4\nmsgid \"\"\n\"The new search path. Relative paths are turned into an absolute and \"\n\"normalized form. If the path looks like a file (not ending in `/`), the \"\n\"filename is stripped off.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:7\nmsgid \"\"\n\"Path used to absolutize relative search paths. Defaults to :attr:`base` \"\n\"which defaults to ``os.getcwd()``.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:9\nmsgid \"\"\n\"Position within the list of search paths. Defaults to last index (appends to\"\n\" the list).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:12\nmsgid \"\"\n\"The `base` parameter makes it easy to reference files installed along with a\"\n\" python module or package::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:1\nmsgid \"Search for a resource and return an absolute file path, or `None`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:3\nmsgid \"\"\n\"The :attr:`path` list is searched in order. The first match is returned. \"\n\"Symlinks are followed. The result is cached to speed up future lookups.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.open:1\nmsgid \"Find a resource and return a file object, or raise IOError.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.file:1\nmsgid \"Open file(-like) object (BytesIO buffer or temporary file)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.name:1\nmsgid \"Name of the upload form field\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.raw_filename:1\nmsgid \"Raw filename as sent by the client (may contain unsafe characters)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.headers:1\nmsgid \"A :class:`HeaderDict` with additional headers (e.g. content-type)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_type:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_type:1\nmsgid \"Current value of the 'Content-Type' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_length:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_length:1\nmsgid \"Current value of the 'Content-Length' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.get_header:1\nmsgid \"Return the value of a header within the mulripart part.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:1\nmsgid \"\"\n\"Name of the file on the client file system, but normalized to ensure file \"\n\"system compatibility. An empty filename is returned as 'empty'.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:4\nmsgid \"\"\n\"Only ASCII letters, digits, dashes, underscores and dots are allowed in the \"\n\"final filename. Accents are removed, if possible. Whitespace is replaced by \"\n\"a single dash. Leading or tailing dots or dashes are removed. The filename \"\n\"is limited to 255 characters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:1\nmsgid \"\"\n\"Save file to disk or copy its content to an open file(-like) object. If \"\n\"*destination* is a directory, :attr:`filename` is added to the path. \"\n\"Existing files are not overwritten by default (IOError).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:5\nmsgid \"File path, directory or file(-like) object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:6\nmsgid \"If True, replace existing files. (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:7\nmsgid \"Bytes to read at a time. (default: 64kb)\"\nmsgstr \"\"\n\n#: ../../api.rst:109\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BottleException:1\nmsgid \"A base class for exceptions used by bottle.\"\nmsgstr \"\"\n\n#: ../../api.rst:117\nmsgid \"The :class:`Bottle` Class\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:1\nmsgid \"\"\n\"Each Bottle object represents a single, distinct web application and \"\n\"consists of routes, callbacks, plugins, resources and configuration. \"\n\"Instances are callable WSGI applications.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:5\nmsgid \"\"\n\"If true (default), handle all exceptions. Turn off to let debugging \"\n\"middleware handle exceptions.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.config:1\nmsgid \"A :class:`ConfigDict` for app specific configuration.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.resources:1\nmsgid \"A :class:`ResourceManager` for application files\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.catchall:1\nmsgid \"If true, most exceptions are caught and returned as :exc:`HTTPError`\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:1\nmsgid \"Attach a callback to a hook. Three hooks are currently implemented:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"before_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"\"\n\"Executed once before each request. The request context is available, but no \"\n\"routing has happened yet.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:6\nmsgid \"after_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:7\nmsgid \"Executed once after each request regardless of its outcome.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:8\nmsgid \"app_reset\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:9\nmsgid \"Called whenever :meth:`Bottle.reset` is called.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.remove_hook:1\nmsgid \"Remove a callback from a hook.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.trigger_hook:1\nmsgid \"Trigger a hook and return a list of results.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.hook:1\nmsgid \"\"\n\"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` \"\n\"for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:1\nmsgid \"\"\n\"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL \"\n\"prefix. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:6\nmsgid \"path prefix or `mount-point`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:7\nmsgid \"an instance of :class:`Bottle` or a WSGI application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:9\nmsgid \"\"\n\"Plugins from the parent application are not applied to the routes of the \"\n\"mounted child application. If you need plugins in the child application, \"\n\"install them separately.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:13\nmsgid \"\"\n\"While it is possible to use path wildcards within the prefix path \"\n\"(:class:`Bottle` childs only), it is highly discouraged.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:16\nmsgid \"\"\n\"The prefix path must end with a slash. If you want to access the root of the\"\n\" child application via `/prefix` in addition to `/prefix/`, consider adding \"\n\"a route with a 307 redirect to the parent application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.merge:1\nmsgid \"\"\n\"Merge the routes of another :class:`Bottle` application or a list of \"\n\":class:`Route` objects into this application. The routes keep their 'owner',\"\n\" meaning that the :data:`Route.app` attribute is not changed.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.install:1\nmsgid \"\"\n\"Add a plugin to the list of plugins and prepare it for being applied to all \"\n\"routes of this application. A plugin may be a simple decorator or an object \"\n\"that implements the :class:`Plugin` API.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.uninstall:1\nmsgid \"\"\n\"Uninstall plugins. Pass an instance to remove a specific plugin, a type \"\n\"object to remove all plugins that match that type, a string to remove all \"\n\"plugins with a matching ``name`` attribute or ``True`` to remove all \"\n\"plugins. Return the list of removed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.reset:1\nmsgid \"\"\n\"Reset all routes (force plugins to be re-applied) and clear all caches. If \"\n\"an ID or route object is given, only that specific route is affected.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.close:1\nmsgid \"Close the application and all installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.run:1\nmsgid \"Calls :func:`run` with the same parameters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.match:1\nmsgid \"\"\n\"Search for a matching route and return a (:class:`Route`, urlargs) tuple. \"\n\"The second value is a dictionary with parameters extracted from the URL. \"\n\"Raise :exc:`HTTPError` (404/405) on a non-match.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get_url:1\nmsgid \"Return a string that matches a named route\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_route:1\nmsgid \"Add a route object, but do not change the :data:`Route.app` attribute.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:1\nmsgid \"A decorator to bind a function to a request URL. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:7\nmsgid \"\"\n\"The ``<name>`` part is a wildcard. See :class:`Router` for syntax details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:10\nmsgid \"\"\n\"Request path or a list of paths to listen to. If no path is specified, it is\"\n\" automatically generated from the signature of the function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:13\nmsgid \"\"\n\"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. \"\n\"(default: `GET`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:15\nmsgid \"\"\n\"An optional shortcut to avoid the decorator syntax. ``route(..., \"\n\"callback=func)`` equals ``route(...)(func)``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:17\nmsgid \"The name for this route. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:18\nmsgid \"\"\n\"A decorator or plugin or a list of plugins. These are applied to the route \"\n\"callback in addition to installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:20\nmsgid \"\"\n\"A list of plugins, plugin classes or names. Matching plugins are not \"\n\"installed to this route. ``True`` skips all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:23\nmsgid \"\"\n\"Any additional keyword arguments are stored as route-specific configuration \"\n\"and passed to plugins (see :meth:`Plugin.apply`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get:1\nmsgid \"Equals :meth:`route`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.post:1\nmsgid \"Equals :meth:`route` with a ``POST`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.put:1\nmsgid \"Equals :meth:`route` with a ``PUT`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.delete:1\nmsgid \"Equals :meth:`route` with a ``DELETE`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.patch:1\nmsgid \"Equals :meth:`route` with a ``PATCH`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.error:1\nmsgid \"\"\n\"Register an output handler for a HTTP error code. Can be used as a decorator\"\n\" or called directly ::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.wsgi:1\nmsgid \"The bottle WSGI-interface.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route:1\nmsgid \"\"\n\"This class wraps a route callback along with route specific metadata and \"\n\"configuration and applies Plugins on demand. It is also responsible for \"\n\"turning an URL path rule into a regular expression usable by the Router.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.app:1\nmsgid \"The application this route is installed to.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.rule:1\nmsgid \"The path-rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.method:1\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.callback:1\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.name:1\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.plugins:1\nmsgid \"A list of route-specific plugins (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.skiplist:1\nmsgid \"\"\n\"A list of plugins to not apply to this route (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.config:1\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific plugin configuration \"\n\"and meta-data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.call:1\nmsgid \"\"\n\"The route callback with all plugins applied. This property is created on \"\n\"demand and then cached to speed up subsequent requests.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.reset:1\nmsgid \"\"\n\"Forget any cached values. The next time :attr:`call` is accessed, all \"\n\"plugins are re-applied.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.prepare:1\nmsgid \"Do all on-demand work immediately (useful for debugging).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.all_plugins:1\nmsgid \"Yield all Plugins affecting this route.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_undecorated_callback:1\nmsgid \"\"\n\"Return the callback. If the callback is a decorated function, try to recover\"\n\" the original function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_callback_args:1\nmsgid \"\"\n\"Return a list of argument names the callback (most likely) accepts as \"\n\"keyword arguments. If the callback is a decorated function, try to recover \"\n\"the original function before inspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_config:1\nmsgid \"\"\n\"Lookup a config field and return its value, first checking the route.config,\"\n\" then route.app.config.\"\nmsgstr \"\"\n\n#: ../../api.rst:127\nmsgid \"The :class:`Request` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:129\nmsgid \"\"\n\"The :class:`Request` class wraps a WSGI environment and provides helpful \"\n\"methods to parse and access form data, cookies, file uploads and other \"\n\"metadata. Most of the attributes are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:1\nmsgid \"\"\n\"A wrapper for WSGI environment dictionaries that adds a lot of convenient \"\n\"access methods and properties. Most of them are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:4\nmsgid \"\"\n\"Adding new attributes to a request actually adds them to the environ \"\n\"dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to \"\n\"store and access request-specific data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.MEMFILE_MAX:1\nmsgid \"Maximum size of memory buffer for :attr:`body` in bytes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.environ:1\nmsgid \"\"\n\"The wrapped WSGI environ dictionary. This is the only real attribute. All \"\n\"other attributes actually are read-only properties.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.app:1\nmsgid \"Bottle application handling this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.route:1\nmsgid \"The bottle :class:`Route` object that matches this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url_args:1\nmsgid \"The arguments extracted from the URL.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path:1\nmsgid \"\"\n\"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken \"\n\"clients and avoid the \\\"empty path\\\" edge case).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.method:1\nmsgid \"The ``REQUEST_METHOD`` value as an uppercase string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.headers:1\nmsgid \"\"\n\"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP \"\n\"request headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_header:1\nmsgid \"Return the value of a request header, or a given default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.cookies:1\nmsgid \"\"\n\"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. \"\n\"Use :meth:`get_cookie` if you expect signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_cookie:1\nmsgid \"\"\n\"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must\"\n\" match the one used to create the cookie (see \"\n\":meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or \"\n\"wrong signature), return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"\"\n\"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are \"\n\"sometimes called \\\"URL arguments\\\" or \\\"GET parameters\\\", but not to be \"\n\"confused with \\\"URL wildcards\\\" as they are provided by the :class:`Router`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.forms:1\nmsgid \"\"\n\"Form values parsed from an `url-encoded` or `multipart/form-data` encoded \"\n\"POST or PUT request body. The result is returned as a :class:`FormsDict`. \"\n\"All keys and values are strings. File uploads are stored separately in \"\n\":attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.params:1\nmsgid \"\"\n\"A :class:`FormsDict` with the combined values of :attr:`query` and \"\n\":attr:`forms`. File uploads are stored in :attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.files:1\nmsgid \"\"\n\"File uploads parsed from `multipart/form-data` encoded POST or PUT request \"\n\"body. The values are instances of :class:`FileUpload`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.json:1\nmsgid \"\"\n\"If the ``Content-Type`` header is ``application/json`` or ``application\"\n\"/json-rpc``, this property holds the parsed content of the request body. \"\n\"Only requests smaller than :attr:`MEMFILE_MAX` are processed to avoid memory\"\n\" exhaustion. Invalid JSON raises a 400 error response.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.body:1\nmsgid \"\"\n\"The HTTP request body as a seek-able file-like object. Depending on \"\n\":attr:`MEMFILE_MAX`, this is either a temporary file or a \"\n\":class:`io.BytesIO` instance. Accessing this property for the first time \"\n\"reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses \"\n\"just do a `seek(0)` on the file object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.chunked:1\nmsgid \"True if Chunked transfer encoding was.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"An alias for :attr:`query`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.POST:1\nmsgid \"\"\n\"The values of :attr:`forms` and :attr:`files` combined into a single \"\n\":class:`FormsDict`. Values are either strings (form values) or instances of \"\n\":class:`cgi.FieldStorage` (file uploads).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url:1\nmsgid \"\"\n\"The full request URI including hostname and scheme. If your app lives behind\"\n\" a reverse proxy or load balancer and you get confusing results, make sure \"\n\"that the ``X-Forwarded-Host`` header is set correctly.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.urlparts:1\nmsgid \"\"\n\"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple \"\n\"contains (scheme, host, path, query_string and fragment), but the fragment \"\n\"is always empty because it is not visible to the server.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.fullpath:1\nmsgid \"Request path including :attr:`script_name` (if present).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query_string:1\nmsgid \"\"\n\"The raw :attr:`query` part of the URL (everything in between ``?`` and \"\n\"``#``) as a string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.script_name:1\nmsgid \"\"\n\"The initial portion of the URL's `path` that was removed by a higher level \"\n\"(server or routing middleware) before the application was called. This \"\n\"script path is returned with leading and tailing slashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"Shift path segments from :attr:`path` to :attr:`script_name` and\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:4\nmsgid \"\"\n\"The number of path segments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_length:1\nmsgid \"\"\n\"The request body length as an integer. The client is responsible to set this\"\n\" header. Otherwise, the real length of the body is unknown and -1 is \"\n\"returned. In this case, :attr:`body` will be empty.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_type:1\nmsgid \"The Content-Type header as a lowercase-string (default: empty).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_xhr:1\nmsgid \"\"\n\"True if the request was triggered by a XMLHttpRequest. This only works with \"\n\"JavaScript libraries that support the `X-Requested-With` header (most of the\"\n\" popular libraries do).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_ajax:1\nmsgid \"Alias for :attr:`is_xhr`. \\\"Ajax\\\" is not the right term.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.auth:1\nmsgid \"\"\n\"HTTP authentication data as a (user, password) tuple. This implementation \"\n\"currently supports basic (not digest) authentication only. If the \"\n\"authentication happened at a higher level (e.g. in the front web-server or a\"\n\" middleware), the password field is None, but the user field is looked up \"\n\"from the ``REMOTE_USER`` environ variable. On any errors, None is returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_route:1\nmsgid \"\"\n\"A list of all IPs that were involved in this request, starting with the \"\n\"client IP and followed by zero or more proxies. This does only work if all \"\n\"proxies support the ```X-Forwarded-For`` header. Note that this information \"\n\"can be forged by malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_addr:1\nmsgid \"\"\n\"The client IP as a string. Note that this information can be forged by \"\n\"malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.copy:1\nmsgid \"Return a new :class:`Request` with a shallow :attr:`environ` copy.\"\nmsgstr \"\"\n\n#: ../../api.rst:137\nmsgid \"\"\n\"The module-level :data:`bottle.request` is a proxy object (implemented in \"\n\":class:`LocalRequest`) and always refers to the `current` request, or in \"\n\"other words, the request that is currently processed by the request handler \"\n\"in the current thread. This `thread locality` ensures that you can safely \"\n\"use a global instance in a multi-threaded environment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseRequest` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`request`). If accessed during a request/response cycle, \"\n\"this instance always refers to the *current* request (even on a \"\n\"multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.__init__:1\nmsgid \"Wrap a WSGI environ dictionary.\"\nmsgstr \"\"\n\n#: ../../api.rst:146\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:148\nmsgid \"\"\n\"The :class:`Response` class stores the HTTP status code as well as headers \"\n\"and cookies that are to be sent to the client. Similar to \"\n\":data:`bottle.request` there is a thread-local :data:`bottle.response` \"\n\"instance that can be used to adjust the `current` response. Moreover, you \"\n\"can instantiate :class:`Response` and return it from your request handler. \"\n\"In this case, the custom instance overrules the headers and cookies defined \"\n\"in the global one.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:1\nmsgid \"Storage class for a response body as well as headers and cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:3\nmsgid \"\"\n\"This class does support dict-like case-insensitive item-access to headers, \"\n\"but is NOT a dict. Most notably, iterating over a response yields parts of \"\n\"the body and not the headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:7\nmsgid \"The response body as one of the supported types.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:8\nmsgid \"\"\n\"Either an HTTP status code (e.g. 200) or a status line including the reason \"\n\"phrase (e.g. '200 OK').\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:10\nmsgid \"A dictionary or a list of name-value pairs.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:12\nmsgid \"\"\n\"Additional keyword arguments are added to the list of headers. Underscores \"\n\"in the header name are replaced with dashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.copy:1\nmsgid \"Returns a copy of self.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_line:1\nmsgid \"The HTTP status line as a string (e.g. ``404 Not Found``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_code:1\nmsgid \"The HTTP status code as an integer (e.g. 404).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status:1\nmsgid \"\"\n\"A writeable property to change the HTTP response status. It accepts either a\"\n\" numeric code (100-999) or a string with a custom reason phrase (e.g. \\\"404 \"\n\"Brain not found\\\"). Both :data:`status_line` and :data:`status_code` are \"\n\"updated accordingly. The return value is always a status string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headers:1\nmsgid \"\"\n\"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the\"\n\" response headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.get_header:1\nmsgid \"\"\n\"Return the value of a previously defined header. If there is no header with \"\n\"that name, return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_header:1\nmsgid \"\"\n\"Create a new response header, replacing any previously defined headers with \"\n\"the same name.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.add_header:1\nmsgid \"Add an additional response header, not removing duplicates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.iter_headers:1\nmsgid \"\"\n\"Yield (header, value) tuples, skipping headers that are not allowed with the\"\n\" current response status code.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headerlist:1\nmsgid \"WSGI conform list of (header, value) tuples.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.expires:1\nmsgid \"Current value of the 'Expires' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.charset:1\nmsgid \"\"\n\"Return the charset specified in the content-type header (default: utf8).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:1\nmsgid \"\"\n\"Create a new cookie or replace an old one. If the `secret` parameter is set,\"\n\" create a `Signed Cookie` (described below).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:4\nmsgid \"the name of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:5\nmsgid \"the value of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:6\nmsgid \"a signature key required for signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:8\nmsgid \"\"\n\"Additionally, this method accepts all RFC 2109 attributes that are supported\"\n\" by :class:`cookie.Morsel`, including:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:11\nmsgid \"maximum age in seconds. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:12\nmsgid \"a datetime object or UNIX timestamp. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:13\nmsgid \"\"\n\"the domain that is allowed to read the cookie. (default: current domain)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:15\nmsgid \"limits the cookie to a given path (default: current path)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:16\nmsgid \"limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:17\nmsgid \"\"\n\"prevents client-side javascript to read this cookie (default: off, requires \"\n\"Python 2.6 or newer).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:19\nmsgid \"\"\n\"Control or disable third-party use for this cookie. Possible values: `lax`, \"\n\"`strict` or `none` (default).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:22\nmsgid \"\"\n\"If neither `expires` nor `maxage` is set (default), the cookie will expire \"\n\"at the end of the browser session (as soon as the browser window is closed).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:26\nmsgid \"\"\n\"Signed cookies may store any pickle-able object and are cryptographically \"\n\"signed to prevent manipulation. Keep in mind that cookies are limited to 4kb\"\n\" in most browsers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:30\nmsgid \"\"\n\"Warning: Pickle is a potentially dangerous format. If an attacker gains \"\n\"access to the secret key, he could forge cookies that execute code on server\"\n\" side if unpickled. Using pickle is discouraged and support for it will be \"\n\"removed in later versions of bottle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:35\nmsgid \"\"\n\"Warning: Signed cookies are not encrypted (the client can still see the \"\n\"content) and not copy-protected (the client can restore an old cookie). The \"\n\"main intention is to make pickling and unpickling save, not to store secret \"\n\"information at client side.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.delete_cookie:1\nmsgid \"\"\n\"Delete a cookie. Be sure to use the same `domain` and `path` settings as \"\n\"used to create the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseResponse` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`response`). Its attributes are used to build the HTTP \"\n\"response at the end of the request/response cycle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.__init__:1\nmsgid \"Initialize self.  See help(type(self)) for accurate signature.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse.body:1\nmsgid \"Thread-local property\"\nmsgstr \"\"\n\n#: ../../api.rst:160\nmsgid \"\"\n\"The following two classes can be raised as an exception. The most noticeable\"\n\" difference is that bottle invokes error handlers for :class:`HTTPError`, \"\n\"but not for :class:`HTTPResponse` or other response types.\"\nmsgstr \"\"\n\n#: ../../api.rst:172\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../api.rst:174\nmsgid \"\"\n\"All template engines supported by :mod:`bottle` implement the \"\n\":class:`BaseTemplate` API. This way it is possible to switch and mix \"\n\"template engines without changing the application code at all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate:1\nmsgid \"Base class and minimal API for template adapters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.__init__:1\nmsgid \"\"\n\"Create a new template. If the source parameter (str or buffer) is missing, \"\n\"the name argument is used to guess a template filename. Subclasses can \"\n\"assume that self.source and/or self.filename are set. Both are strings. The \"\n\"lookup, encoding and settings parameters are stored as instance variables. \"\n\"The lookup parameter stores a list containing directory paths. The encoding \"\n\"parameter should be used to decode byte strings or files. The settings \"\n\"parameter contains a dict for engine-specific settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.search:1\nmsgid \"\"\n\"Search name in all directories specified in lookup. First without, then with\"\n\" common extensions. Return first hit.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.global_config:1\nmsgid \"This reads or sets the global settings stored in class.settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.render:1\nmsgid \"\"\n\"Render the template with the specified local variables and return a single \"\n\"byte or unicode string. If it is a byte string, the encoding must match \"\n\"self.encoding. This method must be thread-safe! Local variables may be \"\n\"provided in dictionaries (args) or directly, as keywords (kwargs).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:1\nmsgid \"\"\n\"Decorator: renders a template for a handler. The handler can control its \"\n\"behavior like that:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:4\nmsgid \"return a dict of template vars to fill out the template\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:5\nmsgid \"\"\n\"return something other than a dict and the view decorator will not process \"\n\"the template, but return the handler result as is. This includes returning a\"\n\" HTTPResponse(dict) to get, for instance, JSON with autojson or other \"\n\"castfilters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.template:1\nmsgid \"\"\n\"Get a rendered template as a string iterator. You can use a name, a filename\"\n\" or a template string as first parameter. Template rendering arguments can \"\n\"be passed as dictionaries or directly (as keyword arguments).\"\nmsgstr \"\"\n\n#: ../../api.rst:185\nmsgid \"\"\n\"You can write your own adapter for your favourite template engine or use one\"\n\" of the predefined adapters. Currently there are four fully supported \"\n\"template engines:\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Class\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"URL\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Decorator\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Render function\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":class:`SimpleTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`view`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`template`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":class:`MakoTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \"http://www.makotemplates.org\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":class:`CheetahTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \"http://www.cheetahtemplate.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":class:`Jinja2Template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \"http://jinja.pocoo.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:196\nmsgid \"\"\n\"To use :class:`MakoTemplate` as your default template engine, just import \"\n\"its specialised decorator and render function::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/async.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2015-01-22 19:17+0000\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../async.rst:2\nmsgid \"Primer to Asynchronous Applications\"\nmsgstr \"\"\n\n#: ../../async.rst:4\nmsgid \"\"\n\"Asynchronous design patterns don't mix well with the synchronous nature of \"\n\"`WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most \"\n\"asynchronous frameworks (tornado, twisted, ...) implement a specialized API \"\n\"to expose their asynchronous features. Bottle is a WSGI framework and shares\"\n\" the synchronous nature of WSGI, but thanks to the awesome `gevent project \"\n\"<http://www.gevent.org/>`_, it is still possible to write asynchronous \"\n\"applications with bottle. This article documents the usage of Bottle with \"\n\"Asynchronous WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:7\nmsgid \"The Limits of Synchronous WSGI\"\nmsgstr \"\"\n\n#: ../../async.rst:9\nmsgid \"\"\n\"Briefly worded, the `WSGI specification (pep 3333) \"\n\"<http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response \"\n\"circle as follows: The application callable is invoked once for each request\"\n\" and must return a body iterator. The server then iterates over the body and\"\n\" writes each chunk to the socket. As soon as the body iterator is exhausted,\"\n\" the client connection is closed.\"\nmsgstr \"\"\n\n#: ../../async.rst:11\nmsgid \"\"\n\"Simple enough, but there is a snag: All this happens synchronously. If your \"\n\"application needs to wait for data (IO, sockets, databases, ...), it must \"\n\"either yield empty strings (busy wait) or block the current thread. Both \"\n\"solutions occupy the handling thread and prevent it from answering new \"\n\"requests. There is consequently only one ongoing request per thread.\"\nmsgstr \"\"\n\n#: ../../async.rst:13\nmsgid \"\"\n\"Most servers limit the number of threads to avoid their relatively high \"\n\"overhead. Pools of 20 or less threads are common. As soon as all threads are\"\n\" occupied, any new connection is stalled. The server is effectively dead for\"\n\" everyone else. If you want to implement a chat that uses long-polling ajax \"\n\"requests to get real-time updates, you'd reach the limited at 20 concurrent \"\n\"connections. That's a pretty small chat.\"\nmsgstr \"\"\n\n#: ../../async.rst:16\nmsgid \"Greenlets to the rescue\"\nmsgstr \"\"\n\n#: ../../async.rst:18\nmsgid \"\"\n\"Most servers limit the size of their worker pools to a relatively low number\"\n\" of concurrent threads, due to the high overhead involved in switching \"\n\"between and creating new threads. While threads are cheap compared to \"\n\"processes (forks), they are still expensive to create for each new \"\n\"connection.\"\nmsgstr \"\"\n\n#: ../../async.rst:20\nmsgid \"\"\n\"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. \"\n\"Greenlets behave similar to traditional threads, but are very cheap to \"\n\"create. A gevent-based server can spawn thousands of greenlets (one for each\"\n\" connection) with almost no overhead. Blocking individual greenlets has no \"\n\"impact on the servers ability to accept new requests. The number of \"\n\"concurrent connections is virtually unlimited.\"\nmsgstr \"\"\n\n#: ../../async.rst:22\nmsgid \"\"\n\"This makes creating asynchronous applications incredibly easy, because they \"\n\"look and feel like synchronous applications. A gevent-based server is \"\n\"actually not asynchronous, but massively multi-threaded. Here is an \"\n\"example::\"\nmsgstr \"\"\n\n#: ../../async.rst:39\nmsgid \"\"\n\"The first line is important. It causes gevent to monkey-patch most of \"\n\"Python's blocking APIs to not block the current thread, but pass the CPU to \"\n\"the next greenlet instead. It actually replaces Python's threading with \"\n\"gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` \"\n\"which would normally block the whole thread. If you don't feel comfortable \"\n\"with monkey-patching python built-ins, you can use the corresponding gevent \"\n\"functions (``gevent.sleep()`` in this case).\"\nmsgstr \"\"\n\n#: ../../async.rst:41\nmsgid \"\"\n\"If you run this script and point your browser to \"\n\"``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and \"\n\"`END` show up one by one (rather than waiting 8 seconds to see them all at \"\n\"once). It works exactly as with normal threads, but now your server can \"\n\"handle thousands of concurrent requests without any problems.\"\nmsgstr \"\"\n\n#: ../../async.rst:45\nmsgid \"\"\n\"Some browsers buffer a certain amount of data before they start rendering a \"\n\"page. You might need to yield more than a few bytes to see an effect in \"\n\"these browsers. Additionally, many browsers have a limit of one concurrent \"\n\"connection per URL. If this is the case, you can use a second browser or a \"\n\"benchmark tool (e.g. `ab` or `httperf`) to measure performance.\"\nmsgstr \"\"\n\n#: ../../async.rst:52\nmsgid \"Event Callbacks\"\nmsgstr \"\"\n\n#: ../../async.rst:54\nmsgid \"\"\n\"A very common design pattern in asynchronous frameworks (including tornado, \"\n\"twisted, node.js and friends) is to use non-blocking APIs and bind callbacks\"\n\" to asynchronous events. The socket object is kept open until it is closed \"\n\"explicitly to allow callbacks to write to the socket at a later point. Here \"\n\"is an example based on the `tornado library \"\n\"<http://www.tornadoweb.org/documentation#non-blocking-asynchronous-\"\n\"requests>`_::\"\nmsgstr \"\"\n\n#: ../../async.rst:63\nmsgid \"\"\n\"The main benefit is that the request handler terminates early. The handling \"\n\"thread can move on and accept new requests while the callbacks continue to \"\n\"write to sockets of previous requests. This is how these frameworks manage \"\n\"to process a lot of concurrent requests with only a small number of OS \"\n\"threads.\"\nmsgstr \"\"\n\n#: ../../async.rst:65\nmsgid \"\"\n\"With Gevent+WSGI, things are different: First, terminating early has no \"\n\"benefit because we have an unlimited pool of (pseudo)threads to accept new \"\n\"connections. Second, we cannot terminate early because that would close the \"\n\"socket (as required by WSGI). Third, we must return an iterable to conform \"\n\"to WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:67\nmsgid \"\"\n\"In order to conform to the WSGI standard, all we have to do is to return a \"\n\"body iterable that we can write to asynchronously. With the help of \"\n\"`gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate*\"\n\" a detached socket and rewrite the previous example as follows::\"\nmsgstr \"\"\n\n#: ../../async.rst:78\nmsgid \"\"\n\"From the server perspective, the queue object is iterable. It blocks if \"\n\"empty and stops as soon as it reaches ``StopIteration``. This conforms to \"\n\"WSGI. On the application side, the queue object behaves like a non-blocking \"\n\"socket. You can write to it at any time, pass it around and even start a new\"\n\" (pseudo)thread that writes to it asynchronously. This is how long-polling \"\n\"is implemented most of the time.\"\nmsgstr \"\"\n\n#: ../../async.rst:82\nmsgid \"Finally: WebSockets\"\nmsgstr \"\"\n\n#: ../../async.rst:84\nmsgid \"\"\n\"Lets forget about the low-level details for a while and speak about \"\n\"WebSockets. Since you are reading this article, you probably know what \"\n\"WebSockets are: A bidirectional communication channel between a browser \"\n\"(client) and a web application (server).\"\nmsgstr \"\"\n\n#: ../../async.rst:86\nmsgid \"\"\n\"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-\"\n\"websocket/>`_ package does all the hard work for us. Here is a simple \"\n\"WebSocket endpoint that receives messages and just sends them back to the \"\n\"client::\"\nmsgstr \"\"\n\n#: ../../async.rst:111\nmsgid \"\"\n\"The while-loop runs until the client closes the connection. You get the idea\"\n\" :)\"\nmsgstr \"\"\n\n#: ../../async.rst:113\nmsgid \"The client-site JavaScript API is really straight forward, too::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/changelog.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../changelog.rst:6\nmsgid \"Release Notes and Changelog\"\nmsgstr \"\"\n\n#: ../../changelog.rst:9\nmsgid \"Release 0.13\"\nmsgstr \"\"\n\n#: ../../changelog.rst:11\nmsgid \"Not released yet.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:14\nmsgid \"Dropped support for Python versions that reached their end-of-life.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:15\nmsgid \"\"\n\"Keeping up support for ancient Python versions hinders adaptation of new \"\n\"features and serves no real purpose. If you need support for older Python \"\n\"versions, you can stay on bottle-0.12. The updated list of tested and \"\n\"supported python releases is as follows:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:20\nmsgid \"Python 2.7 (>= 2.7.3)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:21\nmsgid \"Python 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:22\nmsgid \"Python 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:23\nmsgid \"Python 3.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:24\nmsgid \"Python 3.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:25\nmsgid \"PyPy 2.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:26\nmsgid \"PyPy 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:27\nmsgid \"PyPy 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:29\nmsgid \"\"\n\"Support for Python 2.5 was marked as deprecated since 0.12. We decided to go\"\n\" a step further and also remove support for 2.6 and 3.1 to 3.5 even if it \"\n\"was never deprecated explicitly in bottle. This means that this release is \"\n\"*not* backwards compatible in Python <2.7.3 or <3.6 environments. \"\n\"Maintainers for distributions or systems that still use these old python \"\n\"versions should not update to Bottle 0.13 and stick with 0.12 instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:35\nmsgid \"Stabilized APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:36\nmsgid \"\"\n\"The documented API of the :class:`ConfigDict` class is now considered stable\"\n\" and ready to use.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:38\nmsgid \"Deprecated APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:39\nmsgid \"\"\n\"The old route syntax (``/hello/:name``) is deprecated in favor of the more \"\n\"readable and flexible ``/hello/<name>`` syntax.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:40\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes Bottle instance and will warn about \"\n\"parameters that are not compatible with the new mounting behavior. The old \"\n\"behavior (mount applications as WSGI callable) still works and is used as a \"\n\"fallback automatically.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:41\nmsgid \"The undocumented :func:`local_property` helper is now deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:42\nmsgid \"\"\n\"The server adapter for google app engine is not useful anymore and marked as\"\n\" deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:43\nmsgid \"\"\n\"Bottle uses pickle to store arbitrary objects into signed cookies. This is \"\n\"safe, as long as the signature key remains a secret. Unfortunately, people \"\n\"tend to push code with signature keys to github all the time, so we decided \"\n\"to remove pickle-support from bottle. Signed cookies will now issue a \"\n\"deprecation warning if the value is not a string, and support for non-string\"\n\" values will be removed in 0.14. The global :func:`cookie_encode`, \"\n\":func:`cookie_decode` and :func:`is_cookie_encoded` are now also deprecated.\"\n\" If you are using this feature, think about using json to serialize your \"\n\"objects before storing them into cookies, or switch to a session system that\"\n\" stores data server-side instead of client-side.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:45\nmsgid \"Removed APIs (deprecated since 0.12)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:46\nmsgid \"\"\n\"Plugins with the old API (``api=1`` or no api attribute) will no longer \"\n\"work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:47\nmsgid \"\"\n\"Parameter order of :meth:`Bottle.mount` changed in 0.10. The old order will \"\n\"now result in an error instead of a warning.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:48\nmsgid \"\"\n\"The :class:`ConfigDict` class was introduced in 0.11 and changed during \"\n\"0.12. These changes are now final.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:50\nmsgid \"\"\n\"Attribute access and assignment was removed due to high overhead and limited\"\n\" usability.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:51\nmsgid \"\"\n\"Namespaced sub-instance creation was removed. ``config[\\\"a\\\"][\\\"b\\\"]`` has a\"\n\" high overhead and little benefit over ``config[\\\"a.b\\\"]``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:52\nmsgid \"\"\n\":class:`ConfigDict` instances are no longer callable. This was a shortcut \"\n\"for :meth:`ConfigDict.update`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:53\nmsgid \"\"\n\":class:`ConfigDict` constructor no longer accepts any parameters. Use the \"\n\"`load_*` methods instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:55\nmsgid \"\"\n\"Bottle 0.12 changed some aspects of the Simple Template Engine. These \"\n\"changes are now final and the old syntax will now longer work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:57\nmsgid \"\"\n\"The magic ``{{rebase()}}`` call was replaced by a ``base`` variable. \"\n\"Example: ``{{base}}``\"\nmsgstr \"\"\n\n#: ../../changelog.rst:58\nmsgid \"\"\n\"In STPL Templates, the 'rebase' and 'include' keywords were replaced with \"\n\"functions in 0.12.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:59\nmsgid \"\"\n\"PEP-263 encoding strings are no longer recognized. Templates are always \"\n\"utf-8.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:61\nmsgid \"\"\n\"The 'geventSocketIO' server adapter was removed without notice. It did not \"\n\"work anyway.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:63\nmsgid \"Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:64\nmsgid \"These changes might require special care when updating.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:66\nmsgid \"\"\n\"Signed cookies now use a stronger HMAC algorithm by default. This will \"\n\"result in old cookies to appear invalid after the update. Pass an explicit \"\n\"``digestmod=hashlib.md5`` to :meth:`Request.get_cookie` and \"\n\":meth:`Response.set_cookie` to get the old behavior.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:68\nmsgid \"Other Improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:69\nmsgid \"\"\n\"Bottle() instances are now context managers. If used in a with-statement, \"\n\"the default application changes to the specific instance and the shortcuts \"\n\"for many instance methods can be used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:70\nmsgid \"\"\n\"Added support for ``PATCH`` requests and the :meth:`Bottle.patch` decorator.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:71\nmsgid \"\"\n\"Added `aiohttp <http://aiohttp.readthedocs.io/en/stable/>`_ and `uvloop \"\n\"<https://github.com/MagicStack/uvloop>`_ server adapters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:72\nmsgid \"Added command-line arguments for config from json or ini files.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:73\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes instances of :class:`Bottle` and mounts \"\n\"them with significantly less overhead than other WSGI applications.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:74\nmsgid \"\"\n\"The :attr:`Request.json` property now accepts ``application/json-rpc`` \"\n\"requests.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:75\nmsgid \"\"\n\":func:`static_file` gained support for ``ETag`` headers. It will generate \"\n\"ETags and recognizes ``If-None-Match`` headers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:76\nmsgid \"Jinja2 templates will produce better error messages than before.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:82\nmsgid \"Release 0.12\"\nmsgstr \"\"\n\n#: ../../changelog.rst:84\nmsgid \"New SimpleTemplate parser implementation\"\nmsgstr \"\"\n\n#: ../../changelog.rst:86\nmsgid \"Support for multi-line code blocks (`<% ... %>`).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:87\nmsgid \"\"\n\"The keywords `include` and `rebase` are functions now and can accept \"\n\"variable template names.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:89\nmsgid \"\"\n\"The new :attr:`BaseRequest.route` property returns the :class:`Route` that \"\n\"originally matched the request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:90\nmsgid \"\"\n\"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in \"\n\"CPythons dict() implementation was fixed over a year ago. If you are still \"\n\"using Python 2.5 in production, consider upgrading or at least make sure \"\n\"that you get security fixed from your distributor.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:91\nmsgid \"New :class:`ConfigDict` API (see :doc:`configuration`)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:93\nmsgid \"\"\n\"More information can be found in this `development blog post \"\n\"<http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:97\nmsgid \"Release 0.11\"\nmsgstr \"\"\n\n#: ../../changelog.rst:99\nmsgid \"\"\n\"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:100\nmsgid \"\"\n\"Support for partial downloads (``Range`` header) in :func:`static_file`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:101\nmsgid \"\"\n\"The new :class:`ResourceManager` interface helps locating files bundled with\"\n\" an application.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:102\nmsgid \"\"\n\"Added a server adapter for `waitress \"\n\"<http://docs.pylonsproject.org/projects/waitress/en/latest/>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:103\nmsgid \"\"\n\"New :meth:`Bottle.merge` method to install all routes from one application \"\n\"into another.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:104\nmsgid \"\"\n\"New :attr:`BaseRequest.app` property to get the application object that \"\n\"handles a request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:105\nmsgid \"\"\n\"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by \"\n\"WTForms).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:106\nmsgid \":class:`MultiDict` and subclasses are now pickle-able.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:109\nmsgid \"API Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:110\nmsgid \"\"\n\":attr:`Response.status` is a read-write property that can be assigned either\"\n\" a numeric status code or a status string with a reason phrase (``200 OK``).\"\n\" The return value is now a string to better match existing APIs (WebOb, \"\n\"werkzeug). To be absolutely clear, you can use the read-only properties \"\n\":attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:113\nmsgid \"API Deprecations\"\nmsgstr \"\"\n\n#: ../../changelog.rst:114\nmsgid \"\"\n\":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:117\nmsgid \"Release 0.10\"\nmsgstr \"\"\n\n#: ../../changelog.rst:119\nmsgid \"Plugin API v2\"\nmsgstr \"\"\n\n#: ../../changelog.rst:121\nmsgid \"To use the new API, set :attr:`Plugin.api` to ``2``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:122\nmsgid \"\"\n\":meth:`Plugin.apply` receives a :class:`Route` object instead of a context \"\n\"dictionary as second parameter. The new object offers some additional \"\n\"information and may be extended in the future.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:123\nmsgid \"\"\n\"Plugin names are considered unique now. The topmost plugin with a given name\"\n\" on a given route is installed, all other plugins with the same name are \"\n\"silently ignored.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:125\nmsgid \"The Request/Response Objects\"\nmsgstr \"\"\n\n#: ../../changelog.rst:127\nmsgid \"\"\n\"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, \"\n\":attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and \"\n\":attr:`BaseRequest.script_name`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:128\nmsgid \"\"\n\"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` \"\n\"attributes. In future releases, :attr:`BaseResponse.status` will return a \"\n\"string (e.g. ``200 OK``) instead of an integer to match the API of other \"\n\"common frameworks. To make the transition as smooth as possible, you should \"\n\"use the verbose attributes from now on.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:129\nmsgid \"\"\n\"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many \"\n\"places. The new dict implementation allows attribute access and handles \"\n\"unicode form values transparently.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:131\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../changelog.rst:133\nmsgid \"\"\n\"Added three new functions to the SimpleTemplate default namespace that \"\n\"handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and \"\n\":func:`stpl.setdefault`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:134\nmsgid \"\"\n\"The default escape function for SimpleTemplate now additionally escapes \"\n\"single and double quotes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:136\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../changelog.rst:138\nmsgid \"\"\n\"A new route syntax (e.g. ``/object/<id:int>``) and support for route \"\n\"wildcard filters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:139\nmsgid \"Four new wildcard filters: `int`, `float`, `path` and `re`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:141\nmsgid \"Other changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:143\nmsgid \"Added command line interface to load applications and start servers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:144\nmsgid \"\"\n\"Introduced a :class:`ConfigDict` that makes accessing configuration a lot \"\n\"easier (attribute access and auto-expanding namespaces).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:145\nmsgid \"Added support for raw WSGI applications to :meth:`Bottle.mount`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:146\nmsgid \":meth:`Bottle.mount` parameter order changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:147\nmsgid \"\"\n\":meth:`Bottle.route` now accpets an import string for the ``callback`` \"\n\"parameter.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:148\nmsgid \"Dropped Gunicorn 0.8 support. Current supported version is 0.13.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:149\nmsgid \"Added custom options to Gunicorn server.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:150\nmsgid \"\"\n\"Finally dropped support for type filters. Replace with a custom plugin of \"\n\"needed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:154\nmsgid \"Release 0.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:157\nmsgid \"Whats new?\"\nmsgstr \"\"\n\n#: ../../changelog.rst:158\nmsgid \"\"\n\"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:159\nmsgid \"\"\n\"The :func:`route` decorator got a lot of new features. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:160\nmsgid \"\"\n\"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld \"\n\"<http://meinheld.org/>`_ and `bjoern \"\n\"<https://github.com/jonashaag/bjoern>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:161\nmsgid \"Support for SimpleTAL templates.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:162\nmsgid \"Better runtime exception handling for mako templates in debug mode.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:163\nmsgid \"Lots of documentation, fixes and small improvements.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:164\nmsgid \"A new :data:`Request.urlparts` property.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:167\nmsgid \"Performance improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:168\nmsgid \"\"\n\"The :class:`Router` now special-cases ``wsgi.run_once`` environments to \"\n\"speed up CGI.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:169\nmsgid \"\"\n\"Reduced module load time by ~30% and optimized template parser. See `8ccb2d \"\n\"</commit/8ccb2d>`_, `f72a7c </commit/f72a7c>`_ and `b14b9a \"\n\"</commit/b14b9a>`_ for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:170\nmsgid \"\"\n\"Support for \\\"App Caching\\\" on Google App Engine. See `af93ec \"\n\"</commit/af93ec>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:171\nmsgid \"\"\n\"Some of the rarely used or deprecated features are now plugins that avoid \"\n\"overhead if the feature is not used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:174 ../../changelog.rst:185\nmsgid \"API changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:175\nmsgid \"\"\n\"This release is mostly backward compatible, but some APIs are marked \"\n\"deprecated now and will be removed for the next release. Most noteworthy:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:177\nmsgid \"\"\n\"The ``static`` route parameter is deprecated. You can escape wild-cards with\"\n\" a backslash.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:178\nmsgid \"\"\n\"Type-based output filters are deprecated. They can easily be replaced with \"\n\"plugins.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:182\nmsgid \"Release 0.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:186\nmsgid \"These changes may break compatibility with previous versions.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:188\nmsgid \"\"\n\"The built-in Key/Value database is not available anymore. It is marked \"\n\"deprecated since 0.6.4\"\nmsgstr \"\"\n\n#: ../../changelog.rst:189\nmsgid \"The Route syntax and behaviour changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:191\nmsgid \"\"\n\"Regular expressions must be encapsulated with ``#``. In 0.6 all non-\"\n\"alphanumeric characters not present in the regular expression were allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:192\nmsgid \"\"\n\"Regular expressions not part of a route wildcard are escaped automatically. \"\n\"You don't have to escape dots or other regular control characters anymore. \"\n\"In 0.6 the whole URL was interpreted as a regular expression. You can use \"\n\"anonymous wildcards (``/index:#(\\\\.html)?#``) to achieve a similar \"\n\"behaviour.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:194\nmsgid \"\"\n\"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:195\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine escapes HTML special characters in \"\n\"``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` \"\n\"syntax to get old behaviour (no escaping).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:196\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine returns unicode strings instead of lists \"\n\"of byte strings.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:197\nmsgid \"\"\n\"``bottle.optimize()`` and the automatic route optimization is obsolete.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:198\nmsgid \"Some functions and attributes were renamed:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:200\nmsgid \":attr:`Request._environ` is now :attr:`Request.environ`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:201\nmsgid \":attr:`Response.header` is now :attr:`Response.headers`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:202\nmsgid \":func:`default_app` is obsolete. Use :func:`app` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:204\nmsgid \"The default :func:`redirect` code changed from 307 to 303.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:205\nmsgid \"Removed support for ``@default``. Use ``@error(404)`` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:209\nmsgid \"New features\"\nmsgstr \"\"\n\n#: ../../changelog.rst:210\nmsgid \"This is an incomplete list of new features and improved functionality.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:212\nmsgid \"\"\n\"The :class:`Request` object got new properties: :attr:`Request.body`, \"\n\":attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, \"\n\":attr:`Request.forms`, :attr:`Request.files`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:213\nmsgid \"\"\n\"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are \"\n\"now able to encode and decode python objects. This is called a *secure \"\n\"cookie* because the encoded values are signed and protected from changes on \"\n\"client side. All pickle-able data structures are allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:214\nmsgid \"\"\n\"The new :class:`Router` class drastically improves performance for setups \"\n\"with lots of dynamic routes and supports named routes (named route + dict = \"\n\"URL string).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:215\nmsgid \"\"\n\"It is now possible (and recommended) to return :exc:`HTTPError` and \"\n\":exc:`HTTPResponse` instances or other exception objects instead of raising \"\n\"them.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:216\nmsgid \"\"\n\"The new function :func:`static_file` equals :func:`send_file` but returns a \"\n\":exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. \"\n\":func:`send_file` is deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:217\nmsgid \"\"\n\"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:218\nmsgid \"The :class:`SimpleTemplate` engine got full unicode support.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:219\nmsgid \"Lots of non-critical bugfixes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:225\nmsgid \"Contributors\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:1\nmsgid \"\"\n\"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:3\nmsgid \"\"\n\"Thanks to all the people who found bugs, sent patches, spread the word, \"\n\"helped each other on the mailing-list and made this project possible. I hope\"\n\" the following (alphabetically sorted) list is complete. If you miss your \"\n\"name on that list (or want your name removed) please :doc:`tell me \"\n\"<contact>` or add it yourself.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:5\nmsgid \"acasajus\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:6\nmsgid \"Adam R. Smith\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:7\nmsgid \"Alexey Borzenkov\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:8\nmsgid \"Alexis Daboville\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:9\nmsgid \"Anton I. Sipos\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:10\nmsgid \"Anton Kolechkin\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:11\nmsgid \"apexi200sx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:12\nmsgid \"apheage\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:13\nmsgid \"BillMa\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:14\nmsgid \"Brad Greenlee\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:15\nmsgid \"Brandon Gilmore\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:16\nmsgid \"Branko Vukelic\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:17\nmsgid \"Brian Sierakowski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:18\nmsgid \"Brian Wickman\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:19\nmsgid \"Carl Scharenberg\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:20\nmsgid \"Damien Degois\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:21\nmsgid \"David Buxton\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:22\nmsgid \"Duane Johnson\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:23\nmsgid \"fcamel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:24\nmsgid \"Frank Murphy\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:25\nmsgid \"Frederic Junod\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:26\nmsgid \"goldfaber3012\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:27\nmsgid \"Greg Milby\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:28\nmsgid \"gstein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:29\nmsgid \"Ian Davis\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:30\nmsgid \"Itamar Nabriski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:31\nmsgid \"Iuri de Silvio\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:32\nmsgid \"Jaimie Murdock\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:33\nmsgid \"Jeff Nichols\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:34\nmsgid \"Jeremy Kelley\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:35\nmsgid \"joegester\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:36\nmsgid \"Johannes Krampf\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:37\nmsgid \"Jonas Haag\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:38\nmsgid \"Joshua Roesslein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:39\nmsgid \"Judson Neer\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:40\nmsgid \"Karl\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:41\nmsgid \"Kevin Zuber\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:42\nmsgid \"Kraken\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:43\nmsgid \"Kyle Fritz\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:44\nmsgid \"m35\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:45\nmsgid \"Marcos Neves\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:46\nmsgid \"masklinn\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:47\nmsgid \"Michael Labbe\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:48\nmsgid \"Michael Soulier\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:49\nmsgid \"`reddit <http://reddit.com/r/python>`_\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:50\nmsgid \"Nicolas Vanhoren\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:51\nmsgid \"Oz N Tiram\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:52\nmsgid \"Robert Rollins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:53\nmsgid \"rogererens\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:54\nmsgid \"rwxrwx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:55\nmsgid \"Santiago Gala\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:56\nmsgid \"Sean M. Collins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:57\nmsgid \"Sebastian Wollrath\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:58\nmsgid \"Seth\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:59\nmsgid \"Sigurd Høgsbro\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:60\nmsgid \"Stuart Rackham\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:61\nmsgid \"Sun Ning\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:62\nmsgid \"Tomás A. Schertel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:63\nmsgid \"Tristan Zajonc\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:64\nmsgid \"voltron\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:65\nmsgid \"Wieland Hoffmann\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:66\nmsgid \"zombat\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:67\nmsgid \"Thiago Avelino\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/configuration.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../configuration.rst:3\nmsgid \"Configuration (DRAFT)\"\nmsgstr \"\"\n\n#: ../../configuration.rst:8\nmsgid \"\"\n\"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_\"\n\" what you think.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:10\nmsgid \"\"\n\"Bottle applications can store their configuration in :attr:`Bottle.config`, \"\n\"a dict-like object and central place for application specific settings. This\"\n\" dictionary controls many aspects of the framework, tells (newer) plugins \"\n\"what to do, and can be used to store your own configuration as well.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:13\nmsgid \"Configuration Basics\"\nmsgstr \"\"\n\n#: ../../configuration.rst:15\nmsgid \"\"\n\"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. \"\n\"All the common dict methods work as expected. Let us start with some \"\n\"examples::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:44\nmsgid \"\"\n\"The app object is not always available, but as long as you are within a \"\n\"request context, you can use the `request` object to get the current \"\n\"application and its configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:51\nmsgid \"Naming Convention\"\nmsgstr \"\"\n\n#: ../../configuration.rst:53\nmsgid \"\"\n\"To make life easier, plugins and applications should follow some simple \"\n\"rules when it comes to config parameter names:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:55\nmsgid \"\"\n\"All keys should be lowercase strings and follow the rules for python \"\n\"identifiers (no special characters but the underscore).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:56\nmsgid \"\"\n\"Namespaces are separated by dots (e.g. ``namespace.field`` or \"\n\"``namespace.subnamespace.field``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:57\nmsgid \"\"\n\"Bottle uses the root namespace for its own configuration. Plugins should \"\n\"store all their variables in their own namespace (e.g. ``sqlite.db`` or \"\n\"``werkzeug.use_debugger``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:58\nmsgid \"\"\n\"Your own application should use a separate namespace (e.g. ``myapp.*``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:62\nmsgid \"Loading Configuration from a File\"\nmsgstr \"\"\n\n#: ../../configuration.rst:66\nmsgid \"\"\n\"Configuration files are useful if you want to enable non-programmers to \"\n\"configure your application, or just don't want to hack python module files \"\n\"just to change the database port. A very common syntax for configuration \"\n\"files is shown here:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:78\nmsgid \"\"\n\"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style \"\n\"configuration files from disk and import their values into your existing \"\n\"configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:85\nmsgid \"Loading Configuration from a python module\"\nmsgstr \"\"\n\n#: ../../configuration.rst:89\nmsgid \"\"\n\"Loading configuration from a Python module is a common pattern for Python \"\n\"programs and frameworks. Bottle assumes that configuration keys are all \"\n\"upper case:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:98\nmsgid \"\"\n\"You can load the this Python module with :met:`ConfigDict.load_module`::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:107\nmsgid \"\"\n\"Note the second parameter to disable loading as namespaced items as in \"\n\":meth:`ConfigDict.load_dict`. By default, loading from a Python module will \"\n\"call this method, unless you specifically call this method with `False` as \"\n\"the second argument.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:110\nmsgid \"Loading Configuration from a nested :class:`dict`\"\nmsgstr \"\"\n\n#: ../../configuration.rst:114\nmsgid \"\"\n\"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an \"\n\"entire structure of nested dictionaries and turns it into a flat list of \"\n\"keys and values with namespaced keys::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:135\nmsgid \"Listening to configuration changes\"\nmsgstr \"\"\n\n#: ../../configuration.rst:139\nmsgid \"\"\n\"The ``config`` hook on the application object is triggered each time a value\"\n\" in :attr:`Bottle.config` is changed. This hook can be used to react on \"\n\"configuration changes at runtime, for example reconnect to a new database, \"\n\"change the debug settings on a background service or resize worker thread \"\n\"pools. The hook callback receives two arguments (key, new_value) and is \"\n\"called before the value is actually changed in the dictionary. Raising an \"\n\"exception from a hook callback cancels the change and the old value is \"\n\"preserved.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:148\nmsgid \"\"\n\"The hook callbacks cannot *change* the value that is to be stored to the \"\n\"dictionary. That is what filters are for.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:154\nmsgid \"Filters and other Meta Data\"\nmsgstr \"\"\n\n#: ../../configuration.rst:158\nmsgid \"\"\n\":class:`ConfigDict` allows you to store meta data along with configuration \"\n\"keys. Two meta fields are currently defined:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:162\nmsgid \"help\"\nmsgstr \"\"\n\n#: ../../configuration.rst:161\nmsgid \"\"\n\"A help or description string. May be used by debugging, introspection or \"\n\"admin tools to help the site maintainer configuring their application.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"filter\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"\"\n\"A callable that accepts and returns a single value. If a filter is defined \"\n\"for a key, any new value stored to that key is first passed through the \"\n\"filter callback. The filter can be used to cast the value to a different \"\n\"type, check for invalid values (throw a ValueError) or trigger side effects.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:167\nmsgid \"\"\n\"This feature is most useful for plugins. They can validate their config \"\n\"parameters or trigger side effects using filters and document their \"\n\"configuration via ``help`` fields::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:189\nmsgid \"API Documentation\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:1\nmsgid \"\"\n\"A dict-like configuration storage with additional support for namespaces, \"\n\"validators, meta-data, overlays and more.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:4\nmsgid \"\"\n\"This dict-like class is heavily optimized for read access. All read-only \"\n\"methods as well as item access should be as fast as the built-in dict.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:1\nmsgid \"Load values from a Python module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:3\nmsgid \"Example modue ``config.py``::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:0\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:17\nmsgid \"\"\n\"If true (default), dictionary values are assumed to represent namespaces \"\n\"(see :meth:`load_dict`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:1\nmsgid \"Load values from an ``*.ini`` style config file.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:3\nmsgid \"\"\n\"A configuration file consists of sections, each led by a ``[section]`` \"\n\"header, followed by key/value entries separated by either ``=`` or ``:``. \"\n\"Section names and keys are case-insensitive. Leading and trailing whitespace\"\n\" is removed from keys and values. Values can be omitted, in which case the \"\n\"key/value delimiter may also be left out. Values can also span multiple \"\n\"lines, as long as they are indented deeper than the first line of the value.\"\n\" Commands are prefixed by ``#`` or ``;`` and may only appear on their own on\"\n\" an otherwise empty line.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:13\nmsgid \"\"\n\"Both section and key names may contain dots (``.``) as namespace separators.\"\n\" The actual configuration parameter name is constructed by joining section \"\n\"name and key name together and converting to lower case.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:18\nmsgid \"\"\n\"The special sections ``bottle`` and ``ROOT`` refer to the root namespace and\"\n\" the ``DEFAULT`` section defines default values for all other sections.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:22\nmsgid \"With Python 3, extended string interpolation is enabled.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:24\nmsgid \"The path of a config file, or a list of paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:25\nmsgid \"\"\n\"All keyword parameters are passed to the underlying \"\n\":class:`python:configparser.ConfigParser` constructor call.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_dict:1\nmsgid \"\"\n\"Load values from a dictionary structure. Nesting can be used to represent \"\n\"namespaces.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.update:1\nmsgid \"\"\n\"If the first parameter is a string, all keys are prefixed with this \"\n\"namespace. Apart from that it works just as the usual dict.update().\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:1\nmsgid \"Insert key with a value of default if key is not in the dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:3\nmsgid \"Return the value for key if key is in the dictionary, else default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_get:1\nmsgid \"Return the value of a meta field for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_set:1\nmsgid \"Set the meta field for a key to a new value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_list:1\nmsgid \"Return an iterable of meta field names defined for a key.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/contact.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Ibrahim DERRAZ <ibrahim@derraz.fr>, 2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../contact.rst:3\nmsgid \"Contact\"\nmsgstr \"Contact\"\n\n#: ../../contact.rst:6\nmsgid \"About the Author\"\nmsgstr \"\"\n\n#: ../../contact.rst:7\nmsgid \"\"\n\"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy \"\n\"behind this website. I'm 27 years old and studying computer science at the \"\n\"Georg-August-University in Göttingen, Germany. Python is my favorite \"\n\"language, but I also code in ruby and JavaScript a lot. Watch me on `twitter\"\n\" <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub \"\n\"<http://github.com/defnull>`_ to get in contact. A `mailinglist \"\n\"<http://groups.google.de/group/bottlepy>`_ is open for Bottle related \"\n\"questions, too.\"\nmsgstr \"Bonjour, je suis *Marcel Hellkamp* (alias *defnull*),  développeur de Bottle, et la personne derrière ce site. J'ans 27 ans et j’étudie l’informatique à l’université Georg-August-University à  Göttingen en Allemagne. Python est mon langage préféré, mais je code aussi en Ruby et JavaScript. Suivez moi sur `twitter <http://twitter.com/bottlepy>`_ ou visitez mon profil sur `GitHub <http://github.com/defnull>`_ . Une `mailinglist <http://groups.google.de/group/bottlepy>`_ est disponible pour toutes les questions liés à Bottle\"\n\n#: ../../contact.rst:10\nmsgid \"About Bottle\"\nmsgstr \"À propos de Bottle\"\n\n#: ../../contact.rst:11\nmsgid \"\"\n\"This is my first open source project so far. It started and a small \"\n\"experiment but soon got so much positive feedback I decided to make \"\n\"something real out of it. Here it is.\"\nmsgstr \"Il s'agit de mon premier projet open-source. Il s’agissait d'un projet d'expérimentation, mais grâce à tout vos retours positifs, j'ai décidé d'en faire un projet sérieux. Et le voilà.\"\n\n#: ../../contact.rst:14\nmsgid \"Impressum und Kontaktdaten\"\nmsgstr \"Impressum und Kontaktdaten\"\n\n#: ../../contact.rst:15\nmsgid \"\"\n\"(This is required by `German law \"\n\"<http://bundesrecht.juris.de/tmg/__5.html>`_)\"\nmsgstr \"(Requis par la  `loi Allemande <http://bundesrecht.juris.de/tmg/__5.html>`_)\"\n\n#: ../../contact.rst:17\nmsgid \"\"\n\"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die \"\n\"Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen \"\n\"vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist \"\n\"ausdrücklich untersagt.\"\nmsgstr \"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist ausdrücklich untersagt.\"\n\n#: ../../contact.rst:22\nmsgid \"**Betreiber**: Marcel Hellkamp\"\nmsgstr \"**Betreiber**: Marcel Hellkamp\"\n\n#: ../../contact.rst:23\nmsgid \"**Ort**: D - 37075 Göttingen\"\nmsgstr \"**Ort**: D - 37075 Göttingen\"\n\n#: ../../contact.rst:24\nmsgid \"**Strasse**: Theodor-Heuss Strasse 13\"\nmsgstr \"**Strasse**: Theodor-Heuss Strasse 13\"\n\n#: ../../contact.rst:25\nmsgid \"**Telefon**: +49 (0) 551 20005915\"\nmsgstr \"**Telefon**: +49 (0) 551 20005915\"\n\n#: ../../contact.rst:26\nmsgid \"**E-Mail**: marc at gsites dot de\"\nmsgstr \"**E-Mail**: marc at gsites dot de\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/deployment.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Ibrahim DERRAZ <ibrahim@derraz.fr>, 2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../deployment.rst:27\nmsgid \"Deployment\"\nmsgstr \"Déploiement \"\n\n#: ../../deployment.rst:29\nmsgid \"\"\n\"The bottle :func:`run` function, when called without any parameters, starts \"\n\"a local development server on port 8080. You can access and test your \"\n\"application via http://localhost:8080/ if you are on the same host.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:31\nmsgid \"\"\n\"To get your application available to the outside world, specify the IP the \"\n\"server should listen to (e.g. ``run(host='192.168.0.1')``) or let the server\"\n\" listen to all interfaces at once (e.g. ``run(host='0.0.0.0')``). The \"\n\"listening port can be changed in a similar way, but you need root or admin \"\n\"rights to choose a port below 1024. Port 80 is the standard for HTTP \"\n\"servers::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:37\nmsgid \"Server Options\"\nmsgstr \"\"\n\n#: ../../deployment.rst:39\nmsgid \"\"\n\"The built-in default server is based on `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-\"\n\"wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine \"\n\"for development, but may become a performance bottleneck when server load \"\n\"increases. There are three ways to eliminate this bottleneck:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:41\nmsgid \"\"\n\"Use a different server that is either multi-threaded or supports \"\n\"asynchronous IO.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:42\nmsgid \"\"\n\"Start multiple server processes and spread the load with a load-balancer.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:43\nmsgid \"Do both.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:45\nmsgid \"\"\n\"**Multi-threaded** servers are the 'classic' way to do it. They are very \"\n\"robust, reasonably fast and easy to manage. As a drawback, they can only \"\n\"handle a limited number of connections at the same time and utilize only one\"\n\" CPU core due to the \\\"Global Interpreter Lock\\\" (GIL) of the Python \"\n\"runtime. This does not hurt most applications, they are waiting for network \"\n\"IO most of the time anyway, but may slow down CPU intensive tasks (e.g. \"\n\"image processing).\"\nmsgstr \"\"\n\n#: ../../deployment.rst:47\nmsgid \"\"\n\"**Asynchronous IO** servers are very fast, can handle a virtually unlimited \"\n\"number of concurrent connections and are easy to manage. To take full \"\n\"advantage of their potential, you need to design your application \"\n\"accordingly and understand the concepts of the specific server.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:49\nmsgid \"\"\n\"**Multi-processing** (forking) servers are not limited by the GIL and \"\n\"utilize more than one CPU core, but make communication between server \"\n\"instances more expensive. You need a database or external message query to \"\n\"share state between processes, or design your application so that it does \"\n\"not need any shared state. The setup is also a bit more complicated, but \"\n\"there are good tutorials available.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:52\nmsgid \"Switching the Server Backend\"\nmsgstr \"\"\n\n#: ../../deployment.rst:54\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded default server::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:58\nmsgid \"\"\n\"Bottle ships with a lot of ready-to-use adapters for the most common WSGI \"\n\"servers and automates the setup process. Here is an incomplete list:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Name\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Homepage\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"cgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"Run as CGI script\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"Run as FastCGI process\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"Helper for Google App Engine deployments\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"Single-threaded default server\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"Multi-threaded and very stable\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"Multi-threaded, stable, tried and tested\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"Multi-threaded, poweres Pyramid\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"Pre-forked, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"Asynchronous framework with WSGI support.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72 ../../deployment.rst:73\nmsgid \"Asynchronous (greenlets)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"Asynchronous, powers some parts of Facebook\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"Asynchronous, well tested but... twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"Asynchronous, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"Asynchronous, very fast and written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"auto\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"Automatically selects an available server adapter\"\nmsgstr \"\"\n\n#: ../../deployment.rst:81\nmsgid \"The full list is available through :data:`server_names`.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:83\nmsgid \"\"\n\"If there is no adapter for your favorite server or if you need more control \"\n\"over the server setup, you may want to start the server manually. Refer to \"\n\"the server documentation on how to run WSGI applications. Here is an example\"\n\" for paste_::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:91\nmsgid \"Apache mod_wsgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:93\nmsgid \"\"\n\"Instead of running your own HTTP server from within Bottle, you can attach \"\n\"Bottle applications to an `Apache server <apache>`_ using mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:95\nmsgid \"\"\n\"All you need is an ``app.wsgi`` file that provides an ``application`` \"\n\"object. This object is used by mod_wsgi to start your application and should\"\n\" be a WSGI-compatible Python callable.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:97\nmsgid \"File ``/var/www/yourapp/app.wsgi``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:108\nmsgid \"The Apache configuration may look like this::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:126\nmsgid \"uWSGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:128\nmsgid \"\"\n\"uWSGI_ is a modern alternative to FastCGI and the recommended deployment \"\n\"option on servers like nginx_, lighttpd_, and cherokee_. The uWSGI project \"\n\"provides an application server that runs your application, and defines a \"\n\"protocol that frontend webservers can speak to. Have a look at the excellent\"\n\" `Quickstart for Python/WSGI applications <https://uwsgi-\"\n\"docs.readthedocs.io/en/latest/WSGIquickstart.html>`_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:132\nmsgid \"Google AppEngine\"\nmsgstr \"\"\n\n#: ../../deployment.rst:136\nmsgid \"\"\n\"New App Engine applications using the Python 2.7 runtime environment support\"\n\" any WSGI application and should be configured to use the Bottle application\"\n\" object directly. For example suppose your application's main module is \"\n\"``myapp.py``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:146\nmsgid \"\"\n\"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object \"\n\"like so::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:158\nmsgid \"\"\n\"It is always a good idea to let GAE serve static files directly. Here is \"\n\"example for a working  ``app.yaml`` (using the legacy Python 2.5 runtime \"\n\"environment)::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:175\nmsgid \"Load Balancer (Manual Setup)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:177\nmsgid \"\"\n\"A single Python process can utilize only one CPU at a time, even if there \"\n\"are more CPU cores available. The trick is to balance the load between \"\n\"multiple independent Python processes to utilize all of your CPU cores.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:179\nmsgid \"\"\n\"Instead of a single Bottle application server, you start one instance for \"\n\"each CPU core available using different local port (localhost:8080, 8081, \"\n\"8082, ...). You can choose any server adapter you want, even asynchronous \"\n\"ones. Then a high performance load balancer acts as a reverse proxy and \"\n\"forwards each new requests to a random port, spreading the load between all \"\n\"available back-ends. This way you can use all of your CPU cores and even \"\n\"spread out the load between different physical servers.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:181\nmsgid \"\"\n\"One of the fastest load balancers available is Pound_ but most common web \"\n\"servers have a proxy-module that can do the work just fine.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:183\nmsgid \"Pound example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:201\nmsgid \"Apache example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:209\nmsgid \"Lighttpd example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:221\nmsgid \"Good old CGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:223\nmsgid \"\"\n\"A CGI server starts a new process for each request. This adds a lot of \"\n\"overhead but is sometimes the only option, especially on cheap hosting \"\n\"packages. The `cgi` server adapter does not actually start a CGI server, but\"\n\" transforms your bottle application into a valid CGI application::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/development.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../development.rst:2\nmsgid \"Developer Notes\"\nmsgstr \"\"\n\n#: ../../development.rst:4\nmsgid \"\"\n\"This document is intended for developers and package maintainers interested \"\n\"in the bottle development and release workflow. If you want to contribute, \"\n\"you are just right!\"\nmsgstr \"\"\n\n#: ../../development.rst:8\nmsgid \"Get involved\"\nmsgstr \"\"\n\n#: ../../development.rst:10\nmsgid \"\"\n\"There are several ways to join the community and stay up to date. Here are \"\n\"some of them:\"\nmsgstr \"\"\n\n#: ../../development.rst:12\nmsgid \"\"\n\"**Mailing list**: Join our mailing list by sending an email to \"\n\"`bottlepy+subscribe@googlegroups.com \"\n\"<mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required).\"\nmsgstr \"\"\n\n#: ../../development.rst:13\nmsgid \"\"\n\"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or \"\n\"search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag.\"\nmsgstr \"\"\n\n#: ../../development.rst:14\nmsgid \"\"\n\"**IRC**: Join `#bottlepy on irc.freenode.net \"\n\"<irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:15\nmsgid \"\"\n\"**Google plus**: We sometimes `blog about Bottle, releases and technical \"\n\"stuff \"\n\"<https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_\"\n\" on our Google+ page.\"\nmsgstr \"\"\n\n#: ../../development.rst:19\nmsgid \"Get the Sources\"\nmsgstr \"\"\n\n#: ../../development.rst:21\nmsgid \"\"\n\"The bottle `development repository <https://github.com/bottlepy/bottle>`_ \"\n\"and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are \"\n\"both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan \"\n\"to contribute, it is a good idea to create an account there and fork the \"\n\"main repository. This way your changes and ideas are visible to other \"\n\"developers and can be discussed openly. Even without an account, you can \"\n\"clone the repository or just download the latest development version as a \"\n\"source archive.\"\nmsgstr \"\"\n\n#: ../../development.rst:23\nmsgid \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:24\nmsgid \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:25\nmsgid \"\"\n\"**Download:** Development branch as `tar archive \"\n\"<http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file \"\n\"<http://github.com/bottlepy/bottle/zipball/master>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:26\nmsgid \"\"\n\"**Translations:** `transifex.com/projects/p/bottle \"\n\"<https://www.transifex.com/projects/p/bottle/>`_\"\nmsgstr \"\"\n\n#: ../../development.rst:30\nmsgid \"Releases and Updates\"\nmsgstr \"\"\n\n#: ../../development.rst:32\nmsgid \"\"\n\"Bottle is released at irregular intervals and distributed through `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-\"\n\"revisions of outdated releases are only available from the git repository \"\n\"mentioned above. Some Linux distributions may offer packages for outdated \"\n\"releases, though.\"\nmsgstr \"\"\n\n#: ../../development.rst:34\nmsgid \"\"\n\"The Bottle version number splits into three parts \"\n\"(**major.minor.revision**). These are *not* used to promote new features but\"\n\" to indicate important bug-fixes and/or API changes. Critical bugs are fixed\"\n\" in at least the two latest minor releases and announced in all available \"\n\"channels (mailinglist, twitter, github). Non-critical bugs or features are \"\n\"not guaranteed to be backported. This may change in the future, through.\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"Major Release (x.0)\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"\"\n\"The major release number is increased on important milestones or updates \"\n\"that completely break backward compatibility. You probably have to work over\"\n\" your entire application to use a new release. These releases are very rare,\"\n\" through.\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"Minor Release (x.y)\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"\"\n\"The minor release number is increased on updates that change the API or \"\n\"behaviour in some way. You might get some depreciation warnings any may have\"\n\" to tweak some configuration settings to restore the old behaviour, but in \"\n\"most cases these changes are designed to be backward compatible for at least\"\n\" one minor release. You should update to stay up do date, but don't have to.\"\n\" An exception is 0.8, which *will* break backward compatibility hard. (This \"\n\"is why 0.7 was skipped). Sorry about that.\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"Revision (x.y.z)\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"\"\n\"The revision number is increased on bug-fixes and other patches that do not \"\n\"change the API or behaviour. You can safely update without editing your \"\n\"application code. In fact, you really should as soon as possible, because \"\n\"important security fixes are released this way.\"\nmsgstr \"\"\n\n#: ../../development.rst:47\nmsgid \"Pre-Release Versions\"\nmsgstr \"\"\n\n#: ../../development.rst:46\nmsgid \"\"\n\"Release candidates are marked by an ``rc`` in their revision number. These \"\n\"are API stable most of the time and open for testing, but not officially \"\n\"released yet. You should not use these for production.\"\nmsgstr \"\"\n\n#: ../../development.rst:50\nmsgid \"Repository Structure\"\nmsgstr \"\"\n\n#: ../../development.rst:52\nmsgid \"The source repository is structured as follows:\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"``master`` branch\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"\"\n\"This is the integration, testing and development branch. All changes that \"\n\"are planned to be part of the next release are merged and tested here.\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"``release-x.y`` branches\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"\"\n\"As soon as the master branch is (almost) ready for a new release, it is \"\n\"branched into a new release branch. This \\\"release candidate\\\" is feature-\"\n\"frozen but may receive bug-fixes and last-minute changes until it is \"\n\"considered production ready and officially released. From that point on it \"\n\"is called a \\\"support branch\\\" and still receives bug-fixes, but only \"\n\"important ones. The revision number is increased on each push to these \"\n\"branches, so you can keep up with important changes.\"\nmsgstr \"\"\n\n#: ../../development.rst:62\nmsgid \"Feature branches\"\nmsgstr \"\"\n\n#: ../../development.rst:61\nmsgid \"\"\n\"All other branches are feature branches. These are based on the master \"\n\"branch and only live as long as they are still active and not merged back \"\n\"into ``master``.\"\nmsgstr \"\"\n\n#: ../../development.rst:65\nmsgid \"What does this mean for a developer?\"\nmsgstr \"\"\n\n#: ../../development.rst:66\nmsgid \"\"\n\"If you want to add a feature, create a new branch from ``master``. If you \"\n\"want to fix a bug, branch ``release-x.y`` for each affected release. Please \"\n\"use a separate branch for each feature or bug to make integration as easy as\"\n\" possible. Thats all. There are git workflow examples at the bottom of this \"\n\"page.\"\nmsgstr \"\"\n\n#: ../../development.rst:68\nmsgid \"\"\n\"Oh, and never ever change the release number. We'll do that on integration. \"\n\"You never know in which order we pull pending requests anyway :)\"\nmsgstr \"\"\n\n#: ../../development.rst:72\nmsgid \"What does this mean for a maintainer ?\"\nmsgstr \"\"\n\n#: ../../development.rst:73\nmsgid \"\"\n\"Watch the tags (and the mailing list) for bug-fixes and new releases. If you\"\n\" want to fetch a specific release from the git repository, trust the tags, \"\n\"not the branches. A branch may contain changes that are not released yet, \"\n\"but a tag marks the exact commit which changed the version number.\"\nmsgstr \"\"\n\n#: ../../development.rst:77\nmsgid \"Submitting Patches\"\nmsgstr \"\"\n\n#: ../../development.rst:79\nmsgid \"\"\n\"The best way to get your changes integrated into the main development branch\"\n\" is to fork the main repository at github, create a new feature-branch, \"\n\"apply your changes and send a pull-request. Further down this page is a \"\n\"small collection of git workflow examples that may guide you. Submitting \"\n\"git-compatible patches to the mailing list is fine too. In any case, please \"\n\"follow some basic rules:\"\nmsgstr \"\"\n\n#: ../../development.rst:81\nmsgid \"\"\n\"**Documentation:** Tell us what your patch does. Comment your code. If you \"\n\"introduced a new feature, add to the documentation so others can learn about\"\n\" it.\"\nmsgstr \"\"\n\n#: ../../development.rst:82\nmsgid \"\"\n\"**Test:** Write tests to prove that your code works as expected and does not\"\n\" break anything. If you fixed a bug, write at least one test-case that \"\n\"triggers the bug. Make sure that all tests pass before you submit a patch.\"\nmsgstr \"\"\n\n#: ../../development.rst:83\nmsgid \"\"\n\"**One patch at a time:** Only fix one bug or add one feature at a time. \"\n\"Design your patches so that they can be applyed as a whole. Keep your \"\n\"patches clean, small and focused.\"\nmsgstr \"\"\n\n#: ../../development.rst:84\nmsgid \"\"\n\"**Sync with upstream:** If the ``upstream/master`` branch changed while you \"\n\"were working on your patch, rebase or pull to make sure that your patch \"\n\"still applies without conflicts.\"\nmsgstr \"\"\n\n#: ../../development.rst:88\nmsgid \"Building the Documentation\"\nmsgstr \"\"\n\n#: ../../development.rst:90\nmsgid \"\"\n\"You need a recent version of Sphinx to build the documentation. The \"\n\"recommended way is to install :command:`virtualenv` using your distribution \"\n\"package repository and install sphinx manually to get an up-to-date version.\"\nmsgstr \"\"\n\n#: ../../development.rst:121\nmsgid \"GIT Workflow Examples\"\nmsgstr \"\"\n\n#: ../../development.rst:123\nmsgid \"\"\n\"The following examples assume that you have an (free) `github account \"\n\"<https://github.com>`_. This is not mandatory, but makes things a lot \"\n\"easier.\"\nmsgstr \"\"\n\n#: ../../development.rst:125\nmsgid \"\"\n\"First of all you need to create a fork (a personal clone) of the official \"\n\"repository. To do this, you simply click the \\\"fork\\\" button on the `bottle \"\n\"project page <https://github.com/bottlepy/bottle>`_. When the fork is done, \"\n\"you will be presented with a short introduction to your new repository.\"\nmsgstr \"\"\n\n#: ../../development.rst:127\nmsgid \"\"\n\"The fork you just created is hosted at github and read-able by everyone, but\"\n\" write-able only by you. Now you need to clone the fork locally to actually \"\n\"make changes to it. Make sure you use the private (read-write) URL and *not*\"\n\" the public (read-only) one::\"\nmsgstr \"\"\n\n#: ../../development.rst:131\nmsgid \"\"\n\"Once the clone is complete your repository will have a remote named \"\n\"\\\"origin\\\" that points to your fork on github. Don’t let the name confuse \"\n\"you, this does not point to the original bottle repository, but to your own \"\n\"fork. To keep track of the official repository, add another remote named \"\n\"\\\"upstream\\\"::\"\nmsgstr \"\"\n\n#: ../../development.rst:137\nmsgid \"\"\n\"Note that \\\"upstream\\\" is a public clone URL, which is read-only. You cannot\"\n\" push changes directly to it. Instead, we will pull from your public \"\n\"repository. This is described later.\"\nmsgstr \"\"\n\n#: ../../development.rst:140\nmsgid \"Submit a Feature\"\nmsgstr \"\"\n\n#: ../../development.rst:141\nmsgid \"\"\n\"New features are developed in separate feature-branches to make integration \"\n\"easy. Because they are going to be integrated into the ``master`` branch, \"\n\"they must be based on ``upstream/master``. To create a new feature-branch, \"\n\"type the following::\"\nmsgstr \"\"\n\n#: ../../development.rst:145\nmsgid \"\"\n\"Now implement your feature, write tests, update the documentation, make sure\"\n\" that all tests pass and commit your changes::\"\nmsgstr \"\"\n\n#: ../../development.rst:149\nmsgid \"\"\n\"If the ``upstream/master`` branch changed in the meantime, there may be \"\n\"conflicts with your changes. To solve these, 'rebase' your feature-branch \"\n\"onto the top of the updated ``upstream/master`` branch::\"\nmsgstr \"\"\n\n#: ../../development.rst:154\nmsgid \"\"\n\"This is equivalent to undoing all your changes, updating your branch to the \"\n\"latest version and reapplying all your patches again. If you released your \"\n\"branch already (see next step), this is not an option because it rewrites \"\n\"your history. You can do a normal pull instead. Resolve any conflicts, run \"\n\"the tests again and commit.\"\nmsgstr \"\"\n\n#: ../../development.rst:156\nmsgid \"\"\n\"Now you are almost ready to send a pull request. But first you need to make \"\n\"your feature-branch public by pushing it to your github fork::\"\nmsgstr \"\"\n\n#: ../../development.rst:160\nmsgid \"\"\n\"After you’ve pushed your commit(s) you need to inform us about the new \"\n\"feature. One way is to send a pull-request using github. Another way would \"\n\"be to start a thread in the mailing-list, which is recommended. It allows \"\n\"other developers to see and discuss your patches and you get some feedback \"\n\"for free :)\"\nmsgstr \"\"\n\n#: ../../development.rst:162\nmsgid \"\"\n\"If we accept your patch, we will integrate it into the official development \"\n\"branch and make it part of the next release.\"\nmsgstr \"\"\n\n#: ../../development.rst:165\nmsgid \"Fix a Bug\"\nmsgstr \"\"\n\n#: ../../development.rst:166\nmsgid \"\"\n\"The workflow for bug-fixes is very similar to the one for features, but \"\n\"there are some differences:\"\nmsgstr \"\"\n\n#: ../../development.rst:168\nmsgid \"\"\n\"Branch off of the affected release branches instead of just the development \"\n\"branch.\"\nmsgstr \"\"\n\n#: ../../development.rst:169\nmsgid \"Write at least one test-case that triggers the bug.\"\nmsgstr \"\"\n\n#: ../../development.rst:170\nmsgid \"\"\n\"Do this for each affected branch including ``upstream/master`` if it is \"\n\"affected. ``git cherry-pick`` may help you reducing repetitive work.\"\nmsgstr \"\"\n\n#: ../../development.rst:171\nmsgid \"\"\n\"Name your branch after the release it is based on to avoid confusion. \"\n\"Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/faq.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../faq.rst:10\nmsgid \"Frequently Asked Questions\"\nmsgstr \"\"\n\n#: ../../faq.rst:13\nmsgid \"About Bottle\"\nmsgstr \"À propos de Bottle\"\n\n#: ../../faq.rst:16\nmsgid \"Is bottle suitable for complex applications?\"\nmsgstr \"\"\n\n#: ../../faq.rst:18\nmsgid \"\"\n\"Bottle is a *micro* framework designed for prototyping and building small \"\n\"web applications and services. It stays out of your way and allows you to \"\n\"get things done fast, but misses some advanced features and ready-to-use \"\n\"solutions found in other frameworks (MVC, ORM, form validation, scaffolding,\"\n\" XML-RPC). Although it *is* possible to add these features and build complex\"\n\" applications with Bottle, you should consider using a full-stack Web \"\n\"framework like pylons_ or paste_ instead.\"\nmsgstr \"\"\n\n#: ../../faq.rst:22\nmsgid \"Common Problems and Pitfalls\"\nmsgstr \"\"\n\n#: ../../faq.rst:29\nmsgid \"\\\"Template Not Found\\\" in mod_wsgi/mod_python\"\nmsgstr \"\"\n\n#: ../../faq.rst:31\nmsgid \"\"\n\"Bottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ \"\n\"or mod_wsgi_ environment, the working directory (``./``) depends on your \"\n\"Apache settings. You should add an absolute path to the template search \"\n\"path::\"\nmsgstr \"\"\n\n#: ../../faq.rst:35\nmsgid \"so bottle searches the right paths.\"\nmsgstr \"\"\n\n#: ../../faq.rst:38\nmsgid \"Dynamic Routes and Slashes\"\nmsgstr \"\"\n\n#: ../../faq.rst:40\nmsgid \"\"\n\"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder \"\n\"token (``<name>``) matches everything up to the next slash. This equals to \"\n\"``[^/]+`` in regular expression syntax. To accept slashes too, you have to \"\n\"add a custom regular pattern to the placeholder. An example: \"\n\"``/images/<filepath:path>`` would match ``/images/icons/error.png`` but \"\n\"``/images/<filename>`` won't.\"\nmsgstr \"\"\n\n#: ../../faq.rst:43\nmsgid \"Problems with reverse proxies\"\nmsgstr \"\"\n\n#: ../../faq.rst:45\nmsgid \"\"\n\"Redirects and url-building only works if bottle knows the public address and\"\n\" location of your application. If you run bottle locally behind a reverse \"\n\"proxy or load balancer, some information might get lost along the way. For \"\n\"example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect \"\n\"the local request by your proxy, not the real request by the client. Here is\"\n\" a small WSGI middleware snippet that helps to fix these values::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Ibrahim DERRAZ <ibrahim@derraz.fr>, 2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../index.rst:20\nmsgid \"Bottle: Python Web Framework\"\nmsgstr \"\"\n\n#: ../../index.rst:22\nmsgid \"\"\n\"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for \"\n\"Python_. It is distributed as a single file module and has no dependencies \"\n\"other than the `Python Standard Library <http://docs.python.org/library/>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:25\nmsgid \"\"\n\"**Routing:** Requests to function-call mapping with support for clean and  \"\n\"dynamic URLs.\"\nmsgstr \"\"\n\n#: ../../index.rst:26\nmsgid \"\"\n\"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-\"\n\"templates>` and support for mako_, jinja2_ and cheetah_ templates.\"\nmsgstr \"\"\n\n#: ../../index.rst:27\nmsgid \"\"\n\"**Utilities:** Convenient access to form data, file uploads, cookies, \"\n\"headers and other HTTP-related metadata.\"\nmsgstr \"\"\n\n#: ../../index.rst:28\nmsgid \"\"\n\"**Server:** Built-in HTTP development server and support for paste_, \"\n\"bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server.\"\nmsgstr \"\"\n\n#: ../../index.rst:31\nmsgid \"Example: \\\"Hello World\\\" in a bottle\"\nmsgstr \"Exemple: \\\"Hello World\\\" dans une bottle\"\n\n#: ../../index.rst:42\nmsgid \"\"\n\"Run this script or paste it into a Python console, then point your browser \"\n\"to `<http://localhost:8080/hello/world>`_. That's it.\"\nmsgstr \"Executez ce script ou coller le dans une console Python, puis rendez vous sur  `<http://localhost:8080/hello/world>`_ dans votre navigateur. Et voilà.\"\n\n#: ../../index.rst:45\nmsgid \"Download and Install\"\nmsgstr \"Téléchargement et installation\"\n\n#: ../../index.rst:48\nmsgid \"\"\n\"Install the latest stable release with ``pip install bottle`` or download \"\n\"`bottle.py`__ (unstable) into your project directory. There are no hard [1]_\"\n\" dependencies other than the Python standard library. Bottle supports \"\n\"**Python 2.7 and Python 3**.\"\nmsgstr \"\"\n\n#: ../../index.rst:50\nmsgid \"Support for Python 2.5 and 2.6 was dropped with this release.\"\nmsgstr \"\"\n\n#: ../../index.rst:55\nmsgid \"User's Guide\"\nmsgstr \"Guide de l'utilisateur\"\n\n#: ../../index.rst:56\nmsgid \"\"\n\"Start here if you want to learn how to use the bottle framework for web \"\n\"development. If you have any questions not answered here, feel free to ask \"\n\"the `mailing list <mailto:bottlepy@googlegroups.com>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:71\nmsgid \"Knowledge Base\"\nmsgstr \"\"\n\n#: ../../index.rst:72\nmsgid \"A collection of articles, guides and HOWTOs.\"\nmsgstr \"\"\n\n#: ../../index.rst:84\nmsgid \"Development and Contribution\"\nmsgstr \"\"\n\n#: ../../index.rst:86\nmsgid \"\"\n\"These chapters are intended for developers interested in the bottle \"\n\"development and release workflow.\"\nmsgstr \"\"\n\n#: ../../index.rst:103\nmsgid \"License\"\nmsgstr \"Licence\"\n\n#: ../../index.rst:105\nmsgid \"Code and documentation are available according to the MIT License:\"\nmsgstr \"Le code et la documentation sont disponibles conformément à la licence MIT:\"\n\n#: ../../index.rst:110\nmsgid \"\"\n\"The Bottle logo however is *NOT* covered by that license. It is allowed to \"\n\"use the logo as a link to the bottle homepage or in direct context with the \"\n\"unmodified library. In all other cases please ask first.\"\nmsgstr \"\"\n\n#: ../../index.rst:115\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../index.rst:116\nmsgid \"\"\n\"Usage of the template or server adapter classes requires the corresponding \"\n\"template or server modules.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/plugindev.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../plugindev.rst:6\nmsgid \"Plugin Development Guide\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:8\nmsgid \"\"\n\"This guide explains the plugin API and how to write custom plugins. I \"\n\"suggest reading :ref:`plugins` first if you have not done that already. You \"\n\"might also want to have a look at the :doc:`/plugins/index` for some \"\n\"practical examples.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:12\nmsgid \"\"\n\"This is a draft. If you see any errors or find that a specific part is not \"\n\"explained clear enough, please tell the `mailing-list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or file a `bug report \"\n\"<https://github.com/bottlepy/bottle/issues>`_.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:16\nmsgid \"How Plugins Work: The Basics\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:18\nmsgid \"\"\n\"The plugin API builds on the concept of `decorators \"\n\"<http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, \"\n\"a plugin is a decorator applied to every single route callback of an \"\n\"application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:20\nmsgid \"\"\n\"This is just a simplification. Plugins can do a lot more than just \"\n\"decorating route callbacks, but it is a good starting point. Lets have a \"\n\"look at some code::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:36\nmsgid \"\"\n\"This plugin measures the execution time for each request and adds an \"\n\"appropriate ``X-Exec-Time`` header to the response. As you can see, the \"\n\"plugin returns a wrapper and the wrapper calls the original callback \"\n\"recursively. This is how decorators usually work.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:38\nmsgid \"\"\n\"The last line tells Bottle to install the plugin to the default application.\"\n\" This causes the plugin to be automatically applied to all routes of that \"\n\"application. In other words, ``stopwatch()`` is called once for each route \"\n\"callback and the return value is used as a replacement for the original \"\n\"callback.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:40\nmsgid \"\"\n\"Plugins are applied on demand, that is, as soon as a route is requested for \"\n\"the first time. For this to work properly in multi-threaded environments, \"\n\"the plugin should be thread-safe. This is not a problem most of the time, \"\n\"but keep it in mind.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:42\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped callback is cached and \"\n\"subsequent requests are handled by the cached version directly. This means \"\n\"that a plugin is usually applied only once to a specific route. That cache, \"\n\"however, is cleared every time the list of installed plugins changes. Your \"\n\"plugin should be able to decorate the same route more than once.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:44\nmsgid \"\"\n\"The decorator API is quite limited, though. You don't know anything about \"\n\"the route being decorated or the associated application object and have no \"\n\"way to efficiently store data that is shared among all routes. But fear not!\"\n\" Plugins are not limited to just decorator functions. Bottle accepts \"\n\"anything as a plugin as long as it is callable or implements an extended \"\n\"API. This API is described below and gives you a lot of control over the \"\n\"whole process.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:48\nmsgid \"Plugin API\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:50\nmsgid \"\"\n\":class:`Plugin` is not a real class (you cannot import it from \"\n\":mod:`bottle`) but an interface that plugins are expected to implement. \"\n\"Bottle accepts any object of any type as a plugin, as long as it conforms to\"\n\" the following API.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:54\nmsgid \"\"\n\"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is \"\n\"defined, it is always preferred over calling the plugin directly. All other \"\n\"methods and attributes are optional.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:58\nmsgid \"\"\n\"Both :meth:`Bottle.uninstall` and the `skip` parameter of \"\n\":meth:`Bottle.route()` accept a name string to refer to a plugin or plugin \"\n\"type. This works only for plugins that have a name attribute.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:62\nmsgid \"\"\n\"The Plugin API is still evolving. This integer attribute tells bottle which \"\n\"version to use. If it is missing, bottle defaults to the first version. The \"\n\"current version is ``2``. See :ref:`plugin-changelog` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:66\nmsgid \"\"\n\"Called as soon as the plugin is installed to an application (see \"\n\":meth:`Bottle.install`). The only parameter is the associated application \"\n\"object.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:70\nmsgid \"\"\n\"As long as :meth:`apply` is not defined, the plugin itself is used as a \"\n\"decorator and applied directly to each route callback. The only parameter is\"\n\" the callback to decorate. Whatever is returned by this method replaces the \"\n\"original callback. If there is no need to wrap or replace a given callback, \"\n\"just return the unmodified callback parameter.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:74\nmsgid \"\"\n\"If defined, this method is used in favor of :meth:`__call__` to decorate \"\n\"route callbacks. The additional `route` parameter is an instance of \"\n\":class:`Route` and provides a lot of meta-information and context for that \"\n\"route. See :ref:`route-context` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:78\nmsgid \"\"\n\"Called immediately before the plugin is uninstalled or the application is \"\n\"closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:81\nmsgid \"\"\n\"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for \"\n\"plugins that are applied directly to a route via the :meth:`Bottle.route()` \"\n\"decorator, but only for plugins installed to an application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:87\nmsgid \"Plugin API changes\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:89\nmsgid \"\"\n\"The Plugin API is still evolving and changed with Bottle 0.10 to address \"\n\"certain issues with the route context dictionary. To ensure backwards \"\n\"compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` \"\n\"attribute to tell bottle which API to use. The API differences are \"\n\"summarized here.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:91\nmsgid \"**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:93\nmsgid \"Original Plugin API as described in the 0.9 docs.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:95\nmsgid \"**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:97\nmsgid \"\"\n\"The `context` parameter of the :meth:`Plugin.apply` method is now an \"\n\"instance of :class:`Route` instead of a context dictionary.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:103\nmsgid \"The Route Context\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:105\nmsgid \"\"\n\"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed\"\n\" informations about the associated route. The most important attributes are \"\n\"summarized here:\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"app\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"The application object this route is installed to.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"rule\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"The rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"method\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"name\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"plugins\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"\"\n\"A list of route-specific plugins. These are applied in addition to \"\n\"application-wide plugins. (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"skiplist\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"\"\n\"A list of plugins to not apply to this route (again, see \"\n\":meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"config\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific configuration and \"\n\"meta-data.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:125\nmsgid \"\"\n\"For your plugin, :attr:`Route.config` is probably the most important \"\n\"attribute. Keep in mind that this dictionary is local to the route, but \"\n\"shared between all plugins. It is always a good idea to add a unique prefix \"\n\"or, if your plugin needs a lot of configuration, store it in a separate \"\n\"namespace within the `config` dictionary. This helps to avoid naming \"\n\"collisions between plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:129\nmsgid \"Changing the :class:`Route` object\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:131\nmsgid \"\"\n\"While some :class:`Route` attributes are mutable, changes may have unwanted \"\n\"effects on other plugins. It is most likely a bad idea to monkey-patch a \"\n\"broken route instead of providing a helpful error message and let the user \"\n\"fix the problem.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:133\nmsgid \"\"\n\"In some rare cases, however, it might be justifiable to break this rule. \"\n\"After you made your changes to the :class:`Route` instance, raise \"\n\":exc:`RouteReset` as an exception. This removes the current route from the \"\n\"cache and causes all plugins to be re-applied. The router is not updated, \"\n\"however. Changes to `rule` or `method` values have no effect on the router, \"\n\"but only on plugins. This may change in the future, though.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:137\nmsgid \"Runtime optimizations\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:139\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped route callback is \"\n\"cached to speed up subsequent requests. If the behavior of your plugin \"\n\"depends on configuration, and you want to be able to change that \"\n\"configuration at runtime, you need to read the configuration on each \"\n\"request. Easy enough.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:141\nmsgid \"\"\n\"For performance reasons, however, it might be worthwhile to choose a \"\n\"different wrapper based on current needs, work with closures, or enable or \"\n\"disable a plugin at runtime. Let's take the built-in HooksPlugin as an \"\n\"example: If no hooks are installed, the plugin removes itself from all \"\n\"affected routes and has virtually no overhead. As soon as you install the \"\n\"first hook, the plugin activates itself and takes effect again.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:143\nmsgid \"\"\n\"To achieve this, you need control over the callback cache: \"\n\":meth:`Route.reset` clears the cache for a single route and \"\n\":meth:`Bottle.reset` clears all caches for all routes of an application at \"\n\"once. On the next request, all plugins are re-applied to the route as if it \"\n\"were requested for the first time.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:145\nmsgid \"\"\n\"Both methods won't affect the current request if called from within a route \"\n\"callback, of cause. To force a restart of the current request, raise \"\n\":exc:`RouteReset` as an exception.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:149\nmsgid \"Plugin Example: SQLitePlugin\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:151\nmsgid \"\"\n\"This plugin provides an sqlite3 database connection handle as an additional \"\n\"keyword argument to wrapped callbacks, but only if the callback expects it. \"\n\"If not, the route is ignored and no overhead is added. The wrapper does not \"\n\"affect the return value, but handles plugin-related exceptions properly. \"\n\":meth:`Plugin.setup` is used to inspect the application and search for \"\n\"conflicting plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:218\nmsgid \"\"\n\"This plugin is actually useful and very similar to the version bundled with \"\n\"Bottle. Not bad for less than 60 lines of code, don't you think? Here is a \"\n\"usage example::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:239\nmsgid \"\"\n\"The first route needs a database connection and tells the plugin to create a\"\n\" handle by requesting a ``db`` keyword argument. The second route does not \"\n\"need a database and is therefore ignored by the plugin. The third route does\"\n\" expect a 'db' keyword argument, but explicitly skips the sqlite plugin. \"\n\"This way the argument is not overruled by the plugin and still contains the \"\n\"value of the same-named url argument.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/plugins/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../plugins/index.rst:5\nmsgid \"List of available Plugins\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:7\nmsgid \"\"\n\"This is a list of third-party plugins that add extend Bottles core \"\n\"functionality or integrate other libraries with the Bottle framework.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:9\nmsgid \"\"\n\"Have a look at :ref:`plugins` for general questions about plugins \"\n\"(installation, usage). If you plan to develop a new plugin, the \"\n\":doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"Beaker to session and caching library with WSGI Middleware\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"`Bottle-Cork <http://cork.firelet.net/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"\"\n\"Cork provides a simple set of methods to implement Authentication and \"\n\"Authorization in web applications based on Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"`Bottle-Cors-plugin <http://pypi.org/project/bottle-cors-plugin/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"\"\n\"Cors-plugin is the easiest way to implement cors on your bottle web \"\n\"application\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"Meta package to install the bottle plugin collection.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"flash plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"FIFO Queue for Bottle built upon redis\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"`Macaron <http://nobrin.github.com/macaron/webapp.html>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"Macaron is an object-relational mapper (ORM) for SQLite.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"Memcache integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"MongoDB integration for Bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"`Bottle-OAuthlib <http://pypi.python.org/pypi/bottle-oauthlib/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"Adapter for oauthlib - create your own OAuth2.0 implementation\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"Redis integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"Renderer plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"A reusable app that serves static files for bottle apps\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"SQLAlchemy integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"SQLite3 database integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"Web2py Dal integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"\"\n\"Integrates the `werkzeug` library (alternative request and response objects,\"\n\" advanced debugging middleware and more).\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"\"\n\"`bottle-smart-filters <https://github.com/agile4you/bottle-smart-filters/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"Bottle Querystring smart guessing.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"`bottle-jwt <https://github.com/agile4you/bottle-jwt/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"JSON Web Token authentication plugin for bottle.py\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"`Bottle-jwt <https://github.com/agalera/bottlejwt>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"JWT integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"`canister <https://github.com/dagnelies/canister>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"a bottle wrapper to provide logging, sessions and authentication\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"`bottle-cerberus <https://github.com/agalera/bottle-cerberus>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"Cerberus integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"`Bottle-errorsrest <https://github.com/agalera/bottle-errorsrest>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"All errors generated from bottle are returned in json\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:82\nmsgid \"`Bottle-tools <https://github.com/theSage21/bottle-tools>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:81\nmsgid \"\"\n\"Decorators that auto-supply function arguments using POST/query string data.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:84\nmsgid \"\"\n\"Plugins listed here are not part of Bottle or the Bottle project, but \"\n\"developed and maintained by third parties.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/recipes.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../recipes.rst:16\nmsgid \"Recipes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:18\nmsgid \"\"\n\"This is a collection of code snippets and examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:21\nmsgid \"Keeping track of Sessions\"\nmsgstr \"\"\n\n#: ../../recipes.rst:23\nmsgid \"\"\n\"There is no built-in support for sessions because there is no *right* way to\"\n\" do it (in a micro framework). Depending on requirements and environment you\"\n\" could use beaker_ middleware with a fitting backend or implement it \"\n\"yourself. Here is an example for beaker sessions with a file-based backend::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:45\nmsgid \"\"\n\"WARNING: Beaker's SessionMiddleware is not thread safe.  If two concurrent \"\n\"requests modify the same session at the same time, one of the updates might \"\n\"get lost. For this reason, sessions should only be populated once and \"\n\"treated as a read-only store after that. If you find yourself updating \"\n\"sessions regularly, and don't want to risk losing any updates, think about \"\n\"using a real database instead or seek alternative session middleware \"\n\"libraries.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:49\nmsgid \"Debugging with Style: Debugging Middleware\"\nmsgstr \"\"\n\n#: ../../recipes.rst:51\nmsgid \"\"\n\"Bottle catches all Exceptions raised in your app code to prevent your WSGI \"\n\"server from crashing. If the built-in :func:`debug` mode is not enough and \"\n\"you need exceptions to propagate to a debugging middleware, you can turn off\"\n\" this behaviour::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:59\nmsgid \"\"\n\"Now, bottle only catches its own exceptions (:exc:`HTTPError`, \"\n\":exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can \"\n\"handle the rest.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:61\nmsgid \"\"\n\"The werkzeug_ and paste_ libraries both ship with very powerful debugging \"\n\"WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for \"\n\"werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for \"\n\"paste_. They both allow you do inspect the stack and even execute python \"\n\"code within the stack context, so **do not use them in production**.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:65\nmsgid \"Unit-Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:67\nmsgid \"\"\n\"Unit-testing is usually performed against methods defined in your web \"\n\"application without running a WSGI environment.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:69\nmsgid \"A simple example using `Nose <http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:80 ../../recipes.rst:97\nmsgid \"Test script::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:87\nmsgid \"\"\n\"In the example the Bottle route() method is never executed - only index() is\"\n\" tested.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:89\nmsgid \"\"\n\"If the code being tested requires access to ``bottle.request`` you can mock \"\n\"it using `Boddle <https://github.com/keredson/boddle>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:108\nmsgid \"Functional Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:110\nmsgid \"\"\n\"Any HTTP-based testing system can be used with a running WSGI server, but \"\n\"some testing frameworks work more intimately with WSGI, and provide the \"\n\"ability the call WSGI applications in a controlled environment, with \"\n\"tracebacks and full use of debugging tools. `Testing tools for WSGI \"\n\"<http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:112\nmsgid \"\"\n\"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose \"\n\"<http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:132\nmsgid \"Embedding other WSGI Apps\"\nmsgstr \"\"\n\n#: ../../recipes.rst:134\nmsgid \"\"\n\"This is not the recommend way (you should use a middleware in front of \"\n\"bottle to do this) but you can call other WSGI applications from within your\"\n\" bottle app and let bottle act as a pseudo-middleware. Here is an example::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:150\nmsgid \"\"\n\"Again, this is not the recommend way to implement subprojects. It is only \"\n\"here because many people asked for this and to show how bottle maps to WSGI.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:154\nmsgid \"Ignore trailing slashes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:156\nmsgid \"\"\n\"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To\"\n\" treat both URLs the same you can add two ``@route`` decorators::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:162\nmsgid \"add a WSGI middleware that strips trailing slashes from all URLs::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:175\nmsgid \"or add a ``before_request`` hook to strip the trailing slashes::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:182\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:183\nmsgid \"Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>\"\nmsgstr \"\"\n\n#: ../../recipes.rst:187\nmsgid \"Keep-alive requests\"\nmsgstr \"\"\n\n#: ../../recipes.rst:191\nmsgid \"For a more detailed explanation, see :doc:`async`.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:193\nmsgid \"\"\n\"Several \\\"push\\\" mechanisms like XHR multipart need the ability to write \"\n\"response data without closing the connection in conjunction with the \"\n\"response header \\\"Connection: keep-alive\\\". WSGI does not easily lend itself\"\n\" to this behavior, but it is still possible to do so in Bottle by using the \"\n\"gevent_ async framework. Here is a sample that works with either the gevent_\"\n\" HTTP server or the paste_ HTTP server (it may work with others, but I have \"\n\"not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the\"\n\" paste_ server::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:210\nmsgid \"\"\n\"If you browse to ``http://localhost:8080/stream``, you should see 'START', \"\n\"'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to \"\n\"see them all at once).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:213\nmsgid \"Gzip Compression in Bottle\"\nmsgstr \"\"\n\n#: ../../recipes.rst:216\nmsgid \"For a detailed discussion, see compression_\"\nmsgstr \"\"\n\n#: ../../recipes.rst:218\nmsgid \"\"\n\"A common feature request is for Bottle to support Gzip compression, which \"\n\"speeds up sites by compressing static resources (like CSS and JS files) \"\n\"during a request.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:220\nmsgid \"\"\n\"Supporting Gzip compression is not a straightforward proposition, due to a \"\n\"number of corner cases that crop up frequently. A proper Gzip implementation\"\n\" must:\"\nmsgstr \"\"\n\n#: ../../recipes.rst:222\nmsgid \"Compress on the fly and be fast doing so.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:223\nmsgid \"Do not compress for browsers that don't support it.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:224\nmsgid \"Do not compress files that are compressed already (images, videos).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:225\nmsgid \"Do not compress dynamic files.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:226\nmsgid \"Support two differed compression algorithms (gzip and deflate).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:227\nmsgid \"Cache compressed files that don't change often.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:228\nmsgid \"De-validate the cache if one of the files changed anyway.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:229\nmsgid \"Make sure the cache does not get to big.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:230\nmsgid \"\"\n\"Do not cache small files because a disk seek would take longer than on-the-\"\n\"fly compression.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:232\nmsgid \"\"\n\"Because of these requirements, it is the recommendation of the Bottle \"\n\"project that Gzip compression is best handled by the WSGI server Bottle runs\"\n\" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware \"\n\"that can be used to accomplish this.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:236\nmsgid \"Using the hooks plugin\"\nmsgstr \"\"\n\n#: ../../recipes.rst:238\nmsgid \"\"\n\"For example, if you want to allow Cross-Origin Resource Sharing for the \"\n\"content returned by all of your URL, you can use the hook decorator and \"\n\"setup a callback function::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:256\nmsgid \"\"\n\"You can also use the ``before_request`` to take an action before every \"\n\"function gets called.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:261\nmsgid \"Using Bottle with Heroku\"\nmsgstr \"\"\n\n#: ../../recipes.rst:263\nmsgid \"\"\n\"Heroku_, a popular cloud application platform now provides support for \"\n\"running Python applications on their infastructure.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:266\nmsgid \"\"\n\"This recipe is based upon the `Heroku Quickstart \"\n\"<http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific \"\n\"code replacing the `Write Your App \"\n\"<http://devcenter.heroku.com/articles/python#write_your_app>`_ section of \"\n\"the `Getting Started with Python on Heroku/Cedar \"\n\"<http://devcenter.heroku.com/articles/python>`_ guide::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:282\nmsgid \"\"\n\"Heroku's app stack passes the port that the application needs to listen on \"\n\"for requests, using the `os.environ` dictionary.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/routing.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../routing.rst:3\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../routing.rst:5\nmsgid \"\"\n\"Bottle uses a powerful routing engine to find the right callback for each \"\n\"request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This \"\n\"document covers advanced techniques and rule mechanics in detail.\"\nmsgstr \"\"\n\n#: ../../routing.rst:8\nmsgid \"Rule Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:10\nmsgid \"\"\n\"The :class:`Router` distinguishes between two basic types of routes: \"\n\"**static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. \"\n\"``/hello/<name>``). A route that contains one or more *wildcards* it is \"\n\"considered dynamic. All other routes are static.\"\nmsgstr \"\"\n\n#: ../../routing.rst:14\nmsgid \"\"\n\"The simplest form of a wildcard consists of a name enclosed in angle \"\n\"brackets (e.g. ``<name>``). The name should be unique for a given route and \"\n\"form a valid python identifier (alphanumeric, starting with a letter). This \"\n\"is because wildcards are used as keyword arguments for the request callback \"\n\"later.\"\nmsgstr \"\"\n\n#: ../../routing.rst:16\nmsgid \"\"\n\"Each wildcard matches one or more characters, but stops at the first slash \"\n\"(``/``). This equals a regular expression of ``[^/]+`` and ensures that only\"\n\" one path segment is matched and routes with more than one wildcard stay \"\n\"unambiguous.\"\nmsgstr \"\"\n\n#: ../../routing.rst:18\nmsgid \"The rule ``/<action>/<item>`` matches as follows:\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Path\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Result\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"/save/123\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"``{'action': 'save', 'item': '123'}``\"\nmsgstr \"\"\n\n#: ../../routing.rst:24\nmsgid \"/save/123/\"\nmsgstr \"\"\n\n#: ../../routing.rst:24 ../../routing.rst:25 ../../routing.rst:26\nmsgid \"`No Match`\"\nmsgstr \"\"\n\n#: ../../routing.rst:25\nmsgid \"/save/\"\nmsgstr \"\"\n\n#: ../../routing.rst:26\nmsgid \"//123\"\nmsgstr \"\"\n\n#: ../../routing.rst:29\nmsgid \"\"\n\"Is it possible to escape characters like colon ``:`` with a backslash \"\n\"``\\\\``. This will prevent to trigger the old syntax in case you need to use \"\n\"``:``. For example: the rule ``/<action>/item:<id>`` triggers the old \"\n\"syntax, (see below) but ``/action/item\\\\:<id>`` works as intended with the \"\n\"new syntax.\"\nmsgstr \"\"\n\n#: ../../routing.rst:33\nmsgid \"\"\n\"You can change the exact behaviour in many ways using filters. This is \"\n\"described in the next section.\"\nmsgstr \"\"\n\n#: ../../routing.rst:36\nmsgid \"Wildcard Filters\"\nmsgstr \"\"\n\n#: ../../routing.rst:40\nmsgid \"\"\n\"Filters are used to define more specific wildcards, and/or transform the \"\n\"matched part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../routing.rst:42\nmsgid \"The following standard filters are implemented:\"\nmsgstr \"\"\n\n#: ../../routing.rst:44\nmsgid \"**:int** matches (signed) digits and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../routing.rst:45\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../routing.rst:46\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and may be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../routing.rst:47\nmsgid \"\"\n\"**:re[:exp]** allows you to specify a custom regular expression in the \"\n\"config field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../routing.rst:49\nmsgid \"\"\n\"You can add your own filters to the router. All you need is a function that \"\n\"returns three elements: A regular expression string, a callable to convert \"\n\"the URL fragment to a python value, and a callable that does the opposite. \"\n\"The filter function is called with the configuration string as the only \"\n\"parameter and may parse it as needed::\"\nmsgstr \"\"\n\n#: ../../routing.rst:75\nmsgid \"Legacy Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:79\nmsgid \"\"\n\"The new rule syntax was introduce in **Bottle 0.10** to simplify some common\"\n\" use cases, but the old syntax still works and you can find lot code \"\n\"examples still using it. The differences are best described by example:\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"Old Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"New Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:90\nmsgid \"\"\n\"Try to avoid the old syntax in future projects if you can. It is not \"\n\"currently deprecated, but will be eventually.\"\nmsgstr \"\"\n\n#: ../../routing.rst:95\nmsgid \"Explicit routing configuration\"\nmsgstr \"\"\n\n#: ../../routing.rst:97\nmsgid \"\"\n\"Route decorator can also be directly called as method. This way provides \"\n\"flexibility in complex setups, allowing you to directly control, when and \"\n\"how routing configuration done.\"\nmsgstr \"\"\n\n#: ../../routing.rst:99\nmsgid \"\"\n\"Here is a basic example of explicit routing configuration for default bottle\"\n\" application::\"\nmsgstr \"\"\n\n#: ../../routing.rst:105\nmsgid \"\"\n\"In fact, any :class:`Bottle` instance routing can be configured same way::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/stpl.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../stpl.rst:3\nmsgid \"SimpleTemplate Engine\"\nmsgstr \"\"\n\n#: ../../stpl.rst:7\nmsgid \"\"\n\"Bottle comes with a fast, powerful and easy to learn built-in template \"\n\"engine called *SimpleTemplate* or *stpl* for short. It is the default engine\"\n\" used by the :func:`view` and :func:`template` helpers but can be used as a \"\n\"stand-alone general purpose template engine too. This document explains the \"\n\"template syntax and shows examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:10\nmsgid \"Basic API Usage:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:11\nmsgid \":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:18\nmsgid \"\"\n\"In this document we use the :func:`template` helper in examples for the sake\"\n\" of simplicity::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:24\nmsgid \"\"\n\"You can also pass a dictionary into the template using keyword arguments::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:31\nmsgid \"\"\n\"Just keep in mind that compiling and rendering templates are two different \"\n\"actions, even if the :func:`template` helper hides this fact. Templates are \"\n\"usually compiled only once and cached internally, but rendered many times \"\n\"with different keyword arguments.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:34\nmsgid \":class:`SimpleTemplate` Syntax\"\nmsgstr \"\"\n\n#: ../../stpl.rst:36\nmsgid \"\"\n\"Python is a very powerful language but its whitespace-aware syntax makes it \"\n\"difficult to use as a template language. SimpleTemplate removes some of \"\n\"these restrictions and allows you to write clean, readable and maintainable \"\n\"templates while preserving full access to the features, libraries and speed \"\n\"of the Python language.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:40\nmsgid \"\"\n\"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and \"\n\"is executed on each :meth:`SimpleTemplate.render` call. Do not render \"\n\"untrusted templates! They may contain and execute harmful python code.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:43\nmsgid \"Inline Expressions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:45\nmsgid \"\"\n\"You already learned the use of the ``{{...}}`` syntax from the \\\"Hello \"\n\"World!\\\" example above, but there is more: any python expression is allowed \"\n\"within the curly brackets as long as it evaluates to a string or something \"\n\"that has a string representation::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:54\nmsgid \"\"\n\"The contained python expression is executed at render-time and has access to\"\n\" all keyword arguments passed to the :meth:`SimpleTemplate.render` method. \"\n\"HTML special characters are escaped automatically to prevent `XSS \"\n\"<http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start\"\n\" the expression with an exclamation mark to disable escaping for that \"\n\"expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:62\nmsgid \"Embedded python code\"\nmsgstr \"\"\n\n#: ../../stpl.rst:66\nmsgid \"\"\n\"The template engine allows you to embed lines or blocks of python code \"\n\"within your template. Code lines start with ``%`` and code blocks are \"\n\"surrounded by ``<%`` and ``%>`` tokens::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:76\nmsgid \"\"\n\"Embedded python code follows regular python syntax, but with two additional \"\n\"syntax rules:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:78\nmsgid \"\"\n\"**Indentation is ignored.** You can put as much whitespace in front of \"\n\"statements as you want. This allows you to align your code with the \"\n\"surrounding markup and can greatly improve readability.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:79\nmsgid \"\"\n\"Blocks that are normally indented now have to be closed explicitly with an \"\n\"``end`` keyword.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:89\nmsgid \"\"\n\"Both the ``%`` and the ``<%`` tokens are only recognized if they are the \"\n\"first non-whitespace characters in a line. You don't have to escape them if \"\n\"they appear mid-text in your template markup. Only if a line of text starts \"\n\"with one of these tokens, you have to escape it with a backslash. In the \"\n\"rare case where the backslash + token combination appears in your markup at \"\n\"the beginning of a line, you can always help yourself with a string literal \"\n\"in an inline expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:96\nmsgid \"\"\n\"If you find yourself needing to escape a lot, consider using :ref:`custom \"\n\"tokens <stpl-custom-tokens>`.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:98\nmsgid \"\"\n\"Note that ``%`` and ``<% %>`` work in *exactly* the same way. The latter is \"\n\"only a convenient way to type less and avoid clutter for longer code \"\n\"segments. This means that in ``<% %>`` blocks, all indented code must be \"\n\"terminated with an ``end``, as in the following example::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:114\nmsgid \"Whitespace Control\"\nmsgstr \"\"\n\n#: ../../stpl.rst:116\nmsgid \"\"\n\"Code blocks and code lines always span the whole line. Whitespace in front \"\n\"of after a code segment is stripped away. You won't see empty lines or \"\n\"dangling whitespace in your template because of embedded code::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:124\nmsgid \"This snippet renders to clean and compact html::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:130\nmsgid \"\"\n\"But embedding code still requires you to start a new line, which may not \"\n\"what you want to see in your rendered template. To skip the newline in front\"\n\" of a code segment, end the text line with a double-backslash::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:138\nmsgid \"This time the rendered template looks like this::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:142\nmsgid \"\"\n\"This only works directly in front of code segments. In all other places you \"\n\"can control the whitespace yourself and don't need any special syntax.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:145\nmsgid \"Template Functions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:147\nmsgid \"\"\n\"Each template is preloaded with a bunch of functions that help with the most\"\n\" common use cases. These functions are always available. You don't have to \"\n\"import or provide them yourself. For everything not covered here there are \"\n\"probably good python libraries available. Remember that you can ``import`` \"\n\"anything you want within your templates. They are python programs after all.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:151\nmsgid \"\"\n\"Prior to this release, :func:`include` and :func:`rebase` were syntax \"\n\"keywords, not functions.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:156\nmsgid \"\"\n\"Render a sub-template with the specified variables and insert the resulting \"\n\"text into the current template. The function returns a dictionary containing\"\n\" the local variables passed to or defined within the sub-template::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:164\nmsgid \"\"\n\"Mark the current template to be later included into a different template. \"\n\"After the current template is rendered, its resulting text is stored in a \"\n\"variable named ``base`` and passed to the base-template, which is then \"\n\"rendered. This can be used to `wrap` a template with surrounding text, or \"\n\"simulate the inheritance feature found in other template engines::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:169\nmsgid \"This can be combined with the following ``base.tpl``::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:181\nmsgid \"\"\n\"Accessing undefined variables in a template raises :exc:`NameError` and \"\n\"stops rendering immediately. This is standard python behavior and nothing \"\n\"new, but vanilla python lacks an easy way to check the availability of a \"\n\"variable. This quickly gets annoying if you want to support flexible inputs \"\n\"or use the same template in different situations. These functions may help:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:189\nmsgid \"\"\n\"Return True if the variable is defined in the current template namespace, \"\n\"False otherwise.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:194\nmsgid \"Return the variable, or a default value.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:198\nmsgid \"\"\n\"If the variable is not defined, create it with the given default value. \"\n\"Return the variable.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:201\nmsgid \"\"\n\"Here is an example that uses all three functions to implement optional \"\n\"template variables in different ways::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:215\nmsgid \":class:`SimpleTemplate` API\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.render:1\nmsgid \"Render the template using keyword arguments as local variables.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/tutorial.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../tutorial.rst:24\nmsgid \"Tutorial\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:26\nmsgid \"\"\n\"This tutorial introduces you to the concepts and features of the Bottle web \"\n\"framework and covers basic and advanced topics alike. You can read it from \"\n\"start to end, or use it as a reference later on. The automatically generated\"\n\" :doc:`api` may be interesting for you, too. It covers more details, but \"\n\"explains less than this tutorial. Solutions for the most common questions \"\n\"can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If \"\n\"you need any help, join our `mailing list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:31\nmsgid \"Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:33\nmsgid \"\"\n\"Bottle does not depend on any external libraries. You can just download \"\n\"`bottle.py </bottle.py>`_ into your project directory and start coding:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:39\nmsgid \"\"\n\"This will get you the latest development snapshot that includes all the new \"\n\"features. If you prefer a more stable environment, you should stick with the\"\n\" stable releases. These are available on `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_ and can be installed via \"\n\":command:`pip` (recommended), :command:`easy_install` or your package \"\n\"manager:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:47\nmsgid \"\"\n\"Either way, you'll need Python 2.7 or newer (including 3.4+) to run bottle \"\n\"applications. If you do not have permissions to install packages system-wide\"\n\" or simply don't want to, create a `virtualenv \"\n\"<http://pypi.python.org/pypi/virtualenv>`_ first:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:55\nmsgid \"Or, if virtualenv is not installed on your system:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:67\nmsgid \"Quickstart: \\\"Hello World\\\"\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:69\nmsgid \"\"\n\"This tutorial assumes you have Bottle either :ref:`installed <installation>`\"\n\" or copied into your project directory. Let's start with a very basic \"\n\"\\\"Hello World\\\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:79\nmsgid \"\"\n\"This is it. Run this script, visit http://localhost:8080/hello and you will \"\n\"see \\\"Hello World!\\\" in your browser. Here is how it works:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:81\nmsgid \"\"\n\"The :func:`route` decorator binds a piece of code to an URL path. In this \"\n\"case, we link the ``/hello`` path to the ``hello()`` function. This is \"\n\"called a `route` (hence the decorator name) and is the most important \"\n\"concept of this framework. You can define as many routes as you want. \"\n\"Whenever a browser requests a URL, the associated function is called and the\"\n\" return value is sent back to the browser. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:83\nmsgid \"\"\n\"The :func:`run` call in the last line starts a built-in development server. \"\n\"It runs on ``localhost`` port ``8080`` and serves requests until you hit \"\n\":kbd:`Control-c`. You can switch the server backend later, but for now a \"\n\"development server is all we need. It requires no setup at all and is an \"\n\"incredibly painless way to get your application up and running for local \"\n\"tests.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:85\nmsgid \"\"\n\"The :ref:`tutorial-debugging` is very helpful during early development, but \"\n\"should be switched off for public applications. Keep that in mind.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:87\nmsgid \"\"\n\"This is just a demonstration of the basic concept of how applications are \"\n\"built with Bottle. Continue reading and you'll see what else is possible.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:92\nmsgid \"The Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:94\nmsgid \"\"\n\"For the sake of simplicity, most examples in this tutorial use a module-\"\n\"level :func:`route` decorator to define routes. This adds routes to a global\"\n\" \\\"default application\\\", an instance of :class:`Bottle` that is \"\n\"automatically created the first time you call :func:`route`. Several other \"\n\"module-level decorators and functions relate to this default application, \"\n\"but if you prefer a more object oriented approach and don't mind the extra \"\n\"typing, you can create a separate application object and use that instead of\"\n\" the global one::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:106\nmsgid \"\"\n\"The object-oriented approach is further described in the :ref:`default-app` \"\n\"section. Just keep in mind that you have a choice.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:114\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:116\nmsgid \"\"\n\"In the last chapter we built a very simple web application with only a \"\n\"single route. Here is the routing part of the \\\"Hello World\\\" example \"\n\"again::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:122\nmsgid \"\"\n\"The :func:`route` decorator links an URL path to a callback function, and \"\n\"adds a new route to the :ref:`default application <tutorial-default>`. An \"\n\"application with just one route is kind of boring, though. Let's add some \"\n\"more (don't forget ``from bottle import template``)::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:129\nmsgid \"\"\n\"This example demonstrates two things: You can bind more than one route to a \"\n\"single callback, and you can add wildcards to URLs and access them via \"\n\"keyword arguments.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:136\nmsgid \"Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:138\nmsgid \"\"\n\"Routes that contain wildcards are called `dynamic routes` (as opposed to \"\n\"`static routes`) and match more than one URL at the same time. A simple \"\n\"wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and\"\n\" accepts one or more characters up to the next slash (``/``). For example, \"\n\"the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as\"\n\" ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:140\nmsgid \"\"\n\"Each wildcard passes the covered part of the URL as a keyword argument to \"\n\"the request callback. You can use them right away and implement RESTful, \"\n\"nice-looking and meaningful URLs with ease. Here are some other examples \"\n\"along with the URLs they'd match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:150\nmsgid \"\"\n\"Filters can be used to define more specific wildcards, and/or transform the \"\n\"covered part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:152\nmsgid \"\"\n\"The following filters are implemented by default and more may be added:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:154\nmsgid \"\"\n\"**:int** matches (signed) digits only and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:155\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:156\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and can be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:157\nmsgid \"\"\n\"**:re** allows you to specify a custom regular expression in the config \"\n\"field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:159\nmsgid \"Let's have a look at some practical examples::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:173\nmsgid \"You can add your own filters as well. See :doc:`routing` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:177\nmsgid \"HTTP Request Methods\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:181\nmsgid \"\"\n\"The HTTP protocol defines several `request methods`__ (sometimes referred to\"\n\" as \\\"verbs\\\") for different tasks. GET is the default for all routes with \"\n\"no other method specified. These routes will match GET requests only. To \"\n\"handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` \"\n\"keyword argument to the :func:`route` decorator or use one of the five \"\n\"alternative decorators: :func:`get`, :func:`post`, :func:`put`, \"\n\":func:`delete` or :func:`patch`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:183\nmsgid \"\"\n\"The POST method is commonly used for HTML form submission. This example \"\n\"shows how to handle a login form using POST::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:206\nmsgid \"\"\n\"In this example the ``/login`` URL is linked to two distinct callbacks, one \"\n\"for GET requests and another for POST requests. The first one displays a \"\n\"HTML form to the user. The second callback is invoked on a form submission \"\n\"and checks the login credentials the user entered into the form. The use of \"\n\":attr:`Request.forms` is further described in the :ref:`tutorial-request` \"\n\"section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:209\nmsgid \"Special Methods: HEAD and ANY\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:210\nmsgid \"\"\n\"The HEAD method is used to ask for the response identical to the one that \"\n\"would correspond to a GET request, but without the response body. This is \"\n\"useful for retrieving meta-information about a resource without having to \"\n\"download the entire document. Bottle handles these requests automatically by\"\n\" falling back to the corresponding GET route and cutting off the request \"\n\"body, if present. You don't have to specify any HEAD routes yourself.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:212\nmsgid \"\"\n\"Additionally, the non-standard ANY method works as a low priority fallback: \"\n\"Routes that listen to ANY will match requests regardless of their HTTP \"\n\"method but only if no other more specific route is defined. This is helpful \"\n\"for *proxy-routes* that redirect requests to more specific sub-applications.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:214\nmsgid \"\"\n\"To sum it up: HEAD requests fall back to GET routes and all requests fall \"\n\"back to ANY routes, but only if there is no matching route for the original \"\n\"request method. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:219\nmsgid \"Routing Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:221\nmsgid \"\"\n\"Static files such as images or CSS files are not served automatically. You \"\n\"have to add a route and a callback to control which files get served and \"\n\"where to find them::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:228\nmsgid \"\"\n\"The :func:`static_file` function is a helper to serve files in a safe and \"\n\"convenient way (see :ref:`tutorial-static-files`). This example is limited \"\n\"to files directly within the ``/path/to/your/static/files`` directory \"\n\"because the ``<filename>`` wildcard won't match a path with a slash in it. \"\n\"To serve files in subdirectories, change the wildcard to use the `path` \"\n\"filter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:234\nmsgid \"\"\n\"Be careful when specifying a relative root-path such as \"\n\"``root='./static/files'``. The working directory (``./``) and the project \"\n\"directory are not always the same.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:242\nmsgid \"Error Pages\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:244\nmsgid \"\"\n\"If anything goes wrong, Bottle displays an informative but fairly plain \"\n\"error page. You can override the default for a specific HTTP status code \"\n\"with the :func:`error` decorator::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:251\nmsgid \"\"\n\"From now on, `404 File not Found` errors will display a custom error page to\"\n\" the user. The only parameter passed to the error-handler is an instance of \"\n\":exc:`HTTPError`. Apart from that, an error-handler is quite similar to a \"\n\"regular request callback. You can read from :data:`request`, write to \"\n\":data:`response` and return any supported data-type except for \"\n\":exc:`HTTPError` instances.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:253\nmsgid \"\"\n\"Error handlers are used only if your application returns or raises an \"\n\":exc:`HTTPError` exception (:func:`abort` does just that). Changing \"\n\":attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the \"\n\"error handler.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:263\nmsgid \"Generating content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:265\nmsgid \"\"\n\"In pure WSGI, the range of types you may return from your application is \"\n\"very limited. Applications must return an iterable yielding byte strings. \"\n\"You may return a string (because strings are iterable) but this causes most \"\n\"servers to transmit your content char by char. Unicode strings are not \"\n\"allowed at all. This is not very practical.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:267\nmsgid \"\"\n\"Bottle is much more flexible and supports a wide range of types. It even \"\n\"adds a ``Content-Length`` header if possible and encodes unicode \"\n\"automatically, so you don't have to. What follows is a list of data types \"\n\"you may return from your application callbacks and a short description of \"\n\"how these are handled by the framework:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"Dictionaries\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"\"\n\"As mentioned above, Python dictionaries (or subclasses thereof) are \"\n\"automatically transformed into JSON strings and returned to the browser with\"\n\" the ``Content-Type`` header set to ``application/json``. This makes it easy\"\n\" to implement json-based APIs. Data formats other than json are supported \"\n\"too. See the :ref:`tutorial-output-filter` to learn more.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"Empty Strings, ``False``, ``None`` or other non-true values:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"\"\n\"These produce an empty output with the ``Content-Length`` header set to 0.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"Unicode strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"\"\n\"Unicode strings (or iterables yielding unicode strings) are automatically \"\n\"encoded with the codec specified in the ``Content-Type`` header (utf8 by \"\n\"default) and then treated as normal byte strings (see below).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"Byte strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"\"\n\"Bottle returns strings as a whole (instead of iterating over each char) and \"\n\"adds a ``Content-Length`` header based on the string length. Lists of byte \"\n\"strings are joined first. Other iterables yielding byte strings are not \"\n\"joined because they may grow too big to fit into memory. The ``Content-\"\n\"Length`` header is not set in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"Instances of :exc:`HTTPError` or :exc:`HTTPResponse`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"\"\n\"Returning these has the same effect as when raising them as an exception. In\"\n\" case of an :exc:`HTTPError`, the error handler is applied. See :ref\"\n\":`tutorial-errorhandling` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"File objects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"\"\n\"Everything that has a ``.read()`` method is treated as a file or file-like \"\n\"object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI \"\n\"server framework. Some WSGI server implementations can make use of optimized\"\n\" system calls (sendfile) to transmit files more efficiently. In other cases \"\n\"this just iterates over chunks that fit into memory. Optional headers such \"\n\"as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use \"\n\":func:`send_file` if possible. See :ref:`tutorial-static-files` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"Iterables and generators\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"\"\n\"You are allowed to use ``yield`` within your callbacks or return an \"\n\"iterable, as long as the iterable yields byte strings, unicode strings, \"\n\":exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not \"\n\"supported, sorry. Please note that the HTTP status code and the headers are \"\n\"sent to the browser as soon as the iterable yields its first non-empty \"\n\"value. Changing these later has no effect.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:290\nmsgid \"\"\n\"The ordering of this list is significant. You may for example return a \"\n\"subclass of :class:`str` with a ``read()`` method. It is still treated as a \"\n\"string instead of a file, because strings are handled first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:293\nmsgid \"Changing the Default Encoding\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:294\nmsgid \"\"\n\"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide\"\n\" how to encode unicode strings. This header defaults to ``text/html; \"\n\"charset=UTF8`` and can be changed using the :attr:`Response.content_type` \"\n\"attribute or by setting the :attr:`Response.charset` attribute directly. \"\n\"(The :class:`Response` object is described in the section :ref:`tutorial-\"\n\"response`.)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:309\nmsgid \"\"\n\"In some rare cases the Python encoding names differ from the names supported\"\n\" by the HTTP specification. Then, you have to do both: first set the \"\n\":attr:`Response.content_type` header (which is sent to the client unchanged)\"\n\" and then set the :attr:`Response.charset` attribute (which is used to \"\n\"encode unicode).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:314\nmsgid \"Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:316\nmsgid \"\"\n\"You can directly return file objects, but :func:`static_file` is the \"\n\"recommended way to serve static files. It automatically guesses a mime-type,\"\n\" adds a ``Last-Modified`` header, restricts paths to a ``root`` directory \"\n\"for security reasons and generates appropriate error responses (403 on \"\n\"permission errors, 404 on missing files). It even supports the ``If-\"\n\"Modified-Since`` header and eventually generates a ``304 Not Modified`` \"\n\"response. You can pass a custom MIME type to disable guessing.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:329\nmsgid \"\"\n\"You can raise the return value of :func:`static_file` as an exception if you\"\n\" really need to.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:332\nmsgid \"Forced Download\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:333\nmsgid \"\"\n\"Most browsers try to open downloaded files if the MIME type is known and \"\n\"assigned to an application (e.g. PDF files). If this is not what you want, \"\n\"you can force a download dialog and even suggest a filename to the user::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:339\nmsgid \"\"\n\"If the ``download`` parameter is just ``True``, the original filename is \"\n\"used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:344\nmsgid \"HTTP Errors and Redirects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:346\nmsgid \"\"\n\"The :func:`abort` function is a shortcut for generating HTTP error pages.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:355\nmsgid \"\"\n\"To redirect a client to a different URL, you can send a ``303 See Other`` \"\n\"response with the ``Location`` header set to the new URL. :func:`redirect` \"\n\"does that for you::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:362\nmsgid \"You may provide a different HTTP status code as a second parameter.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:365\nmsgid \"\"\n\"Both functions will interrupt your callback code by raising an \"\n\":exc:`HTTPResponse` exception.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:368\nmsgid \"Other Exceptions\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:369\nmsgid \"\"\n\"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will \"\n\"result in a ``500 Internal Server Error`` response, so they won't crash your\"\n\" WSGI server. You can turn off this behavior to handle exceptions in your \"\n\"middleware by setting ``bottle.app().catchall`` to ``False``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:375\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:377\nmsgid \"\"\n\"Response metadata such as the HTTP status code, response headers and cookies\"\n\" are stored in an object called :data:`response` up to the point where they \"\n\"are transmitted to the browser. You can manipulate these metadata directly \"\n\"or use the predefined helper methods to do so. The full API and feature list\"\n\" is described in the API section (see :class:`Response`), but the most \"\n\"common use cases and features are covered here, too.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:380\nmsgid \"Status Code\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:381\nmsgid \"\"\n\"The `HTTP status code <http_code>`_ controls the behavior of the browser and\"\n\" defaults to ``200 OK``. In most scenarios you won't need to set the \"\n\":attr:`Response.status` attribute manually, but use the :func:`abort` helper\"\n\" or return an :exc:`HTTPResponse` instance with the appropriate status code.\"\n\" Any integer is allowed, but codes other than the ones defined by the `HTTP \"\n\"specification <http_code>`_ will only confuse the browser and break \"\n\"standards.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:384\nmsgid \"Response Header\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:385\nmsgid \"\"\n\"Response headers such as ``Cache-Control`` or ``Location`` are defined via \"\n\":meth:`Response.set_header`. This method takes two parameters, a header name\"\n\" and a value. The name part is case-insensitive::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:392\nmsgid \"\"\n\"Most headers are unique, meaning that only one header per name is send to \"\n\"the client. Some special headers however are allowed to appear more than \"\n\"once in a response. To add an additional header, use \"\n\":meth:`Response.add_header` instead of :meth:`Response.set_header`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:397\nmsgid \"\"\n\"Please note that this is just an example. If you want to work with cookies, \"\n\"read :ref:`ahead <tutorial-cookies>`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:403 ../../tutorial.rst:533\nmsgid \"Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:405\nmsgid \"\"\n\"A cookie is a named piece of text stored in the user's browser profile. You \"\n\"can access previously defined cookies via :meth:`Request.get_cookie` and set\"\n\" new cookies with :meth:`Response.set_cookie`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:415\nmsgid \"\"\n\"The :meth:`Response.set_cookie` method accepts a number of additional \"\n\"keyword arguments that control the cookies lifetime and behavior. Some of \"\n\"the most common settings are described here:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:417\nmsgid \"**max_age:**    Maximum age in seconds. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:418\nmsgid \"\"\n\"**expires:**    A datetime object or UNIX timestamp. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:419\nmsgid \"\"\n\"**domain:**     The domain that is allowed to read the cookie. (default: \"\n\"current domain)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:420\nmsgid \"**path:**       Limit the cookie to a given path (default: ``/``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:421\nmsgid \"**secure:**     Limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:422\nmsgid \"\"\n\"**httponly:**   Prevent client-side javascript to read this cookie (default:\"\n\" off, requires Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:423\nmsgid \"\"\n\"**same_site:**  Disables third-party use for a cookie. Allowed attributes: \"\n\"`lax` and `strict`. In strict mode the cookie will never be sent. In lax \"\n\"mode the cookie is only sent with a top-level GET request.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:425\nmsgid \"\"\n\"If neither `expires` nor `max_age` is set, the cookie expires at the end of \"\n\"the browser session or as soon as the browser window is closed. There are \"\n\"some other gotchas you should consider when using cookies:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:427\nmsgid \"Cookies are limited to 4 KB of text in most browsers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:428\nmsgid \"\"\n\"Some users configure their browsers to not accept cookies at all. Most \"\n\"search engines ignore cookies too. Make sure that your application still \"\n\"works without cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:429\nmsgid \"\"\n\"Cookies are stored at client side and are not encrypted in any way. Whatever\"\n\" you store in a cookie, the user can read it. Worse than that, an attacker \"\n\"might be able to steal a user's cookies through `XSS \"\n\"<http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_\"\n\" vulnerabilities on your side. Some viruses are known to read the browser \"\n\"cookies, too. Thus, never store confidential information in cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:430\nmsgid \"Cookies are easily forged by malicious clients. Do not trust cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:435\nmsgid \"Signed Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:436\nmsgid \"\"\n\"As mentioned above, cookies are easily forged by malicious clients. Bottle \"\n\"can cryptographically sign your cookies to prevent this kind of \"\n\"manipulation. All you have to do is to provide a signature key via the \"\n\"`secret` keyword argument whenever you read or set a cookie and keep that \"\n\"key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` \"\n\"if the cookie is not signed or the signature keys don't match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:456\nmsgid \"\"\n\"In addition, Bottle automatically pickles and unpickles any data stored to \"\n\"signed cookies. This allows you to store any pickle-able object (not only \"\n\"strings) to cookies, as long as the pickled data does not exceed the 4 KB \"\n\"limit.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:458\nmsgid \"\"\n\"Signed cookies are not encrypted (the client can still see the content) and \"\n\"not copy-protected (the client can restore an old cookie). The main \"\n\"intention is to make pickling and unpickling safe and prevent manipulation, \"\n\"not to store secret information at client side.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:471\nmsgid \"Request Data\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:473\nmsgid \"\"\n\"Cookies, HTTP header, HTML ``<form>`` fields and other request data is \"\n\"available through the global :data:`request` object. This special object \"\n\"always refers to the *current* request, even in multi-threaded environments \"\n\"where multiple client connections are handled at the same time::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:482\nmsgid \"\"\n\"The :data:`request` object is a subclass of :class:`BaseRequest` and has a \"\n\"very rich API to access data. We only cover the most commonly used features \"\n\"here, but it should be enough to get started.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:487\nmsgid \"Introducing :class:`FormsDict`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:489\nmsgid \"\"\n\"Bottle uses a special type of dictionary to store form data and cookies. \"\n\":class:`FormsDict` behaves like a normal dictionary, but has some additional\"\n\" features to make your life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:491\nmsgid \"\"\n\"**Attribute access**: All values in the dictionary are also accessible as \"\n\"attributes. These virtual attributes return unicode strings, even if the \"\n\"value is missing or unicode decoding fails. In that case, the string is \"\n\"empty, but still present::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:506\nmsgid \"\"\n\"**Multiple values per key:** :class:`FormsDict` is a subclass of \"\n\":class:`MultiDict` and can store more than one value per key. The standard \"\n\"dictionary access methods will only return a single value, but the \"\n\":meth:`~MultiDict.getall` method returns a (possibly empty) list of all \"\n\"values for a specific key::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:511\nmsgid \"\"\n\"**WTForms support:** Some libraries (e.g. `WTForms \"\n\"<http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input.\"\n\" :meth:`FormsDict.decode` does that for you. It decodes all values and \"\n\"returns a copy of itself, while preserving multiple values per key and all \"\n\"the other features.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:515\nmsgid \"\"\n\"In **Python 2** all keys and values are byte-strings. If you need unicode, \"\n\"you can call :meth:`FormsDict.getunicode` or fetch values via attribute \"\n\"access. Both methods try to decode the string (default: utf8) and return an \"\n\"empty string if that fails. No need to catch :exc:`UnicodeError`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:522\nmsgid \"\"\n\"In **Python 3** all strings are unicode, but HTTP is a byte-based wire \"\n\"protocol. The server has to decode the byte strings somehow before they are \"\n\"passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 \"\n\"(aka latin1), a reversible single-byte codec that can be re-encoded with a \"\n\"different encoding later. Bottle does that for :meth:`FormsDict.getunicode` \"\n\"and attribute access, but not for the dict-access methods. These return the \"\n\"unchanged values as provided by the server implementation, which is probably\"\n\" not what you want.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:529\nmsgid \"\"\n\"If you need the whole dictionary with correctly decoded values (e.g. for \"\n\"WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:535\nmsgid \"\"\n\"Cookies are small pieces of text stored in the clients browser and sent back\"\n\" to the server with each request. They are useful to keep some state around \"\n\"for more than one request (HTTP itself is stateless), but should not be used\"\n\" for security related stuff. They can be easily forged by the client.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:537\nmsgid \"\"\n\"All cookies sent by the client are available through \"\n\":attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a \"\n\"simple cookie-based view counter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:547\nmsgid \"\"\n\"The :meth:`BaseRequest.get_cookie` method is a different way do access \"\n\"cookies. It supports decoding :ref:`signed cookies <tutorial-signed-\"\n\"cookies>` as described in a separate section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:550\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:552\nmsgid \"\"\n\"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or \"\n\"``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible \"\n\"through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict`\"\n\" is basically a dictionary with case-insensitive keys::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:564\nmsgid \"Query Variables\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:566\nmsgid \"\"\n\"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit\"\n\" a small number of key/value pairs to the server. You can use the \"\n\":attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these \"\n\"values and the :attr:`BaseRequest.query_string` attribute to get the whole \"\n\"string.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:579\nmsgid \"HTML `<form>` Handling\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:581\nmsgid \"\"\n\"Let us start from the beginning. In HTML, a typical ``<form>`` looks \"\n\"something like this:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:591\nmsgid \"\"\n\"The ``action`` attribute specifies the URL that will receive the form data. \"\n\"``method`` defines the HTTP method to use (``GET`` or ``POST``). With \"\n\"``method=\\\"get\\\"`` the form values are appended to the URL and available \"\n\"through :attr:`BaseRequest.query` as described above. This is considered \"\n\"insecure and has other limitations, so we use ``method=\\\"post\\\"`` here. If \"\n\"in doubt, use ``POST`` forms.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:593\nmsgid \"\"\n\"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms`\"\n\" as a :class:`FormsDict`. The server side code may look like this::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:616\nmsgid \"\"\n\"There are several other attributes used to access form data. Some of them \"\n\"combine values from different sources for easier access. The following table\"\n\" should give you a decent overview.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"GET Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"POST Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"File Uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621\nmsgid \":attr:`BaseRequest.query`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:622 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:624 ../../tutorial.rst:625\n#: ../../tutorial.rst:626 ../../tutorial.rst:626\nmsgid \"yes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:621 ../../tutorial.rst:622\n#: ../../tutorial.rst:622 ../../tutorial.rst:623 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:625 ../../tutorial.rst:625\n#: ../../tutorial.rst:626\nmsgid \"no\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:622\nmsgid \":attr:`BaseRequest.forms`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:623\nmsgid \":attr:`BaseRequest.files`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:624\nmsgid \":attr:`BaseRequest.params`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:625\nmsgid \":attr:`BaseRequest.GET`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:626\nmsgid \":attr:`BaseRequest.POST`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:631\nmsgid \"File uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:633\nmsgid \"\"\n\"To support file uploads, we have to change the ``<form>`` tag a bit. First, \"\n\"we tell the browser to encode the form data in a different way by adding an \"\n\"``enctype=\\\"multipart/form-data\\\"`` attribute to the ``<form>`` tag. Then, \"\n\"we add ``<input type=\\\"file\\\" />`` tags to allow the user to select a file. \"\n\"Here is an example:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:643\nmsgid \"\"\n\"Bottle stores file uploads in :attr:`BaseRequest.files` as \"\n\":class:`FileUpload` instances, along with some metadata about the upload. \"\n\"Let us assume you just want to save the file to disk::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:657\nmsgid \"\"\n\":attr:`FileUpload.filename` contains the name of the file on the clients \"\n\"file system, but is cleaned up and normalized to prevent bugs caused by \"\n\"unsupported characters or path segments in the filename. If you need the \"\n\"unmodified name as sent by the client, have a look at \"\n\":attr:`FileUpload.raw_filename`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:659\nmsgid \"\"\n\"The :attr:`FileUpload.save` method is highly recommended if you want to \"\n\"store the file to disk. It prevents some common errors (e.g. it does not \"\n\"overwrite existing files unless you tell it to) and stores the file in a \"\n\"memory efficient way. You can access the file object directly via \"\n\":attr:`FileUpload.file`. Just be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:663\nmsgid \"JSON Content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:665\nmsgid \"\"\n\"Some JavaScript or REST clients send ``application/json`` content to the \"\n\"server. The :attr:`BaseRequest.json` attribute contains the parsed data \"\n\"structure, if available.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:669\nmsgid \"The raw request body\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:671\nmsgid \"\"\n\"You can access the raw body data as a file-like object via \"\n\":attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary \"\n\"file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` \"\n\"setting. In both cases the body is completely buffered before you can access\"\n\" the attribute. If you expect huge amounts of data and want to get direct \"\n\"unbuffered access to the stream, have a look at ``request['wsgi.input']``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:676\nmsgid \"WSGI Environment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:678\nmsgid \"\"\n\"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The \"\n\"original is stored in :attr:`BaseRequest.environ`, but the request object \"\n\"itself behaves like a dictionary, too. Most of the interesting data is \"\n\"exposed through special methods or attributes, but if you want to access \"\n\"`WSGI environ variables <WSGI_Specification>`_ directly, you can do so::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:696\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:698\nmsgid \"\"\n\"Bottle comes with a fast and powerful built-in template engine called \"\n\":doc:`stpl`. To render a template you can use the :func:`template` function \"\n\"or the :func:`view` decorator. All you have to do is to provide the name of \"\n\"the template and the variables you want to pass to the template as keyword \"\n\"arguments. Here’s a simple example of how to render a template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:705\nmsgid \"\"\n\"This will load the template file ``hello_template.tpl`` and render it with \"\n\"the ``name`` variable set. Bottle will look for templates in the \"\n\"``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` \"\n\"list.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:707\nmsgid \"\"\n\"The :func:`view` decorator allows you to return a dictionary with the \"\n\"template variables instead of calling :func:`template`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:716\nmsgid \"Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:719\nmsgid \"\"\n\"The template syntax is a very thin layer around the Python language. Its \"\n\"main purpose is to ensure correct indentation of blocks, so you can format \"\n\"your template without worrying about indentation. Follow the link for a full\"\n\" syntax description: :doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:721\nmsgid \"Here is an example template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:732\nmsgid \"Caching\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:733\nmsgid \"\"\n\"Templates are cached in memory after compilation. Modifications made to the \"\n\"template files will have no affect until you clear the template cache. Call \"\n\"``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:743\nmsgid \"Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:747\nmsgid \"\"\n\"Bottle's core features cover most common use-cases, but as a micro-framework\"\n\" it has its limits. This is where \\\"Plugins\\\" come into play. Plugins add \"\n\"missing functionality to the framework, integrate third party libraries, or \"\n\"just automate some repetitive work.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:749\nmsgid \"\"\n\"We have a growing :doc:`/plugins/index` and most plugins are designed to be \"\n\"portable and re-usable across applications. The chances are high that your \"\n\"problem has already been solved and a ready-to-use plugin exists. If not, \"\n\"the :doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:751\nmsgid \"\"\n\"The effects and APIs of plugins are manifold and depend on the specific \"\n\"plugin. The ``SQLitePlugin`` plugin for example detects callbacks that \"\n\"require a ``db`` keyword argument and creates a fresh database connection \"\n\"object every time the callback is called. This makes it very convenient to \"\n\"use a database::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:771\nmsgid \"\"\n\"Other plugin may populate the thread-safe :data:`local` object, change \"\n\"details of the :data:`request` object, filter the data returned by the \"\n\"callback or bypass the callback completely. An \\\"auth\\\" plugin for example \"\n\"could check for a valid session and return a login page instead of calling \"\n\"the original callback. What happens exactly depends on the plugin.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:775\nmsgid \"Application-wide Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:777\nmsgid \"\"\n\"Plugins can be installed application-wide or just to some specific routes \"\n\"that need additional functionality. Most plugins can safely be installed to \"\n\"all routes and are smart enough to not add overhead to callbacks that do not\"\n\" need their functionality.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:779\nmsgid \"\"\n\"Let us take the ``SQLitePlugin`` plugin for example. It only affects route \"\n\"callbacks that need a database connection. Other routes are left alone. \"\n\"Because of this, we can install the plugin application-wide with no \"\n\"additional overhead.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:781\nmsgid \"\"\n\"To install a plugin, just call :func:`install` with the plugin as first \"\n\"argument::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:786\nmsgid \"\"\n\"The plugin is not applied to the route callbacks yet. This is delayed to \"\n\"make sure no routes are missed. You can install plugins first and add routes\"\n\" later, if you want to. The order of installed plugins is significant, \"\n\"though. If a plugin requires a database connection, you need to install the \"\n\"database plugin first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:790\nmsgid \"Uninstall Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:791\nmsgid \"\"\n\"You can use a name, class or instance to :func:`uninstall` a previously \"\n\"installed plugin::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:801\nmsgid \"\"\n\"Plugins can be installed and removed at any time, even at runtime while \"\n\"serving requests. This enables some neat tricks (installing slow debugging \"\n\"or profiling plugins only when needed) but should not be overused. Each time\"\n\" the list of plugins changes, the route cache is flushed and all plugins are\"\n\" re-applied.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:804\nmsgid \"\"\n\"The module-level :func:`install` and :func:`uninstall` functions affect the \"\n\":ref:`default-app`. To manage plugins for a specific application, use the \"\n\"corresponding methods on the :class:`Bottle` application object.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:808\nmsgid \"Route-specific Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:810\nmsgid \"\"\n\"The ``apply`` parameter of the :func:`route` decorator comes in handy if you\"\n\" want to install plugins to only a small number of routes::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:820\nmsgid \"Blacklisting Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:822\nmsgid \"\"\n\"You may want to explicitly disable a plugin for a number of routes. The \"\n\":func:`route` decorator has a ``skip`` parameter for this purpose::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:844\nmsgid \"\"\n\"The ``skip`` parameter accepts a single value or a list of values. You can \"\n\"use a name, class or instance to identify the plugin that is to be skipped. \"\n\"Set ``skip=True`` to skip all plugins at once.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:847\nmsgid \"Plugins and Sub-Applications\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:849\nmsgid \"\"\n\"Most plugins are specific to the application they were installed to. \"\n\"Consequently, they should not affect sub-applications mounted with \"\n\":meth:`Bottle.mount`. Here is an example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:860\nmsgid \"\"\n\"Whenever you mount an application, Bottle creates a proxy-route on the main-\"\n\"application that forwards all requests to the sub-application. Plugins are \"\n\"disabled for this kind of proxy-route by default. As a result, our \"\n\"(fictional) `WTForms` plugin affects the ``/contact`` route, but does not \"\n\"affect the routes of the ``/blog`` sub-application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:862\nmsgid \"\"\n\"This behavior is intended as a sane default, but can be overridden. The \"\n\"following example re-activates all plugins for a specific proxy-route::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:866\nmsgid \"\"\n\"But there is a snag: The plugin sees the whole sub-application as a single \"\n\"route, namely the proxy-route mentioned above. In order to affect each \"\n\"individual route of the sub-application, you have to install the plugin to \"\n\"the mounted application explicitly.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:871\nmsgid \"Development\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:873\nmsgid \"\"\n\"So you have learned the basics and want to write your own application? Here \"\n\"are some tips that might help you being more productive.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:879\nmsgid \"Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:881\nmsgid \"\"\n\"Bottle maintains a global stack of :class:`Bottle` instances and uses the \"\n\"top of the stack as a default for some of the module-level functions and \"\n\"decorators. The :func:`route` decorator, for example, is a shortcut for \"\n\"calling :meth:`Bottle.route` on the default application::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:889\nmsgid \"\"\n\"This is very convenient for small applications and saves you some typing, \"\n\"but also means that, as soon as your module is imported, routes are \"\n\"installed to the global default application. To avoid this kind of import \"\n\"side-effects, Bottle offers a second, more explicit way to build \"\n\"applications::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:899\nmsgid \"\"\n\"Separating the application object improves re-usability a lot, too. Other \"\n\"developers can safely import the ``app`` object from your module and use \"\n\":meth:`Bottle.mount` to merge applications together.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:904\nmsgid \"\"\n\"Starting with bottle-0.13 you can use :class:`Bottle` instances as context \"\n\"managers::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:929\nmsgid \"Debug Mode\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:931\nmsgid \"During early development, the debug mode can be very helpful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:939\nmsgid \"\"\n\"In this mode, Bottle is much more verbose and provides helpful debugging \"\n\"information whenever an error occurs. It also disables some optimisations \"\n\"that might get in your way and adds some checks that warn you about possible\"\n\" misconfiguration.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:941\nmsgid \"Here is an incomplete list of things that change in debug mode:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:943\nmsgid \"The default error page shows a traceback.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:944\nmsgid \"Templates are not cached.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:945\nmsgid \"Plugins are applied immediately.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:947\nmsgid \"Just make sure not to use the debug mode on a production server.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:950\nmsgid \"Auto Reloading\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:952\nmsgid \"\"\n\"During development, you have to restart the server a lot to test your recent\"\n\" changes. The auto reloader can do this for you. Every time you edit a \"\n\"module file, the reloader restarts the server process and loads the newest \"\n\"version of your code.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:962\nmsgid \"\"\n\"How it works: the main process will not start a server, but spawn a new \"\n\"child process using the same command line arguments used to start the main \"\n\"process. All module-level code is executed at least twice! Be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:967\nmsgid \"\"\n\"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` \"\n\"and start as a normal non-reloading app server. As soon as any of the loaded\"\n\" modules changes, the child process is terminated and re-spawned by the main\"\n\" process. Changes in template files will not trigger a reload. Please use \"\n\"debug mode to deactivate template caching.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:973\nmsgid \"\"\n\"The reloading depends on the ability to stop the child process. If you are \"\n\"running on Windows or any other operating system not supporting \"\n\"``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), \"\n\"``signal.SIGTERM`` is used to kill the child. Note that exit handlers and \"\n\"finally clauses, etc., are not executed after a ``SIGTERM``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:981\nmsgid \"Command Line Interface\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:985\nmsgid \"Starting with version 0.10 you can use bottle as a command-line tool:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1009\nmsgid \"\"\n\"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to \"\n\"``localhost:8080``. The other parameters should be self-explanatory.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1011\nmsgid \"\"\n\"Both plugins and applications are specified via import expressions. These \"\n\"consist of an import path (e.g. ``package.module``) and an expression to be \"\n\"evaluated in the namespace of that module, separated by a colon. See \"\n\":func:`load` for details. Here are some examples:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1032\nmsgid \"Deployment\"\nmsgstr \"Déploiement \"\n\n#: ../../tutorial.rst:1034\nmsgid \"\"\n\"Bottle runs on the built-in `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_\"\n\"  by default. This non-threading HTTP server is perfectly fine for \"\n\"development, but may become a performance bottleneck when server load \"\n\"increases.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1036\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded server::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1040\nmsgid \"\"\n\"This, and many other deployment options are described in a separate article:\"\n\" :doc:`deployment`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1048\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1051\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1053\nmsgid \"\"\n\"Programmer code that is to be called when some external action happens. In \"\n\"the context of web frameworks, the mapping between URL paths and application\"\n\" code is often achieved by specifying a callback function for each URL.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1057\nmsgid \"decorator\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1059\nmsgid \"\"\n\"A function returning another function, usually applied as a function \"\n\"transformation using the ``@decorator`` syntax. See `python documentation \"\n\"for function definition  \"\n\"<http://docs.python.org/reference/compound_stmts.html#function>`_ for more \"\n\"about decorators.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1060\nmsgid \"environ\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1062\nmsgid \"\"\n\"A structure where information about all documents under the root is saved, \"\n\"and used for cross-referencing.  The environment is pickled after the \"\n\"parsing stage, so that successive runs only need to read and parse new and \"\n\"changed documents.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1066\nmsgid \"handler function\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1068\nmsgid \"\"\n\"A function to handle some specific event or situation. In a web framework, \"\n\"the application is developed by attaching a handler function as callback for\"\n\" each specific URL comprising the application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1071\nmsgid \"source directory\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1073\nmsgid \"\"\n\"The directory which, including its subdirectories, contains all source files\"\n\" for one Sphinx project.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/fr/LC_MESSAGES/tutorial_app.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: French (http://www.transifex.com/bottle/bottle/language/fr/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: fr\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../tutorial_app.rst:19\nmsgid \"Tutorial: Todo-List Application\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:23\nmsgid \"\"\n\"This tutorial is a work in progress and written by `noisefloor \"\n\"<http://github.com/noisefloor>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:26\nmsgid \"\"\n\"This tutorial should give a brief introduction to the Bottle_ WSGI \"\n\"Framework. The main goal is to be able, after reading through this tutorial,\"\n\" to create a project using Bottle. Within this document, not all abilities \"\n\"will be shown, but at least the main and important ones like routing, \"\n\"utilizing the Bottle template abilities to format output and handling GET / \"\n\"POST parameters.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:28\nmsgid \"\"\n\"To understand the content here, it is not necessary to have a basic \"\n\"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. \"\n\"You should have a fair understanding of the Python_ programming language. \"\n\"Furthermore, the example used in the tutorial retrieves and stores data in a\"\n\" SQL database, so a basic idea about SQL helps, but is not a must to \"\n\"understand the concepts of Bottle. Right here, SQLite_ is used. The output \"\n\"of Bottle sent to the browser is formatted in some examples by the help of \"\n\"HTML. Thus, a basic idea about the common HTML tags does help as well.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:30\nmsgid \"\"\n\"For the sake of introducing Bottle, the Python code \\\"in between\\\" is kept \"\n\"short, in order to keep the focus. Also all code within the tutorial is \"\n\"working fine, but you may not necessarily use it \\\"in the wild\\\", e.g. on a \"\n\"public web server. In order to do so, you may add e.g. more error handling, \"\n\"protect the database with a password, test and escape the input etc.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:32\nmsgid \"Table of Contents\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:35\nmsgid \"Goals\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:37\nmsgid \"\"\n\"At the end of this tutorial, we will have a simple, web-based ToDo list. The\"\n\" list contains a text (with max 100 characters) and a status (0 for closed, \"\n\"1 for open) for each item. Through the web-based user interface, open items \"\n\"can be view and edited and new items can be added.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:39\nmsgid \"\"\n\"During development, all pages will be available on ``localhost`` only, but \"\n\"later on it will be shown how to adapt the application for a \\\"real\\\" \"\n\"server, including how to use with Apache's mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:41\nmsgid \"\"\n\"Bottle will do the routing and format the output, with the help of \"\n\"templates. The items of the list will be stored inside a SQLite database. \"\n\"Reading and  writing the database will be done by Python code.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:43\nmsgid \"\"\n\"We will end up with an application with the following pages and \"\n\"functionality:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:45\nmsgid \"start page ``http://localhost:8080/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:46\nmsgid \"adding new items to the list: ``http://localhost:8080/new``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:47\nmsgid \"page for editing items: ``http://localhost:8080/edit/<no:int>``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:48\nmsgid \"catching errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:51\nmsgid \"Before We Start...\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:55\nmsgid \"Install Bottle\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:56\nmsgid \"\"\n\"Assuming that you have a fairly new installation of Python (version 2.5 or \"\n\"higher), you only need to install Bottle in addition to that. Bottle has no \"\n\"other dependencies than Python itself.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:58\nmsgid \"\"\n\"You can either manually install Bottle or use Python's easy_install: \"\n\"``easy_install bottle``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:62\nmsgid \"Further Software Necessities\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:63\nmsgid \"\"\n\"As we use SQLite3 as a database, make sure it is installed. On Linux \"\n\"systems, most distributions have SQLite3 installed by default. SQLite is \"\n\"available for Windows and MacOS X as well and the `sqlite3` module is part \"\n\"of the python standard library.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:66\nmsgid \"Create An SQL Database\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:67\nmsgid \"\"\n\"First, we need to create the database we use later on. To do so, save the \"\n\"following script in your project directory and run it with python. You can \"\n\"use the interactive interpreter too::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:78\nmsgid \"\"\n\"This generates a database-file `todo.db` with tables called ``todo`` and \"\n\"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for \"\n\"each row, which is used later on to reference the rows. The column ``task`` \"\n\"holds the text which describes the task, it can be max 100 characters long. \"\n\"Finally, the column ``status`` is used to mark a task as open (value 1) or \"\n\"closed (value 0).\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:81\nmsgid \"Using Bottle for a Web-Based ToDo List\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:83\nmsgid \"\"\n\"Now it is time to introduce Bottle in order to create a web-based \"\n\"application. But first, we need to look into a basic concept of Bottle: \"\n\"routes.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:87\nmsgid \"Understanding routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:88\nmsgid \"\"\n\"Basically, each page visible in the browser is dynamically generated when \"\n\"the page address is called. Thus, there is no static content. That is \"\n\"exactly what is called a \\\"route\\\" within Bottle: a certain address on the \"\n\"server. So, for example, when the page ``http://localhost:8080/todo`` is \"\n\"called from the browser, Bottle \\\"grabs\\\" the call and checks if there is \"\n\"any (Python) function defined for the route \\\"todo\\\". If so, Bottle will \"\n\"execute the corresponding Python code and return its result.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:92\nmsgid \"First Step - Showing All Open Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:93\nmsgid \"\"\n\"So, after understanding the concept of routes, let's create the first one. \"\n\"The goal is to see all open items from the ToDo list::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:108\nmsgid \"\"\n\"Save the code a ``todo.py``, preferably in the same directory as the file \"\n\"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the \"\n\"``sqlite3.connect()`` statement.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:110\nmsgid \"\"\n\"Let's have a look what we just did: We imported the necessary module \"\n\"``sqlite3`` to access to SQLite database and from Bottle we imported \"\n\"``route`` and ``run``. The ``run()`` statement simply starts the web server \"\n\"included in Bottle. By default, the web server serves the pages on localhost\"\n\" and port 8080. Furthermore, we imported ``route``, which is the function \"\n\"responsible for Bottle's routing. As you can see, we defined one function, \"\n\"``todo_list()``, with a few lines of code reading from the database. The \"\n\"important point is the `decorator statement`_ ``@route('/todo')`` right \"\n\"before the ``def todo_list()`` statement. By doing this, we bind this \"\n\"function to the route ``/todo``, so every time the browsers calls \"\n\"``http://localhost:8080/todo``, Bottle returns the result of the function \"\n\"``todo_list()``. That is how routing within bottle works.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:112\nmsgid \"\"\n\"Actually you can bind more than one route to a function. So the following \"\n\"code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:119\nmsgid \"\"\n\"will work fine, too. What will not work is to bind one route to more than \"\n\"one function.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:121\nmsgid \"\"\n\"What you will see in the browser is what is returned, thus the value given \"\n\"by the ``return`` statement. In this example, we need to convert ``result`` \"\n\"in to a string by ``str()``, as Bottle expects a string or a list of strings\"\n\" from the return statement. But here, the result of the database query is a \"\n\"list of tuples, which is the standard defined by the `Python DB API`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:123\nmsgid \"\"\n\"Now, after understanding the little script above, it is time to execute it \"\n\"and watch the result yourself. Remember that on Linux- / Unix-based systems \"\n\"the file ``todo.py`` needs to be executable first. Then, just run ``python \"\n\"todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. \"\n\"In case you made no mistake writing the script, the output should look like \"\n\"this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:127\nmsgid \"\"\n\"If so - congratulations! You are now a successful user of Bottle. In case it\"\n\" did not work and you need to make some changes to the script, remember to \"\n\"stop Bottle serving the page, otherwise the revised version will not be \"\n\"loaded.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:129\nmsgid \"\"\n\"Actually, the output is not really exciting nor nice to read. It is the raw \"\n\"result returned from the SQL query.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:131\nmsgid \"\"\n\"So, in the next step we format the output in a nicer way. But before we do \"\n\"that, we make our life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:135\nmsgid \"Debugging and Auto-Reload\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:136\nmsgid \"\"\n\"Maybe you already noticed that Bottle sends a short error message to the \"\n\"browser in case something within the script is wrong, e.g. the connection to\"\n\" the database is not working. For debugging purposes it is quite helpful to \"\n\"get more details. This can be easily achieved by adding the following \"\n\"statement to the script::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:144\nmsgid \"\"\n\"By enabling \\\"debug\\\", you will get a full stacktrace of the Python \"\n\"interpreter, which usually contains useful information for finding bugs. \"\n\"Furthermore, templates (see below) are not cached, thus changes to templates\"\n\" will take effect without stopping the server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:148\nmsgid \"\"\n\"That ``debug(True)`` is supposed to be used for development only, it should \"\n\"*not* be used in production environments.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:152\nmsgid \"\"\n\"Another quite nice feature is auto-reloading, which is enabled by modifying \"\n\"the ``run()`` statement to\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:158\nmsgid \"\"\n\"This will automatically detect changes to the script and reload the new \"\n\"version once it is called again, without the need to stop and start the \"\n\"server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:160\nmsgid \"\"\n\"Again, the feature is mainly supposed to be used while developing, not on \"\n\"production systems.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:164\nmsgid \"Bottle Template To Format The Output\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:165\nmsgid \"\"\n\"Now let's have a look at casting the output of the script into a proper \"\n\"format.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:167\nmsgid \"\"\n\"Actually Bottle expects to receive a string or a list of strings from a \"\n\"function and returns them by the help of the built-in server to the browser.\"\n\" Bottle does not bother about the content of the string itself, so it can be\"\n\" text formatted with HTML markup, too.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:169\nmsgid \"\"\n\"Bottle brings its own easy-to-use template engine with it. Templates are \"\n\"stored as separate files having a ``.tpl`` extension. The template can be \"\n\"called then from within a function. Templates can contain any type of text \"\n\"(which will be most likely HTML-markup mixed with Python statements). \"\n\"Furthermore, templates can take arguments, e.g. the result set of a database\"\n\" query, which will be then formatted nicely within the template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:171\nmsgid \"\"\n\"Right here, we are going to cast the result of our query showing the open \"\n\"ToDo items into a simple table with two columns: the first column will \"\n\"contain the ID of the item, the second column the text. The result set is, \"\n\"as seen above, a list of tuples, each tuple contains one set of results.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:173\nmsgid \"To include the template in our example, just add the following lines::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:183\nmsgid \"\"\n\"So we do here two things: first, we import ``template`` from Bottle in order\"\n\" to be able to use templates. Second, we assign the output of the template \"\n\"``make_table`` to the variable ``output``, which is then returned. In \"\n\"addition to calling the template, we assign ``result``, which we received \"\n\"from the database query, to the variable ``rows``, which is later on used \"\n\"within the template. If necessary, you can assign more than one variable / \"\n\"value to a template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:185\nmsgid \"\"\n\"Templates always return a list of strings, thus there is no need to convert \"\n\"anything. We can save one line of code by writing ``return \"\n\"template('make_table', rows=result)``, which gives exactly the same result \"\n\"as above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:187\nmsgid \"\"\n\"Now it is time to write the corresponding template, which looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:201\nmsgid \"\"\n\"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` \"\n\"is stored.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:203\nmsgid \"\"\n\"Let's have a look at the code: every line starting with % is interpreted as \"\n\"Python code. Because it is effectively Python, only valid Python statements \"\n\"are allowed. The template will raise exceptions, just as any other Python \"\n\"code would. The other lines are plain HTML markup.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:205\nmsgid \"\"\n\"As you can see, we use Python's ``for`` statement two times, in order to go \"\n\"through ``rows``. As seen above, ``rows`` is a variable which holds the \"\n\"result of the database query, so it is a list of tuples. The first ``for`` \"\n\"statement accesses the tuples within the list, the second one the items \"\n\"within the tuple, which are put each into a cell of the table. It is \"\n\"important that you close all ``for``, ``if``, ``while`` etc. statements with\"\n\" ``%end``, otherwise the output may not be what you expect.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:207\nmsgid \"\"\n\"If you need to access a variable within a non-Python code line inside the \"\n\"template, you need to put it into double curly braces. This tells the \"\n\"template to insert the actual value of the variable right in place.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:209\nmsgid \"\"\n\"Run the script again and look at the output. Still not really nice, but at \"\n\"least more readable than the list of tuples. You can spice-up the very \"\n\"simple HTML markup above, e.g. by using in-line styles to get a better \"\n\"looking output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:213\nmsgid \"Using GET and POST Values\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:214\nmsgid \"\"\n\"As we can review all open items properly, we move to the next step, which is\"\n\" adding new items to the ToDo list. The new item should be received from a \"\n\"regular HTML-based form, which sends its data by the GET method.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:216\nmsgid \"\"\n\"To do so, we first add a new route to our script and tell the route that it \"\n\"should get GET data::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:239\nmsgid \"\"\n\"To access GET (or POST) data, we need to import ``request`` from Bottle. To \"\n\"assign the actual data to a variable, we use the statement \"\n\"``request.GET.task.strip()`` statement, where ``task`` is the name of the \"\n\"GET data we want to access. That's all. If your GET data has more than one \"\n\"variable, multiple ``request.GET.get()`` statements can be used and assigned\"\n\" to other variables.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:241\nmsgid \"\"\n\"The rest of this piece of code is just processing of the gained data: \"\n\"writing to the database, retrieve the corresponding id from the database and\"\n\" generate the output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:243\nmsgid \"\"\n\"But where do we get the GET data from? Well, we can use a static HTML page \"\n\"holding the form. Or, what we do right now, is to use a template which is \"\n\"output when the route ``/new`` is called without GET data.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:245\nmsgid \"The code needs to be extended to::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:268\nmsgid \"``new_task.tpl`` looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:276\nmsgid \"That's all. As you can see, the template is plain HTML this time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:278\nmsgid \"Now we are able to extend our to do list.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:280\nmsgid \"\"\n\"By the way, if you prefer to use POST data: this works exactly the same way,\"\n\" just use ``request.POST.get()`` instead.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:284\nmsgid \"Editing Existing Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:285\nmsgid \"The last point to do is to enable editing of existing items.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:287\nmsgid \"\"\n\"By using only the routes we know so far it is possible, but may be quite \"\n\"tricky. But Bottle knows something called \\\"dynamic routes\\\", which makes \"\n\"this task quite easy.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:289\nmsgid \"The basic statement for a dynamic route looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:293\nmsgid \"\"\n\"This tells Bottle to accept for ``<something>`` any string up to the next \"\n\"slash. Furthermore, the value of ``something`` will be passed to the \"\n\"function assigned to that route, so the data can be processed within the \"\n\"function, like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:321\nmsgid \"\"\n\"It is basically pretty much the same what we already did above when adding \"\n\"new items, like using ``GET`` data etc. The main addition here is using the \"\n\"dynamic route ``<no:int>``, which here passes the number to the \"\n\"corresponding function. As you can see, ``no`` is integer ID and used within\"\n\" the function to access the right row of data within the database.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:324\nmsgid \"\"\n\"The template ``edit_task.tpl`` called within the function looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:339\nmsgid \"\"\n\"Again, this template is a mix of Python statements and HTML, as already \"\n\"explained above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:341\nmsgid \"\"\n\"A last word on dynamic routes: you can even use a regular expression for a \"\n\"dynamic route, as demonstrated later.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:345\nmsgid \"Validating Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:346\nmsgid \"\"\n\"Using dynamic routes is fine, but for many cases it makes sense to validate \"\n\"the dynamic part of the route. For example, we expect an integer number in \"\n\"our route for editing above. But if a float, characters or so are received, \"\n\"the Python interpreter throws an exception, which is not what we want.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:348\nmsgid \"\"\n\"For those cases, Bottle offers the ``<name:int>`` wildcard filter, which \"\n\"matches (signed) digits and converts the value to integer. In order to apply\"\n\" the wildcard filter, extend the code as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:356\nmsgid \"\"\n\"Save the code and call the page again using incorrect value for \"\n\"``<no:int>``, e.g. a float. You will receive not an exception, but a \\\"404 \"\n\"Not Found\\\" error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:360\nmsgid \"Dynamic Routes Using Regular Expressions\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:361\nmsgid \"\"\n\"Bottle can also handle dynamic routes, where the \\\"dynamic part\\\" of the \"\n\"route can be a regular expression.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:363\nmsgid \"\"\n\"So, just to demonstrate that, let's assume that all single items in our ToDo\"\n\" list should be accessible by their plain number, by a term like e.g. \"\n\"\\\"item1\\\". For obvious reasons, you do not want to create a route for every \"\n\"item. Furthermore, the simple dynamic routes do not work either, as part of \"\n\"the route, the term \\\"item\\\" is static.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:365\nmsgid \"As said above, the solution is a regular expression::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:380\nmsgid \"\"\n\"The line ``@route(/item<item:re:[0-9]+>)`` starts like a normal route, but \"\n\"the third part of the wildcard is interpreted as a regular expression, which\"\n\" is the dynamic part of the route. So in this case, we want to match any \"\n\"digit between 0 and 9. The following function \\\"show_item\\\" just checks \"\n\"whether the given item is present in the database or not. In case it is \"\n\"present, the corresponding text of the task is returned. As you can see, \"\n\"only the regular expression part of the route is passed forward. \"\n\"Furthermore, it is always forwarded as a string, even if it is a plain \"\n\"integer number, like in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:384\nmsgid \"Returning Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:385\nmsgid \"\"\n\"Sometimes it may become necessary to associate a route not to a Python \"\n\"function, but just return a static file. So if you have for example a help \"\n\"page for your application, you may want to return this page as plain HTML. \"\n\"This works as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:393\nmsgid \"\"\n\"At first, we need to import the ``static_file`` function from Bottle. As you\"\n\" can see, the ``return static_file`` statement replaces the ``return`` \"\n\"statement. It takes at least two arguments: the name of the file to be \"\n\"returned and the path to the file. Even if the file is in the same directory\"\n\" as your application, the path needs to be stated. But in this case, you can\"\n\" use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file \"\n\"automatically, but in case you like to state it explicitly, add a third \"\n\"argument to ``static_file``, which would be here ``mimetype='text/html'``. \"\n\"``static_file`` works with any type of route, including the dynamic ones.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:397\nmsgid \"Returning JSON Data\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:398\nmsgid \"\"\n\"There may be cases where you do not want your application to generate the \"\n\"output directly, but return data to be processed further on, e.g. by \"\n\"JavaScript. For those cases, Bottle offers the possibility to return JSON \"\n\"objects, which is sort of standard for exchanging data between web \"\n\"applications. Furthermore, JSON can be processed by many programming \"\n\"languages, including Python\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:400\nmsgid \"\"\n\"So, let's assume we want to return the data generated in the regular \"\n\"expression route example as a JSON object. The code looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:415\nmsgid \"\"\n\"As you can, that is fairly simple: just return a regular Python dictionary \"\n\"and Bottle will convert it automatically into a JSON object prior to \"\n\"sending. So if you e.g. call \\\"http://localhost/json1\\\" Bottle should in \"\n\"this case return the JSON object ``{\\\"task\\\": [\\\"Read A-byte-of-python to \"\n\"get a good introduction into Python\\\"]}``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:420\nmsgid \"Catching Errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:421\nmsgid \"\"\n\"The next step may is to catch the error with Bottle itself, to keep away any\"\n\" type of error message from the user of your application. To do that, Bottle\"\n\" has an \\\"error-route\\\", which can be a assigned to a HTML-error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:423\nmsgid \"In our case, we want to catch a 403 error. The code is as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:431\nmsgid \"\"\n\"So, at first we need to import ``error`` from Bottle and define a route by \"\n\"``error(403)``, which catches all \\\"403 forbidden\\\" errors. The function \"\n\"\\\"mistake\\\" is assigned to that. Please note that ``error()`` always passes \"\n\"the error-code to the function - even if you do not need it. Thus, the \"\n\"function always needs to accept one argument, otherwise it will not work.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:433\nmsgid \"\"\n\"Again, you can assign more than one error-route to a function, or catch \"\n\"various errors with one function each. So this code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:440\nmsgid \"works fine, the following one as well::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:452\nmsgid \"Summary\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:453\nmsgid \"\"\n\"After going through all the sections above, you should have a brief \"\n\"understanding how the Bottle WSGI framework works. Furthermore you have all \"\n\"the knowledge necessary to use Bottle for your applications.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:455\nmsgid \"\"\n\"The following chapter give a short introduction how to adapt Bottle for \"\n\"larger projects. Furthermore, we will show how to operate Bottle with web \"\n\"servers which perform better on a higher load / more web traffic than the \"\n\"one we used so far.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:458\nmsgid \"Server Setup\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:460\nmsgid \"\"\n\"So far, we used the standard server used by Bottle, which is the `WSGI \"\n\"reference Server`_ shipped along with Python. Although this server is \"\n\"perfectly suitable for development purposes, it is not really suitable for \"\n\"larger applications. But before we have a look at the alternatives, let's \"\n\"have a look how to tweak the settings of the standard server first.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:464\nmsgid \"Running Bottle on a different port and IP\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:465\nmsgid \"\"\n\"As standard, Bottle serves the pages on the IP address 127.0.0.1, also known\"\n\" as ``localhost``, and on port ``8080``. To modify the setting is pretty \"\n\"simple, as additional parameters can be passed to Bottle's ``run()`` \"\n\"function to change the port and the address.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:467\nmsgid \"\"\n\"To change the port, just add ``port=portnumber`` to the run command. So, for\"\n\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:471\nmsgid \"would make Bottle listen to port 80.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:473\nmsgid \"To change the IP address where Bottle is listening::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:477\nmsgid \"If needed, both parameters can be combined, like::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:481\nmsgid \"\"\n\"The ``port`` and ``host`` parameter can also be applied when Bottle is \"\n\"running with a different server, as shown in the following section.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:485\nmsgid \"Running Bottle with a different server\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:486\nmsgid \"\"\n\"As said above, the standard server is perfectly suitable for development, \"\n\"personal use or a small group of people only using your application based on\"\n\" Bottle. For larger tasks, the standard server may become a bottleneck, as \"\n\"it is single-threaded, thus it can only serve one request at a time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:488\nmsgid \"\"\n\"But Bottle has already various adapters to multi-threaded servers on board, \"\n\"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and \"\n\"Paste_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:490\nmsgid \"\"\n\"If you want to run for example Bottle with the Paste server, use the \"\n\"following code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:496\nmsgid \"\"\n\"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and \"\n\"``FapwsServer``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:500\nmsgid \"Running Bottle on Apache with mod_wsgi\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:501\nmsgid \"\"\n\"Maybe you already have an Apache_ or you want to run a Bottle-based \"\n\"application large scale - then it is time to think about Apache with \"\n\"mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:503\nmsgid \"\"\n\"We assume that your Apache server is up and running and mod_wsgi is working \"\n\"fine as well. On a lot of Linux distributions, mod_wsgi can be easily \"\n\"installed via whatever package management system is in use.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:505\nmsgid \"\"\n\"Bottle brings an adapter for mod_wsgi with it, so serving your application \"\n\"is an easy task.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:507\nmsgid \"\"\n\"In the following example, we assume that you want to make your application \"\n\"\\\"ToDo list\\\" accessible through ``http://www.mypage.com/todo`` and your \"\n\"code, templates and SQLite database are stored in the path \"\n\"``/var/www/todo``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:509\nmsgid \"\"\n\"When you run your application via mod_wsgi, it is imperative to remove the \"\n\"``run()`` statement from your code, otherwise it won't work here.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:511\nmsgid \"\"\n\"After that, create a file called ``adapter.wsgi`` with the following \"\n\"content::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:522\nmsgid \"\"\n\"and save it in the same path, ``/var/www/todo``. Actually the name of the \"\n\"file can be anything, as long as the extension is ``.wsgi``. The name is \"\n\"only used to reference the file from your virtual host.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:524\nmsgid \"\"\n\"Finally, we need to add a virtual host to the Apache configuration, which \"\n\"looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:540\nmsgid \"\"\n\"After restarting the server, your ToDo list should be accessible at \"\n\"``http://www.mypage.com/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:543\nmsgid \"Final Words\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:545\nmsgid \"\"\n\"Now we are at the end of this introduction and tutorial to Bottle. We \"\n\"learned about the basic concepts of Bottle and wrote a first application \"\n\"using the Bottle framework. In addition to that, we saw how to adapt Bottle \"\n\"for large tasks and serve Bottle through an Apache web server with mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:547\nmsgid \"\"\n\"As said in the introduction, this tutorial is not showing all shades and \"\n\"possibilities of Bottle. What we skipped here is e.g. receiving file objects\"\n\" and streams and how to handle authentication data. Furthermore, we did not \"\n\"show how templates can be called from within another template. For an \"\n\"introduction into those points, please refer to the full `Bottle \"\n\"documentation`_ .\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:550\nmsgid \"Complete Example Listing\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:552\nmsgid \"\"\n\"As the ToDo list example was developed piece by piece, here is the complete \"\n\"listing:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:554\nmsgid \"Main code for the application ``todo.py``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:675\nmsgid \"Template ``make_table.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:689\nmsgid \"Template ``edit_task.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:704\nmsgid \"Template ``new_task.tpl``::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/api.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../api.rst:3\nmsgid \"API Reference\"\nmsgstr \"\"\n\n#: ../../api.rst:10\nmsgid \"\"\n\"This is a mostly auto-generated API. If you are new to bottle, you might \"\n\"find the narrative :doc:`tutorial` more helpful.\"\nmsgstr \"\"\n\n#: ../../api.rst:17\nmsgid \"Module Contents\"\nmsgstr \"\"\n\n#: ../../api.rst:19\nmsgid \"The module defines several functions, constants, and an exception.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.debug:1\nmsgid \"\"\n\"Change the debug level. There is only one debug level supported at the \"\n\"moment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:1\nmsgid \"\"\n\"Start a server instance. This method blocks until the server terminates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:0 ../../../bottle.pydocstring of\n#: bottle.path_shift:0 ../../../bottle.pydocstring of bottle.MultiDict.get:0\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:0\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:0\n#: ../../../bottle.pydocstring of bottle.Bottle:0 ../../../bottle.pydocstring\n#: of bottle.Bottle.mount:0 ../../../bottle.pydocstring of\n#: bottle.Bottle.route:0 ../../../bottle.pydocstring of\n#: bottle.BaseRequest.path_shift:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:3\nmsgid \"\"\n\"WSGI application or target string supported by :func:`load_app`. (default: \"\n\":func:`default_app`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:5\nmsgid \"\"\n\"Server adapter to use. See :data:`server_names` keys for valid names or pass\"\n\" a :class:`ServerAdapter` subclass. (default: `wsgiref`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:8\nmsgid \"\"\n\"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces \"\n\"including the external one. (default: 127.0.0.1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:10\nmsgid \"\"\n\"Server port to bind to. Values below 1024 require root privileges. (default:\"\n\" 8080)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:12\nmsgid \"Start auto-reloading server? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:13\nmsgid \"Auto-reloader interval in seconds (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:14\nmsgid \"Suppress output to stdout and stderr? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:15\nmsgid \"Options passed to the server adapter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:1\nmsgid \"Import a module or fetch an object from a module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:3\nmsgid \"``package.module`` returns `module` as a module object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:4\nmsgid \"``pack.mod:name`` returns the module variable `name` from `pack.mod`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:5\nmsgid \"``pack.mod:func()`` calls `pack.mod.func()` and returns the result.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:7\nmsgid \"\"\n\"The last form accepts not only function calls, but any type of expression. \"\n\"Keyword arguments passed to this function are available as local variables. \"\n\"Example: ``import_string('re:compile(x)', x='[a-z]')``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load_app:1\nmsgid \"\"\n\"Load a bottle application from a module and make sure that the import does \"\n\"not affect the current default application, but returns a separate \"\n\"application object. See :func:`load` for the target parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.request:1 ../../../bottle.pydocstring\n#: of bottle.request:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalRequest`. If accessed from within a \"\n\"request callback, this instance always refers to the *current* request (even\"\n\" on a multi-threaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.response:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalResponse`. It is used to change the \"\n\"HTTP response for the *current* request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HTTP_CODES:1\nmsgid \"\"\n\"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')\"\nmsgstr \"\"\n\n#: ../../api.rst:38\nmsgid \"\"\n\"Return the current :ref:`default-app`. Actually, these are callable \"\n\"instances of :class:`AppStack` and implement a stack-like API.\"\nmsgstr \"\"\n\n#: ../../api.rst:42\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../api.rst:44\nmsgid \"\"\n\"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and \"\n\":class:`AppStack`) and uses the top of the stack as a *default application* \"\n\"for some of the module-level functions and decorators.\"\nmsgstr \"\"\n\n#: ../../api.rst:54\nmsgid \"\"\n\"Decorator to install a route to the current default application. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:59\nmsgid \"\"\n\"Decorator to install an error handler to the current default application. \"\n\"See :meth:`Bottle.error` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:63\nmsgid \"WSGI and HTTP Utilities\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_date:1\nmsgid \"Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_auth:1\nmsgid \"\"\n\"Parse rfc2617 HTTP authentication header string (basic) and return \"\n\"(user,pass) tuple or None\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_encode:1\nmsgid \"Encode and sign a pickle-able object. Return a (byte) string\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_decode:1\nmsgid \"Verify and decode an encoded string. Return an object or None.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_is_encoded:1\nmsgid \"Return True if the argument looks like a encoded cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.yieldroutes:1\nmsgid \"\"\n\"Return a generator for routes that match the signature (name, args) of the \"\n\"func parameter. This may yield more than one route if the function takes \"\n\"optional keyword arguments. The output is best described by example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:1\nmsgid \"Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:0\nmsgid \"Returns\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:3\nmsgid \"The modified paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:4\nmsgid \"The SCRIPT_NAME path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:5\nmsgid \"The PATH_INFO path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:6\nmsgid \"\"\n\"The number of path fragments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../api.rst:81\nmsgid \"Data Structures\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict:1\nmsgid \"\"\n\"This dict stores multiple values per key, but behaves exactly like a normal \"\n\"dict in that it returns only the newest value for any given key. There are \"\n\"special methods available to access the full list of values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.keys:1\nmsgid \"D.keys() -> a set-like object providing a view on D's keys\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.values:1\nmsgid \"D.values() -> an object providing a view on D's values\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.items:1\nmsgid \"D.items() -> a set-like object providing a view on D's items\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:1\nmsgid \"Return the most recent value for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:3\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:3\nmsgid \"\"\n\"The default value to be returned if the key is not present or the type \"\n\"conversion fails.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:5\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:5\nmsgid \"An index for the list of available values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:6\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:6\nmsgid \"\"\n\"If defined, this callable is used to cast the value into a specific type. \"\n\"Exception are suppressed and result in the default value to be returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.append:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.append:1\nmsgid \"Add a new value to the list of values for this key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.replace:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.replace:1\nmsgid \"Replace the list of values with a single value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.getall:1\nmsgid \"Return a (possibly empty) list of values for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\nmsgid \"Aliases for WTForms to mimic other multi-dict APIs (Django)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HeaderDict:1\nmsgid \"\"\n\"A case-insensitive version of :class:`MultiDict` that defaults to replace \"\n\"the old value instead of appending it.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict:1\nmsgid \"\"\n\"This :class:`MultiDict` subclass is used to store request form data. \"\n\"Additionally to the normal dict-like item access methods (which return \"\n\"unmodified data as native strings), this container also supports attribute-\"\n\"like access to its values. Attributes are automatically de- or recoded to \"\n\"match :attr:`input_encoding` (default: 'utf8'). Missing attributes default \"\n\"to an empty string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.input_encoding:1\nmsgid \"Encoding used for attribute values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.recode_unicode:1\nmsgid \"\"\n\"If true (default), unicode strings are first encoded with `latin1` and then \"\n\"decoded to match :attr:`input_encoding`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.decode:1\nmsgid \"\"\n\"Returns a copy with all keys and values de- or recoded to match \"\n\":attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode \"\n\"dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.getunicode:1\nmsgid \"Return the value as a unicode string, or the default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:1\nmsgid \"\"\n\"This dict-like class wraps a WSGI environ dict and provides convenient \"\n\"access to HTTP_* fields. Keys and values are native strings (2.x bytes or \"\n\"3.x unicode) and keys are case-insensitive. If the WSGI environment contains\"\n\" non-native string values, these are de- or encoded using a lossless \"\n\"'latin1' character set.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:7\nmsgid \"\"\n\"The API will remain stable even on changes to the relevant PEPs. Currently \"\n\"PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-\"\n\"native strings.)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.cgikeys:1\nmsgid \"List of keys that do not have a ``HTTP_`` prefix.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.raw:1\nmsgid \"Return the header value as is (may be bytes or unicode).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack:1\nmsgid \"A stack-like list. Calling it returns the head of the stack.\"\nmsgstr \"\"\n\n#: ../../api.rst:100\nmsgid \"Return the current default application and remove it from the stack.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\nmsgid \"Add a new :class:`Bottle` instance to the stack\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:1\nmsgid \"\"\n\"This class manages a list of search paths and helps to find and open \"\n\"application-bound resources (files).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:4\nmsgid \"default value for :meth:`add_path` calls.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:5\nmsgid \"callable used to open resources.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:6\nmsgid \"controls which lookups are cached. One of 'all', 'found' or 'none'.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.path:1\nmsgid \"A list of search paths. See :meth:`add_path` for details.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.cache:1\nmsgid \"A cache for resolved paths. ``res.cache.clear()`` clears the cache.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:1\nmsgid \"\"\n\"Add a new path to the list of search paths. Return False if the path does \"\n\"not exist.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:4\nmsgid \"\"\n\"The new search path. Relative paths are turned into an absolute and \"\n\"normalized form. If the path looks like a file (not ending in `/`), the \"\n\"filename is stripped off.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:7\nmsgid \"\"\n\"Path used to absolutize relative search paths. Defaults to :attr:`base` \"\n\"which defaults to ``os.getcwd()``.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:9\nmsgid \"\"\n\"Position within the list of search paths. Defaults to last index (appends to\"\n\" the list).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:12\nmsgid \"\"\n\"The `base` parameter makes it easy to reference files installed along with a\"\n\" python module or package::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:1\nmsgid \"Search for a resource and return an absolute file path, or `None`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:3\nmsgid \"\"\n\"The :attr:`path` list is searched in order. The first match is returned. \"\n\"Symlinks are followed. The result is cached to speed up future lookups.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.open:1\nmsgid \"Find a resource and return a file object, or raise IOError.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.file:1\nmsgid \"Open file(-like) object (BytesIO buffer or temporary file)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.name:1\nmsgid \"Name of the upload form field\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.raw_filename:1\nmsgid \"Raw filename as sent by the client (may contain unsafe characters)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.headers:1\nmsgid \"A :class:`HeaderDict` with additional headers (e.g. content-type)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_type:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_type:1\nmsgid \"Current value of the 'Content-Type' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_length:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_length:1\nmsgid \"Current value of the 'Content-Length' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.get_header:1\nmsgid \"Return the value of a header within the mulripart part.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:1\nmsgid \"\"\n\"Name of the file on the client file system, but normalized to ensure file \"\n\"system compatibility. An empty filename is returned as 'empty'.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:4\nmsgid \"\"\n\"Only ASCII letters, digits, dashes, underscores and dots are allowed in the \"\n\"final filename. Accents are removed, if possible. Whitespace is replaced by \"\n\"a single dash. Leading or tailing dots or dashes are removed. The filename \"\n\"is limited to 255 characters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:1\nmsgid \"\"\n\"Save file to disk or copy its content to an open file(-like) object. If \"\n\"*destination* is a directory, :attr:`filename` is added to the path. \"\n\"Existing files are not overwritten by default (IOError).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:5\nmsgid \"File path, directory or file(-like) object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:6\nmsgid \"If True, replace existing files. (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:7\nmsgid \"Bytes to read at a time. (default: 64kb)\"\nmsgstr \"\"\n\n#: ../../api.rst:109\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BottleException:1\nmsgid \"A base class for exceptions used by bottle.\"\nmsgstr \"\"\n\n#: ../../api.rst:117\nmsgid \"The :class:`Bottle` Class\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:1\nmsgid \"\"\n\"Each Bottle object represents a single, distinct web application and \"\n\"consists of routes, callbacks, plugins, resources and configuration. \"\n\"Instances are callable WSGI applications.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:5\nmsgid \"\"\n\"If true (default), handle all exceptions. Turn off to let debugging \"\n\"middleware handle exceptions.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.config:1\nmsgid \"A :class:`ConfigDict` for app specific configuration.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.resources:1\nmsgid \"A :class:`ResourceManager` for application files\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.catchall:1\nmsgid \"If true, most exceptions are caught and returned as :exc:`HTTPError`\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:1\nmsgid \"Attach a callback to a hook. Three hooks are currently implemented:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"before_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"\"\n\"Executed once before each request. The request context is available, but no \"\n\"routing has happened yet.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:6\nmsgid \"after_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:7\nmsgid \"Executed once after each request regardless of its outcome.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:8\nmsgid \"app_reset\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:9\nmsgid \"Called whenever :meth:`Bottle.reset` is called.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.remove_hook:1\nmsgid \"Remove a callback from a hook.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.trigger_hook:1\nmsgid \"Trigger a hook and return a list of results.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.hook:1\nmsgid \"\"\n\"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` \"\n\"for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:1\nmsgid \"\"\n\"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL \"\n\"prefix. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:6\nmsgid \"path prefix or `mount-point`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:7\nmsgid \"an instance of :class:`Bottle` or a WSGI application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:9\nmsgid \"\"\n\"Plugins from the parent application are not applied to the routes of the \"\n\"mounted child application. If you need plugins in the child application, \"\n\"install them separately.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:13\nmsgid \"\"\n\"While it is possible to use path wildcards within the prefix path \"\n\"(:class:`Bottle` childs only), it is highly discouraged.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:16\nmsgid \"\"\n\"The prefix path must end with a slash. If you want to access the root of the\"\n\" child application via `/prefix` in addition to `/prefix/`, consider adding \"\n\"a route with a 307 redirect to the parent application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.merge:1\nmsgid \"\"\n\"Merge the routes of another :class:`Bottle` application or a list of \"\n\":class:`Route` objects into this application. The routes keep their 'owner',\"\n\" meaning that the :data:`Route.app` attribute is not changed.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.install:1\nmsgid \"\"\n\"Add a plugin to the list of plugins and prepare it for being applied to all \"\n\"routes of this application. A plugin may be a simple decorator or an object \"\n\"that implements the :class:`Plugin` API.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.uninstall:1\nmsgid \"\"\n\"Uninstall plugins. Pass an instance to remove a specific plugin, a type \"\n\"object to remove all plugins that match that type, a string to remove all \"\n\"plugins with a matching ``name`` attribute or ``True`` to remove all \"\n\"plugins. Return the list of removed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.reset:1\nmsgid \"\"\n\"Reset all routes (force plugins to be re-applied) and clear all caches. If \"\n\"an ID or route object is given, only that specific route is affected.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.close:1\nmsgid \"Close the application and all installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.run:1\nmsgid \"Calls :func:`run` with the same parameters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.match:1\nmsgid \"\"\n\"Search for a matching route and return a (:class:`Route`, urlargs) tuple. \"\n\"The second value is a dictionary with parameters extracted from the URL. \"\n\"Raise :exc:`HTTPError` (404/405) on a non-match.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get_url:1\nmsgid \"Return a string that matches a named route\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_route:1\nmsgid \"Add a route object, but do not change the :data:`Route.app` attribute.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:1\nmsgid \"A decorator to bind a function to a request URL. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:7\nmsgid \"\"\n\"The ``<name>`` part is a wildcard. See :class:`Router` for syntax details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:10\nmsgid \"\"\n\"Request path or a list of paths to listen to. If no path is specified, it is\"\n\" automatically generated from the signature of the function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:13\nmsgid \"\"\n\"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. \"\n\"(default: `GET`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:15\nmsgid \"\"\n\"An optional shortcut to avoid the decorator syntax. ``route(..., \"\n\"callback=func)`` equals ``route(...)(func)``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:17\nmsgid \"The name for this route. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:18\nmsgid \"\"\n\"A decorator or plugin or a list of plugins. These are applied to the route \"\n\"callback in addition to installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:20\nmsgid \"\"\n\"A list of plugins, plugin classes or names. Matching plugins are not \"\n\"installed to this route. ``True`` skips all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:23\nmsgid \"\"\n\"Any additional keyword arguments are stored as route-specific configuration \"\n\"and passed to plugins (see :meth:`Plugin.apply`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get:1\nmsgid \"Equals :meth:`route`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.post:1\nmsgid \"Equals :meth:`route` with a ``POST`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.put:1\nmsgid \"Equals :meth:`route` with a ``PUT`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.delete:1\nmsgid \"Equals :meth:`route` with a ``DELETE`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.patch:1\nmsgid \"Equals :meth:`route` with a ``PATCH`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.error:1\nmsgid \"\"\n\"Register an output handler for a HTTP error code. Can be used as a decorator\"\n\" or called directly ::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.wsgi:1\nmsgid \"The bottle WSGI-interface.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route:1\nmsgid \"\"\n\"This class wraps a route callback along with route specific metadata and \"\n\"configuration and applies Plugins on demand. It is also responsible for \"\n\"turning an URL path rule into a regular expression usable by the Router.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.app:1\nmsgid \"The application this route is installed to.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.rule:1\nmsgid \"The path-rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.method:1\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.callback:1\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.name:1\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.plugins:1\nmsgid \"A list of route-specific plugins (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.skiplist:1\nmsgid \"\"\n\"A list of plugins to not apply to this route (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.config:1\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific plugin configuration \"\n\"and meta-data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.call:1\nmsgid \"\"\n\"The route callback with all plugins applied. This property is created on \"\n\"demand and then cached to speed up subsequent requests.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.reset:1\nmsgid \"\"\n\"Forget any cached values. The next time :attr:`call` is accessed, all \"\n\"plugins are re-applied.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.prepare:1\nmsgid \"Do all on-demand work immediately (useful for debugging).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.all_plugins:1\nmsgid \"Yield all Plugins affecting this route.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_undecorated_callback:1\nmsgid \"\"\n\"Return the callback. If the callback is a decorated function, try to recover\"\n\" the original function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_callback_args:1\nmsgid \"\"\n\"Return a list of argument names the callback (most likely) accepts as \"\n\"keyword arguments. If the callback is a decorated function, try to recover \"\n\"the original function before inspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_config:1\nmsgid \"\"\n\"Lookup a config field and return its value, first checking the route.config,\"\n\" then route.app.config.\"\nmsgstr \"\"\n\n#: ../../api.rst:127\nmsgid \"The :class:`Request` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:129\nmsgid \"\"\n\"The :class:`Request` class wraps a WSGI environment and provides helpful \"\n\"methods to parse and access form data, cookies, file uploads and other \"\n\"metadata. Most of the attributes are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:1\nmsgid \"\"\n\"A wrapper for WSGI environment dictionaries that adds a lot of convenient \"\n\"access methods and properties. Most of them are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:4\nmsgid \"\"\n\"Adding new attributes to a request actually adds them to the environ \"\n\"dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to \"\n\"store and access request-specific data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.MEMFILE_MAX:1\nmsgid \"Maximum size of memory buffer for :attr:`body` in bytes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.environ:1\nmsgid \"\"\n\"The wrapped WSGI environ dictionary. This is the only real attribute. All \"\n\"other attributes actually are read-only properties.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.app:1\nmsgid \"Bottle application handling this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.route:1\nmsgid \"The bottle :class:`Route` object that matches this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url_args:1\nmsgid \"The arguments extracted from the URL.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path:1\nmsgid \"\"\n\"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken \"\n\"clients and avoid the \\\"empty path\\\" edge case).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.method:1\nmsgid \"The ``REQUEST_METHOD`` value as an uppercase string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.headers:1\nmsgid \"\"\n\"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP \"\n\"request headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_header:1\nmsgid \"Return the value of a request header, or a given default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.cookies:1\nmsgid \"\"\n\"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. \"\n\"Use :meth:`get_cookie` if you expect signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_cookie:1\nmsgid \"\"\n\"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must\"\n\" match the one used to create the cookie (see \"\n\":meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or \"\n\"wrong signature), return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"\"\n\"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are \"\n\"sometimes called \\\"URL arguments\\\" or \\\"GET parameters\\\", but not to be \"\n\"confused with \\\"URL wildcards\\\" as they are provided by the :class:`Router`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.forms:1\nmsgid \"\"\n\"Form values parsed from an `url-encoded` or `multipart/form-data` encoded \"\n\"POST or PUT request body. The result is returned as a :class:`FormsDict`. \"\n\"All keys and values are strings. File uploads are stored separately in \"\n\":attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.params:1\nmsgid \"\"\n\"A :class:`FormsDict` with the combined values of :attr:`query` and \"\n\":attr:`forms`. File uploads are stored in :attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.files:1\nmsgid \"\"\n\"File uploads parsed from `multipart/form-data` encoded POST or PUT request \"\n\"body. The values are instances of :class:`FileUpload`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.json:1\nmsgid \"\"\n\"If the ``Content-Type`` header is ``application/json`` or ``application\"\n\"/json-rpc``, this property holds the parsed content of the request body. \"\n\"Only requests smaller than :attr:`MEMFILE_MAX` are processed to avoid memory\"\n\" exhaustion. Invalid JSON raises a 400 error response.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.body:1\nmsgid \"\"\n\"The HTTP request body as a seek-able file-like object. Depending on \"\n\":attr:`MEMFILE_MAX`, this is either a temporary file or a \"\n\":class:`io.BytesIO` instance. Accessing this property for the first time \"\n\"reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses \"\n\"just do a `seek(0)` on the file object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.chunked:1\nmsgid \"True if Chunked transfer encoding was.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"An alias for :attr:`query`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.POST:1\nmsgid \"\"\n\"The values of :attr:`forms` and :attr:`files` combined into a single \"\n\":class:`FormsDict`. Values are either strings (form values) or instances of \"\n\":class:`cgi.FieldStorage` (file uploads).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url:1\nmsgid \"\"\n\"The full request URI including hostname and scheme. If your app lives behind\"\n\" a reverse proxy or load balancer and you get confusing results, make sure \"\n\"that the ``X-Forwarded-Host`` header is set correctly.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.urlparts:1\nmsgid \"\"\n\"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple \"\n\"contains (scheme, host, path, query_string and fragment), but the fragment \"\n\"is always empty because it is not visible to the server.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.fullpath:1\nmsgid \"Request path including :attr:`script_name` (if present).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query_string:1\nmsgid \"\"\n\"The raw :attr:`query` part of the URL (everything in between ``?`` and \"\n\"``#``) as a string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.script_name:1\nmsgid \"\"\n\"The initial portion of the URL's `path` that was removed by a higher level \"\n\"(server or routing middleware) before the application was called. This \"\n\"script path is returned with leading and tailing slashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"Shift path segments from :attr:`path` to :attr:`script_name` and\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:4\nmsgid \"\"\n\"The number of path segments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_length:1\nmsgid \"\"\n\"The request body length as an integer. The client is responsible to set this\"\n\" header. Otherwise, the real length of the body is unknown and -1 is \"\n\"returned. In this case, :attr:`body` will be empty.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_type:1\nmsgid \"The Content-Type header as a lowercase-string (default: empty).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_xhr:1\nmsgid \"\"\n\"True if the request was triggered by a XMLHttpRequest. This only works with \"\n\"JavaScript libraries that support the `X-Requested-With` header (most of the\"\n\" popular libraries do).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_ajax:1\nmsgid \"Alias for :attr:`is_xhr`. \\\"Ajax\\\" is not the right term.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.auth:1\nmsgid \"\"\n\"HTTP authentication data as a (user, password) tuple. This implementation \"\n\"currently supports basic (not digest) authentication only. If the \"\n\"authentication happened at a higher level (e.g. in the front web-server or a\"\n\" middleware), the password field is None, but the user field is looked up \"\n\"from the ``REMOTE_USER`` environ variable. On any errors, None is returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_route:1\nmsgid \"\"\n\"A list of all IPs that were involved in this request, starting with the \"\n\"client IP and followed by zero or more proxies. This does only work if all \"\n\"proxies support the ```X-Forwarded-For`` header. Note that this information \"\n\"can be forged by malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_addr:1\nmsgid \"\"\n\"The client IP as a string. Note that this information can be forged by \"\n\"malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.copy:1\nmsgid \"Return a new :class:`Request` with a shallow :attr:`environ` copy.\"\nmsgstr \"\"\n\n#: ../../api.rst:137\nmsgid \"\"\n\"The module-level :data:`bottle.request` is a proxy object (implemented in \"\n\":class:`LocalRequest`) and always refers to the `current` request, or in \"\n\"other words, the request that is currently processed by the request handler \"\n\"in the current thread. This `thread locality` ensures that you can safely \"\n\"use a global instance in a multi-threaded environment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseRequest` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`request`). If accessed during a request/response cycle, \"\n\"this instance always refers to the *current* request (even on a \"\n\"multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.__init__:1\nmsgid \"Wrap a WSGI environ dictionary.\"\nmsgstr \"\"\n\n#: ../../api.rst:146\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:148\nmsgid \"\"\n\"The :class:`Response` class stores the HTTP status code as well as headers \"\n\"and cookies that are to be sent to the client. Similar to \"\n\":data:`bottle.request` there is a thread-local :data:`bottle.response` \"\n\"instance that can be used to adjust the `current` response. Moreover, you \"\n\"can instantiate :class:`Response` and return it from your request handler. \"\n\"In this case, the custom instance overrules the headers and cookies defined \"\n\"in the global one.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:1\nmsgid \"Storage class for a response body as well as headers and cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:3\nmsgid \"\"\n\"This class does support dict-like case-insensitive item-access to headers, \"\n\"but is NOT a dict. Most notably, iterating over a response yields parts of \"\n\"the body and not the headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:7\nmsgid \"The response body as one of the supported types.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:8\nmsgid \"\"\n\"Either an HTTP status code (e.g. 200) or a status line including the reason \"\n\"phrase (e.g. '200 OK').\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:10\nmsgid \"A dictionary or a list of name-value pairs.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:12\nmsgid \"\"\n\"Additional keyword arguments are added to the list of headers. Underscores \"\n\"in the header name are replaced with dashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.copy:1\nmsgid \"Returns a copy of self.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_line:1\nmsgid \"The HTTP status line as a string (e.g. ``404 Not Found``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_code:1\nmsgid \"The HTTP status code as an integer (e.g. 404).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status:1\nmsgid \"\"\n\"A writeable property to change the HTTP response status. It accepts either a\"\n\" numeric code (100-999) or a string with a custom reason phrase (e.g. \\\"404 \"\n\"Brain not found\\\"). Both :data:`status_line` and :data:`status_code` are \"\n\"updated accordingly. The return value is always a status string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headers:1\nmsgid \"\"\n\"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the\"\n\" response headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.get_header:1\nmsgid \"\"\n\"Return the value of a previously defined header. If there is no header with \"\n\"that name, return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_header:1\nmsgid \"\"\n\"Create a new response header, replacing any previously defined headers with \"\n\"the same name.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.add_header:1\nmsgid \"Add an additional response header, not removing duplicates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.iter_headers:1\nmsgid \"\"\n\"Yield (header, value) tuples, skipping headers that are not allowed with the\"\n\" current response status code.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headerlist:1\nmsgid \"WSGI conform list of (header, value) tuples.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.expires:1\nmsgid \"Current value of the 'Expires' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.charset:1\nmsgid \"\"\n\"Return the charset specified in the content-type header (default: utf8).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:1\nmsgid \"\"\n\"Create a new cookie or replace an old one. If the `secret` parameter is set,\"\n\" create a `Signed Cookie` (described below).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:4\nmsgid \"the name of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:5\nmsgid \"the value of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:6\nmsgid \"a signature key required for signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:8\nmsgid \"\"\n\"Additionally, this method accepts all RFC 2109 attributes that are supported\"\n\" by :class:`cookie.Morsel`, including:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:11\nmsgid \"maximum age in seconds. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:12\nmsgid \"a datetime object or UNIX timestamp. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:13\nmsgid \"\"\n\"the domain that is allowed to read the cookie. (default: current domain)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:15\nmsgid \"limits the cookie to a given path (default: current path)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:16\nmsgid \"limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:17\nmsgid \"\"\n\"prevents client-side javascript to read this cookie (default: off, requires \"\n\"Python 2.6 or newer).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:19\nmsgid \"\"\n\"Control or disable third-party use for this cookie. Possible values: `lax`, \"\n\"`strict` or `none` (default).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:22\nmsgid \"\"\n\"If neither `expires` nor `maxage` is set (default), the cookie will expire \"\n\"at the end of the browser session (as soon as the browser window is closed).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:26\nmsgid \"\"\n\"Signed cookies may store any pickle-able object and are cryptographically \"\n\"signed to prevent manipulation. Keep in mind that cookies are limited to 4kb\"\n\" in most browsers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:30\nmsgid \"\"\n\"Warning: Pickle is a potentially dangerous format. If an attacker gains \"\n\"access to the secret key, he could forge cookies that execute code on server\"\n\" side if unpickled. Using pickle is discouraged and support for it will be \"\n\"removed in later versions of bottle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:35\nmsgid \"\"\n\"Warning: Signed cookies are not encrypted (the client can still see the \"\n\"content) and not copy-protected (the client can restore an old cookie). The \"\n\"main intention is to make pickling and unpickling save, not to store secret \"\n\"information at client side.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.delete_cookie:1\nmsgid \"\"\n\"Delete a cookie. Be sure to use the same `domain` and `path` settings as \"\n\"used to create the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseResponse` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`response`). Its attributes are used to build the HTTP \"\n\"response at the end of the request/response cycle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.__init__:1\nmsgid \"Initialize self.  See help(type(self)) for accurate signature.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse.body:1\nmsgid \"Thread-local property\"\nmsgstr \"\"\n\n#: ../../api.rst:160\nmsgid \"\"\n\"The following two classes can be raised as an exception. The most noticeable\"\n\" difference is that bottle invokes error handlers for :class:`HTTPError`, \"\n\"but not for :class:`HTTPResponse` or other response types.\"\nmsgstr \"\"\n\n#: ../../api.rst:172\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../api.rst:174\nmsgid \"\"\n\"All template engines supported by :mod:`bottle` implement the \"\n\":class:`BaseTemplate` API. This way it is possible to switch and mix \"\n\"template engines without changing the application code at all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate:1\nmsgid \"Base class and minimal API for template adapters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.__init__:1\nmsgid \"\"\n\"Create a new template. If the source parameter (str or buffer) is missing, \"\n\"the name argument is used to guess a template filename. Subclasses can \"\n\"assume that self.source and/or self.filename are set. Both are strings. The \"\n\"lookup, encoding and settings parameters are stored as instance variables. \"\n\"The lookup parameter stores a list containing directory paths. The encoding \"\n\"parameter should be used to decode byte strings or files. The settings \"\n\"parameter contains a dict for engine-specific settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.search:1\nmsgid \"\"\n\"Search name in all directories specified in lookup. First without, then with\"\n\" common extensions. Return first hit.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.global_config:1\nmsgid \"This reads or sets the global settings stored in class.settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.render:1\nmsgid \"\"\n\"Render the template with the specified local variables and return a single \"\n\"byte or unicode string. If it is a byte string, the encoding must match \"\n\"self.encoding. This method must be thread-safe! Local variables may be \"\n\"provided in dictionaries (args) or directly, as keywords (kwargs).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:1\nmsgid \"\"\n\"Decorator: renders a template for a handler. The handler can control its \"\n\"behavior like that:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:4\nmsgid \"return a dict of template vars to fill out the template\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:5\nmsgid \"\"\n\"return something other than a dict and the view decorator will not process \"\n\"the template, but return the handler result as is. This includes returning a\"\n\" HTTPResponse(dict) to get, for instance, JSON with autojson or other \"\n\"castfilters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.template:1\nmsgid \"\"\n\"Get a rendered template as a string iterator. You can use a name, a filename\"\n\" or a template string as first parameter. Template rendering arguments can \"\n\"be passed as dictionaries or directly (as keyword arguments).\"\nmsgstr \"\"\n\n#: ../../api.rst:185\nmsgid \"\"\n\"You can write your own adapter for your favourite template engine or use one\"\n\" of the predefined adapters. Currently there are four fully supported \"\n\"template engines:\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Class\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"URL\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Decorator\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Render function\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":class:`SimpleTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`view`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`template`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":class:`MakoTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \"http://www.makotemplates.org\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":class:`CheetahTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \"http://www.cheetahtemplate.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":class:`Jinja2Template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \"http://jinja.pocoo.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:196\nmsgid \"\"\n\"To use :class:`MakoTemplate` as your default template engine, just import \"\n\"its specialised decorator and render function::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/async.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2015-01-22 19:17+0000\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../async.rst:2\nmsgid \"Primer to Asynchronous Applications\"\nmsgstr \"\"\n\n#: ../../async.rst:4\nmsgid \"\"\n\"Asynchronous design patterns don't mix well with the synchronous nature of \"\n\"`WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most \"\n\"asynchronous frameworks (tornado, twisted, ...) implement a specialized API \"\n\"to expose their asynchronous features. Bottle is a WSGI framework and shares\"\n\" the synchronous nature of WSGI, but thanks to the awesome `gevent project \"\n\"<http://www.gevent.org/>`_, it is still possible to write asynchronous \"\n\"applications with bottle. This article documents the usage of Bottle with \"\n\"Asynchronous WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:7\nmsgid \"The Limits of Synchronous WSGI\"\nmsgstr \"\"\n\n#: ../../async.rst:9\nmsgid \"\"\n\"Briefly worded, the `WSGI specification (pep 3333) \"\n\"<http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response \"\n\"circle as follows: The application callable is invoked once for each request\"\n\" and must return a body iterator. The server then iterates over the body and\"\n\" writes each chunk to the socket. As soon as the body iterator is exhausted,\"\n\" the client connection is closed.\"\nmsgstr \"\"\n\n#: ../../async.rst:11\nmsgid \"\"\n\"Simple enough, but there is a snag: All this happens synchronously. If your \"\n\"application needs to wait for data (IO, sockets, databases, ...), it must \"\n\"either yield empty strings (busy wait) or block the current thread. Both \"\n\"solutions occupy the handling thread and prevent it from answering new \"\n\"requests. There is consequently only one ongoing request per thread.\"\nmsgstr \"\"\n\n#: ../../async.rst:13\nmsgid \"\"\n\"Most servers limit the number of threads to avoid their relatively high \"\n\"overhead. Pools of 20 or less threads are common. As soon as all threads are\"\n\" occupied, any new connection is stalled. The server is effectively dead for\"\n\" everyone else. If you want to implement a chat that uses long-polling ajax \"\n\"requests to get real-time updates, you'd reach the limited at 20 concurrent \"\n\"connections. That's a pretty small chat.\"\nmsgstr \"\"\n\n#: ../../async.rst:16\nmsgid \"Greenlets to the rescue\"\nmsgstr \"\"\n\n#: ../../async.rst:18\nmsgid \"\"\n\"Most servers limit the size of their worker pools to a relatively low number\"\n\" of concurrent threads, due to the high overhead involved in switching \"\n\"between and creating new threads. While threads are cheap compared to \"\n\"processes (forks), they are still expensive to create for each new \"\n\"connection.\"\nmsgstr \"\"\n\n#: ../../async.rst:20\nmsgid \"\"\n\"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. \"\n\"Greenlets behave similar to traditional threads, but are very cheap to \"\n\"create. A gevent-based server can spawn thousands of greenlets (one for each\"\n\" connection) with almost no overhead. Blocking individual greenlets has no \"\n\"impact on the servers ability to accept new requests. The number of \"\n\"concurrent connections is virtually unlimited.\"\nmsgstr \"\"\n\n#: ../../async.rst:22\nmsgid \"\"\n\"This makes creating asynchronous applications incredibly easy, because they \"\n\"look and feel like synchronous applications. A gevent-based server is \"\n\"actually not asynchronous, but massively multi-threaded. Here is an \"\n\"example::\"\nmsgstr \"\"\n\n#: ../../async.rst:39\nmsgid \"\"\n\"The first line is important. It causes gevent to monkey-patch most of \"\n\"Python's blocking APIs to not block the current thread, but pass the CPU to \"\n\"the next greenlet instead. It actually replaces Python's threading with \"\n\"gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` \"\n\"which would normally block the whole thread. If you don't feel comfortable \"\n\"with monkey-patching python built-ins, you can use the corresponding gevent \"\n\"functions (``gevent.sleep()`` in this case).\"\nmsgstr \"\"\n\n#: ../../async.rst:41\nmsgid \"\"\n\"If you run this script and point your browser to \"\n\"``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and \"\n\"`END` show up one by one (rather than waiting 8 seconds to see them all at \"\n\"once). It works exactly as with normal threads, but now your server can \"\n\"handle thousands of concurrent requests without any problems.\"\nmsgstr \"\"\n\n#: ../../async.rst:45\nmsgid \"\"\n\"Some browsers buffer a certain amount of data before they start rendering a \"\n\"page. You might need to yield more than a few bytes to see an effect in \"\n\"these browsers. Additionally, many browsers have a limit of one concurrent \"\n\"connection per URL. If this is the case, you can use a second browser or a \"\n\"benchmark tool (e.g. `ab` or `httperf`) to measure performance.\"\nmsgstr \"\"\n\n#: ../../async.rst:52\nmsgid \"Event Callbacks\"\nmsgstr \"\"\n\n#: ../../async.rst:54\nmsgid \"\"\n\"A very common design pattern in asynchronous frameworks (including tornado, \"\n\"twisted, node.js and friends) is to use non-blocking APIs and bind callbacks\"\n\" to asynchronous events. The socket object is kept open until it is closed \"\n\"explicitly to allow callbacks to write to the socket at a later point. Here \"\n\"is an example based on the `tornado library \"\n\"<http://www.tornadoweb.org/documentation#non-blocking-asynchronous-\"\n\"requests>`_::\"\nmsgstr \"\"\n\n#: ../../async.rst:63\nmsgid \"\"\n\"The main benefit is that the request handler terminates early. The handling \"\n\"thread can move on and accept new requests while the callbacks continue to \"\n\"write to sockets of previous requests. This is how these frameworks manage \"\n\"to process a lot of concurrent requests with only a small number of OS \"\n\"threads.\"\nmsgstr \"\"\n\n#: ../../async.rst:65\nmsgid \"\"\n\"With Gevent+WSGI, things are different: First, terminating early has no \"\n\"benefit because we have an unlimited pool of (pseudo)threads to accept new \"\n\"connections. Second, we cannot terminate early because that would close the \"\n\"socket (as required by WSGI). Third, we must return an iterable to conform \"\n\"to WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:67\nmsgid \"\"\n\"In order to conform to the WSGI standard, all we have to do is to return a \"\n\"body iterable that we can write to asynchronously. With the help of \"\n\"`gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate*\"\n\" a detached socket and rewrite the previous example as follows::\"\nmsgstr \"\"\n\n#: ../../async.rst:78\nmsgid \"\"\n\"From the server perspective, the queue object is iterable. It blocks if \"\n\"empty and stops as soon as it reaches ``StopIteration``. This conforms to \"\n\"WSGI. On the application side, the queue object behaves like a non-blocking \"\n\"socket. You can write to it at any time, pass it around and even start a new\"\n\" (pseudo)thread that writes to it asynchronously. This is how long-polling \"\n\"is implemented most of the time.\"\nmsgstr \"\"\n\n#: ../../async.rst:82\nmsgid \"Finally: WebSockets\"\nmsgstr \"\"\n\n#: ../../async.rst:84\nmsgid \"\"\n\"Lets forget about the low-level details for a while and speak about \"\n\"WebSockets. Since you are reading this article, you probably know what \"\n\"WebSockets are: A bidirectional communication channel between a browser \"\n\"(client) and a web application (server).\"\nmsgstr \"\"\n\n#: ../../async.rst:86\nmsgid \"\"\n\"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-\"\n\"websocket/>`_ package does all the hard work for us. Here is a simple \"\n\"WebSocket endpoint that receives messages and just sends them back to the \"\n\"client::\"\nmsgstr \"\"\n\n#: ../../async.rst:111\nmsgid \"\"\n\"The while-loop runs until the client closes the connection. You get the idea\"\n\" :)\"\nmsgstr \"\"\n\n#: ../../async.rst:113\nmsgid \"The client-site JavaScript API is really straight forward, too::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/changelog.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../changelog.rst:6\nmsgid \"Release Notes and Changelog\"\nmsgstr \"\"\n\n#: ../../changelog.rst:9\nmsgid \"Release 0.13\"\nmsgstr \"\"\n\n#: ../../changelog.rst:11\nmsgid \"Not released yet.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:14\nmsgid \"Dropped support for Python versions that reached their end-of-life.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:15\nmsgid \"\"\n\"Keeping up support for ancient Python versions hinders adaptation of new \"\n\"features and serves no real purpose. If you need support for older Python \"\n\"versions, you can stay on bottle-0.12. The updated list of tested and \"\n\"supported python releases is as follows:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:20\nmsgid \"Python 2.7 (>= 2.7.3)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:21\nmsgid \"Python 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:22\nmsgid \"Python 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:23\nmsgid \"Python 3.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:24\nmsgid \"Python 3.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:25\nmsgid \"PyPy 2.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:26\nmsgid \"PyPy 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:27\nmsgid \"PyPy 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:29\nmsgid \"\"\n\"Support for Python 2.5 was marked as deprecated since 0.12. We decided to go\"\n\" a step further and also remove support for 2.6 and 3.1 to 3.5 even if it \"\n\"was never deprecated explicitly in bottle. This means that this release is \"\n\"*not* backwards compatible in Python <2.7.3 or <3.6 environments. \"\n\"Maintainers for distributions or systems that still use these old python \"\n\"versions should not update to Bottle 0.13 and stick with 0.12 instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:35\nmsgid \"Stabilized APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:36\nmsgid \"\"\n\"The documented API of the :class:`ConfigDict` class is now considered stable\"\n\" and ready to use.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:38\nmsgid \"Deprecated APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:39\nmsgid \"\"\n\"The old route syntax (``/hello/:name``) is deprecated in favor of the more \"\n\"readable and flexible ``/hello/<name>`` syntax.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:40\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes Bottle instance and will warn about \"\n\"parameters that are not compatible with the new mounting behavior. The old \"\n\"behavior (mount applications as WSGI callable) still works and is used as a \"\n\"fallback automatically.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:41\nmsgid \"The undocumented :func:`local_property` helper is now deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:42\nmsgid \"\"\n\"The server adapter for google app engine is not useful anymore and marked as\"\n\" deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:43\nmsgid \"\"\n\"Bottle uses pickle to store arbitrary objects into signed cookies. This is \"\n\"safe, as long as the signature key remains a secret. Unfortunately, people \"\n\"tend to push code with signature keys to github all the time, so we decided \"\n\"to remove pickle-support from bottle. Signed cookies will now issue a \"\n\"deprecation warning if the value is not a string, and support for non-string\"\n\" values will be removed in 0.14. The global :func:`cookie_encode`, \"\n\":func:`cookie_decode` and :func:`is_cookie_encoded` are now also deprecated.\"\n\" If you are using this feature, think about using json to serialize your \"\n\"objects before storing them into cookies, or switch to a session system that\"\n\" stores data server-side instead of client-side.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:45\nmsgid \"Removed APIs (deprecated since 0.12)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:46\nmsgid \"\"\n\"Plugins with the old API (``api=1`` or no api attribute) will no longer \"\n\"work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:47\nmsgid \"\"\n\"Parameter order of :meth:`Bottle.mount` changed in 0.10. The old order will \"\n\"now result in an error instead of a warning.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:48\nmsgid \"\"\n\"The :class:`ConfigDict` class was introduced in 0.11 and changed during \"\n\"0.12. These changes are now final.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:50\nmsgid \"\"\n\"Attribute access and assignment was removed due to high overhead and limited\"\n\" usability.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:51\nmsgid \"\"\n\"Namespaced sub-instance creation was removed. ``config[\\\"a\\\"][\\\"b\\\"]`` has a\"\n\" high overhead and little benefit over ``config[\\\"a.b\\\"]``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:52\nmsgid \"\"\n\":class:`ConfigDict` instances are no longer callable. This was a shortcut \"\n\"for :meth:`ConfigDict.update`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:53\nmsgid \"\"\n\":class:`ConfigDict` constructor no longer accepts any parameters. Use the \"\n\"`load_*` methods instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:55\nmsgid \"\"\n\"Bottle 0.12 changed some aspects of the Simple Template Engine. These \"\n\"changes are now final and the old syntax will now longer work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:57\nmsgid \"\"\n\"The magic ``{{rebase()}}`` call was replaced by a ``base`` variable. \"\n\"Example: ``{{base}}``\"\nmsgstr \"\"\n\n#: ../../changelog.rst:58\nmsgid \"\"\n\"In STPL Templates, the 'rebase' and 'include' keywords were replaced with \"\n\"functions in 0.12.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:59\nmsgid \"\"\n\"PEP-263 encoding strings are no longer recognized. Templates are always \"\n\"utf-8.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:61\nmsgid \"\"\n\"The 'geventSocketIO' server adapter was removed without notice. It did not \"\n\"work anyway.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:63\nmsgid \"Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:64\nmsgid \"These changes might require special care when updating.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:66\nmsgid \"\"\n\"Signed cookies now use a stronger HMAC algorithm by default. This will \"\n\"result in old cookies to appear invalid after the update. Pass an explicit \"\n\"``digestmod=hashlib.md5`` to :meth:`Request.get_cookie` and \"\n\":meth:`Response.set_cookie` to get the old behavior.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:68\nmsgid \"Other Improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:69\nmsgid \"\"\n\"Bottle() instances are now context managers. If used in a with-statement, \"\n\"the default application changes to the specific instance and the shortcuts \"\n\"for many instance methods can be used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:70\nmsgid \"\"\n\"Added support for ``PATCH`` requests and the :meth:`Bottle.patch` decorator.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:71\nmsgid \"\"\n\"Added `aiohttp <http://aiohttp.readthedocs.io/en/stable/>`_ and `uvloop \"\n\"<https://github.com/MagicStack/uvloop>`_ server adapters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:72\nmsgid \"Added command-line arguments for config from json or ini files.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:73\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes instances of :class:`Bottle` and mounts \"\n\"them with significantly less overhead than other WSGI applications.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:74\nmsgid \"\"\n\"The :attr:`Request.json` property now accepts ``application/json-rpc`` \"\n\"requests.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:75\nmsgid \"\"\n\":func:`static_file` gained support for ``ETag`` headers. It will generate \"\n\"ETags and recognizes ``If-None-Match`` headers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:76\nmsgid \"Jinja2 templates will produce better error messages than before.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:82\nmsgid \"Release 0.12\"\nmsgstr \"\"\n\n#: ../../changelog.rst:84\nmsgid \"New SimpleTemplate parser implementation\"\nmsgstr \"\"\n\n#: ../../changelog.rst:86\nmsgid \"Support for multi-line code blocks (`<% ... %>`).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:87\nmsgid \"\"\n\"The keywords `include` and `rebase` are functions now and can accept \"\n\"variable template names.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:89\nmsgid \"\"\n\"The new :attr:`BaseRequest.route` property returns the :class:`Route` that \"\n\"originally matched the request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:90\nmsgid \"\"\n\"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in \"\n\"CPythons dict() implementation was fixed over a year ago. If you are still \"\n\"using Python 2.5 in production, consider upgrading or at least make sure \"\n\"that you get security fixed from your distributor.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:91\nmsgid \"New :class:`ConfigDict` API (see :doc:`configuration`)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:93\nmsgid \"\"\n\"More information can be found in this `development blog post \"\n\"<http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:97\nmsgid \"Release 0.11\"\nmsgstr \"\"\n\n#: ../../changelog.rst:99\nmsgid \"\"\n\"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:100\nmsgid \"\"\n\"Support for partial downloads (``Range`` header) in :func:`static_file`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:101\nmsgid \"\"\n\"The new :class:`ResourceManager` interface helps locating files bundled with\"\n\" an application.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:102\nmsgid \"\"\n\"Added a server adapter for `waitress \"\n\"<http://docs.pylonsproject.org/projects/waitress/en/latest/>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:103\nmsgid \"\"\n\"New :meth:`Bottle.merge` method to install all routes from one application \"\n\"into another.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:104\nmsgid \"\"\n\"New :attr:`BaseRequest.app` property to get the application object that \"\n\"handles a request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:105\nmsgid \"\"\n\"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by \"\n\"WTForms).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:106\nmsgid \":class:`MultiDict` and subclasses are now pickle-able.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:109\nmsgid \"API Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:110\nmsgid \"\"\n\":attr:`Response.status` is a read-write property that can be assigned either\"\n\" a numeric status code or a status string with a reason phrase (``200 OK``).\"\n\" The return value is now a string to better match existing APIs (WebOb, \"\n\"werkzeug). To be absolutely clear, you can use the read-only properties \"\n\":attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:113\nmsgid \"API Deprecations\"\nmsgstr \"\"\n\n#: ../../changelog.rst:114\nmsgid \"\"\n\":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:117\nmsgid \"Release 0.10\"\nmsgstr \"\"\n\n#: ../../changelog.rst:119\nmsgid \"Plugin API v2\"\nmsgstr \"\"\n\n#: ../../changelog.rst:121\nmsgid \"To use the new API, set :attr:`Plugin.api` to ``2``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:122\nmsgid \"\"\n\":meth:`Plugin.apply` receives a :class:`Route` object instead of a context \"\n\"dictionary as second parameter. The new object offers some additional \"\n\"information and may be extended in the future.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:123\nmsgid \"\"\n\"Plugin names are considered unique now. The topmost plugin with a given name\"\n\" on a given route is installed, all other plugins with the same name are \"\n\"silently ignored.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:125\nmsgid \"The Request/Response Objects\"\nmsgstr \"\"\n\n#: ../../changelog.rst:127\nmsgid \"\"\n\"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, \"\n\":attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and \"\n\":attr:`BaseRequest.script_name`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:128\nmsgid \"\"\n\"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` \"\n\"attributes. In future releases, :attr:`BaseResponse.status` will return a \"\n\"string (e.g. ``200 OK``) instead of an integer to match the API of other \"\n\"common frameworks. To make the transition as smooth as possible, you should \"\n\"use the verbose attributes from now on.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:129\nmsgid \"\"\n\"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many \"\n\"places. The new dict implementation allows attribute access and handles \"\n\"unicode form values transparently.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:131\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../changelog.rst:133\nmsgid \"\"\n\"Added three new functions to the SimpleTemplate default namespace that \"\n\"handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and \"\n\":func:`stpl.setdefault`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:134\nmsgid \"\"\n\"The default escape function for SimpleTemplate now additionally escapes \"\n\"single and double quotes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:136\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../changelog.rst:138\nmsgid \"\"\n\"A new route syntax (e.g. ``/object/<id:int>``) and support for route \"\n\"wildcard filters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:139\nmsgid \"Four new wildcard filters: `int`, `float`, `path` and `re`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:141\nmsgid \"Other changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:143\nmsgid \"Added command line interface to load applications and start servers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:144\nmsgid \"\"\n\"Introduced a :class:`ConfigDict` that makes accessing configuration a lot \"\n\"easier (attribute access and auto-expanding namespaces).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:145\nmsgid \"Added support for raw WSGI applications to :meth:`Bottle.mount`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:146\nmsgid \":meth:`Bottle.mount` parameter order changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:147\nmsgid \"\"\n\":meth:`Bottle.route` now accpets an import string for the ``callback`` \"\n\"parameter.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:148\nmsgid \"Dropped Gunicorn 0.8 support. Current supported version is 0.13.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:149\nmsgid \"Added custom options to Gunicorn server.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:150\nmsgid \"\"\n\"Finally dropped support for type filters. Replace with a custom plugin of \"\n\"needed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:154\nmsgid \"Release 0.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:157\nmsgid \"Whats new?\"\nmsgstr \"\"\n\n#: ../../changelog.rst:158\nmsgid \"\"\n\"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:159\nmsgid \"\"\n\"The :func:`route` decorator got a lot of new features. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:160\nmsgid \"\"\n\"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld \"\n\"<http://meinheld.org/>`_ and `bjoern \"\n\"<https://github.com/jonashaag/bjoern>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:161\nmsgid \"Support for SimpleTAL templates.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:162\nmsgid \"Better runtime exception handling for mako templates in debug mode.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:163\nmsgid \"Lots of documentation, fixes and small improvements.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:164\nmsgid \"A new :data:`Request.urlparts` property.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:167\nmsgid \"Performance improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:168\nmsgid \"\"\n\"The :class:`Router` now special-cases ``wsgi.run_once`` environments to \"\n\"speed up CGI.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:169\nmsgid \"\"\n\"Reduced module load time by ~30% and optimized template parser. See `8ccb2d \"\n\"</commit/8ccb2d>`_, `f72a7c </commit/f72a7c>`_ and `b14b9a \"\n\"</commit/b14b9a>`_ for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:170\nmsgid \"\"\n\"Support for \\\"App Caching\\\" on Google App Engine. See `af93ec \"\n\"</commit/af93ec>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:171\nmsgid \"\"\n\"Some of the rarely used or deprecated features are now plugins that avoid \"\n\"overhead if the feature is not used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:174 ../../changelog.rst:185\nmsgid \"API changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:175\nmsgid \"\"\n\"This release is mostly backward compatible, but some APIs are marked \"\n\"deprecated now and will be removed for the next release. Most noteworthy:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:177\nmsgid \"\"\n\"The ``static`` route parameter is deprecated. You can escape wild-cards with\"\n\" a backslash.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:178\nmsgid \"\"\n\"Type-based output filters are deprecated. They can easily be replaced with \"\n\"plugins.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:182\nmsgid \"Release 0.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:186\nmsgid \"These changes may break compatibility with previous versions.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:188\nmsgid \"\"\n\"The built-in Key/Value database is not available anymore. It is marked \"\n\"deprecated since 0.6.4\"\nmsgstr \"\"\n\n#: ../../changelog.rst:189\nmsgid \"The Route syntax and behaviour changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:191\nmsgid \"\"\n\"Regular expressions must be encapsulated with ``#``. In 0.6 all non-\"\n\"alphanumeric characters not present in the regular expression were allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:192\nmsgid \"\"\n\"Regular expressions not part of a route wildcard are escaped automatically. \"\n\"You don't have to escape dots or other regular control characters anymore. \"\n\"In 0.6 the whole URL was interpreted as a regular expression. You can use \"\n\"anonymous wildcards (``/index:#(\\\\.html)?#``) to achieve a similar \"\n\"behaviour.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:194\nmsgid \"\"\n\"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:195\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine escapes HTML special characters in \"\n\"``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` \"\n\"syntax to get old behaviour (no escaping).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:196\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine returns unicode strings instead of lists \"\n\"of byte strings.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:197\nmsgid \"\"\n\"``bottle.optimize()`` and the automatic route optimization is obsolete.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:198\nmsgid \"Some functions and attributes were renamed:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:200\nmsgid \":attr:`Request._environ` is now :attr:`Request.environ`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:201\nmsgid \":attr:`Response.header` is now :attr:`Response.headers`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:202\nmsgid \":func:`default_app` is obsolete. Use :func:`app` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:204\nmsgid \"The default :func:`redirect` code changed from 307 to 303.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:205\nmsgid \"Removed support for ``@default``. Use ``@error(404)`` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:209\nmsgid \"New features\"\nmsgstr \"\"\n\n#: ../../changelog.rst:210\nmsgid \"This is an incomplete list of new features and improved functionality.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:212\nmsgid \"\"\n\"The :class:`Request` object got new properties: :attr:`Request.body`, \"\n\":attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, \"\n\":attr:`Request.forms`, :attr:`Request.files`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:213\nmsgid \"\"\n\"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are \"\n\"now able to encode and decode python objects. This is called a *secure \"\n\"cookie* because the encoded values are signed and protected from changes on \"\n\"client side. All pickle-able data structures are allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:214\nmsgid \"\"\n\"The new :class:`Router` class drastically improves performance for setups \"\n\"with lots of dynamic routes and supports named routes (named route + dict = \"\n\"URL string).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:215\nmsgid \"\"\n\"It is now possible (and recommended) to return :exc:`HTTPError` and \"\n\":exc:`HTTPResponse` instances or other exception objects instead of raising \"\n\"them.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:216\nmsgid \"\"\n\"The new function :func:`static_file` equals :func:`send_file` but returns a \"\n\":exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. \"\n\":func:`send_file` is deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:217\nmsgid \"\"\n\"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:218\nmsgid \"The :class:`SimpleTemplate` engine got full unicode support.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:219\nmsgid \"Lots of non-critical bugfixes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:225\nmsgid \"Contributors\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:1\nmsgid \"\"\n\"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:3\nmsgid \"\"\n\"Thanks to all the people who found bugs, sent patches, spread the word, \"\n\"helped each other on the mailing-list and made this project possible. I hope\"\n\" the following (alphabetically sorted) list is complete. If you miss your \"\n\"name on that list (or want your name removed) please :doc:`tell me \"\n\"<contact>` or add it yourself.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:5\nmsgid \"acasajus\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:6\nmsgid \"Adam R. Smith\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:7\nmsgid \"Alexey Borzenkov\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:8\nmsgid \"Alexis Daboville\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:9\nmsgid \"Anton I. Sipos\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:10\nmsgid \"Anton Kolechkin\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:11\nmsgid \"apexi200sx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:12\nmsgid \"apheage\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:13\nmsgid \"BillMa\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:14\nmsgid \"Brad Greenlee\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:15\nmsgid \"Brandon Gilmore\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:16\nmsgid \"Branko Vukelic\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:17\nmsgid \"Brian Sierakowski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:18\nmsgid \"Brian Wickman\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:19\nmsgid \"Carl Scharenberg\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:20\nmsgid \"Damien Degois\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:21\nmsgid \"David Buxton\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:22\nmsgid \"Duane Johnson\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:23\nmsgid \"fcamel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:24\nmsgid \"Frank Murphy\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:25\nmsgid \"Frederic Junod\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:26\nmsgid \"goldfaber3012\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:27\nmsgid \"Greg Milby\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:28\nmsgid \"gstein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:29\nmsgid \"Ian Davis\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:30\nmsgid \"Itamar Nabriski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:31\nmsgid \"Iuri de Silvio\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:32\nmsgid \"Jaimie Murdock\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:33\nmsgid \"Jeff Nichols\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:34\nmsgid \"Jeremy Kelley\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:35\nmsgid \"joegester\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:36\nmsgid \"Johannes Krampf\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:37\nmsgid \"Jonas Haag\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:38\nmsgid \"Joshua Roesslein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:39\nmsgid \"Judson Neer\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:40\nmsgid \"Karl\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:41\nmsgid \"Kevin Zuber\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:42\nmsgid \"Kraken\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:43\nmsgid \"Kyle Fritz\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:44\nmsgid \"m35\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:45\nmsgid \"Marcos Neves\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:46\nmsgid \"masklinn\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:47\nmsgid \"Michael Labbe\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:48\nmsgid \"Michael Soulier\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:49\nmsgid \"`reddit <http://reddit.com/r/python>`_\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:50\nmsgid \"Nicolas Vanhoren\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:51\nmsgid \"Oz N Tiram\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:52\nmsgid \"Robert Rollins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:53\nmsgid \"rogererens\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:54\nmsgid \"rwxrwx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:55\nmsgid \"Santiago Gala\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:56\nmsgid \"Sean M. Collins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:57\nmsgid \"Sebastian Wollrath\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:58\nmsgid \"Seth\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:59\nmsgid \"Sigurd Høgsbro\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:60\nmsgid \"Stuart Rackham\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:61\nmsgid \"Sun Ning\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:62\nmsgid \"Tomás A. Schertel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:63\nmsgid \"Tristan Zajonc\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:64\nmsgid \"voltron\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:65\nmsgid \"Wieland Hoffmann\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:66\nmsgid \"zombat\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:67\nmsgid \"Thiago Avelino\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/configuration.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../configuration.rst:3\nmsgid \"Configuration (DRAFT)\"\nmsgstr \"\"\n\n#: ../../configuration.rst:8\nmsgid \"\"\n\"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_\"\n\" what you think.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:10\nmsgid \"\"\n\"Bottle applications can store their configuration in :attr:`Bottle.config`, \"\n\"a dict-like object and central place for application specific settings. This\"\n\" dictionary controls many aspects of the framework, tells (newer) plugins \"\n\"what to do, and can be used to store your own configuration as well.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:13\nmsgid \"Configuration Basics\"\nmsgstr \"\"\n\n#: ../../configuration.rst:15\nmsgid \"\"\n\"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. \"\n\"All the common dict methods work as expected. Let us start with some \"\n\"examples::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:44\nmsgid \"\"\n\"The app object is not always available, but as long as you are within a \"\n\"request context, you can use the `request` object to get the current \"\n\"application and its configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:51\nmsgid \"Naming Convention\"\nmsgstr \"\"\n\n#: ../../configuration.rst:53\nmsgid \"\"\n\"To make life easier, plugins and applications should follow some simple \"\n\"rules when it comes to config parameter names:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:55\nmsgid \"\"\n\"All keys should be lowercase strings and follow the rules for python \"\n\"identifiers (no special characters but the underscore).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:56\nmsgid \"\"\n\"Namespaces are separated by dots (e.g. ``namespace.field`` or \"\n\"``namespace.subnamespace.field``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:57\nmsgid \"\"\n\"Bottle uses the root namespace for its own configuration. Plugins should \"\n\"store all their variables in their own namespace (e.g. ``sqlite.db`` or \"\n\"``werkzeug.use_debugger``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:58\nmsgid \"\"\n\"Your own application should use a separate namespace (e.g. ``myapp.*``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:62\nmsgid \"Loading Configuration from a File\"\nmsgstr \"\"\n\n#: ../../configuration.rst:66\nmsgid \"\"\n\"Configuration files are useful if you want to enable non-programmers to \"\n\"configure your application, or just don't want to hack python module files \"\n\"just to change the database port. A very common syntax for configuration \"\n\"files is shown here:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:78\nmsgid \"\"\n\"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style \"\n\"configuration files from disk and import their values into your existing \"\n\"configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:85\nmsgid \"Loading Configuration from a python module\"\nmsgstr \"\"\n\n#: ../../configuration.rst:89\nmsgid \"\"\n\"Loading configuration from a Python module is a common pattern for Python \"\n\"programs and frameworks. Bottle assumes that configuration keys are all \"\n\"upper case:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:98\nmsgid \"\"\n\"You can load the this Python module with :met:`ConfigDict.load_module`::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:107\nmsgid \"\"\n\"Note the second parameter to disable loading as namespaced items as in \"\n\":meth:`ConfigDict.load_dict`. By default, loading from a Python module will \"\n\"call this method, unless you specifically call this method with `False` as \"\n\"the second argument.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:110\nmsgid \"Loading Configuration from a nested :class:`dict`\"\nmsgstr \"\"\n\n#: ../../configuration.rst:114\nmsgid \"\"\n\"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an \"\n\"entire structure of nested dictionaries and turns it into a flat list of \"\n\"keys and values with namespaced keys::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:135\nmsgid \"Listening to configuration changes\"\nmsgstr \"\"\n\n#: ../../configuration.rst:139\nmsgid \"\"\n\"The ``config`` hook on the application object is triggered each time a value\"\n\" in :attr:`Bottle.config` is changed. This hook can be used to react on \"\n\"configuration changes at runtime, for example reconnect to a new database, \"\n\"change the debug settings on a background service or resize worker thread \"\n\"pools. The hook callback receives two arguments (key, new_value) and is \"\n\"called before the value is actually changed in the dictionary. Raising an \"\n\"exception from a hook callback cancels the change and the old value is \"\n\"preserved.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:148\nmsgid \"\"\n\"The hook callbacks cannot *change* the value that is to be stored to the \"\n\"dictionary. That is what filters are for.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:154\nmsgid \"Filters and other Meta Data\"\nmsgstr \"\"\n\n#: ../../configuration.rst:158\nmsgid \"\"\n\":class:`ConfigDict` allows you to store meta data along with configuration \"\n\"keys. Two meta fields are currently defined:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:162\nmsgid \"help\"\nmsgstr \"\"\n\n#: ../../configuration.rst:161\nmsgid \"\"\n\"A help or description string. May be used by debugging, introspection or \"\n\"admin tools to help the site maintainer configuring their application.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"filter\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"\"\n\"A callable that accepts and returns a single value. If a filter is defined \"\n\"for a key, any new value stored to that key is first passed through the \"\n\"filter callback. The filter can be used to cast the value to a different \"\n\"type, check for invalid values (throw a ValueError) or trigger side effects.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:167\nmsgid \"\"\n\"This feature is most useful for plugins. They can validate their config \"\n\"parameters or trigger side effects using filters and document their \"\n\"configuration via ``help`` fields::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:189\nmsgid \"API Documentation\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:1\nmsgid \"\"\n\"A dict-like configuration storage with additional support for namespaces, \"\n\"validators, meta-data, overlays and more.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:4\nmsgid \"\"\n\"This dict-like class is heavily optimized for read access. All read-only \"\n\"methods as well as item access should be as fast as the built-in dict.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:1\nmsgid \"Load values from a Python module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:3\nmsgid \"Example modue ``config.py``::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:0\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:17\nmsgid \"\"\n\"If true (default), dictionary values are assumed to represent namespaces \"\n\"(see :meth:`load_dict`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:1\nmsgid \"Load values from an ``*.ini`` style config file.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:3\nmsgid \"\"\n\"A configuration file consists of sections, each led by a ``[section]`` \"\n\"header, followed by key/value entries separated by either ``=`` or ``:``. \"\n\"Section names and keys are case-insensitive. Leading and trailing whitespace\"\n\" is removed from keys and values. Values can be omitted, in which case the \"\n\"key/value delimiter may also be left out. Values can also span multiple \"\n\"lines, as long as they are indented deeper than the first line of the value.\"\n\" Commands are prefixed by ``#`` or ``;`` and may only appear on their own on\"\n\" an otherwise empty line.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:13\nmsgid \"\"\n\"Both section and key names may contain dots (``.``) as namespace separators.\"\n\" The actual configuration parameter name is constructed by joining section \"\n\"name and key name together and converting to lower case.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:18\nmsgid \"\"\n\"The special sections ``bottle`` and ``ROOT`` refer to the root namespace and\"\n\" the ``DEFAULT`` section defines default values for all other sections.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:22\nmsgid \"With Python 3, extended string interpolation is enabled.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:24\nmsgid \"The path of a config file, or a list of paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:25\nmsgid \"\"\n\"All keyword parameters are passed to the underlying \"\n\":class:`python:configparser.ConfigParser` constructor call.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_dict:1\nmsgid \"\"\n\"Load values from a dictionary structure. Nesting can be used to represent \"\n\"namespaces.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.update:1\nmsgid \"\"\n\"If the first parameter is a string, all keys are prefixed with this \"\n\"namespace. Apart from that it works just as the usual dict.update().\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:1\nmsgid \"Insert key with a value of default if key is not in the dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:3\nmsgid \"Return the value for key if key is in the dictionary, else default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_get:1\nmsgid \"Return the value of a meta field for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_set:1\nmsgid \"Set the meta field for a key to a new value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_list:1\nmsgid \"Return an iterable of meta field names defined for a key.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/contact.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../contact.rst:3\nmsgid \"Contact\"\nmsgstr \"\"\n\n#: ../../contact.rst:6\nmsgid \"About the Author\"\nmsgstr \"\"\n\n#: ../../contact.rst:7\nmsgid \"\"\n\"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy \"\n\"behind this website. I'm 27 years old and studying computer science at the \"\n\"Georg-August-University in Göttingen, Germany. Python is my favorite \"\n\"language, but I also code in ruby and JavaScript a lot. Watch me on `twitter\"\n\" <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub \"\n\"<http://github.com/defnull>`_ to get in contact. A `mailinglist \"\n\"<http://groups.google.de/group/bottlepy>`_ is open for Bottle related \"\n\"questions, too.\"\nmsgstr \"\"\n\n#: ../../contact.rst:10\nmsgid \"About Bottle\"\nmsgstr \"\"\n\n#: ../../contact.rst:11\nmsgid \"\"\n\"This is my first open source project so far. It started and a small \"\n\"experiment but soon got so much positive feedback I decided to make \"\n\"something real out of it. Here it is.\"\nmsgstr \"\"\n\n#: ../../contact.rst:14\nmsgid \"Impressum und Kontaktdaten\"\nmsgstr \"\"\n\n#: ../../contact.rst:15\nmsgid \"\"\n\"(This is required by `German law \"\n\"<http://bundesrecht.juris.de/tmg/__5.html>`_)\"\nmsgstr \"\"\n\n#: ../../contact.rst:17\nmsgid \"\"\n\"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die \"\n\"Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen \"\n\"vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist \"\n\"ausdrücklich untersagt.\"\nmsgstr \"\"\n\n#: ../../contact.rst:22\nmsgid \"**Betreiber**: Marcel Hellkamp\"\nmsgstr \"\"\n\n#: ../../contact.rst:23\nmsgid \"**Ort**: D - 37075 Göttingen\"\nmsgstr \"\"\n\n#: ../../contact.rst:24\nmsgid \"**Strasse**: Theodor-Heuss Strasse 13\"\nmsgstr \"\"\n\n#: ../../contact.rst:25\nmsgid \"**Telefon**: +49 (0) 551 20005915\"\nmsgstr \"\"\n\n#: ../../contact.rst:26\nmsgid \"**E-Mail**: marc at gsites dot de\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/deployment.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../deployment.rst:27\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../deployment.rst:29\nmsgid \"\"\n\"The bottle :func:`run` function, when called without any parameters, starts \"\n\"a local development server on port 8080. You can access and test your \"\n\"application via http://localhost:8080/ if you are on the same host.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:31\nmsgid \"\"\n\"To get your application available to the outside world, specify the IP the \"\n\"server should listen to (e.g. ``run(host='192.168.0.1')``) or let the server\"\n\" listen to all interfaces at once (e.g. ``run(host='0.0.0.0')``). The \"\n\"listening port can be changed in a similar way, but you need root or admin \"\n\"rights to choose a port below 1024. Port 80 is the standard for HTTP \"\n\"servers::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:37\nmsgid \"Server Options\"\nmsgstr \"\"\n\n#: ../../deployment.rst:39\nmsgid \"\"\n\"The built-in default server is based on `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-\"\n\"wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine \"\n\"for development, but may become a performance bottleneck when server load \"\n\"increases. There are three ways to eliminate this bottleneck:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:41\nmsgid \"\"\n\"Use a different server that is either multi-threaded or supports \"\n\"asynchronous IO.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:42\nmsgid \"\"\n\"Start multiple server processes and spread the load with a load-balancer.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:43\nmsgid \"Do both.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:45\nmsgid \"\"\n\"**Multi-threaded** servers are the 'classic' way to do it. They are very \"\n\"robust, reasonably fast and easy to manage. As a drawback, they can only \"\n\"handle a limited number of connections at the same time and utilize only one\"\n\" CPU core due to the \\\"Global Interpreter Lock\\\" (GIL) of the Python \"\n\"runtime. This does not hurt most applications, they are waiting for network \"\n\"IO most of the time anyway, but may slow down CPU intensive tasks (e.g. \"\n\"image processing).\"\nmsgstr \"\"\n\n#: ../../deployment.rst:47\nmsgid \"\"\n\"**Asynchronous IO** servers are very fast, can handle a virtually unlimited \"\n\"number of concurrent connections and are easy to manage. To take full \"\n\"advantage of their potential, you need to design your application \"\n\"accordingly and understand the concepts of the specific server.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:49\nmsgid \"\"\n\"**Multi-processing** (forking) servers are not limited by the GIL and \"\n\"utilize more than one CPU core, but make communication between server \"\n\"instances more expensive. You need a database or external message query to \"\n\"share state between processes, or design your application so that it does \"\n\"not need any shared state. The setup is also a bit more complicated, but \"\n\"there are good tutorials available.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:52\nmsgid \"Switching the Server Backend\"\nmsgstr \"\"\n\n#: ../../deployment.rst:54\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded default server::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:58\nmsgid \"\"\n\"Bottle ships with a lot of ready-to-use adapters for the most common WSGI \"\n\"servers and automates the setup process. Here is an incomplete list:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Name\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Homepage\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"cgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"Run as CGI script\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"Run as FastCGI process\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"Helper for Google App Engine deployments\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"Single-threaded default server\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"Multi-threaded and very stable\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"Multi-threaded, stable, tried and tested\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"Multi-threaded, poweres Pyramid\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"Pre-forked, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"Asynchronous framework with WSGI support.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72 ../../deployment.rst:73\nmsgid \"Asynchronous (greenlets)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"Asynchronous, powers some parts of Facebook\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"Asynchronous, well tested but... twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"Asynchronous, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"Asynchronous, very fast and written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"auto\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"Automatically selects an available server adapter\"\nmsgstr \"\"\n\n#: ../../deployment.rst:81\nmsgid \"The full list is available through :data:`server_names`.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:83\nmsgid \"\"\n\"If there is no adapter for your favorite server or if you need more control \"\n\"over the server setup, you may want to start the server manually. Refer to \"\n\"the server documentation on how to run WSGI applications. Here is an example\"\n\" for paste_::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:91\nmsgid \"Apache mod_wsgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:93\nmsgid \"\"\n\"Instead of running your own HTTP server from within Bottle, you can attach \"\n\"Bottle applications to an `Apache server <apache>`_ using mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:95\nmsgid \"\"\n\"All you need is an ``app.wsgi`` file that provides an ``application`` \"\n\"object. This object is used by mod_wsgi to start your application and should\"\n\" be a WSGI-compatible Python callable.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:97\nmsgid \"File ``/var/www/yourapp/app.wsgi``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:108\nmsgid \"The Apache configuration may look like this::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:126\nmsgid \"uWSGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:128\nmsgid \"\"\n\"uWSGI_ is a modern alternative to FastCGI and the recommended deployment \"\n\"option on servers like nginx_, lighttpd_, and cherokee_. The uWSGI project \"\n\"provides an application server that runs your application, and defines a \"\n\"protocol that frontend webservers can speak to. Have a look at the excellent\"\n\" `Quickstart for Python/WSGI applications <https://uwsgi-\"\n\"docs.readthedocs.io/en/latest/WSGIquickstart.html>`_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:132\nmsgid \"Google AppEngine\"\nmsgstr \"\"\n\n#: ../../deployment.rst:136\nmsgid \"\"\n\"New App Engine applications using the Python 2.7 runtime environment support\"\n\" any WSGI application and should be configured to use the Bottle application\"\n\" object directly. For example suppose your application's main module is \"\n\"``myapp.py``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:146\nmsgid \"\"\n\"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object \"\n\"like so::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:158\nmsgid \"\"\n\"It is always a good idea to let GAE serve static files directly. Here is \"\n\"example for a working  ``app.yaml`` (using the legacy Python 2.5 runtime \"\n\"environment)::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:175\nmsgid \"Load Balancer (Manual Setup)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:177\nmsgid \"\"\n\"A single Python process can utilize only one CPU at a time, even if there \"\n\"are more CPU cores available. The trick is to balance the load between \"\n\"multiple independent Python processes to utilize all of your CPU cores.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:179\nmsgid \"\"\n\"Instead of a single Bottle application server, you start one instance for \"\n\"each CPU core available using different local port (localhost:8080, 8081, \"\n\"8082, ...). You can choose any server adapter you want, even asynchronous \"\n\"ones. Then a high performance load balancer acts as a reverse proxy and \"\n\"forwards each new requests to a random port, spreading the load between all \"\n\"available back-ends. This way you can use all of your CPU cores and even \"\n\"spread out the load between different physical servers.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:181\nmsgid \"\"\n\"One of the fastest load balancers available is Pound_ but most common web \"\n\"servers have a proxy-module that can do the work just fine.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:183\nmsgid \"Pound example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:201\nmsgid \"Apache example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:209\nmsgid \"Lighttpd example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:221\nmsgid \"Good old CGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:223\nmsgid \"\"\n\"A CGI server starts a new process for each request. This adds a lot of \"\n\"overhead but is sometimes the only option, especially on cheap hosting \"\n\"packages. The `cgi` server adapter does not actually start a CGI server, but\"\n\" transforms your bottle application into a valid CGI application::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/development.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../development.rst:2\nmsgid \"Developer Notes\"\nmsgstr \"\"\n\n#: ../../development.rst:4\nmsgid \"\"\n\"This document is intended for developers and package maintainers interested \"\n\"in the bottle development and release workflow. If you want to contribute, \"\n\"you are just right!\"\nmsgstr \"\"\n\n#: ../../development.rst:8\nmsgid \"Get involved\"\nmsgstr \"\"\n\n#: ../../development.rst:10\nmsgid \"\"\n\"There are several ways to join the community and stay up to date. Here are \"\n\"some of them:\"\nmsgstr \"\"\n\n#: ../../development.rst:12\nmsgid \"\"\n\"**Mailing list**: Join our mailing list by sending an email to \"\n\"`bottlepy+subscribe@googlegroups.com \"\n\"<mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required).\"\nmsgstr \"\"\n\n#: ../../development.rst:13\nmsgid \"\"\n\"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or \"\n\"search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag.\"\nmsgstr \"\"\n\n#: ../../development.rst:14\nmsgid \"\"\n\"**IRC**: Join `#bottlepy on irc.freenode.net \"\n\"<irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:15\nmsgid \"\"\n\"**Google plus**: We sometimes `blog about Bottle, releases and technical \"\n\"stuff \"\n\"<https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_\"\n\" on our Google+ page.\"\nmsgstr \"\"\n\n#: ../../development.rst:19\nmsgid \"Get the Sources\"\nmsgstr \"\"\n\n#: ../../development.rst:21\nmsgid \"\"\n\"The bottle `development repository <https://github.com/bottlepy/bottle>`_ \"\n\"and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are \"\n\"both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan \"\n\"to contribute, it is a good idea to create an account there and fork the \"\n\"main repository. This way your changes and ideas are visible to other \"\n\"developers and can be discussed openly. Even without an account, you can \"\n\"clone the repository or just download the latest development version as a \"\n\"source archive.\"\nmsgstr \"\"\n\n#: ../../development.rst:23\nmsgid \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:24\nmsgid \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:25\nmsgid \"\"\n\"**Download:** Development branch as `tar archive \"\n\"<http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file \"\n\"<http://github.com/bottlepy/bottle/zipball/master>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:26\nmsgid \"\"\n\"**Translations:** `transifex.com/projects/p/bottle \"\n\"<https://www.transifex.com/projects/p/bottle/>`_\"\nmsgstr \"\"\n\n#: ../../development.rst:30\nmsgid \"Releases and Updates\"\nmsgstr \"\"\n\n#: ../../development.rst:32\nmsgid \"\"\n\"Bottle is released at irregular intervals and distributed through `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-\"\n\"revisions of outdated releases are only available from the git repository \"\n\"mentioned above. Some Linux distributions may offer packages for outdated \"\n\"releases, though.\"\nmsgstr \"\"\n\n#: ../../development.rst:34\nmsgid \"\"\n\"The Bottle version number splits into three parts \"\n\"(**major.minor.revision**). These are *not* used to promote new features but\"\n\" to indicate important bug-fixes and/or API changes. Critical bugs are fixed\"\n\" in at least the two latest minor releases and announced in all available \"\n\"channels (mailinglist, twitter, github). Non-critical bugs or features are \"\n\"not guaranteed to be backported. This may change in the future, through.\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"Major Release (x.0)\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"\"\n\"The major release number is increased on important milestones or updates \"\n\"that completely break backward compatibility. You probably have to work over\"\n\" your entire application to use a new release. These releases are very rare,\"\n\" through.\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"Minor Release (x.y)\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"\"\n\"The minor release number is increased on updates that change the API or \"\n\"behaviour in some way. You might get some depreciation warnings any may have\"\n\" to tweak some configuration settings to restore the old behaviour, but in \"\n\"most cases these changes are designed to be backward compatible for at least\"\n\" one minor release. You should update to stay up do date, but don't have to.\"\n\" An exception is 0.8, which *will* break backward compatibility hard. (This \"\n\"is why 0.7 was skipped). Sorry about that.\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"Revision (x.y.z)\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"\"\n\"The revision number is increased on bug-fixes and other patches that do not \"\n\"change the API or behaviour. You can safely update without editing your \"\n\"application code. In fact, you really should as soon as possible, because \"\n\"important security fixes are released this way.\"\nmsgstr \"\"\n\n#: ../../development.rst:47\nmsgid \"Pre-Release Versions\"\nmsgstr \"\"\n\n#: ../../development.rst:46\nmsgid \"\"\n\"Release candidates are marked by an ``rc`` in their revision number. These \"\n\"are API stable most of the time and open for testing, but not officially \"\n\"released yet. You should not use these for production.\"\nmsgstr \"\"\n\n#: ../../development.rst:50\nmsgid \"Repository Structure\"\nmsgstr \"\"\n\n#: ../../development.rst:52\nmsgid \"The source repository is structured as follows:\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"``master`` branch\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"\"\n\"This is the integration, testing and development branch. All changes that \"\n\"are planned to be part of the next release are merged and tested here.\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"``release-x.y`` branches\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"\"\n\"As soon as the master branch is (almost) ready for a new release, it is \"\n\"branched into a new release branch. This \\\"release candidate\\\" is feature-\"\n\"frozen but may receive bug-fixes and last-minute changes until it is \"\n\"considered production ready and officially released. From that point on it \"\n\"is called a \\\"support branch\\\" and still receives bug-fixes, but only \"\n\"important ones. The revision number is increased on each push to these \"\n\"branches, so you can keep up with important changes.\"\nmsgstr \"\"\n\n#: ../../development.rst:62\nmsgid \"Feature branches\"\nmsgstr \"\"\n\n#: ../../development.rst:61\nmsgid \"\"\n\"All other branches are feature branches. These are based on the master \"\n\"branch and only live as long as they are still active and not merged back \"\n\"into ``master``.\"\nmsgstr \"\"\n\n#: ../../development.rst:65\nmsgid \"What does this mean for a developer?\"\nmsgstr \"\"\n\n#: ../../development.rst:66\nmsgid \"\"\n\"If you want to add a feature, create a new branch from ``master``. If you \"\n\"want to fix a bug, branch ``release-x.y`` for each affected release. Please \"\n\"use a separate branch for each feature or bug to make integration as easy as\"\n\" possible. Thats all. There are git workflow examples at the bottom of this \"\n\"page.\"\nmsgstr \"\"\n\n#: ../../development.rst:68\nmsgid \"\"\n\"Oh, and never ever change the release number. We'll do that on integration. \"\n\"You never know in which order we pull pending requests anyway :)\"\nmsgstr \"\"\n\n#: ../../development.rst:72\nmsgid \"What does this mean for a maintainer ?\"\nmsgstr \"\"\n\n#: ../../development.rst:73\nmsgid \"\"\n\"Watch the tags (and the mailing list) for bug-fixes and new releases. If you\"\n\" want to fetch a specific release from the git repository, trust the tags, \"\n\"not the branches. A branch may contain changes that are not released yet, \"\n\"but a tag marks the exact commit which changed the version number.\"\nmsgstr \"\"\n\n#: ../../development.rst:77\nmsgid \"Submitting Patches\"\nmsgstr \"\"\n\n#: ../../development.rst:79\nmsgid \"\"\n\"The best way to get your changes integrated into the main development branch\"\n\" is to fork the main repository at github, create a new feature-branch, \"\n\"apply your changes and send a pull-request. Further down this page is a \"\n\"small collection of git workflow examples that may guide you. Submitting \"\n\"git-compatible patches to the mailing list is fine too. In any case, please \"\n\"follow some basic rules:\"\nmsgstr \"\"\n\n#: ../../development.rst:81\nmsgid \"\"\n\"**Documentation:** Tell us what your patch does. Comment your code. If you \"\n\"introduced a new feature, add to the documentation so others can learn about\"\n\" it.\"\nmsgstr \"\"\n\n#: ../../development.rst:82\nmsgid \"\"\n\"**Test:** Write tests to prove that your code works as expected and does not\"\n\" break anything. If you fixed a bug, write at least one test-case that \"\n\"triggers the bug. Make sure that all tests pass before you submit a patch.\"\nmsgstr \"\"\n\n#: ../../development.rst:83\nmsgid \"\"\n\"**One patch at a time:** Only fix one bug or add one feature at a time. \"\n\"Design your patches so that they can be applyed as a whole. Keep your \"\n\"patches clean, small and focused.\"\nmsgstr \"\"\n\n#: ../../development.rst:84\nmsgid \"\"\n\"**Sync with upstream:** If the ``upstream/master`` branch changed while you \"\n\"were working on your patch, rebase or pull to make sure that your patch \"\n\"still applies without conflicts.\"\nmsgstr \"\"\n\n#: ../../development.rst:88\nmsgid \"Building the Documentation\"\nmsgstr \"\"\n\n#: ../../development.rst:90\nmsgid \"\"\n\"You need a recent version of Sphinx to build the documentation. The \"\n\"recommended way is to install :command:`virtualenv` using your distribution \"\n\"package repository and install sphinx manually to get an up-to-date version.\"\nmsgstr \"\"\n\n#: ../../development.rst:121\nmsgid \"GIT Workflow Examples\"\nmsgstr \"\"\n\n#: ../../development.rst:123\nmsgid \"\"\n\"The following examples assume that you have an (free) `github account \"\n\"<https://github.com>`_. This is not mandatory, but makes things a lot \"\n\"easier.\"\nmsgstr \"\"\n\n#: ../../development.rst:125\nmsgid \"\"\n\"First of all you need to create a fork (a personal clone) of the official \"\n\"repository. To do this, you simply click the \\\"fork\\\" button on the `bottle \"\n\"project page <https://github.com/bottlepy/bottle>`_. When the fork is done, \"\n\"you will be presented with a short introduction to your new repository.\"\nmsgstr \"\"\n\n#: ../../development.rst:127\nmsgid \"\"\n\"The fork you just created is hosted at github and read-able by everyone, but\"\n\" write-able only by you. Now you need to clone the fork locally to actually \"\n\"make changes to it. Make sure you use the private (read-write) URL and *not*\"\n\" the public (read-only) one::\"\nmsgstr \"\"\n\n#: ../../development.rst:131\nmsgid \"\"\n\"Once the clone is complete your repository will have a remote named \"\n\"\\\"origin\\\" that points to your fork on github. Don’t let the name confuse \"\n\"you, this does not point to the original bottle repository, but to your own \"\n\"fork. To keep track of the official repository, add another remote named \"\n\"\\\"upstream\\\"::\"\nmsgstr \"\"\n\n#: ../../development.rst:137\nmsgid \"\"\n\"Note that \\\"upstream\\\" is a public clone URL, which is read-only. You cannot\"\n\" push changes directly to it. Instead, we will pull from your public \"\n\"repository. This is described later.\"\nmsgstr \"\"\n\n#: ../../development.rst:140\nmsgid \"Submit a Feature\"\nmsgstr \"\"\n\n#: ../../development.rst:141\nmsgid \"\"\n\"New features are developed in separate feature-branches to make integration \"\n\"easy. Because they are going to be integrated into the ``master`` branch, \"\n\"they must be based on ``upstream/master``. To create a new feature-branch, \"\n\"type the following::\"\nmsgstr \"\"\n\n#: ../../development.rst:145\nmsgid \"\"\n\"Now implement your feature, write tests, update the documentation, make sure\"\n\" that all tests pass and commit your changes::\"\nmsgstr \"\"\n\n#: ../../development.rst:149\nmsgid \"\"\n\"If the ``upstream/master`` branch changed in the meantime, there may be \"\n\"conflicts with your changes. To solve these, 'rebase' your feature-branch \"\n\"onto the top of the updated ``upstream/master`` branch::\"\nmsgstr \"\"\n\n#: ../../development.rst:154\nmsgid \"\"\n\"This is equivalent to undoing all your changes, updating your branch to the \"\n\"latest version and reapplying all your patches again. If you released your \"\n\"branch already (see next step), this is not an option because it rewrites \"\n\"your history. You can do a normal pull instead. Resolve any conflicts, run \"\n\"the tests again and commit.\"\nmsgstr \"\"\n\n#: ../../development.rst:156\nmsgid \"\"\n\"Now you are almost ready to send a pull request. But first you need to make \"\n\"your feature-branch public by pushing it to your github fork::\"\nmsgstr \"\"\n\n#: ../../development.rst:160\nmsgid \"\"\n\"After you’ve pushed your commit(s) you need to inform us about the new \"\n\"feature. One way is to send a pull-request using github. Another way would \"\n\"be to start a thread in the mailing-list, which is recommended. It allows \"\n\"other developers to see and discuss your patches and you get some feedback \"\n\"for free :)\"\nmsgstr \"\"\n\n#: ../../development.rst:162\nmsgid \"\"\n\"If we accept your patch, we will integrate it into the official development \"\n\"branch and make it part of the next release.\"\nmsgstr \"\"\n\n#: ../../development.rst:165\nmsgid \"Fix a Bug\"\nmsgstr \"\"\n\n#: ../../development.rst:166\nmsgid \"\"\n\"The workflow for bug-fixes is very similar to the one for features, but \"\n\"there are some differences:\"\nmsgstr \"\"\n\n#: ../../development.rst:168\nmsgid \"\"\n\"Branch off of the affected release branches instead of just the development \"\n\"branch.\"\nmsgstr \"\"\n\n#: ../../development.rst:169\nmsgid \"Write at least one test-case that triggers the bug.\"\nmsgstr \"\"\n\n#: ../../development.rst:170\nmsgid \"\"\n\"Do this for each affected branch including ``upstream/master`` if it is \"\n\"affected. ``git cherry-pick`` may help you reducing repetitive work.\"\nmsgstr \"\"\n\n#: ../../development.rst:171\nmsgid \"\"\n\"Name your branch after the release it is based on to avoid confusion. \"\n\"Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/faq.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../faq.rst:10\nmsgid \"Frequently Asked Questions\"\nmsgstr \"\"\n\n#: ../../faq.rst:13\nmsgid \"About Bottle\"\nmsgstr \"\"\n\n#: ../../faq.rst:16\nmsgid \"Is bottle suitable for complex applications?\"\nmsgstr \"\"\n\n#: ../../faq.rst:18\nmsgid \"\"\n\"Bottle is a *micro* framework designed for prototyping and building small \"\n\"web applications and services. It stays out of your way and allows you to \"\n\"get things done fast, but misses some advanced features and ready-to-use \"\n\"solutions found in other frameworks (MVC, ORM, form validation, scaffolding,\"\n\" XML-RPC). Although it *is* possible to add these features and build complex\"\n\" applications with Bottle, you should consider using a full-stack Web \"\n\"framework like pylons_ or paste_ instead.\"\nmsgstr \"\"\n\n#: ../../faq.rst:22\nmsgid \"Common Problems and Pitfalls\"\nmsgstr \"\"\n\n#: ../../faq.rst:29\nmsgid \"\\\"Template Not Found\\\" in mod_wsgi/mod_python\"\nmsgstr \"\"\n\n#: ../../faq.rst:31\nmsgid \"\"\n\"Bottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ \"\n\"or mod_wsgi_ environment, the working directory (``./``) depends on your \"\n\"Apache settings. You should add an absolute path to the template search \"\n\"path::\"\nmsgstr \"\"\n\n#: ../../faq.rst:35\nmsgid \"so bottle searches the right paths.\"\nmsgstr \"\"\n\n#: ../../faq.rst:38\nmsgid \"Dynamic Routes and Slashes\"\nmsgstr \"\"\n\n#: ../../faq.rst:40\nmsgid \"\"\n\"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder \"\n\"token (``<name>``) matches everything up to the next slash. This equals to \"\n\"``[^/]+`` in regular expression syntax. To accept slashes too, you have to \"\n\"add a custom regular pattern to the placeholder. An example: \"\n\"``/images/<filepath:path>`` would match ``/images/icons/error.png`` but \"\n\"``/images/<filename>`` won't.\"\nmsgstr \"\"\n\n#: ../../faq.rst:43\nmsgid \"Problems with reverse proxies\"\nmsgstr \"\"\n\n#: ../../faq.rst:45\nmsgid \"\"\n\"Redirects and url-building only works if bottle knows the public address and\"\n\" location of your application. If you run bottle locally behind a reverse \"\n\"proxy or load balancer, some information might get lost along the way. For \"\n\"example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect \"\n\"the local request by your proxy, not the real request by the client. Here is\"\n\" a small WSGI middleware snippet that helps to fix these values::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Manabu Shimohira <mshimohi@gmail.com>, 2017\n# taisa007 <g5.taisa007@gmail.com>, 2016\n# taisa007 <g5.taisa007@gmail.com>, 2016\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../index.rst:20\nmsgid \"Bottle: Python Web Framework\"\nmsgstr \"Bottle: Python Webフレームワーク\"\n\n#: ../../index.rst:22\nmsgid \"\"\n\"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for \"\n\"Python_. It is distributed as a single file module and has no dependencies \"\n\"other than the `Python Standard Library <http://docs.python.org/library/>`_.\"\nmsgstr \"BottleはPython製の早くてシンプルでライトウェイトなWSGIマイクロWebフレームワークです。Bottleは1つのファイルで構成されていて、Pythonの標準ライブラリには依存していません。\"\n\n#: ../../index.rst:25\nmsgid \"\"\n\"**Routing:** Requests to function-call mapping with support for clean and  \"\n\"dynamic URLs.\"\nmsgstr \"**ルーティング:** リクエストをファンクションとマッピングします。また、ダイナミックURLもサポートしています。\"\n\n#: ../../index.rst:26\nmsgid \"\"\n\"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-\"\n\"templates>` and support for mako_, jinja2_ and cheetah_ templates.\"\nmsgstr \"**テンプレート:** Pythonのビルドインテンプレートやmako、jinja2、cheetahテンプレートをサポートしています。\"\n\n#: ../../index.rst:27\nmsgid \"\"\n\"**Utilities:** Convenient access to form data, file uploads, cookies, \"\n\"headers and other HTTP-related metadata.\"\nmsgstr \"ファイルアップロートやクッキー、ヘッダー、その他HTTPに関連するデータに簡単にアクセスすることが可能です。\"\n\n#: ../../index.rst:28\nmsgid \"\"\n\"**Server:** Built-in HTTP development server and support for paste_, \"\n\"bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server.\"\nmsgstr \"\"\n\n#: ../../index.rst:31\nmsgid \"Example: \\\"Hello World\\\" in a bottle\"\nmsgstr \"例: Bottleによる \\\"Hello World\\\"\"\n\n#: ../../index.rst:42\nmsgid \"\"\n\"Run this script or paste it into a Python console, then point your browser \"\n\"to `<http://localhost:8080/hello/world>`_. That's it.\"\nmsgstr \"このスクリプトを実行するかPythonコンソールに貼り付けて実行し、ブラウザに次のURLを入力してください。`<http://localhost:8080/hello/world>`\"\n\n#: ../../index.rst:45\nmsgid \"Download and Install\"\nmsgstr \"ダウンロードとインストール\"\n\n#: ../../index.rst:48\nmsgid \"\"\n\"Install the latest stable release with ``pip install bottle`` or download \"\n\"`bottle.py`__ (unstable) into your project directory. There are no hard [1]_\"\n\" dependencies other than the Python standard library. Bottle supports \"\n\"**Python 2.7 and Python 3**.\"\nmsgstr \"\"\n\n#: ../../index.rst:50\nmsgid \"Support for Python 2.5 and 2.6 was dropped with this release.\"\nmsgstr \"\"\n\n#: ../../index.rst:55\nmsgid \"User's Guide\"\nmsgstr \"ユーザーズガイド\"\n\n#: ../../index.rst:56\nmsgid \"\"\n\"Start here if you want to learn how to use the bottle framework for web \"\n\"development. If you have any questions not answered here, feel free to ask \"\n\"the `mailing list <mailto:bottlepy@googlegroups.com>`_.\"\nmsgstr \"Bottleの使い方はここから調べることができます。ここで分からないことについてはメーリングリスト`<mailto:bottlepy@googlegroups.com>`_で質問してください。\"\n\n#: ../../index.rst:71\nmsgid \"Knowledge Base\"\nmsgstr \"ナレッジベース\"\n\n#: ../../index.rst:72\nmsgid \"A collection of articles, guides and HOWTOs.\"\nmsgstr \"Bottleに関する記事や使い方のノウハウ集です。\"\n\n#: ../../index.rst:84\nmsgid \"Development and Contribution\"\nmsgstr \"コントリビューション\"\n\n#: ../../index.rst:86\nmsgid \"\"\n\"These chapters are intended for developers interested in the bottle \"\n\"development and release workflow.\"\nmsgstr \"このチャプターはBottleの開発やリリースワークフローに興味のある人向けのコンテンツです。\"\n\n#: ../../index.rst:103\nmsgid \"License\"\nmsgstr \"ライセンス\"\n\n#: ../../index.rst:105\nmsgid \"Code and documentation are available according to the MIT License:\"\nmsgstr \"コードとドキュメントはMITライセンスに応じてご利用いただけます\"\n\n#: ../../index.rst:110\nmsgid \"\"\n\"The Bottle logo however is *NOT* covered by that license. It is allowed to \"\n\"use the logo as a link to the bottle homepage or in direct context with the \"\n\"unmodified library. In all other cases please ask first.\"\nmsgstr \"Bottleロゴの利用はライセンスによって制限されていない為、Bottleのホームページへのリンクなどにご利用いただけます。\"\n\n#: ../../index.rst:115\nmsgid \"Footnotes\"\nmsgstr \"脚注\"\n\n#: ../../index.rst:116\nmsgid \"\"\n\"Usage of the template or server adapter classes requires the corresponding \"\n\"template or server modules.\"\nmsgstr \"テンプレートやサーバーアダプタークラスの使用方法は、対応するテンプレートやサーバーモジュールが必要です。\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/plugindev.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../plugindev.rst:6\nmsgid \"Plugin Development Guide\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:8\nmsgid \"\"\n\"This guide explains the plugin API and how to write custom plugins. I \"\n\"suggest reading :ref:`plugins` first if you have not done that already. You \"\n\"might also want to have a look at the :doc:`/plugins/index` for some \"\n\"practical examples.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:12\nmsgid \"\"\n\"This is a draft. If you see any errors or find that a specific part is not \"\n\"explained clear enough, please tell the `mailing-list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or file a `bug report \"\n\"<https://github.com/bottlepy/bottle/issues>`_.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:16\nmsgid \"How Plugins Work: The Basics\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:18\nmsgid \"\"\n\"The plugin API builds on the concept of `decorators \"\n\"<http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, \"\n\"a plugin is a decorator applied to every single route callback of an \"\n\"application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:20\nmsgid \"\"\n\"This is just a simplification. Plugins can do a lot more than just \"\n\"decorating route callbacks, but it is a good starting point. Lets have a \"\n\"look at some code::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:36\nmsgid \"\"\n\"This plugin measures the execution time for each request and adds an \"\n\"appropriate ``X-Exec-Time`` header to the response. As you can see, the \"\n\"plugin returns a wrapper and the wrapper calls the original callback \"\n\"recursively. This is how decorators usually work.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:38\nmsgid \"\"\n\"The last line tells Bottle to install the plugin to the default application.\"\n\" This causes the plugin to be automatically applied to all routes of that \"\n\"application. In other words, ``stopwatch()`` is called once for each route \"\n\"callback and the return value is used as a replacement for the original \"\n\"callback.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:40\nmsgid \"\"\n\"Plugins are applied on demand, that is, as soon as a route is requested for \"\n\"the first time. For this to work properly in multi-threaded environments, \"\n\"the plugin should be thread-safe. This is not a problem most of the time, \"\n\"but keep it in mind.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:42\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped callback is cached and \"\n\"subsequent requests are handled by the cached version directly. This means \"\n\"that a plugin is usually applied only once to a specific route. That cache, \"\n\"however, is cleared every time the list of installed plugins changes. Your \"\n\"plugin should be able to decorate the same route more than once.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:44\nmsgid \"\"\n\"The decorator API is quite limited, though. You don't know anything about \"\n\"the route being decorated or the associated application object and have no \"\n\"way to efficiently store data that is shared among all routes. But fear not!\"\n\" Plugins are not limited to just decorator functions. Bottle accepts \"\n\"anything as a plugin as long as it is callable or implements an extended \"\n\"API. This API is described below and gives you a lot of control over the \"\n\"whole process.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:48\nmsgid \"Plugin API\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:50\nmsgid \"\"\n\":class:`Plugin` is not a real class (you cannot import it from \"\n\":mod:`bottle`) but an interface that plugins are expected to implement. \"\n\"Bottle accepts any object of any type as a plugin, as long as it conforms to\"\n\" the following API.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:54\nmsgid \"\"\n\"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is \"\n\"defined, it is always preferred over calling the plugin directly. All other \"\n\"methods and attributes are optional.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:58\nmsgid \"\"\n\"Both :meth:`Bottle.uninstall` and the `skip` parameter of \"\n\":meth:`Bottle.route()` accept a name string to refer to a plugin or plugin \"\n\"type. This works only for plugins that have a name attribute.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:62\nmsgid \"\"\n\"The Plugin API is still evolving. This integer attribute tells bottle which \"\n\"version to use. If it is missing, bottle defaults to the first version. The \"\n\"current version is ``2``. See :ref:`plugin-changelog` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:66\nmsgid \"\"\n\"Called as soon as the plugin is installed to an application (see \"\n\":meth:`Bottle.install`). The only parameter is the associated application \"\n\"object.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:70\nmsgid \"\"\n\"As long as :meth:`apply` is not defined, the plugin itself is used as a \"\n\"decorator and applied directly to each route callback. The only parameter is\"\n\" the callback to decorate. Whatever is returned by this method replaces the \"\n\"original callback. If there is no need to wrap or replace a given callback, \"\n\"just return the unmodified callback parameter.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:74\nmsgid \"\"\n\"If defined, this method is used in favor of :meth:`__call__` to decorate \"\n\"route callbacks. The additional `route` parameter is an instance of \"\n\":class:`Route` and provides a lot of meta-information and context for that \"\n\"route. See :ref:`route-context` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:78\nmsgid \"\"\n\"Called immediately before the plugin is uninstalled or the application is \"\n\"closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:81\nmsgid \"\"\n\"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for \"\n\"plugins that are applied directly to a route via the :meth:`Bottle.route()` \"\n\"decorator, but only for plugins installed to an application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:87\nmsgid \"Plugin API changes\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:89\nmsgid \"\"\n\"The Plugin API is still evolving and changed with Bottle 0.10 to address \"\n\"certain issues with the route context dictionary. To ensure backwards \"\n\"compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` \"\n\"attribute to tell bottle which API to use. The API differences are \"\n\"summarized here.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:91\nmsgid \"**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:93\nmsgid \"Original Plugin API as described in the 0.9 docs.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:95\nmsgid \"**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:97\nmsgid \"\"\n\"The `context` parameter of the :meth:`Plugin.apply` method is now an \"\n\"instance of :class:`Route` instead of a context dictionary.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:103\nmsgid \"The Route Context\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:105\nmsgid \"\"\n\"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed\"\n\" informations about the associated route. The most important attributes are \"\n\"summarized here:\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"app\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"The application object this route is installed to.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"rule\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"The rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"method\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"name\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"plugins\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"\"\n\"A list of route-specific plugins. These are applied in addition to \"\n\"application-wide plugins. (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"skiplist\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"\"\n\"A list of plugins to not apply to this route (again, see \"\n\":meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"config\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific configuration and \"\n\"meta-data.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:125\nmsgid \"\"\n\"For your plugin, :attr:`Route.config` is probably the most important \"\n\"attribute. Keep in mind that this dictionary is local to the route, but \"\n\"shared between all plugins. It is always a good idea to add a unique prefix \"\n\"or, if your plugin needs a lot of configuration, store it in a separate \"\n\"namespace within the `config` dictionary. This helps to avoid naming \"\n\"collisions between plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:129\nmsgid \"Changing the :class:`Route` object\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:131\nmsgid \"\"\n\"While some :class:`Route` attributes are mutable, changes may have unwanted \"\n\"effects on other plugins. It is most likely a bad idea to monkey-patch a \"\n\"broken route instead of providing a helpful error message and let the user \"\n\"fix the problem.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:133\nmsgid \"\"\n\"In some rare cases, however, it might be justifiable to break this rule. \"\n\"After you made your changes to the :class:`Route` instance, raise \"\n\":exc:`RouteReset` as an exception. This removes the current route from the \"\n\"cache and causes all plugins to be re-applied. The router is not updated, \"\n\"however. Changes to `rule` or `method` values have no effect on the router, \"\n\"but only on plugins. This may change in the future, though.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:137\nmsgid \"Runtime optimizations\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:139\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped route callback is \"\n\"cached to speed up subsequent requests. If the behavior of your plugin \"\n\"depends on configuration, and you want to be able to change that \"\n\"configuration at runtime, you need to read the configuration on each \"\n\"request. Easy enough.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:141\nmsgid \"\"\n\"For performance reasons, however, it might be worthwhile to choose a \"\n\"different wrapper based on current needs, work with closures, or enable or \"\n\"disable a plugin at runtime. Let's take the built-in HooksPlugin as an \"\n\"example: If no hooks are installed, the plugin removes itself from all \"\n\"affected routes and has virtually no overhead. As soon as you install the \"\n\"first hook, the plugin activates itself and takes effect again.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:143\nmsgid \"\"\n\"To achieve this, you need control over the callback cache: \"\n\":meth:`Route.reset` clears the cache for a single route and \"\n\":meth:`Bottle.reset` clears all caches for all routes of an application at \"\n\"once. On the next request, all plugins are re-applied to the route as if it \"\n\"were requested for the first time.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:145\nmsgid \"\"\n\"Both methods won't affect the current request if called from within a route \"\n\"callback, of cause. To force a restart of the current request, raise \"\n\":exc:`RouteReset` as an exception.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:149\nmsgid \"Plugin Example: SQLitePlugin\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:151\nmsgid \"\"\n\"This plugin provides an sqlite3 database connection handle as an additional \"\n\"keyword argument to wrapped callbacks, but only if the callback expects it. \"\n\"If not, the route is ignored and no overhead is added. The wrapper does not \"\n\"affect the return value, but handles plugin-related exceptions properly. \"\n\":meth:`Plugin.setup` is used to inspect the application and search for \"\n\"conflicting plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:218\nmsgid \"\"\n\"This plugin is actually useful and very similar to the version bundled with \"\n\"Bottle. Not bad for less than 60 lines of code, don't you think? Here is a \"\n\"usage example::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:239\nmsgid \"\"\n\"The first route needs a database connection and tells the plugin to create a\"\n\" handle by requesting a ``db`` keyword argument. The second route does not \"\n\"need a database and is therefore ignored by the plugin. The third route does\"\n\" expect a 'db' keyword argument, but explicitly skips the sqlite plugin. \"\n\"This way the argument is not overruled by the plugin and still contains the \"\n\"value of the same-named url argument.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/plugins/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../plugins/index.rst:5\nmsgid \"List of available Plugins\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:7\nmsgid \"\"\n\"This is a list of third-party plugins that add extend Bottles core \"\n\"functionality or integrate other libraries with the Bottle framework.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:9\nmsgid \"\"\n\"Have a look at :ref:`plugins` for general questions about plugins \"\n\"(installation, usage). If you plan to develop a new plugin, the \"\n\":doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"Beaker to session and caching library with WSGI Middleware\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"`Bottle-Cork <http://cork.firelet.net/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"\"\n\"Cork provides a simple set of methods to implement Authentication and \"\n\"Authorization in web applications based on Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"`Bottle-Cors-plugin <http://pypi.org/project/bottle-cors-plugin/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"\"\n\"Cors-plugin is the easiest way to implement cors on your bottle web \"\n\"application\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"Meta package to install the bottle plugin collection.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"flash plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"FIFO Queue for Bottle built upon redis\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"`Macaron <http://nobrin.github.com/macaron/webapp.html>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"Macaron is an object-relational mapper (ORM) for SQLite.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"Memcache integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"MongoDB integration for Bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"`Bottle-OAuthlib <http://pypi.python.org/pypi/bottle-oauthlib/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"Adapter for oauthlib - create your own OAuth2.0 implementation\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"Redis integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"Renderer plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"A reusable app that serves static files for bottle apps\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"SQLAlchemy integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"SQLite3 database integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"Web2py Dal integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"\"\n\"Integrates the `werkzeug` library (alternative request and response objects,\"\n\" advanced debugging middleware and more).\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"\"\n\"`bottle-smart-filters <https://github.com/agile4you/bottle-smart-filters/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"Bottle Querystring smart guessing.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"`bottle-jwt <https://github.com/agile4you/bottle-jwt/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"JSON Web Token authentication plugin for bottle.py\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"`Bottle-jwt <https://github.com/agalera/bottlejwt>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"JWT integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"`canister <https://github.com/dagnelies/canister>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"a bottle wrapper to provide logging, sessions and authentication\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"`bottle-cerberus <https://github.com/agalera/bottle-cerberus>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"Cerberus integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"`Bottle-errorsrest <https://github.com/agalera/bottle-errorsrest>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"All errors generated from bottle are returned in json\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:82\nmsgid \"`Bottle-tools <https://github.com/theSage21/bottle-tools>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:81\nmsgid \"\"\n\"Decorators that auto-supply function arguments using POST/query string data.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:84\nmsgid \"\"\n\"Plugins listed here are not part of Bottle or the Bottle project, but \"\n\"developed and maintained by third parties.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/recipes.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../recipes.rst:16\nmsgid \"Recipes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:18\nmsgid \"\"\n\"This is a collection of code snippets and examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:21\nmsgid \"Keeping track of Sessions\"\nmsgstr \"\"\n\n#: ../../recipes.rst:23\nmsgid \"\"\n\"There is no built-in support for sessions because there is no *right* way to\"\n\" do it (in a micro framework). Depending on requirements and environment you\"\n\" could use beaker_ middleware with a fitting backend or implement it \"\n\"yourself. Here is an example for beaker sessions with a file-based backend::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:45\nmsgid \"\"\n\"WARNING: Beaker's SessionMiddleware is not thread safe.  If two concurrent \"\n\"requests modify the same session at the same time, one of the updates might \"\n\"get lost. For this reason, sessions should only be populated once and \"\n\"treated as a read-only store after that. If you find yourself updating \"\n\"sessions regularly, and don't want to risk losing any updates, think about \"\n\"using a real database instead or seek alternative session middleware \"\n\"libraries.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:49\nmsgid \"Debugging with Style: Debugging Middleware\"\nmsgstr \"\"\n\n#: ../../recipes.rst:51\nmsgid \"\"\n\"Bottle catches all Exceptions raised in your app code to prevent your WSGI \"\n\"server from crashing. If the built-in :func:`debug` mode is not enough and \"\n\"you need exceptions to propagate to a debugging middleware, you can turn off\"\n\" this behaviour::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:59\nmsgid \"\"\n\"Now, bottle only catches its own exceptions (:exc:`HTTPError`, \"\n\":exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can \"\n\"handle the rest.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:61\nmsgid \"\"\n\"The werkzeug_ and paste_ libraries both ship with very powerful debugging \"\n\"WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for \"\n\"werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for \"\n\"paste_. They both allow you do inspect the stack and even execute python \"\n\"code within the stack context, so **do not use them in production**.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:65\nmsgid \"Unit-Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:67\nmsgid \"\"\n\"Unit-testing is usually performed against methods defined in your web \"\n\"application without running a WSGI environment.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:69\nmsgid \"A simple example using `Nose <http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:80 ../../recipes.rst:97\nmsgid \"Test script::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:87\nmsgid \"\"\n\"In the example the Bottle route() method is never executed - only index() is\"\n\" tested.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:89\nmsgid \"\"\n\"If the code being tested requires access to ``bottle.request`` you can mock \"\n\"it using `Boddle <https://github.com/keredson/boddle>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:108\nmsgid \"Functional Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:110\nmsgid \"\"\n\"Any HTTP-based testing system can be used with a running WSGI server, but \"\n\"some testing frameworks work more intimately with WSGI, and provide the \"\n\"ability the call WSGI applications in a controlled environment, with \"\n\"tracebacks and full use of debugging tools. `Testing tools for WSGI \"\n\"<http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:112\nmsgid \"\"\n\"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose \"\n\"<http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:132\nmsgid \"Embedding other WSGI Apps\"\nmsgstr \"\"\n\n#: ../../recipes.rst:134\nmsgid \"\"\n\"This is not the recommend way (you should use a middleware in front of \"\n\"bottle to do this) but you can call other WSGI applications from within your\"\n\" bottle app and let bottle act as a pseudo-middleware. Here is an example::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:150\nmsgid \"\"\n\"Again, this is not the recommend way to implement subprojects. It is only \"\n\"here because many people asked for this and to show how bottle maps to WSGI.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:154\nmsgid \"Ignore trailing slashes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:156\nmsgid \"\"\n\"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To\"\n\" treat both URLs the same you can add two ``@route`` decorators::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:162\nmsgid \"add a WSGI middleware that strips trailing slashes from all URLs::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:175\nmsgid \"or add a ``before_request`` hook to strip the trailing slashes::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:182\nmsgid \"Footnotes\"\nmsgstr \"脚注\"\n\n#: ../../recipes.rst:183\nmsgid \"Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>\"\nmsgstr \"\"\n\n#: ../../recipes.rst:187\nmsgid \"Keep-alive requests\"\nmsgstr \"\"\n\n#: ../../recipes.rst:191\nmsgid \"For a more detailed explanation, see :doc:`async`.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:193\nmsgid \"\"\n\"Several \\\"push\\\" mechanisms like XHR multipart need the ability to write \"\n\"response data without closing the connection in conjunction with the \"\n\"response header \\\"Connection: keep-alive\\\". WSGI does not easily lend itself\"\n\" to this behavior, but it is still possible to do so in Bottle by using the \"\n\"gevent_ async framework. Here is a sample that works with either the gevent_\"\n\" HTTP server or the paste_ HTTP server (it may work with others, but I have \"\n\"not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the\"\n\" paste_ server::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:210\nmsgid \"\"\n\"If you browse to ``http://localhost:8080/stream``, you should see 'START', \"\n\"'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to \"\n\"see them all at once).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:213\nmsgid \"Gzip Compression in Bottle\"\nmsgstr \"\"\n\n#: ../../recipes.rst:216\nmsgid \"For a detailed discussion, see compression_\"\nmsgstr \"\"\n\n#: ../../recipes.rst:218\nmsgid \"\"\n\"A common feature request is for Bottle to support Gzip compression, which \"\n\"speeds up sites by compressing static resources (like CSS and JS files) \"\n\"during a request.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:220\nmsgid \"\"\n\"Supporting Gzip compression is not a straightforward proposition, due to a \"\n\"number of corner cases that crop up frequently. A proper Gzip implementation\"\n\" must:\"\nmsgstr \"\"\n\n#: ../../recipes.rst:222\nmsgid \"Compress on the fly and be fast doing so.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:223\nmsgid \"Do not compress for browsers that don't support it.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:224\nmsgid \"Do not compress files that are compressed already (images, videos).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:225\nmsgid \"Do not compress dynamic files.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:226\nmsgid \"Support two differed compression algorithms (gzip and deflate).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:227\nmsgid \"Cache compressed files that don't change often.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:228\nmsgid \"De-validate the cache if one of the files changed anyway.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:229\nmsgid \"Make sure the cache does not get to big.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:230\nmsgid \"\"\n\"Do not cache small files because a disk seek would take longer than on-the-\"\n\"fly compression.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:232\nmsgid \"\"\n\"Because of these requirements, it is the recommendation of the Bottle \"\n\"project that Gzip compression is best handled by the WSGI server Bottle runs\"\n\" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware \"\n\"that can be used to accomplish this.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:236\nmsgid \"Using the hooks plugin\"\nmsgstr \"\"\n\n#: ../../recipes.rst:238\nmsgid \"\"\n\"For example, if you want to allow Cross-Origin Resource Sharing for the \"\n\"content returned by all of your URL, you can use the hook decorator and \"\n\"setup a callback function::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:256\nmsgid \"\"\n\"You can also use the ``before_request`` to take an action before every \"\n\"function gets called.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:261\nmsgid \"Using Bottle with Heroku\"\nmsgstr \"\"\n\n#: ../../recipes.rst:263\nmsgid \"\"\n\"Heroku_, a popular cloud application platform now provides support for \"\n\"running Python applications on their infastructure.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:266\nmsgid \"\"\n\"This recipe is based upon the `Heroku Quickstart \"\n\"<http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific \"\n\"code replacing the `Write Your App \"\n\"<http://devcenter.heroku.com/articles/python#write_your_app>`_ section of \"\n\"the `Getting Started with Python on Heroku/Cedar \"\n\"<http://devcenter.heroku.com/articles/python>`_ guide::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:282\nmsgid \"\"\n\"Heroku's app stack passes the port that the application needs to listen on \"\n\"for requests, using the `os.environ` dictionary.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/routing.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../routing.rst:3\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../routing.rst:5\nmsgid \"\"\n\"Bottle uses a powerful routing engine to find the right callback for each \"\n\"request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This \"\n\"document covers advanced techniques and rule mechanics in detail.\"\nmsgstr \"\"\n\n#: ../../routing.rst:8\nmsgid \"Rule Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:10\nmsgid \"\"\n\"The :class:`Router` distinguishes between two basic types of routes: \"\n\"**static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. \"\n\"``/hello/<name>``). A route that contains one or more *wildcards* it is \"\n\"considered dynamic. All other routes are static.\"\nmsgstr \"\"\n\n#: ../../routing.rst:14\nmsgid \"\"\n\"The simplest form of a wildcard consists of a name enclosed in angle \"\n\"brackets (e.g. ``<name>``). The name should be unique for a given route and \"\n\"form a valid python identifier (alphanumeric, starting with a letter). This \"\n\"is because wildcards are used as keyword arguments for the request callback \"\n\"later.\"\nmsgstr \"\"\n\n#: ../../routing.rst:16\nmsgid \"\"\n\"Each wildcard matches one or more characters, but stops at the first slash \"\n\"(``/``). This equals a regular expression of ``[^/]+`` and ensures that only\"\n\" one path segment is matched and routes with more than one wildcard stay \"\n\"unambiguous.\"\nmsgstr \"\"\n\n#: ../../routing.rst:18\nmsgid \"The rule ``/<action>/<item>`` matches as follows:\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Path\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Result\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"/save/123\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"``{'action': 'save', 'item': '123'}``\"\nmsgstr \"\"\n\n#: ../../routing.rst:24\nmsgid \"/save/123/\"\nmsgstr \"\"\n\n#: ../../routing.rst:24 ../../routing.rst:25 ../../routing.rst:26\nmsgid \"`No Match`\"\nmsgstr \"\"\n\n#: ../../routing.rst:25\nmsgid \"/save/\"\nmsgstr \"\"\n\n#: ../../routing.rst:26\nmsgid \"//123\"\nmsgstr \"\"\n\n#: ../../routing.rst:29\nmsgid \"\"\n\"Is it possible to escape characters like colon ``:`` with a backslash \"\n\"``\\\\``. This will prevent to trigger the old syntax in case you need to use \"\n\"``:``. For example: the rule ``/<action>/item:<id>`` triggers the old \"\n\"syntax, (see below) but ``/action/item\\\\:<id>`` works as intended with the \"\n\"new syntax.\"\nmsgstr \"\"\n\n#: ../../routing.rst:33\nmsgid \"\"\n\"You can change the exact behaviour in many ways using filters. This is \"\n\"described in the next section.\"\nmsgstr \"\"\n\n#: ../../routing.rst:36\nmsgid \"Wildcard Filters\"\nmsgstr \"\"\n\n#: ../../routing.rst:40\nmsgid \"\"\n\"Filters are used to define more specific wildcards, and/or transform the \"\n\"matched part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../routing.rst:42\nmsgid \"The following standard filters are implemented:\"\nmsgstr \"\"\n\n#: ../../routing.rst:44\nmsgid \"**:int** matches (signed) digits and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../routing.rst:45\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../routing.rst:46\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and may be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../routing.rst:47\nmsgid \"\"\n\"**:re[:exp]** allows you to specify a custom regular expression in the \"\n\"config field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../routing.rst:49\nmsgid \"\"\n\"You can add your own filters to the router. All you need is a function that \"\n\"returns three elements: A regular expression string, a callable to convert \"\n\"the URL fragment to a python value, and a callable that does the opposite. \"\n\"The filter function is called with the configuration string as the only \"\n\"parameter and may parse it as needed::\"\nmsgstr \"\"\n\n#: ../../routing.rst:75\nmsgid \"Legacy Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:79\nmsgid \"\"\n\"The new rule syntax was introduce in **Bottle 0.10** to simplify some common\"\n\" use cases, but the old syntax still works and you can find lot code \"\n\"examples still using it. The differences are best described by example:\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"Old Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"New Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:90\nmsgid \"\"\n\"Try to avoid the old syntax in future projects if you can. It is not \"\n\"currently deprecated, but will be eventually.\"\nmsgstr \"\"\n\n#: ../../routing.rst:95\nmsgid \"Explicit routing configuration\"\nmsgstr \"\"\n\n#: ../../routing.rst:97\nmsgid \"\"\n\"Route decorator can also be directly called as method. This way provides \"\n\"flexibility in complex setups, allowing you to directly control, when and \"\n\"how routing configuration done.\"\nmsgstr \"\"\n\n#: ../../routing.rst:99\nmsgid \"\"\n\"Here is a basic example of explicit routing configuration for default bottle\"\n\" application::\"\nmsgstr \"\"\n\n#: ../../routing.rst:105\nmsgid \"\"\n\"In fact, any :class:`Bottle` instance routing can be configured same way::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/stpl.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../stpl.rst:3\nmsgid \"SimpleTemplate Engine\"\nmsgstr \"\"\n\n#: ../../stpl.rst:7\nmsgid \"\"\n\"Bottle comes with a fast, powerful and easy to learn built-in template \"\n\"engine called *SimpleTemplate* or *stpl* for short. It is the default engine\"\n\" used by the :func:`view` and :func:`template` helpers but can be used as a \"\n\"stand-alone general purpose template engine too. This document explains the \"\n\"template syntax and shows examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:10\nmsgid \"Basic API Usage:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:11\nmsgid \":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:18\nmsgid \"\"\n\"In this document we use the :func:`template` helper in examples for the sake\"\n\" of simplicity::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:24\nmsgid \"\"\n\"You can also pass a dictionary into the template using keyword arguments::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:31\nmsgid \"\"\n\"Just keep in mind that compiling and rendering templates are two different \"\n\"actions, even if the :func:`template` helper hides this fact. Templates are \"\n\"usually compiled only once and cached internally, but rendered many times \"\n\"with different keyword arguments.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:34\nmsgid \":class:`SimpleTemplate` Syntax\"\nmsgstr \"\"\n\n#: ../../stpl.rst:36\nmsgid \"\"\n\"Python is a very powerful language but its whitespace-aware syntax makes it \"\n\"difficult to use as a template language. SimpleTemplate removes some of \"\n\"these restrictions and allows you to write clean, readable and maintainable \"\n\"templates while preserving full access to the features, libraries and speed \"\n\"of the Python language.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:40\nmsgid \"\"\n\"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and \"\n\"is executed on each :meth:`SimpleTemplate.render` call. Do not render \"\n\"untrusted templates! They may contain and execute harmful python code.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:43\nmsgid \"Inline Expressions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:45\nmsgid \"\"\n\"You already learned the use of the ``{{...}}`` syntax from the \\\"Hello \"\n\"World!\\\" example above, but there is more: any python expression is allowed \"\n\"within the curly brackets as long as it evaluates to a string or something \"\n\"that has a string representation::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:54\nmsgid \"\"\n\"The contained python expression is executed at render-time and has access to\"\n\" all keyword arguments passed to the :meth:`SimpleTemplate.render` method. \"\n\"HTML special characters are escaped automatically to prevent `XSS \"\n\"<http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start\"\n\" the expression with an exclamation mark to disable escaping for that \"\n\"expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:62\nmsgid \"Embedded python code\"\nmsgstr \"\"\n\n#: ../../stpl.rst:66\nmsgid \"\"\n\"The template engine allows you to embed lines or blocks of python code \"\n\"within your template. Code lines start with ``%`` and code blocks are \"\n\"surrounded by ``<%`` and ``%>`` tokens::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:76\nmsgid \"\"\n\"Embedded python code follows regular python syntax, but with two additional \"\n\"syntax rules:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:78\nmsgid \"\"\n\"**Indentation is ignored.** You can put as much whitespace in front of \"\n\"statements as you want. This allows you to align your code with the \"\n\"surrounding markup and can greatly improve readability.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:79\nmsgid \"\"\n\"Blocks that are normally indented now have to be closed explicitly with an \"\n\"``end`` keyword.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:89\nmsgid \"\"\n\"Both the ``%`` and the ``<%`` tokens are only recognized if they are the \"\n\"first non-whitespace characters in a line. You don't have to escape them if \"\n\"they appear mid-text in your template markup. Only if a line of text starts \"\n\"with one of these tokens, you have to escape it with a backslash. In the \"\n\"rare case where the backslash + token combination appears in your markup at \"\n\"the beginning of a line, you can always help yourself with a string literal \"\n\"in an inline expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:96\nmsgid \"\"\n\"If you find yourself needing to escape a lot, consider using :ref:`custom \"\n\"tokens <stpl-custom-tokens>`.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:98\nmsgid \"\"\n\"Note that ``%`` and ``<% %>`` work in *exactly* the same way. The latter is \"\n\"only a convenient way to type less and avoid clutter for longer code \"\n\"segments. This means that in ``<% %>`` blocks, all indented code must be \"\n\"terminated with an ``end``, as in the following example::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:114\nmsgid \"Whitespace Control\"\nmsgstr \"\"\n\n#: ../../stpl.rst:116\nmsgid \"\"\n\"Code blocks and code lines always span the whole line. Whitespace in front \"\n\"of after a code segment is stripped away. You won't see empty lines or \"\n\"dangling whitespace in your template because of embedded code::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:124\nmsgid \"This snippet renders to clean and compact html::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:130\nmsgid \"\"\n\"But embedding code still requires you to start a new line, which may not \"\n\"what you want to see in your rendered template. To skip the newline in front\"\n\" of a code segment, end the text line with a double-backslash::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:138\nmsgid \"This time the rendered template looks like this::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:142\nmsgid \"\"\n\"This only works directly in front of code segments. In all other places you \"\n\"can control the whitespace yourself and don't need any special syntax.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:145\nmsgid \"Template Functions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:147\nmsgid \"\"\n\"Each template is preloaded with a bunch of functions that help with the most\"\n\" common use cases. These functions are always available. You don't have to \"\n\"import or provide them yourself. For everything not covered here there are \"\n\"probably good python libraries available. Remember that you can ``import`` \"\n\"anything you want within your templates. They are python programs after all.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:151\nmsgid \"\"\n\"Prior to this release, :func:`include` and :func:`rebase` were syntax \"\n\"keywords, not functions.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:156\nmsgid \"\"\n\"Render a sub-template with the specified variables and insert the resulting \"\n\"text into the current template. The function returns a dictionary containing\"\n\" the local variables passed to or defined within the sub-template::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:164\nmsgid \"\"\n\"Mark the current template to be later included into a different template. \"\n\"After the current template is rendered, its resulting text is stored in a \"\n\"variable named ``base`` and passed to the base-template, which is then \"\n\"rendered. This can be used to `wrap` a template with surrounding text, or \"\n\"simulate the inheritance feature found in other template engines::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:169\nmsgid \"This can be combined with the following ``base.tpl``::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:181\nmsgid \"\"\n\"Accessing undefined variables in a template raises :exc:`NameError` and \"\n\"stops rendering immediately. This is standard python behavior and nothing \"\n\"new, but vanilla python lacks an easy way to check the availability of a \"\n\"variable. This quickly gets annoying if you want to support flexible inputs \"\n\"or use the same template in different situations. These functions may help:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:189\nmsgid \"\"\n\"Return True if the variable is defined in the current template namespace, \"\n\"False otherwise.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:194\nmsgid \"Return the variable, or a default value.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:198\nmsgid \"\"\n\"If the variable is not defined, create it with the given default value. \"\n\"Return the variable.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:201\nmsgid \"\"\n\"Here is an example that uses all three functions to implement optional \"\n\"template variables in different ways::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:215\nmsgid \":class:`SimpleTemplate` API\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.render:1\nmsgid \"Render the template using keyword arguments as local variables.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/tutorial.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Manabu Shimohira <mshimohi@gmail.com>, 2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../tutorial.rst:24\nmsgid \"Tutorial\"\nmsgstr \"チュートリアル\"\n\n#: ../../tutorial.rst:26\nmsgid \"\"\n\"This tutorial introduces you to the concepts and features of the Bottle web \"\n\"framework and covers basic and advanced topics alike. You can read it from \"\n\"start to end, or use it as a reference later on. The automatically generated\"\n\" :doc:`api` may be interesting for you, too. It covers more details, but \"\n\"explains less than this tutorial. Solutions for the most common questions \"\n\"can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If \"\n\"you need any help, join our `mailing list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"このチュートリアルでは、Bottle Webフレームワークの概念と機能を、基礎から上級までカバーして紹介します。最初から最後まで読み通すのもいいでしょうし、リファレンスとしてあとで参照するのも良いでしょう。自動的に生成される :doc: 'api' も興味を引くことでしょう。そこには詳細について述べられていますが、このチュートリアルよりも説明は多くは述べられていません。一般的に共通した質問についての答えは :doc:`recipes`  コレクションか  :doc:`faq` ページで見つけることができます。なんらかの助けが必要な場合には <mailto:bottlepy@googlegroups.com>`_  のメーリングリストに参加するか、<http://webchat.freenode.net/?channels=bottlepy>`_のIRCチャネルを訪問してください。\"\n\n#: ../../tutorial.rst:31\nmsgid \"Installation\"\nmsgstr \"インストール\"\n\n#: ../../tutorial.rst:33\nmsgid \"\"\n\"Bottle does not depend on any external libraries. You can just download \"\n\"`bottle.py </bottle.py>`_ into your project directory and start coding:\"\nmsgstr \"Bottleはどの外部ライブラリーにも依存していません。 `bottle.py </bottle.py>`_ をコンピューターにダウンロードすればコーディングを始めることができます。\"\n\n#: ../../tutorial.rst:39\nmsgid \"\"\n\"This will get you the latest development snapshot that includes all the new \"\n\"features. If you prefer a more stable environment, you should stick with the\"\n\" stable releases. These are available on `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_ and can be installed via \"\n\":command:`pip` (recommended), :command:`easy_install` or your package \"\n\"manager:\"\nmsgstr \"これにより全ての新機能が含まれた最新の開発スナップショットを入手することが可能になります。より安定した環境を希望する場合には、安定リリースを選択してください。これらは  :command:`pip` (推奨), :command:`easy_install` を実行することで`PyPI <http://pypi.python.org/pypi/bottle>`_やその他のパッケージ管理ツールから入手することができます。\"\n\n#: ../../tutorial.rst:47\nmsgid \"\"\n\"Either way, you'll need Python 2.7 or newer (including 3.4+) to run bottle \"\n\"applications. If you do not have permissions to install packages system-wide\"\n\" or simply don't want to, create a `virtualenv \"\n\"<http://pypi.python.org/pypi/virtualenv>`_ first:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:55\nmsgid \"Or, if virtualenv is not installed on your system:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:67\nmsgid \"Quickstart: \\\"Hello World\\\"\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:69\nmsgid \"\"\n\"This tutorial assumes you have Bottle either :ref:`installed <installation>`\"\n\" or copied into your project directory. Let's start with a very basic \"\n\"\\\"Hello World\\\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:79\nmsgid \"\"\n\"This is it. Run this script, visit http://localhost:8080/hello and you will \"\n\"see \\\"Hello World!\\\" in your browser. Here is how it works:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:81\nmsgid \"\"\n\"The :func:`route` decorator binds a piece of code to an URL path. In this \"\n\"case, we link the ``/hello`` path to the ``hello()`` function. This is \"\n\"called a `route` (hence the decorator name) and is the most important \"\n\"concept of this framework. You can define as many routes as you want. \"\n\"Whenever a browser requests a URL, the associated function is called and the\"\n\" return value is sent back to the browser. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:83\nmsgid \"\"\n\"The :func:`run` call in the last line starts a built-in development server. \"\n\"It runs on ``localhost`` port ``8080`` and serves requests until you hit \"\n\":kbd:`Control-c`. You can switch the server backend later, but for now a \"\n\"development server is all we need. It requires no setup at all and is an \"\n\"incredibly painless way to get your application up and running for local \"\n\"tests.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:85\nmsgid \"\"\n\"The :ref:`tutorial-debugging` is very helpful during early development, but \"\n\"should be switched off for public applications. Keep that in mind.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:87\nmsgid \"\"\n\"This is just a demonstration of the basic concept of how applications are \"\n\"built with Bottle. Continue reading and you'll see what else is possible.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:92\nmsgid \"The Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:94\nmsgid \"\"\n\"For the sake of simplicity, most examples in this tutorial use a module-\"\n\"level :func:`route` decorator to define routes. This adds routes to a global\"\n\" \\\"default application\\\", an instance of :class:`Bottle` that is \"\n\"automatically created the first time you call :func:`route`. Several other \"\n\"module-level decorators and functions relate to this default application, \"\n\"but if you prefer a more object oriented approach and don't mind the extra \"\n\"typing, you can create a separate application object and use that instead of\"\n\" the global one::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:106\nmsgid \"\"\n\"The object-oriented approach is further described in the :ref:`default-app` \"\n\"section. Just keep in mind that you have a choice.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:114\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:116\nmsgid \"\"\n\"In the last chapter we built a very simple web application with only a \"\n\"single route. Here is the routing part of the \\\"Hello World\\\" example \"\n\"again::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:122\nmsgid \"\"\n\"The :func:`route` decorator links an URL path to a callback function, and \"\n\"adds a new route to the :ref:`default application <tutorial-default>`. An \"\n\"application with just one route is kind of boring, though. Let's add some \"\n\"more (don't forget ``from bottle import template``)::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:129\nmsgid \"\"\n\"This example demonstrates two things: You can bind more than one route to a \"\n\"single callback, and you can add wildcards to URLs and access them via \"\n\"keyword arguments.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:136\nmsgid \"Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:138\nmsgid \"\"\n\"Routes that contain wildcards are called `dynamic routes` (as opposed to \"\n\"`static routes`) and match more than one URL at the same time. A simple \"\n\"wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and\"\n\" accepts one or more characters up to the next slash (``/``). For example, \"\n\"the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as\"\n\" ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:140\nmsgid \"\"\n\"Each wildcard passes the covered part of the URL as a keyword argument to \"\n\"the request callback. You can use them right away and implement RESTful, \"\n\"nice-looking and meaningful URLs with ease. Here are some other examples \"\n\"along with the URLs they'd match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:150\nmsgid \"\"\n\"Filters can be used to define more specific wildcards, and/or transform the \"\n\"covered part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:152\nmsgid \"\"\n\"The following filters are implemented by default and more may be added:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:154\nmsgid \"\"\n\"**:int** matches (signed) digits only and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:155\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:156\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and can be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:157\nmsgid \"\"\n\"**:re** allows you to specify a custom regular expression in the config \"\n\"field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:159\nmsgid \"Let's have a look at some practical examples::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:173\nmsgid \"You can add your own filters as well. See :doc:`routing` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:177\nmsgid \"HTTP Request Methods\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:181\nmsgid \"\"\n\"The HTTP protocol defines several `request methods`__ (sometimes referred to\"\n\" as \\\"verbs\\\") for different tasks. GET is the default for all routes with \"\n\"no other method specified. These routes will match GET requests only. To \"\n\"handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` \"\n\"keyword argument to the :func:`route` decorator or use one of the five \"\n\"alternative decorators: :func:`get`, :func:`post`, :func:`put`, \"\n\":func:`delete` or :func:`patch`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:183\nmsgid \"\"\n\"The POST method is commonly used for HTML form submission. This example \"\n\"shows how to handle a login form using POST::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:206\nmsgid \"\"\n\"In this example the ``/login`` URL is linked to two distinct callbacks, one \"\n\"for GET requests and another for POST requests. The first one displays a \"\n\"HTML form to the user. The second callback is invoked on a form submission \"\n\"and checks the login credentials the user entered into the form. The use of \"\n\":attr:`Request.forms` is further described in the :ref:`tutorial-request` \"\n\"section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:209\nmsgid \"Special Methods: HEAD and ANY\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:210\nmsgid \"\"\n\"The HEAD method is used to ask for the response identical to the one that \"\n\"would correspond to a GET request, but without the response body. This is \"\n\"useful for retrieving meta-information about a resource without having to \"\n\"download the entire document. Bottle handles these requests automatically by\"\n\" falling back to the corresponding GET route and cutting off the request \"\n\"body, if present. You don't have to specify any HEAD routes yourself.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:212\nmsgid \"\"\n\"Additionally, the non-standard ANY method works as a low priority fallback: \"\n\"Routes that listen to ANY will match requests regardless of their HTTP \"\n\"method but only if no other more specific route is defined. This is helpful \"\n\"for *proxy-routes* that redirect requests to more specific sub-applications.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:214\nmsgid \"\"\n\"To sum it up: HEAD requests fall back to GET routes and all requests fall \"\n\"back to ANY routes, but only if there is no matching route for the original \"\n\"request method. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:219\nmsgid \"Routing Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:221\nmsgid \"\"\n\"Static files such as images or CSS files are not served automatically. You \"\n\"have to add a route and a callback to control which files get served and \"\n\"where to find them::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:228\nmsgid \"\"\n\"The :func:`static_file` function is a helper to serve files in a safe and \"\n\"convenient way (see :ref:`tutorial-static-files`). This example is limited \"\n\"to files directly within the ``/path/to/your/static/files`` directory \"\n\"because the ``<filename>`` wildcard won't match a path with a slash in it. \"\n\"To serve files in subdirectories, change the wildcard to use the `path` \"\n\"filter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:234\nmsgid \"\"\n\"Be careful when specifying a relative root-path such as \"\n\"``root='./static/files'``. The working directory (``./``) and the project \"\n\"directory are not always the same.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:242\nmsgid \"Error Pages\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:244\nmsgid \"\"\n\"If anything goes wrong, Bottle displays an informative but fairly plain \"\n\"error page. You can override the default for a specific HTTP status code \"\n\"with the :func:`error` decorator::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:251\nmsgid \"\"\n\"From now on, `404 File not Found` errors will display a custom error page to\"\n\" the user. The only parameter passed to the error-handler is an instance of \"\n\":exc:`HTTPError`. Apart from that, an error-handler is quite similar to a \"\n\"regular request callback. You can read from :data:`request`, write to \"\n\":data:`response` and return any supported data-type except for \"\n\":exc:`HTTPError` instances.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:253\nmsgid \"\"\n\"Error handlers are used only if your application returns or raises an \"\n\":exc:`HTTPError` exception (:func:`abort` does just that). Changing \"\n\":attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the \"\n\"error handler.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:263\nmsgid \"Generating content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:265\nmsgid \"\"\n\"In pure WSGI, the range of types you may return from your application is \"\n\"very limited. Applications must return an iterable yielding byte strings. \"\n\"You may return a string (because strings are iterable) but this causes most \"\n\"servers to transmit your content char by char. Unicode strings are not \"\n\"allowed at all. This is not very practical.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:267\nmsgid \"\"\n\"Bottle is much more flexible and supports a wide range of types. It even \"\n\"adds a ``Content-Length`` header if possible and encodes unicode \"\n\"automatically, so you don't have to. What follows is a list of data types \"\n\"you may return from your application callbacks and a short description of \"\n\"how these are handled by the framework:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"Dictionaries\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"\"\n\"As mentioned above, Python dictionaries (or subclasses thereof) are \"\n\"automatically transformed into JSON strings and returned to the browser with\"\n\" the ``Content-Type`` header set to ``application/json``. This makes it easy\"\n\" to implement json-based APIs. Data formats other than json are supported \"\n\"too. See the :ref:`tutorial-output-filter` to learn more.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"Empty Strings, ``False``, ``None`` or other non-true values:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"\"\n\"These produce an empty output with the ``Content-Length`` header set to 0.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"Unicode strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"\"\n\"Unicode strings (or iterables yielding unicode strings) are automatically \"\n\"encoded with the codec specified in the ``Content-Type`` header (utf8 by \"\n\"default) and then treated as normal byte strings (see below).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"Byte strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"\"\n\"Bottle returns strings as a whole (instead of iterating over each char) and \"\n\"adds a ``Content-Length`` header based on the string length. Lists of byte \"\n\"strings are joined first. Other iterables yielding byte strings are not \"\n\"joined because they may grow too big to fit into memory. The ``Content-\"\n\"Length`` header is not set in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"Instances of :exc:`HTTPError` or :exc:`HTTPResponse`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"\"\n\"Returning these has the same effect as when raising them as an exception. In\"\n\" case of an :exc:`HTTPError`, the error handler is applied. See :ref\"\n\":`tutorial-errorhandling` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"File objects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"\"\n\"Everything that has a ``.read()`` method is treated as a file or file-like \"\n\"object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI \"\n\"server framework. Some WSGI server implementations can make use of optimized\"\n\" system calls (sendfile) to transmit files more efficiently. In other cases \"\n\"this just iterates over chunks that fit into memory. Optional headers such \"\n\"as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use \"\n\":func:`send_file` if possible. See :ref:`tutorial-static-files` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"Iterables and generators\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"\"\n\"You are allowed to use ``yield`` within your callbacks or return an \"\n\"iterable, as long as the iterable yields byte strings, unicode strings, \"\n\":exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not \"\n\"supported, sorry. Please note that the HTTP status code and the headers are \"\n\"sent to the browser as soon as the iterable yields its first non-empty \"\n\"value. Changing these later has no effect.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:290\nmsgid \"\"\n\"The ordering of this list is significant. You may for example return a \"\n\"subclass of :class:`str` with a ``read()`` method. It is still treated as a \"\n\"string instead of a file, because strings are handled first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:293\nmsgid \"Changing the Default Encoding\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:294\nmsgid \"\"\n\"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide\"\n\" how to encode unicode strings. This header defaults to ``text/html; \"\n\"charset=UTF8`` and can be changed using the :attr:`Response.content_type` \"\n\"attribute or by setting the :attr:`Response.charset` attribute directly. \"\n\"(The :class:`Response` object is described in the section :ref:`tutorial-\"\n\"response`.)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:309\nmsgid \"\"\n\"In some rare cases the Python encoding names differ from the names supported\"\n\" by the HTTP specification. Then, you have to do both: first set the \"\n\":attr:`Response.content_type` header (which is sent to the client unchanged)\"\n\" and then set the :attr:`Response.charset` attribute (which is used to \"\n\"encode unicode).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:314\nmsgid \"Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:316\nmsgid \"\"\n\"You can directly return file objects, but :func:`static_file` is the \"\n\"recommended way to serve static files. It automatically guesses a mime-type,\"\n\" adds a ``Last-Modified`` header, restricts paths to a ``root`` directory \"\n\"for security reasons and generates appropriate error responses (403 on \"\n\"permission errors, 404 on missing files). It even supports the ``If-\"\n\"Modified-Since`` header and eventually generates a ``304 Not Modified`` \"\n\"response. You can pass a custom MIME type to disable guessing.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:329\nmsgid \"\"\n\"You can raise the return value of :func:`static_file` as an exception if you\"\n\" really need to.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:332\nmsgid \"Forced Download\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:333\nmsgid \"\"\n\"Most browsers try to open downloaded files if the MIME type is known and \"\n\"assigned to an application (e.g. PDF files). If this is not what you want, \"\n\"you can force a download dialog and even suggest a filename to the user::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:339\nmsgid \"\"\n\"If the ``download`` parameter is just ``True``, the original filename is \"\n\"used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:344\nmsgid \"HTTP Errors and Redirects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:346\nmsgid \"\"\n\"The :func:`abort` function is a shortcut for generating HTTP error pages.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:355\nmsgid \"\"\n\"To redirect a client to a different URL, you can send a ``303 See Other`` \"\n\"response with the ``Location`` header set to the new URL. :func:`redirect` \"\n\"does that for you::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:362\nmsgid \"You may provide a different HTTP status code as a second parameter.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:365\nmsgid \"\"\n\"Both functions will interrupt your callback code by raising an \"\n\":exc:`HTTPResponse` exception.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:368\nmsgid \"Other Exceptions\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:369\nmsgid \"\"\n\"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will \"\n\"result in a ``500 Internal Server Error`` response, so they won't crash your\"\n\" WSGI server. You can turn off this behavior to handle exceptions in your \"\n\"middleware by setting ``bottle.app().catchall`` to ``False``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:375\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:377\nmsgid \"\"\n\"Response metadata such as the HTTP status code, response headers and cookies\"\n\" are stored in an object called :data:`response` up to the point where they \"\n\"are transmitted to the browser. You can manipulate these metadata directly \"\n\"or use the predefined helper methods to do so. The full API and feature list\"\n\" is described in the API section (see :class:`Response`), but the most \"\n\"common use cases and features are covered here, too.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:380\nmsgid \"Status Code\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:381\nmsgid \"\"\n\"The `HTTP status code <http_code>`_ controls the behavior of the browser and\"\n\" defaults to ``200 OK``. In most scenarios you won't need to set the \"\n\":attr:`Response.status` attribute manually, but use the :func:`abort` helper\"\n\" or return an :exc:`HTTPResponse` instance with the appropriate status code.\"\n\" Any integer is allowed, but codes other than the ones defined by the `HTTP \"\n\"specification <http_code>`_ will only confuse the browser and break \"\n\"standards.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:384\nmsgid \"Response Header\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:385\nmsgid \"\"\n\"Response headers such as ``Cache-Control`` or ``Location`` are defined via \"\n\":meth:`Response.set_header`. This method takes two parameters, a header name\"\n\" and a value. The name part is case-insensitive::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:392\nmsgid \"\"\n\"Most headers are unique, meaning that only one header per name is send to \"\n\"the client. Some special headers however are allowed to appear more than \"\n\"once in a response. To add an additional header, use \"\n\":meth:`Response.add_header` instead of :meth:`Response.set_header`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:397\nmsgid \"\"\n\"Please note that this is just an example. If you want to work with cookies, \"\n\"read :ref:`ahead <tutorial-cookies>`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:403 ../../tutorial.rst:533\nmsgid \"Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:405\nmsgid \"\"\n\"A cookie is a named piece of text stored in the user's browser profile. You \"\n\"can access previously defined cookies via :meth:`Request.get_cookie` and set\"\n\" new cookies with :meth:`Response.set_cookie`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:415\nmsgid \"\"\n\"The :meth:`Response.set_cookie` method accepts a number of additional \"\n\"keyword arguments that control the cookies lifetime and behavior. Some of \"\n\"the most common settings are described here:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:417\nmsgid \"**max_age:**    Maximum age in seconds. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:418\nmsgid \"\"\n\"**expires:**    A datetime object or UNIX timestamp. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:419\nmsgid \"\"\n\"**domain:**     The domain that is allowed to read the cookie. (default: \"\n\"current domain)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:420\nmsgid \"**path:**       Limit the cookie to a given path (default: ``/``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:421\nmsgid \"**secure:**     Limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:422\nmsgid \"\"\n\"**httponly:**   Prevent client-side javascript to read this cookie (default:\"\n\" off, requires Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:423\nmsgid \"\"\n\"**same_site:**  Disables third-party use for a cookie. Allowed attributes: \"\n\"`lax` and `strict`. In strict mode the cookie will never be sent. In lax \"\n\"mode the cookie is only sent with a top-level GET request.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:425\nmsgid \"\"\n\"If neither `expires` nor `max_age` is set, the cookie expires at the end of \"\n\"the browser session or as soon as the browser window is closed. There are \"\n\"some other gotchas you should consider when using cookies:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:427\nmsgid \"Cookies are limited to 4 KB of text in most browsers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:428\nmsgid \"\"\n\"Some users configure their browsers to not accept cookies at all. Most \"\n\"search engines ignore cookies too. Make sure that your application still \"\n\"works without cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:429\nmsgid \"\"\n\"Cookies are stored at client side and are not encrypted in any way. Whatever\"\n\" you store in a cookie, the user can read it. Worse than that, an attacker \"\n\"might be able to steal a user's cookies through `XSS \"\n\"<http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_\"\n\" vulnerabilities on your side. Some viruses are known to read the browser \"\n\"cookies, too. Thus, never store confidential information in cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:430\nmsgid \"Cookies are easily forged by malicious clients. Do not trust cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:435\nmsgid \"Signed Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:436\nmsgid \"\"\n\"As mentioned above, cookies are easily forged by malicious clients. Bottle \"\n\"can cryptographically sign your cookies to prevent this kind of \"\n\"manipulation. All you have to do is to provide a signature key via the \"\n\"`secret` keyword argument whenever you read or set a cookie and keep that \"\n\"key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` \"\n\"if the cookie is not signed or the signature keys don't match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:456\nmsgid \"\"\n\"In addition, Bottle automatically pickles and unpickles any data stored to \"\n\"signed cookies. This allows you to store any pickle-able object (not only \"\n\"strings) to cookies, as long as the pickled data does not exceed the 4 KB \"\n\"limit.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:458\nmsgid \"\"\n\"Signed cookies are not encrypted (the client can still see the content) and \"\n\"not copy-protected (the client can restore an old cookie). The main \"\n\"intention is to make pickling and unpickling safe and prevent manipulation, \"\n\"not to store secret information at client side.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:471\nmsgid \"Request Data\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:473\nmsgid \"\"\n\"Cookies, HTTP header, HTML ``<form>`` fields and other request data is \"\n\"available through the global :data:`request` object. This special object \"\n\"always refers to the *current* request, even in multi-threaded environments \"\n\"where multiple client connections are handled at the same time::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:482\nmsgid \"\"\n\"The :data:`request` object is a subclass of :class:`BaseRequest` and has a \"\n\"very rich API to access data. We only cover the most commonly used features \"\n\"here, but it should be enough to get started.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:487\nmsgid \"Introducing :class:`FormsDict`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:489\nmsgid \"\"\n\"Bottle uses a special type of dictionary to store form data and cookies. \"\n\":class:`FormsDict` behaves like a normal dictionary, but has some additional\"\n\" features to make your life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:491\nmsgid \"\"\n\"**Attribute access**: All values in the dictionary are also accessible as \"\n\"attributes. These virtual attributes return unicode strings, even if the \"\n\"value is missing or unicode decoding fails. In that case, the string is \"\n\"empty, but still present::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:506\nmsgid \"\"\n\"**Multiple values per key:** :class:`FormsDict` is a subclass of \"\n\":class:`MultiDict` and can store more than one value per key. The standard \"\n\"dictionary access methods will only return a single value, but the \"\n\":meth:`~MultiDict.getall` method returns a (possibly empty) list of all \"\n\"values for a specific key::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:511\nmsgid \"\"\n\"**WTForms support:** Some libraries (e.g. `WTForms \"\n\"<http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input.\"\n\" :meth:`FormsDict.decode` does that for you. It decodes all values and \"\n\"returns a copy of itself, while preserving multiple values per key and all \"\n\"the other features.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:515\nmsgid \"\"\n\"In **Python 2** all keys and values are byte-strings. If you need unicode, \"\n\"you can call :meth:`FormsDict.getunicode` or fetch values via attribute \"\n\"access. Both methods try to decode the string (default: utf8) and return an \"\n\"empty string if that fails. No need to catch :exc:`UnicodeError`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:522\nmsgid \"\"\n\"In **Python 3** all strings are unicode, but HTTP is a byte-based wire \"\n\"protocol. The server has to decode the byte strings somehow before they are \"\n\"passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 \"\n\"(aka latin1), a reversible single-byte codec that can be re-encoded with a \"\n\"different encoding later. Bottle does that for :meth:`FormsDict.getunicode` \"\n\"and attribute access, but not for the dict-access methods. These return the \"\n\"unchanged values as provided by the server implementation, which is probably\"\n\" not what you want.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:529\nmsgid \"\"\n\"If you need the whole dictionary with correctly decoded values (e.g. for \"\n\"WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:535\nmsgid \"\"\n\"Cookies are small pieces of text stored in the clients browser and sent back\"\n\" to the server with each request. They are useful to keep some state around \"\n\"for more than one request (HTTP itself is stateless), but should not be used\"\n\" for security related stuff. They can be easily forged by the client.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:537\nmsgid \"\"\n\"All cookies sent by the client are available through \"\n\":attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a \"\n\"simple cookie-based view counter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:547\nmsgid \"\"\n\"The :meth:`BaseRequest.get_cookie` method is a different way do access \"\n\"cookies. It supports decoding :ref:`signed cookies <tutorial-signed-\"\n\"cookies>` as described in a separate section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:550\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:552\nmsgid \"\"\n\"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or \"\n\"``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible \"\n\"through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict`\"\n\" is basically a dictionary with case-insensitive keys::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:564\nmsgid \"Query Variables\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:566\nmsgid \"\"\n\"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit\"\n\" a small number of key/value pairs to the server. You can use the \"\n\":attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these \"\n\"values and the :attr:`BaseRequest.query_string` attribute to get the whole \"\n\"string.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:579\nmsgid \"HTML `<form>` Handling\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:581\nmsgid \"\"\n\"Let us start from the beginning. In HTML, a typical ``<form>`` looks \"\n\"something like this:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:591\nmsgid \"\"\n\"The ``action`` attribute specifies the URL that will receive the form data. \"\n\"``method`` defines the HTTP method to use (``GET`` or ``POST``). With \"\n\"``method=\\\"get\\\"`` the form values are appended to the URL and available \"\n\"through :attr:`BaseRequest.query` as described above. This is considered \"\n\"insecure and has other limitations, so we use ``method=\\\"post\\\"`` here. If \"\n\"in doubt, use ``POST`` forms.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:593\nmsgid \"\"\n\"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms`\"\n\" as a :class:`FormsDict`. The server side code may look like this::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:616\nmsgid \"\"\n\"There are several other attributes used to access form data. Some of them \"\n\"combine values from different sources for easier access. The following table\"\n\" should give you a decent overview.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"GET Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"POST Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"File Uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621\nmsgid \":attr:`BaseRequest.query`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:622 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:624 ../../tutorial.rst:625\n#: ../../tutorial.rst:626 ../../tutorial.rst:626\nmsgid \"yes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:621 ../../tutorial.rst:622\n#: ../../tutorial.rst:622 ../../tutorial.rst:623 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:625 ../../tutorial.rst:625\n#: ../../tutorial.rst:626\nmsgid \"no\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:622\nmsgid \":attr:`BaseRequest.forms`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:623\nmsgid \":attr:`BaseRequest.files`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:624\nmsgid \":attr:`BaseRequest.params`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:625\nmsgid \":attr:`BaseRequest.GET`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:626\nmsgid \":attr:`BaseRequest.POST`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:631\nmsgid \"File uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:633\nmsgid \"\"\n\"To support file uploads, we have to change the ``<form>`` tag a bit. First, \"\n\"we tell the browser to encode the form data in a different way by adding an \"\n\"``enctype=\\\"multipart/form-data\\\"`` attribute to the ``<form>`` tag. Then, \"\n\"we add ``<input type=\\\"file\\\" />`` tags to allow the user to select a file. \"\n\"Here is an example:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:643\nmsgid \"\"\n\"Bottle stores file uploads in :attr:`BaseRequest.files` as \"\n\":class:`FileUpload` instances, along with some metadata about the upload. \"\n\"Let us assume you just want to save the file to disk::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:657\nmsgid \"\"\n\":attr:`FileUpload.filename` contains the name of the file on the clients \"\n\"file system, but is cleaned up and normalized to prevent bugs caused by \"\n\"unsupported characters or path segments in the filename. If you need the \"\n\"unmodified name as sent by the client, have a look at \"\n\":attr:`FileUpload.raw_filename`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:659\nmsgid \"\"\n\"The :attr:`FileUpload.save` method is highly recommended if you want to \"\n\"store the file to disk. It prevents some common errors (e.g. it does not \"\n\"overwrite existing files unless you tell it to) and stores the file in a \"\n\"memory efficient way. You can access the file object directly via \"\n\":attr:`FileUpload.file`. Just be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:663\nmsgid \"JSON Content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:665\nmsgid \"\"\n\"Some JavaScript or REST clients send ``application/json`` content to the \"\n\"server. The :attr:`BaseRequest.json` attribute contains the parsed data \"\n\"structure, if available.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:669\nmsgid \"The raw request body\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:671\nmsgid \"\"\n\"You can access the raw body data as a file-like object via \"\n\":attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary \"\n\"file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` \"\n\"setting. In both cases the body is completely buffered before you can access\"\n\" the attribute. If you expect huge amounts of data and want to get direct \"\n\"unbuffered access to the stream, have a look at ``request['wsgi.input']``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:676\nmsgid \"WSGI Environment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:678\nmsgid \"\"\n\"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The \"\n\"original is stored in :attr:`BaseRequest.environ`, but the request object \"\n\"itself behaves like a dictionary, too. Most of the interesting data is \"\n\"exposed through special methods or attributes, but if you want to access \"\n\"`WSGI environ variables <WSGI_Specification>`_ directly, you can do so::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:696\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:698\nmsgid \"\"\n\"Bottle comes with a fast and powerful built-in template engine called \"\n\":doc:`stpl`. To render a template you can use the :func:`template` function \"\n\"or the :func:`view` decorator. All you have to do is to provide the name of \"\n\"the template and the variables you want to pass to the template as keyword \"\n\"arguments. Here’s a simple example of how to render a template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:705\nmsgid \"\"\n\"This will load the template file ``hello_template.tpl`` and render it with \"\n\"the ``name`` variable set. Bottle will look for templates in the \"\n\"``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` \"\n\"list.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:707\nmsgid \"\"\n\"The :func:`view` decorator allows you to return a dictionary with the \"\n\"template variables instead of calling :func:`template`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:716\nmsgid \"Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:719\nmsgid \"\"\n\"The template syntax is a very thin layer around the Python language. Its \"\n\"main purpose is to ensure correct indentation of blocks, so you can format \"\n\"your template without worrying about indentation. Follow the link for a full\"\n\" syntax description: :doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:721\nmsgid \"Here is an example template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:732\nmsgid \"Caching\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:733\nmsgid \"\"\n\"Templates are cached in memory after compilation. Modifications made to the \"\n\"template files will have no affect until you clear the template cache. Call \"\n\"``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:743\nmsgid \"Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:747\nmsgid \"\"\n\"Bottle's core features cover most common use-cases, but as a micro-framework\"\n\" it has its limits. This is where \\\"Plugins\\\" come into play. Plugins add \"\n\"missing functionality to the framework, integrate third party libraries, or \"\n\"just automate some repetitive work.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:749\nmsgid \"\"\n\"We have a growing :doc:`/plugins/index` and most plugins are designed to be \"\n\"portable and re-usable across applications. The chances are high that your \"\n\"problem has already been solved and a ready-to-use plugin exists. If not, \"\n\"the :doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:751\nmsgid \"\"\n\"The effects and APIs of plugins are manifold and depend on the specific \"\n\"plugin. The ``SQLitePlugin`` plugin for example detects callbacks that \"\n\"require a ``db`` keyword argument and creates a fresh database connection \"\n\"object every time the callback is called. This makes it very convenient to \"\n\"use a database::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:771\nmsgid \"\"\n\"Other plugin may populate the thread-safe :data:`local` object, change \"\n\"details of the :data:`request` object, filter the data returned by the \"\n\"callback or bypass the callback completely. An \\\"auth\\\" plugin for example \"\n\"could check for a valid session and return a login page instead of calling \"\n\"the original callback. What happens exactly depends on the plugin.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:775\nmsgid \"Application-wide Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:777\nmsgid \"\"\n\"Plugins can be installed application-wide or just to some specific routes \"\n\"that need additional functionality. Most plugins can safely be installed to \"\n\"all routes and are smart enough to not add overhead to callbacks that do not\"\n\" need their functionality.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:779\nmsgid \"\"\n\"Let us take the ``SQLitePlugin`` plugin for example. It only affects route \"\n\"callbacks that need a database connection. Other routes are left alone. \"\n\"Because of this, we can install the plugin application-wide with no \"\n\"additional overhead.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:781\nmsgid \"\"\n\"To install a plugin, just call :func:`install` with the plugin as first \"\n\"argument::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:786\nmsgid \"\"\n\"The plugin is not applied to the route callbacks yet. This is delayed to \"\n\"make sure no routes are missed. You can install plugins first and add routes\"\n\" later, if you want to. The order of installed plugins is significant, \"\n\"though. If a plugin requires a database connection, you need to install the \"\n\"database plugin first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:790\nmsgid \"Uninstall Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:791\nmsgid \"\"\n\"You can use a name, class or instance to :func:`uninstall` a previously \"\n\"installed plugin::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:801\nmsgid \"\"\n\"Plugins can be installed and removed at any time, even at runtime while \"\n\"serving requests. This enables some neat tricks (installing slow debugging \"\n\"or profiling plugins only when needed) but should not be overused. Each time\"\n\" the list of plugins changes, the route cache is flushed and all plugins are\"\n\" re-applied.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:804\nmsgid \"\"\n\"The module-level :func:`install` and :func:`uninstall` functions affect the \"\n\":ref:`default-app`. To manage plugins for a specific application, use the \"\n\"corresponding methods on the :class:`Bottle` application object.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:808\nmsgid \"Route-specific Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:810\nmsgid \"\"\n\"The ``apply`` parameter of the :func:`route` decorator comes in handy if you\"\n\" want to install plugins to only a small number of routes::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:820\nmsgid \"Blacklisting Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:822\nmsgid \"\"\n\"You may want to explicitly disable a plugin for a number of routes. The \"\n\":func:`route` decorator has a ``skip`` parameter for this purpose::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:844\nmsgid \"\"\n\"The ``skip`` parameter accepts a single value or a list of values. You can \"\n\"use a name, class or instance to identify the plugin that is to be skipped. \"\n\"Set ``skip=True`` to skip all plugins at once.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:847\nmsgid \"Plugins and Sub-Applications\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:849\nmsgid \"\"\n\"Most plugins are specific to the application they were installed to. \"\n\"Consequently, they should not affect sub-applications mounted with \"\n\":meth:`Bottle.mount`. Here is an example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:860\nmsgid \"\"\n\"Whenever you mount an application, Bottle creates a proxy-route on the main-\"\n\"application that forwards all requests to the sub-application. Plugins are \"\n\"disabled for this kind of proxy-route by default. As a result, our \"\n\"(fictional) `WTForms` plugin affects the ``/contact`` route, but does not \"\n\"affect the routes of the ``/blog`` sub-application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:862\nmsgid \"\"\n\"This behavior is intended as a sane default, but can be overridden. The \"\n\"following example re-activates all plugins for a specific proxy-route::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:866\nmsgid \"\"\n\"But there is a snag: The plugin sees the whole sub-application as a single \"\n\"route, namely the proxy-route mentioned above. In order to affect each \"\n\"individual route of the sub-application, you have to install the plugin to \"\n\"the mounted application explicitly.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:871\nmsgid \"Development\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:873\nmsgid \"\"\n\"So you have learned the basics and want to write your own application? Here \"\n\"are some tips that might help you being more productive.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:879\nmsgid \"Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:881\nmsgid \"\"\n\"Bottle maintains a global stack of :class:`Bottle` instances and uses the \"\n\"top of the stack as a default for some of the module-level functions and \"\n\"decorators. The :func:`route` decorator, for example, is a shortcut for \"\n\"calling :meth:`Bottle.route` on the default application::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:889\nmsgid \"\"\n\"This is very convenient for small applications and saves you some typing, \"\n\"but also means that, as soon as your module is imported, routes are \"\n\"installed to the global default application. To avoid this kind of import \"\n\"side-effects, Bottle offers a second, more explicit way to build \"\n\"applications::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:899\nmsgid \"\"\n\"Separating the application object improves re-usability a lot, too. Other \"\n\"developers can safely import the ``app`` object from your module and use \"\n\":meth:`Bottle.mount` to merge applications together.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:904\nmsgid \"\"\n\"Starting with bottle-0.13 you can use :class:`Bottle` instances as context \"\n\"managers::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:929\nmsgid \"Debug Mode\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:931\nmsgid \"During early development, the debug mode can be very helpful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:939\nmsgid \"\"\n\"In this mode, Bottle is much more verbose and provides helpful debugging \"\n\"information whenever an error occurs. It also disables some optimisations \"\n\"that might get in your way and adds some checks that warn you about possible\"\n\" misconfiguration.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:941\nmsgid \"Here is an incomplete list of things that change in debug mode:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:943\nmsgid \"The default error page shows a traceback.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:944\nmsgid \"Templates are not cached.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:945\nmsgid \"Plugins are applied immediately.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:947\nmsgid \"Just make sure not to use the debug mode on a production server.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:950\nmsgid \"Auto Reloading\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:952\nmsgid \"\"\n\"During development, you have to restart the server a lot to test your recent\"\n\" changes. The auto reloader can do this for you. Every time you edit a \"\n\"module file, the reloader restarts the server process and loads the newest \"\n\"version of your code.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:962\nmsgid \"\"\n\"How it works: the main process will not start a server, but spawn a new \"\n\"child process using the same command line arguments used to start the main \"\n\"process. All module-level code is executed at least twice! Be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:967\nmsgid \"\"\n\"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` \"\n\"and start as a normal non-reloading app server. As soon as any of the loaded\"\n\" modules changes, the child process is terminated and re-spawned by the main\"\n\" process. Changes in template files will not trigger a reload. Please use \"\n\"debug mode to deactivate template caching.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:973\nmsgid \"\"\n\"The reloading depends on the ability to stop the child process. If you are \"\n\"running on Windows or any other operating system not supporting \"\n\"``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), \"\n\"``signal.SIGTERM`` is used to kill the child. Note that exit handlers and \"\n\"finally clauses, etc., are not executed after a ``SIGTERM``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:981\nmsgid \"Command Line Interface\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:985\nmsgid \"Starting with version 0.10 you can use bottle as a command-line tool:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1009\nmsgid \"\"\n\"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to \"\n\"``localhost:8080``. The other parameters should be self-explanatory.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1011\nmsgid \"\"\n\"Both plugins and applications are specified via import expressions. These \"\n\"consist of an import path (e.g. ``package.module``) and an expression to be \"\n\"evaluated in the namespace of that module, separated by a colon. See \"\n\":func:`load` for details. Here are some examples:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1032\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1034\nmsgid \"\"\n\"Bottle runs on the built-in `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_\"\n\"  by default. This non-threading HTTP server is perfectly fine for \"\n\"development, but may become a performance bottleneck when server load \"\n\"increases.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1036\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded server::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1040\nmsgid \"\"\n\"This, and many other deployment options are described in a separate article:\"\n\" :doc:`deployment`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1048\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1051\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1053\nmsgid \"\"\n\"Programmer code that is to be called when some external action happens. In \"\n\"the context of web frameworks, the mapping between URL paths and application\"\n\" code is often achieved by specifying a callback function for each URL.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1057\nmsgid \"decorator\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1059\nmsgid \"\"\n\"A function returning another function, usually applied as a function \"\n\"transformation using the ``@decorator`` syntax. See `python documentation \"\n\"for function definition  \"\n\"<http://docs.python.org/reference/compound_stmts.html#function>`_ for more \"\n\"about decorators.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1060\nmsgid \"environ\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1062\nmsgid \"\"\n\"A structure where information about all documents under the root is saved, \"\n\"and used for cross-referencing.  The environment is pickled after the \"\n\"parsing stage, so that successive runs only need to read and parse new and \"\n\"changed documents.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1066\nmsgid \"handler function\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1068\nmsgid \"\"\n\"A function to handle some specific event or situation. In a web framework, \"\n\"the application is developed by attaching a handler function as callback for\"\n\" each specific URL comprising the application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1071\nmsgid \"source directory\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1073\nmsgid \"\"\n\"The directory which, including its subdirectories, contains all source files\"\n\" for one Sphinx project.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ja_JP/LC_MESSAGES/tutorial_app.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Japanese (Japan) (http://www.transifex.com/bottle/bottle/language/ja_JP/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ja_JP\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../tutorial_app.rst:19\nmsgid \"Tutorial: Todo-List Application\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:23\nmsgid \"\"\n\"This tutorial is a work in progress and written by `noisefloor \"\n\"<http://github.com/noisefloor>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:26\nmsgid \"\"\n\"This tutorial should give a brief introduction to the Bottle_ WSGI \"\n\"Framework. The main goal is to be able, after reading through this tutorial,\"\n\" to create a project using Bottle. Within this document, not all abilities \"\n\"will be shown, but at least the main and important ones like routing, \"\n\"utilizing the Bottle template abilities to format output and handling GET / \"\n\"POST parameters.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:28\nmsgid \"\"\n\"To understand the content here, it is not necessary to have a basic \"\n\"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. \"\n\"You should have a fair understanding of the Python_ programming language. \"\n\"Furthermore, the example used in the tutorial retrieves and stores data in a\"\n\" SQL database, so a basic idea about SQL helps, but is not a must to \"\n\"understand the concepts of Bottle. Right here, SQLite_ is used. The output \"\n\"of Bottle sent to the browser is formatted in some examples by the help of \"\n\"HTML. Thus, a basic idea about the common HTML tags does help as well.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:30\nmsgid \"\"\n\"For the sake of introducing Bottle, the Python code \\\"in between\\\" is kept \"\n\"short, in order to keep the focus. Also all code within the tutorial is \"\n\"working fine, but you may not necessarily use it \\\"in the wild\\\", e.g. on a \"\n\"public web server. In order to do so, you may add e.g. more error handling, \"\n\"protect the database with a password, test and escape the input etc.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:32\nmsgid \"Table of Contents\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:35\nmsgid \"Goals\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:37\nmsgid \"\"\n\"At the end of this tutorial, we will have a simple, web-based ToDo list. The\"\n\" list contains a text (with max 100 characters) and a status (0 for closed, \"\n\"1 for open) for each item. Through the web-based user interface, open items \"\n\"can be view and edited and new items can be added.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:39\nmsgid \"\"\n\"During development, all pages will be available on ``localhost`` only, but \"\n\"later on it will be shown how to adapt the application for a \\\"real\\\" \"\n\"server, including how to use with Apache's mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:41\nmsgid \"\"\n\"Bottle will do the routing and format the output, with the help of \"\n\"templates. The items of the list will be stored inside a SQLite database. \"\n\"Reading and  writing the database will be done by Python code.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:43\nmsgid \"\"\n\"We will end up with an application with the following pages and \"\n\"functionality:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:45\nmsgid \"start page ``http://localhost:8080/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:46\nmsgid \"adding new items to the list: ``http://localhost:8080/new``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:47\nmsgid \"page for editing items: ``http://localhost:8080/edit/<no:int>``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:48\nmsgid \"catching errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:51\nmsgid \"Before We Start...\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:55\nmsgid \"Install Bottle\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:56\nmsgid \"\"\n\"Assuming that you have a fairly new installation of Python (version 2.5 or \"\n\"higher), you only need to install Bottle in addition to that. Bottle has no \"\n\"other dependencies than Python itself.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:58\nmsgid \"\"\n\"You can either manually install Bottle or use Python's easy_install: \"\n\"``easy_install bottle``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:62\nmsgid \"Further Software Necessities\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:63\nmsgid \"\"\n\"As we use SQLite3 as a database, make sure it is installed. On Linux \"\n\"systems, most distributions have SQLite3 installed by default. SQLite is \"\n\"available for Windows and MacOS X as well and the `sqlite3` module is part \"\n\"of the python standard library.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:66\nmsgid \"Create An SQL Database\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:67\nmsgid \"\"\n\"First, we need to create the database we use later on. To do so, save the \"\n\"following script in your project directory and run it with python. You can \"\n\"use the interactive interpreter too::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:78\nmsgid \"\"\n\"This generates a database-file `todo.db` with tables called ``todo`` and \"\n\"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for \"\n\"each row, which is used later on to reference the rows. The column ``task`` \"\n\"holds the text which describes the task, it can be max 100 characters long. \"\n\"Finally, the column ``status`` is used to mark a task as open (value 1) or \"\n\"closed (value 0).\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:81\nmsgid \"Using Bottle for a Web-Based ToDo List\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:83\nmsgid \"\"\n\"Now it is time to introduce Bottle in order to create a web-based \"\n\"application. But first, we need to look into a basic concept of Bottle: \"\n\"routes.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:87\nmsgid \"Understanding routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:88\nmsgid \"\"\n\"Basically, each page visible in the browser is dynamically generated when \"\n\"the page address is called. Thus, there is no static content. That is \"\n\"exactly what is called a \\\"route\\\" within Bottle: a certain address on the \"\n\"server. So, for example, when the page ``http://localhost:8080/todo`` is \"\n\"called from the browser, Bottle \\\"grabs\\\" the call and checks if there is \"\n\"any (Python) function defined for the route \\\"todo\\\". If so, Bottle will \"\n\"execute the corresponding Python code and return its result.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:92\nmsgid \"First Step - Showing All Open Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:93\nmsgid \"\"\n\"So, after understanding the concept of routes, let's create the first one. \"\n\"The goal is to see all open items from the ToDo list::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:108\nmsgid \"\"\n\"Save the code a ``todo.py``, preferably in the same directory as the file \"\n\"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the \"\n\"``sqlite3.connect()`` statement.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:110\nmsgid \"\"\n\"Let's have a look what we just did: We imported the necessary module \"\n\"``sqlite3`` to access to SQLite database and from Bottle we imported \"\n\"``route`` and ``run``. The ``run()`` statement simply starts the web server \"\n\"included in Bottle. By default, the web server serves the pages on localhost\"\n\" and port 8080. Furthermore, we imported ``route``, which is the function \"\n\"responsible for Bottle's routing. As you can see, we defined one function, \"\n\"``todo_list()``, with a few lines of code reading from the database. The \"\n\"important point is the `decorator statement`_ ``@route('/todo')`` right \"\n\"before the ``def todo_list()`` statement. By doing this, we bind this \"\n\"function to the route ``/todo``, so every time the browsers calls \"\n\"``http://localhost:8080/todo``, Bottle returns the result of the function \"\n\"``todo_list()``. That is how routing within bottle works.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:112\nmsgid \"\"\n\"Actually you can bind more than one route to a function. So the following \"\n\"code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:119\nmsgid \"\"\n\"will work fine, too. What will not work is to bind one route to more than \"\n\"one function.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:121\nmsgid \"\"\n\"What you will see in the browser is what is returned, thus the value given \"\n\"by the ``return`` statement. In this example, we need to convert ``result`` \"\n\"in to a string by ``str()``, as Bottle expects a string or a list of strings\"\n\" from the return statement. But here, the result of the database query is a \"\n\"list of tuples, which is the standard defined by the `Python DB API`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:123\nmsgid \"\"\n\"Now, after understanding the little script above, it is time to execute it \"\n\"and watch the result yourself. Remember that on Linux- / Unix-based systems \"\n\"the file ``todo.py`` needs to be executable first. Then, just run ``python \"\n\"todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. \"\n\"In case you made no mistake writing the script, the output should look like \"\n\"this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:127\nmsgid \"\"\n\"If so - congratulations! You are now a successful user of Bottle. In case it\"\n\" did not work and you need to make some changes to the script, remember to \"\n\"stop Bottle serving the page, otherwise the revised version will not be \"\n\"loaded.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:129\nmsgid \"\"\n\"Actually, the output is not really exciting nor nice to read. It is the raw \"\n\"result returned from the SQL query.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:131\nmsgid \"\"\n\"So, in the next step we format the output in a nicer way. But before we do \"\n\"that, we make our life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:135\nmsgid \"Debugging and Auto-Reload\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:136\nmsgid \"\"\n\"Maybe you already noticed that Bottle sends a short error message to the \"\n\"browser in case something within the script is wrong, e.g. the connection to\"\n\" the database is not working. For debugging purposes it is quite helpful to \"\n\"get more details. This can be easily achieved by adding the following \"\n\"statement to the script::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:144\nmsgid \"\"\n\"By enabling \\\"debug\\\", you will get a full stacktrace of the Python \"\n\"interpreter, which usually contains useful information for finding bugs. \"\n\"Furthermore, templates (see below) are not cached, thus changes to templates\"\n\" will take effect without stopping the server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:148\nmsgid \"\"\n\"That ``debug(True)`` is supposed to be used for development only, it should \"\n\"*not* be used in production environments.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:152\nmsgid \"\"\n\"Another quite nice feature is auto-reloading, which is enabled by modifying \"\n\"the ``run()`` statement to\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:158\nmsgid \"\"\n\"This will automatically detect changes to the script and reload the new \"\n\"version once it is called again, without the need to stop and start the \"\n\"server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:160\nmsgid \"\"\n\"Again, the feature is mainly supposed to be used while developing, not on \"\n\"production systems.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:164\nmsgid \"Bottle Template To Format The Output\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:165\nmsgid \"\"\n\"Now let's have a look at casting the output of the script into a proper \"\n\"format.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:167\nmsgid \"\"\n\"Actually Bottle expects to receive a string or a list of strings from a \"\n\"function and returns them by the help of the built-in server to the browser.\"\n\" Bottle does not bother about the content of the string itself, so it can be\"\n\" text formatted with HTML markup, too.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:169\nmsgid \"\"\n\"Bottle brings its own easy-to-use template engine with it. Templates are \"\n\"stored as separate files having a ``.tpl`` extension. The template can be \"\n\"called then from within a function. Templates can contain any type of text \"\n\"(which will be most likely HTML-markup mixed with Python statements). \"\n\"Furthermore, templates can take arguments, e.g. the result set of a database\"\n\" query, which will be then formatted nicely within the template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:171\nmsgid \"\"\n\"Right here, we are going to cast the result of our query showing the open \"\n\"ToDo items into a simple table with two columns: the first column will \"\n\"contain the ID of the item, the second column the text. The result set is, \"\n\"as seen above, a list of tuples, each tuple contains one set of results.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:173\nmsgid \"To include the template in our example, just add the following lines::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:183\nmsgid \"\"\n\"So we do here two things: first, we import ``template`` from Bottle in order\"\n\" to be able to use templates. Second, we assign the output of the template \"\n\"``make_table`` to the variable ``output``, which is then returned. In \"\n\"addition to calling the template, we assign ``result``, which we received \"\n\"from the database query, to the variable ``rows``, which is later on used \"\n\"within the template. If necessary, you can assign more than one variable / \"\n\"value to a template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:185\nmsgid \"\"\n\"Templates always return a list of strings, thus there is no need to convert \"\n\"anything. We can save one line of code by writing ``return \"\n\"template('make_table', rows=result)``, which gives exactly the same result \"\n\"as above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:187\nmsgid \"\"\n\"Now it is time to write the corresponding template, which looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:201\nmsgid \"\"\n\"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` \"\n\"is stored.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:203\nmsgid \"\"\n\"Let's have a look at the code: every line starting with % is interpreted as \"\n\"Python code. Because it is effectively Python, only valid Python statements \"\n\"are allowed. The template will raise exceptions, just as any other Python \"\n\"code would. The other lines are plain HTML markup.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:205\nmsgid \"\"\n\"As you can see, we use Python's ``for`` statement two times, in order to go \"\n\"through ``rows``. As seen above, ``rows`` is a variable which holds the \"\n\"result of the database query, so it is a list of tuples. The first ``for`` \"\n\"statement accesses the tuples within the list, the second one the items \"\n\"within the tuple, which are put each into a cell of the table. It is \"\n\"important that you close all ``for``, ``if``, ``while`` etc. statements with\"\n\" ``%end``, otherwise the output may not be what you expect.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:207\nmsgid \"\"\n\"If you need to access a variable within a non-Python code line inside the \"\n\"template, you need to put it into double curly braces. This tells the \"\n\"template to insert the actual value of the variable right in place.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:209\nmsgid \"\"\n\"Run the script again and look at the output. Still not really nice, but at \"\n\"least more readable than the list of tuples. You can spice-up the very \"\n\"simple HTML markup above, e.g. by using in-line styles to get a better \"\n\"looking output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:213\nmsgid \"Using GET and POST Values\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:214\nmsgid \"\"\n\"As we can review all open items properly, we move to the next step, which is\"\n\" adding new items to the ToDo list. The new item should be received from a \"\n\"regular HTML-based form, which sends its data by the GET method.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:216\nmsgid \"\"\n\"To do so, we first add a new route to our script and tell the route that it \"\n\"should get GET data::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:239\nmsgid \"\"\n\"To access GET (or POST) data, we need to import ``request`` from Bottle. To \"\n\"assign the actual data to a variable, we use the statement \"\n\"``request.GET.task.strip()`` statement, where ``task`` is the name of the \"\n\"GET data we want to access. That's all. If your GET data has more than one \"\n\"variable, multiple ``request.GET.get()`` statements can be used and assigned\"\n\" to other variables.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:241\nmsgid \"\"\n\"The rest of this piece of code is just processing of the gained data: \"\n\"writing to the database, retrieve the corresponding id from the database and\"\n\" generate the output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:243\nmsgid \"\"\n\"But where do we get the GET data from? Well, we can use a static HTML page \"\n\"holding the form. Or, what we do right now, is to use a template which is \"\n\"output when the route ``/new`` is called without GET data.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:245\nmsgid \"The code needs to be extended to::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:268\nmsgid \"``new_task.tpl`` looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:276\nmsgid \"That's all. As you can see, the template is plain HTML this time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:278\nmsgid \"Now we are able to extend our to do list.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:280\nmsgid \"\"\n\"By the way, if you prefer to use POST data: this works exactly the same way,\"\n\" just use ``request.POST.get()`` instead.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:284\nmsgid \"Editing Existing Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:285\nmsgid \"The last point to do is to enable editing of existing items.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:287\nmsgid \"\"\n\"By using only the routes we know so far it is possible, but may be quite \"\n\"tricky. But Bottle knows something called \\\"dynamic routes\\\", which makes \"\n\"this task quite easy.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:289\nmsgid \"The basic statement for a dynamic route looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:293\nmsgid \"\"\n\"This tells Bottle to accept for ``<something>`` any string up to the next \"\n\"slash. Furthermore, the value of ``something`` will be passed to the \"\n\"function assigned to that route, so the data can be processed within the \"\n\"function, like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:321\nmsgid \"\"\n\"It is basically pretty much the same what we already did above when adding \"\n\"new items, like using ``GET`` data etc. The main addition here is using the \"\n\"dynamic route ``<no:int>``, which here passes the number to the \"\n\"corresponding function. As you can see, ``no`` is integer ID and used within\"\n\" the function to access the right row of data within the database.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:324\nmsgid \"\"\n\"The template ``edit_task.tpl`` called within the function looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:339\nmsgid \"\"\n\"Again, this template is a mix of Python statements and HTML, as already \"\n\"explained above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:341\nmsgid \"\"\n\"A last word on dynamic routes: you can even use a regular expression for a \"\n\"dynamic route, as demonstrated later.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:345\nmsgid \"Validating Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:346\nmsgid \"\"\n\"Using dynamic routes is fine, but for many cases it makes sense to validate \"\n\"the dynamic part of the route. For example, we expect an integer number in \"\n\"our route for editing above. But if a float, characters or so are received, \"\n\"the Python interpreter throws an exception, which is not what we want.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:348\nmsgid \"\"\n\"For those cases, Bottle offers the ``<name:int>`` wildcard filter, which \"\n\"matches (signed) digits and converts the value to integer. In order to apply\"\n\" the wildcard filter, extend the code as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:356\nmsgid \"\"\n\"Save the code and call the page again using incorrect value for \"\n\"``<no:int>``, e.g. a float. You will receive not an exception, but a \\\"404 \"\n\"Not Found\\\" error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:360\nmsgid \"Dynamic Routes Using Regular Expressions\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:361\nmsgid \"\"\n\"Bottle can also handle dynamic routes, where the \\\"dynamic part\\\" of the \"\n\"route can be a regular expression.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:363\nmsgid \"\"\n\"So, just to demonstrate that, let's assume that all single items in our ToDo\"\n\" list should be accessible by their plain number, by a term like e.g. \"\n\"\\\"item1\\\". For obvious reasons, you do not want to create a route for every \"\n\"item. Furthermore, the simple dynamic routes do not work either, as part of \"\n\"the route, the term \\\"item\\\" is static.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:365\nmsgid \"As said above, the solution is a regular expression::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:380\nmsgid \"\"\n\"The line ``@route(/item<item:re:[0-9]+>)`` starts like a normal route, but \"\n\"the third part of the wildcard is interpreted as a regular expression, which\"\n\" is the dynamic part of the route. So in this case, we want to match any \"\n\"digit between 0 and 9. The following function \\\"show_item\\\" just checks \"\n\"whether the given item is present in the database or not. In case it is \"\n\"present, the corresponding text of the task is returned. As you can see, \"\n\"only the regular expression part of the route is passed forward. \"\n\"Furthermore, it is always forwarded as a string, even if it is a plain \"\n\"integer number, like in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:384\nmsgid \"Returning Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:385\nmsgid \"\"\n\"Sometimes it may become necessary to associate a route not to a Python \"\n\"function, but just return a static file. So if you have for example a help \"\n\"page for your application, you may want to return this page as plain HTML. \"\n\"This works as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:393\nmsgid \"\"\n\"At first, we need to import the ``static_file`` function from Bottle. As you\"\n\" can see, the ``return static_file`` statement replaces the ``return`` \"\n\"statement. It takes at least two arguments: the name of the file to be \"\n\"returned and the path to the file. Even if the file is in the same directory\"\n\" as your application, the path needs to be stated. But in this case, you can\"\n\" use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file \"\n\"automatically, but in case you like to state it explicitly, add a third \"\n\"argument to ``static_file``, which would be here ``mimetype='text/html'``. \"\n\"``static_file`` works with any type of route, including the dynamic ones.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:397\nmsgid \"Returning JSON Data\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:398\nmsgid \"\"\n\"There may be cases where you do not want your application to generate the \"\n\"output directly, but return data to be processed further on, e.g. by \"\n\"JavaScript. For those cases, Bottle offers the possibility to return JSON \"\n\"objects, which is sort of standard for exchanging data between web \"\n\"applications. Furthermore, JSON can be processed by many programming \"\n\"languages, including Python\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:400\nmsgid \"\"\n\"So, let's assume we want to return the data generated in the regular \"\n\"expression route example as a JSON object. The code looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:415\nmsgid \"\"\n\"As you can, that is fairly simple: just return a regular Python dictionary \"\n\"and Bottle will convert it automatically into a JSON object prior to \"\n\"sending. So if you e.g. call \\\"http://localhost/json1\\\" Bottle should in \"\n\"this case return the JSON object ``{\\\"task\\\": [\\\"Read A-byte-of-python to \"\n\"get a good introduction into Python\\\"]}``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:420\nmsgid \"Catching Errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:421\nmsgid \"\"\n\"The next step may is to catch the error with Bottle itself, to keep away any\"\n\" type of error message from the user of your application. To do that, Bottle\"\n\" has an \\\"error-route\\\", which can be a assigned to a HTML-error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:423\nmsgid \"In our case, we want to catch a 403 error. The code is as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:431\nmsgid \"\"\n\"So, at first we need to import ``error`` from Bottle and define a route by \"\n\"``error(403)``, which catches all \\\"403 forbidden\\\" errors. The function \"\n\"\\\"mistake\\\" is assigned to that. Please note that ``error()`` always passes \"\n\"the error-code to the function - even if you do not need it. Thus, the \"\n\"function always needs to accept one argument, otherwise it will not work.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:433\nmsgid \"\"\n\"Again, you can assign more than one error-route to a function, or catch \"\n\"various errors with one function each. So this code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:440\nmsgid \"works fine, the following one as well::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:452\nmsgid \"Summary\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:453\nmsgid \"\"\n\"After going through all the sections above, you should have a brief \"\n\"understanding how the Bottle WSGI framework works. Furthermore you have all \"\n\"the knowledge necessary to use Bottle for your applications.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:455\nmsgid \"\"\n\"The following chapter give a short introduction how to adapt Bottle for \"\n\"larger projects. Furthermore, we will show how to operate Bottle with web \"\n\"servers which perform better on a higher load / more web traffic than the \"\n\"one we used so far.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:458\nmsgid \"Server Setup\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:460\nmsgid \"\"\n\"So far, we used the standard server used by Bottle, which is the `WSGI \"\n\"reference Server`_ shipped along with Python. Although this server is \"\n\"perfectly suitable for development purposes, it is not really suitable for \"\n\"larger applications. But before we have a look at the alternatives, let's \"\n\"have a look how to tweak the settings of the standard server first.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:464\nmsgid \"Running Bottle on a different port and IP\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:465\nmsgid \"\"\n\"As standard, Bottle serves the pages on the IP address 127.0.0.1, also known\"\n\" as ``localhost``, and on port ``8080``. To modify the setting is pretty \"\n\"simple, as additional parameters can be passed to Bottle's ``run()`` \"\n\"function to change the port and the address.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:467\nmsgid \"\"\n\"To change the port, just add ``port=portnumber`` to the run command. So, for\"\n\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:471\nmsgid \"would make Bottle listen to port 80.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:473\nmsgid \"To change the IP address where Bottle is listening::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:477\nmsgid \"If needed, both parameters can be combined, like::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:481\nmsgid \"\"\n\"The ``port`` and ``host`` parameter can also be applied when Bottle is \"\n\"running with a different server, as shown in the following section.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:485\nmsgid \"Running Bottle with a different server\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:486\nmsgid \"\"\n\"As said above, the standard server is perfectly suitable for development, \"\n\"personal use or a small group of people only using your application based on\"\n\" Bottle. For larger tasks, the standard server may become a bottleneck, as \"\n\"it is single-threaded, thus it can only serve one request at a time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:488\nmsgid \"\"\n\"But Bottle has already various adapters to multi-threaded servers on board, \"\n\"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and \"\n\"Paste_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:490\nmsgid \"\"\n\"If you want to run for example Bottle with the Paste server, use the \"\n\"following code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:496\nmsgid \"\"\n\"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and \"\n\"``FapwsServer``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:500\nmsgid \"Running Bottle on Apache with mod_wsgi\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:501\nmsgid \"\"\n\"Maybe you already have an Apache_ or you want to run a Bottle-based \"\n\"application large scale - then it is time to think about Apache with \"\n\"mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:503\nmsgid \"\"\n\"We assume that your Apache server is up and running and mod_wsgi is working \"\n\"fine as well. On a lot of Linux distributions, mod_wsgi can be easily \"\n\"installed via whatever package management system is in use.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:505\nmsgid \"\"\n\"Bottle brings an adapter for mod_wsgi with it, so serving your application \"\n\"is an easy task.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:507\nmsgid \"\"\n\"In the following example, we assume that you want to make your application \"\n\"\\\"ToDo list\\\" accessible through ``http://www.mypage.com/todo`` and your \"\n\"code, templates and SQLite database are stored in the path \"\n\"``/var/www/todo``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:509\nmsgid \"\"\n\"When you run your application via mod_wsgi, it is imperative to remove the \"\n\"``run()`` statement from your code, otherwise it won't work here.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:511\nmsgid \"\"\n\"After that, create a file called ``adapter.wsgi`` with the following \"\n\"content::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:522\nmsgid \"\"\n\"and save it in the same path, ``/var/www/todo``. Actually the name of the \"\n\"file can be anything, as long as the extension is ``.wsgi``. The name is \"\n\"only used to reference the file from your virtual host.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:524\nmsgid \"\"\n\"Finally, we need to add a virtual host to the Apache configuration, which \"\n\"looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:540\nmsgid \"\"\n\"After restarting the server, your ToDo list should be accessible at \"\n\"``http://www.mypage.com/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:543\nmsgid \"Final Words\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:545\nmsgid \"\"\n\"Now we are at the end of this introduction and tutorial to Bottle. We \"\n\"learned about the basic concepts of Bottle and wrote a first application \"\n\"using the Bottle framework. In addition to that, we saw how to adapt Bottle \"\n\"for large tasks and serve Bottle through an Apache web server with mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:547\nmsgid \"\"\n\"As said in the introduction, this tutorial is not showing all shades and \"\n\"possibilities of Bottle. What we skipped here is e.g. receiving file objects\"\n\" and streams and how to handle authentication data. Furthermore, we did not \"\n\"show how templates can be called from within another template. For an \"\n\"introduction into those points, please refer to the full `Bottle \"\n\"documentation`_ .\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:550\nmsgid \"Complete Example Listing\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:552\nmsgid \"\"\n\"As the ToDo list example was developed piece by piece, here is the complete \"\n\"listing:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:554\nmsgid \"Main code for the application ``todo.py``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:675\nmsgid \"Template ``make_table.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:689\nmsgid \"Template ``edit_task.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:704\nmsgid \"Template ``new_task.tpl``::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/api.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../api.rst:3\nmsgid \"API Reference\"\nmsgstr \"\"\n\n#: ../../api.rst:10\nmsgid \"\"\n\"This is a mostly auto-generated API. If you are new to bottle, you might \"\n\"find the narrative :doc:`tutorial` more helpful.\"\nmsgstr \"\"\n\n#: ../../api.rst:17\nmsgid \"Module Contents\"\nmsgstr \"\"\n\n#: ../../api.rst:19\nmsgid \"The module defines several functions, constants, and an exception.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.debug:1\nmsgid \"\"\n\"Change the debug level. There is only one debug level supported at the \"\n\"moment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:1\nmsgid \"\"\n\"Start a server instance. This method blocks until the server terminates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:3\nmsgid \"\"\n\"WSGI application or target string supported by :func:`load_app`. (default: \"\n\":func:`default_app`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:5\nmsgid \"\"\n\"Server adapter to use. See :data:`server_names` keys for valid names or pass\"\n\" a :class:`ServerAdapter` subclass. (default: `wsgiref`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:8\nmsgid \"\"\n\"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces \"\n\"including the external one. (default: 127.0.0.1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:10\nmsgid \"\"\n\"Server port to bind to. Values below 1024 require root privileges. (default:\"\n\" 8080)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:12\nmsgid \"Start auto-reloading server? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:13\nmsgid \"Auto-reloader interval in seconds (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:14\nmsgid \"Suppress output to stdout and stderr? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:15\nmsgid \"Options passed to the server adapter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:1\nmsgid \"Import a module or fetch an object from a module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:3\nmsgid \"``package.module`` returns `module` as a module object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:4\nmsgid \"``pack.mod:name`` returns the module variable `name` from `pack.mod`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:5\nmsgid \"``pack.mod:func()`` calls `pack.mod.func()` and returns the result.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:7\nmsgid \"\"\n\"The last form accepts not only function calls, but any type of expression. \"\n\"Keyword arguments passed to this function are available as local variables. \"\n\"Example: ``import_string('re:compile(x)', x='[a-z]')``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load_app:1\nmsgid \"\"\n\"Load a bottle application from a module and make sure that the import does \"\n\"not affect the current default application, but returns a separate \"\n\"application object. See :func:`load` for the target parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.request:1 ../../../bottle.pydocstring\n#: of bottle.request:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalRequest`. If accessed from within a \"\n\"request callback, this instance always refers to the *current* request (even\"\n\" on a multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.response:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalResponse`. It is used to change the \"\n\"HTTP response for the *current* request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HTTP_CODES:1\nmsgid \"\"\n\"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')\"\nmsgstr \"\"\n\n#: ../../api.rst:38\nmsgid \"\"\n\"Return the current :ref:`default-app`. Actually, these are callable \"\n\"instances of :class:`AppStack` and implement a stack-like API.\"\nmsgstr \"\"\n\n#: ../../api.rst:42\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../api.rst:44\nmsgid \"\"\n\"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and \"\n\":class:`AppStack`) and uses the top of the stack as a *default application* \"\n\"for some of the module-level functions and decorators.\"\nmsgstr \"\"\n\n#: ../../api.rst:54\nmsgid \"\"\n\"Decorator to install a route to the current default application. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:59\nmsgid \"\"\n\"Decorator to install an error handler to the current default application. \"\n\"See :meth:`Bottle.error` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:63\nmsgid \"WSGI and HTTP Utilities\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_date:1\nmsgid \"Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_auth:1\nmsgid \"\"\n\"Parse rfc2617 HTTP authentication header string (basic) and return \"\n\"(user,pass) tuple or None\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_encode:1\nmsgid \"Encode and sign a pickle-able object. Return a (byte) string\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_decode:1\nmsgid \"Verify and decode an encoded string. Return an object or None.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_is_encoded:1\nmsgid \"Return True if the argument looks like a encoded cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.yieldroutes:1\nmsgid \"\"\n\"Return a generator for routes that match the signature (name, args) of the \"\n\"func parameter. This may yield more than one route if the function takes \"\n\"optional keyword arguments. The output is best described by example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:1\nmsgid \"Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:3\nmsgid \"The modified paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:4\nmsgid \"The SCRIPT_NAME path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:5\nmsgid \"The PATH_INFO path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:6\nmsgid \"\"\n\"The number of path fragments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../api.rst:81\nmsgid \"Data Structures\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict:1\nmsgid \"\"\n\"This dict stores multiple values per key, but behaves exactly like a normal \"\n\"dict in that it returns only the newest value for any given key. There are \"\n\"special methods available to access the full list of values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\nmsgid \"Return the most recent value for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:3\nmsgid \"\"\n\"The default value to be returned if the key is not present or the type \"\n\"conversion fails.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:5\nmsgid \"An index for the list of available values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:6\nmsgid \"\"\n\"If defined, this callable is used to cast the value into a specific type. \"\n\"Exception are suppressed and result in the default value to be returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.append:1\nmsgid \"Add a new value to the list of values for this key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.replace:1\nmsgid \"Replace the list of values with a single value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.MultiDict.getlist:1\nmsgid \"Return a (possibly empty) list of values for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.getone:1\nmsgid \"Aliases for WTForms to mimic other multi-dict APIs (Django)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HeaderDict:1\nmsgid \"\"\n\"A case-insensitive version of :class:`MultiDict` that defaults to replace \"\n\"the old value instead of appending it.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict:1\nmsgid \"\"\n\"This :class:`MultiDict` subclass is used to store request form data. \"\n\"Additionally to the normal dict-like item access methods (which return \"\n\"unmodified data as native strings), this container also supports attribute-\"\n\"like access to its values. Attributes are automatically de- or recoded to \"\n\"match :attr:`input_encoding` (default: 'utf8'). Missing attributes default \"\n\"to an empty string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.input_encoding:1\nmsgid \"Encoding used for attribute values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.recode_unicode:1\nmsgid \"\"\n\"If true (default), unicode strings are first encoded with `latin1` and then \"\n\"decoded to match :attr:`input_encoding`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.decode:1\nmsgid \"\"\n\"Returns a copy with all keys and values de- or recoded to match \"\n\":attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode \"\n\"dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.getunicode:1\nmsgid \"Return the value as a unicode string, or the default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:1\nmsgid \"\"\n\"This dict-like class wraps a WSGI environ dict and provides convenient \"\n\"access to HTTP_* fields. Keys and values are native strings (2.x bytes or \"\n\"3.x unicode) and keys are case-insensitive. If the WSGI environment contains\"\n\" non-native string values, these are de- or encoded using a lossless \"\n\"'latin1' character set.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:7\nmsgid \"\"\n\"The API will remain stable even on changes to the relevant PEPs. Currently \"\n\"PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-\"\n\"native strings.)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.cgikeys:1\nmsgid \"List of keys that do not have a ``HTTP_`` prefix.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.raw:1\nmsgid \"Return the header value as is (may be bytes or unicode).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack:1\nmsgid \"A stack-like list. Calling it returns the head of the stack.\"\nmsgstr \"\"\n\n#: ../../api.rst:100\nmsgid \"Return the current default application and remove it from the stack.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\nmsgid \"Add a new :class:`Bottle` instance to the stack\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:1\nmsgid \"\"\n\"This class manages a list of search paths and helps to find and open \"\n\"application-bound resources (files).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:4\nmsgid \"default value for :meth:`add_path` calls.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:5\nmsgid \"callable used to open resources.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:6\nmsgid \"controls which lookups are cached. One of 'all', 'found' or 'none'.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.path:1\nmsgid \"A list of search paths. See :meth:`add_path` for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.cache:1\nmsgid \"A cache for resolved paths. ``res.cache.clear()`` clears the cache.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:1\nmsgid \"\"\n\"Add a new path to the list of search paths. Return False if the path does \"\n\"not exist.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:4\nmsgid \"\"\n\"The new search path. Relative paths are turned into an absolute and \"\n\"normalized form. If the path looks like a file (not ending in `/`), the \"\n\"filename is stripped off.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:7\nmsgid \"\"\n\"Path used to absolutize relative search paths. Defaults to :attr:`base` \"\n\"which defaults to ``os.getcwd()``.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:9\nmsgid \"\"\n\"Position within the list of search paths. Defaults to last index (appends to\"\n\" the list).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:12\nmsgid \"\"\n\"The `base` parameter makes it easy to reference files installed along with a\"\n\" python module or package::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:1\nmsgid \"Search for a resource and return an absolute file path, or `None`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:3\nmsgid \"\"\n\"The :attr:`path` list is searched in order. The first match is returend. \"\n\"Symlinks are followed. The result is cached to speed up future lookups.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.open:1\nmsgid \"Find a resource and return a file object, or raise IOError.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.file:1\nmsgid \"Open file(-like) object (BytesIO buffer or temporary file)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.name:1\nmsgid \"Name of the upload form field\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.raw_filename:1\nmsgid \"Raw filename as sent by the client (may contain unsafe characters)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.headers:1\nmsgid \"A :class:`HeaderDict` with additional headers (e.g. content-type)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_type:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_type:1\nmsgid \"Current value of the 'Content-Type' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_length:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_length:1\nmsgid \"Current value of the 'Content-Length' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:1\nmsgid \"\"\n\"Name of the file on the client file system, but normalized to ensure file \"\n\"system compatibility. An empty filename is returned as 'empty'.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:4\nmsgid \"\"\n\"Only ASCII letters, digits, dashes, underscores and dots are allowed in the \"\n\"final filename. Accents are removed, if possible. Whitespace is replaced by \"\n\"a single dash. Leading or tailing dots or dashes are removed. The filename \"\n\"is limited to 255 characters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:1\nmsgid \"\"\n\"Save file to disk or copy its content to an open file(-like) object. If \"\n\"*destination* is a directory, :attr:`filename` is added to the path. \"\n\"Existing files are not overwritten by default (IOError).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:5\nmsgid \"File path, directory or file(-like) object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:6\nmsgid \"If True, replace existing files. (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:7\nmsgid \"Bytes to read at a time. (default: 64kb)\"\nmsgstr \"\"\n\n#: ../../api.rst:109\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BottleException:1\nmsgid \"A base class for exceptions used by bottle.\"\nmsgstr \"\"\n\n#: ../../api.rst:117\nmsgid \"The :class:`Bottle` Class\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:1\nmsgid \"\"\n\"Each Bottle object represents a single, distinct web application and \"\n\"consists of routes, callbacks, plugins, resources and configuration. \"\n\"Instances are callable WSGI applications.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:5\nmsgid \"\"\n\"If true (default), handle all exceptions. Turn off to let debugging \"\n\"middleware handle exceptions.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.config:1\nmsgid \"A :class:`ConfigDict` for app specific configuration.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.resources:1\nmsgid \"A :class:`ResourceManager` for application files\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.catchall:1\nmsgid \"If true, most exceptions are caught and returned as :exc:`HTTPError`\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:1\nmsgid \"Attach a callback to a hook. Three hooks are currently implemented:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"before_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"\"\n\"Executed once before each request. The request context is available, but no \"\n\"routing has happened yet.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:6\nmsgid \"after_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:7\nmsgid \"Executed once after each request regardless of its outcome.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:8\nmsgid \"app_reset\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:9\nmsgid \"Called whenever :meth:`Bottle.reset` is called.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.remove_hook:1\nmsgid \"Remove a callback from a hook.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.trigger_hook:1\nmsgid \"Trigger a hook and return a list of results.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.hook:1\nmsgid \"\"\n\"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` \"\n\"for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:1\nmsgid \"\"\n\"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL \"\n\"prefix. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:6\nmsgid \"\"\n\"path prefix or `mount-point`. If it ends in a slash, that slash is \"\n\"mandatory.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:8\nmsgid \"an instance of :class:`Bottle` or a WSGI application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:10\nmsgid \"All other parameters are passed to the underlying :meth:`route` call.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.merge:1\nmsgid \"\"\n\"Merge the routes of another :class:`Bottle` application or a list of \"\n\":class:`Route` objects into this application. The routes keep their 'owner',\"\n\" meaning that the :data:`Route.app` attribute is not changed.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.install:1\nmsgid \"\"\n\"Add a plugin to the list of plugins and prepare it for being applied to all \"\n\"routes of this application. A plugin may be a simple decorator or an object \"\n\"that implements the :class:`Plugin` API.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.uninstall:1\nmsgid \"\"\n\"Uninstall plugins. Pass an instance to remove a specific plugin, a type \"\n\"object to remove all plugins that match that type, a string to remove all \"\n\"plugins with a matching ``name`` attribute or ``True`` to remove all \"\n\"plugins. Return the list of removed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.reset:1\nmsgid \"\"\n\"Reset all routes (force plugins to be re-applied) and clear all caches. If \"\n\"an ID or route object is given, only that specific route is affected.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.close:1\nmsgid \"Close the application and all installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.run:1\nmsgid \"Calls :func:`run` with the same parameters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.match:1\nmsgid \"\"\n\"Search for a matching route and return a (:class:`Route` , urlargs) tuple. \"\n\"The second value is a dictionary with parameters extracted from the URL. \"\n\"Raise :exc:`HTTPError` (404/405) on a non-match.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get_url:1\nmsgid \"Return a string that matches a named route\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_route:1\nmsgid \"Add a route object, but do not change the :data:`Route.app` attribute.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:1\nmsgid \"A decorator to bind a function to a request URL. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:7\nmsgid \"\"\n\"The ``:name`` part is a wildcard. See :class:`Router` for syntax details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:10\nmsgid \"\"\n\"Request path or a list of paths to listen to. If no path is specified, it is\"\n\" automatically generated from the signature of the function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:13\nmsgid \"\"\n\"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. \"\n\"(default: `GET`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:15\nmsgid \"\"\n\"An optional shortcut to avoid the decorator syntax. ``route(..., \"\n\"callback=func)`` equals ``route(...)(func)``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:17\nmsgid \"The name for this route. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:18\nmsgid \"\"\n\"A decorator or plugin or a list of plugins. These are applied to the route \"\n\"callback in addition to installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:20\nmsgid \"\"\n\"A list of plugins, plugin classes or names. Matching plugins are not \"\n\"installed to this route. ``True`` skips all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:23\nmsgid \"\"\n\"Any additional keyword arguments are stored as route-specific configuration \"\n\"and passed to plugins (see :meth:`Plugin.apply`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get:1\nmsgid \"Equals :meth:`route`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.post:1\nmsgid \"Equals :meth:`route` with a ``POST`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.put:1\nmsgid \"Equals :meth:`route` with a ``PUT`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.delete:1\nmsgid \"Equals :meth:`route` with a ``DELETE`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.patch:1\nmsgid \"Equals :meth:`route` with a ``PATCH`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.error:1\nmsgid \"Decorator: Register an output handler for a HTTP error code\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.wsgi:1\nmsgid \"The bottle WSGI-interface.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route:1\nmsgid \"\"\n\"This class wraps a route callback along with route specific metadata and \"\n\"configuration and applies Plugins on demand. It is also responsible for \"\n\"turing an URL path rule into a regular expression usable by the Router.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.app:1\nmsgid \"The application this route is installed to.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.rule:1\nmsgid \"The path-rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.method:1\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.callback:1\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.name:1\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.plugins:1\nmsgid \"A list of route-specific plugins (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.skiplist:1\nmsgid \"\"\n\"A list of plugins to not apply to this route (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.config:1\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific plugin configuration \"\n\"and meta-data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.call:1\nmsgid \"\"\n\"The route callback with all plugins applied. This property is created on \"\n\"demand and then cached to speed up subsequent requests.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.reset:1\nmsgid \"\"\n\"Forget any cached values. The next time :attr:`call` is accessed, all \"\n\"plugins are re-applied.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.prepare:1\nmsgid \"Do all on-demand work immediately (useful for debugging).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.all_plugins:1\nmsgid \"Yield all Plugins affecting this route.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_undecorated_callback:1\nmsgid \"\"\n\"Return the callback. If the callback is a decorated function, try to recover\"\n\" the original function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_callback_args:1\nmsgid \"\"\n\"Return a list of argument names the callback (most likely) accepts as \"\n\"keyword arguments. If the callback is a decorated function, try to recover \"\n\"the original function before inspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_config:1\nmsgid \"\"\n\"Lookup a config field and return its value, first checking the route.config,\"\n\" then route.app.config.\"\nmsgstr \"\"\n\n#: ../../api.rst:127\nmsgid \"The :class:`Request` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:129\nmsgid \"\"\n\"The :class:`Request` class wraps a WSGI environment and provides helpful \"\n\"methods to parse and access form data, cookies, file uploads and other \"\n\"metadata. Most of the attributes are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:1\nmsgid \"\"\n\"A wrapper for WSGI environment dictionaries that adds a lot of convenient \"\n\"access methods and properties. Most of them are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:4\nmsgid \"\"\n\"Adding new attributes to a request actually adds them to the environ \"\n\"dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to \"\n\"store and access request-specific data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.MEMFILE_MAX:1\nmsgid \"Maximum size of memory buffer for :attr:`body` in bytes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.environ:1\nmsgid \"\"\n\"The wrapped WSGI environ dictionary. This is the only real attribute. All \"\n\"other attributes actually are read-only properties.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.app:1\nmsgid \"Bottle application handling this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.route:1\nmsgid \"The bottle :class:`Route` object that matches this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url_args:1\nmsgid \"The arguments extracted from the URL.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path:1\nmsgid \"\"\n\"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken \"\n\"clients and avoid the \\\"empty path\\\" edge case).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.method:1\nmsgid \"The ``REQUEST_METHOD`` value as an uppercase string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.headers:1\nmsgid \"\"\n\"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP \"\n\"request headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_header:1\nmsgid \"Return the value of a request header, or a given default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.cookies:1\nmsgid \"\"\n\"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. \"\n\"Use :meth:`get_cookie` if you expect signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_cookie:1\nmsgid \"\"\n\"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must\"\n\" match the one used to create the cookie (see \"\n\":meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or \"\n\"wrong signature), return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"\"\n\"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are \"\n\"sometimes called \\\"URL arguments\\\" or \\\"GET parameters\\\", but not to be \"\n\"confused with \\\"URL wildcards\\\" as they are provided by the :class:`Router`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.forms:1\nmsgid \"\"\n\"Form values parsed from an `url-encoded` or `multipart/form-data` encoded \"\n\"POST or PUT request body. The result is returned as a :class:`FormsDict`. \"\n\"All keys and values are strings. File uploads are stored separately in \"\n\":attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.params:1\nmsgid \"\"\n\"A :class:`FormsDict` with the combined values of :attr:`query` and \"\n\":attr:`forms`. File uploads are stored in :attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.files:1\nmsgid \"\"\n\"File uploads parsed from `multipart/form-data` encoded POST or PUT request \"\n\"body. The values are instances of :class:`FileUpload`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.json:1\nmsgid \"\"\n\"If the ``Content-Type`` header is ``application/json``, this property holds \"\n\"the parsed content of the request body. Only requests smaller than \"\n\":attr:`MEMFILE_MAX` are processed to avoid memory exhaustion.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.body:1\nmsgid \"\"\n\"The HTTP request body as a seek-able file-like object. Depending on \"\n\":attr:`MEMFILE_MAX`, this is either a temporary file or a \"\n\":class:`io.BytesIO` instance. Accessing this property for the first time \"\n\"reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses \"\n\"just do a `seek(0)` on the file object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.chunked:1\nmsgid \"True if Chunked transfer encoding was.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.GET:1\nmsgid \"An alias for :attr:`query`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.POST:1\nmsgid \"\"\n\"The values of :attr:`forms` and :attr:`files` combined into a single \"\n\":class:`FormsDict`. Values are either strings (form values) or instances of \"\n\":class:`cgi.FieldStorage` (file uploads).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url:1\nmsgid \"\"\n\"The full request URI including hostname and scheme. If your app lives behind\"\n\" a reverse proxy or load balancer and you get confusing results, make sure \"\n\"that the ``X-Forwarded-Host`` header is set correctly.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.urlparts:1\nmsgid \"\"\n\"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple \"\n\"contains (scheme, host, path, query_string and fragment), but the fragment \"\n\"is always empty because it is not visible to the server.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.fullpath:1\nmsgid \"Request path including :attr:`script_name` (if present).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query_string:1\nmsgid \"\"\n\"The raw :attr:`query` part of the URL (everything in between ``?`` and \"\n\"``#``) as a string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.script_name:1\nmsgid \"\"\n\"The initial portion of the URL's `path` that was removed by a higher level \"\n\"(server or routing middleware) before the application was called. This \"\n\"script path is returned with leading and tailing slashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"Shift path segments from :attr:`path` to :attr:`script_name` and\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:4\nmsgid \"\"\n\"The number of path segments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_length:1\nmsgid \"\"\n\"The request body length as an integer. The client is responsible to set this\"\n\" header. Otherwise, the real length of the body is unknown and -1 is \"\n\"returned. In this case, :attr:`body` will be empty.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_type:1\nmsgid \"The Content-Type header as a lowercase-string (default: empty).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_xhr:1\nmsgid \"\"\n\"True if the request was triggered by a XMLHttpRequest. This only works with \"\n\"JavaScript libraries that support the `X-Requested-With` header (most of the\"\n\" popular libraries do).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_ajax:1\nmsgid \"Alias for :attr:`is_xhr`. \\\"Ajax\\\" is not the right term.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.auth:1\nmsgid \"\"\n\"HTTP authentication data as a (user, password) tuple. This implementation \"\n\"currently supports basic (not digest) authentication only. If the \"\n\"authentication happened at a higher level (e.g. in the front web-server or a\"\n\" middleware), the password field is None, but the user field is looked up \"\n\"from the ``REMOTE_USER`` environ variable. On any errors, None is returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_route:1\nmsgid \"\"\n\"A list of all IPs that were involved in this request, starting with the \"\n\"client IP and followed by zero or more proxies. This does only work if all \"\n\"proxies support the ```X-Forwarded-For`` header. Note that this information \"\n\"can be forged by malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_addr:1\nmsgid \"\"\n\"The client IP as a string. Note that this information can be forged by \"\n\"malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.copy:1\nmsgid \"Return a new :class:`Request` with a shallow :attr:`environ` copy.\"\nmsgstr \"\"\n\n#: ../../api.rst:137\nmsgid \"\"\n\"The module-level :data:`bottle.request` is a proxy object (implemented in \"\n\":class:`LocalRequest`) and always refers to the `current` request, or in \"\n\"other words, the request that is currently processed by the request handler \"\n\"in the current thread. This `thread locality` ensures that you can safely \"\n\"use a global instance in a multi-threaded environment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseRequest` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`request`). If accessed during a request/response cycle, \"\n\"this instance always refers to the *current* request (even on a \"\n\"multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest.bind:1\nmsgid \"Wrap a WSGI environ dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest.environ:1\n#: ../../../bottle.pydocstring of bottle.LocalResponse.body:1\nmsgid \"Thread-local property\"\nmsgstr \"\"\n\n#: ../../api.rst:146\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:148\nmsgid \"\"\n\"The :class:`Response` class stores the HTTP status code as well as headers \"\n\"and cookies that are to be sent to the client. Similar to \"\n\":data:`bottle.request` there is a thread-local :data:`bottle.response` \"\n\"instance that can be used to adjust the `current` response. Moreover, you \"\n\"can instantiate :class:`Response` and return it from your request handler. \"\n\"In this case, the custom instance overrules the headers and cookies defined \"\n\"in the global one.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:1\nmsgid \"Storage class for a response body as well as headers and cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:3\nmsgid \"\"\n\"This class does support dict-like case-insensitive item-access to headers, \"\n\"but is NOT a dict. Most notably, iterating over a response yields parts of \"\n\"the body and not the headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:7\nmsgid \"The response body as one of the supported types.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:8\nmsgid \"\"\n\"Either an HTTP status code (e.g. 200) or a status line including the reason \"\n\"phrase (e.g. '200 OK').\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:10\nmsgid \"A dictionary or a list of name-value pairs.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:12\nmsgid \"\"\n\"Additional keyword arguments are added to the list of headers. Underscores \"\n\"in the header name are replaced with dashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.copy:1\nmsgid \"Returns a copy of self.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_line:1\nmsgid \"The HTTP status line as a string (e.g. ``404 Not Found``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_code:1\nmsgid \"The HTTP status code as an integer (e.g. 404).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status:1\nmsgid \"\"\n\"A writeable property to change the HTTP response status. It accepts either a\"\n\" numeric code (100-999) or a string with a custom reason phrase (e.g. \\\"404 \"\n\"Brain not found\\\"). Both :data:`status_line` and :data:`status_code` are \"\n\"updated accordingly. The return value is always a status string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headers:1\nmsgid \"\"\n\"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the\"\n\" response headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.get_header:1\nmsgid \"\"\n\"Return the value of a previously defined header. If there is no header with \"\n\"that name, return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_header:1\nmsgid \"\"\n\"Create a new response header, replacing any previously defined headers with \"\n\"the same name.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.add_header:1\nmsgid \"Add an additional response header, not removing duplicates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.iter_headers:1\nmsgid \"\"\n\"Yield (header, value) tuples, skipping headers that are not allowed with the\"\n\" current response status code.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headerlist:1\nmsgid \"WSGI conform list of (header, value) tuples.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.expires:1\nmsgid \"Current value of the 'Expires' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.charset:1\nmsgid \"\"\n\"Return the charset specified in the content-type header (default: utf8).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:1\nmsgid \"\"\n\"Create a new cookie or replace an old one. If the `secret` parameter is set,\"\n\" create a `Signed Cookie` (described below).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:4\nmsgid \"the name of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:5\nmsgid \"the value of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:6\nmsgid \"a signature key required for signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:8\nmsgid \"\"\n\"Additionally, this method accepts all RFC 2109 attributes that are supported\"\n\" by :class:`cookie.Morsel`, including:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:11\nmsgid \"maximum age in seconds. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:12\nmsgid \"a datetime object or UNIX timestamp. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:13\nmsgid \"\"\n\"the domain that is allowed to read the cookie. (default: current domain)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:15\nmsgid \"limits the cookie to a given path (default: current path)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:16\nmsgid \"limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:17\nmsgid \"\"\n\"prevents client-side javascript to read this cookie (default: off, requires \"\n\"Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:20\nmsgid \"\"\n\"If neither `expires` nor `max_age` is set (default), the cookie will expire \"\n\"at the end of the browser session (as soon as the browser window is closed).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:24\nmsgid \"\"\n\"Signed cookies may store any pickle-able object and are cryptographically \"\n\"signed to prevent manipulation. Keep in mind that cookies are limited to 4kb\"\n\" in most browsers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:28\nmsgid \"\"\n\"Warning: Signed cookies are not encrypted (the client can still see the \"\n\"content) and not copy-protected (the client can restore an old cookie). The \"\n\"main intention is to make pickling and unpickling save, not to store secret \"\n\"information at client side.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.delete_cookie:1\nmsgid \"\"\n\"Delete a cookie. Be sure to use the same `domain` and `path` settings as \"\n\"used to create the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseResponse` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`response`). Its attributes are used to build the HTTP \"\n\"response at the end of the request/response cycle.\"\nmsgstr \"\"\n\n#: ../../api.rst:160\nmsgid \"\"\n\"The following two classes can be raised as an exception. The most noticeable\"\n\" difference is that bottle invokes error handlers for :class:`HTTPError`, \"\n\"but not for :class:`HTTPResponse` or other response types.\"\nmsgstr \"\"\n\n#: ../../api.rst:172\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../api.rst:174\nmsgid \"\"\n\"All template engines supported by :mod:`bottle` implement the \"\n\":class:`BaseTemplate` API. This way it is possible to switch and mix \"\n\"template engines without changing the application code at all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate:1\nmsgid \"Base class and minimal API for template adapters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.__init__:1\nmsgid \"\"\n\"Create a new template. If the source parameter (str or buffer) is missing, \"\n\"the name argument is used to guess a template filename. Subclasses can \"\n\"assume that self.source and/or self.filename are set. Both are strings. The \"\n\"lookup, encoding and settings parameters are stored as instance variables. \"\n\"The lookup parameter stores a list containing directory paths. The encoding \"\n\"parameter should be used to decode byte strings or files. The settings \"\n\"parameter contains a dict for engine-specific settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.search:1\nmsgid \"\"\n\"Search name in all directories specified in lookup. First without, then with\"\n\" common extensions. Return first hit.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.global_config:1\nmsgid \"This reads or sets the global settings stored in class.settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.render:1\nmsgid \"\"\n\"Render the template with the specified local variables and return a single \"\n\"byte or unicode string. If it is a byte string, the encoding must match \"\n\"self.encoding. This method must be thread-safe! Local variables may be \"\n\"provided in dictionaries (args) or directly, as keywords (kwargs).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:1\nmsgid \"\"\n\"Decorator: renders a template for a handler. The handler can control its \"\n\"behavior like that:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:4\nmsgid \"return a dict of template vars to fill out the template\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:5\nmsgid \"\"\n\"return something other than a dict and the view decorator will not process \"\n\"the template, but return the handler result as is. This includes returning a\"\n\" HTTPResponse(dict) to get, for instance, JSON with autojson or other \"\n\"castfilters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.template:1\nmsgid \"\"\n\"Get a rendered template as a string iterator. You can use a name, a filename\"\n\" or a template string as first parameter. Template rendering arguments can \"\n\"be passed as dictionaries or directly (as keyword arguments).\"\nmsgstr \"\"\n\n#: ../../api.rst:185\nmsgid \"\"\n\"You can write your own adapter for your favourite template engine or use one\"\n\" of the predefined adapters. Currently there are four fully supported \"\n\"template engines:\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Class\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"URL\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Decorator\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Render function\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":class:`SimpleTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`view`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`template`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":class:`MakoTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \"http://www.makotemplates.org\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":class:`CheetahTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \"http://www.cheetahtemplate.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":class:`Jinja2Template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \"http://jinja.pocoo.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:196\nmsgid \"\"\n\"To use :class:`MakoTemplate` as your default template engine, just import \"\n\"its specialised decorator and render function::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/async.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../async.rst:2\nmsgid \"Primer to Asynchronous Applications\"\nmsgstr \"\"\n\n#: ../../async.rst:4\nmsgid \"\"\n\"Asynchronous design patterns don't mix well with the synchronous nature of \"\n\"`WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most \"\n\"asynchronous frameworks (tornado, twisted, ...) implement a specialized API \"\n\"to expose their asynchronous features. Bottle is a WSGI framework and shares\"\n\" the synchronous nature of WSGI, but thanks to the awesome `gevent project \"\n\"<http://www.gevent.org/>`_, it is still possible to write asynchronous \"\n\"applications with bottle. This article documents the usage of Bottle with \"\n\"Asynchronous WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:7\nmsgid \"The Limits of Synchronous WSGI\"\nmsgstr \"\"\n\n#: ../../async.rst:9\nmsgid \"\"\n\"Briefly worded, the `WSGI specification (pep 3333) \"\n\"<http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response \"\n\"circle as follows: The application callable is invoked once for each request\"\n\" and must return a body iterator. The server then iterates over the body and\"\n\" writes each chunk to the socket. As soon as the body iterator is exhausted,\"\n\" the client connection is closed.\"\nmsgstr \"\"\n\n#: ../../async.rst:11\nmsgid \"\"\n\"Simple enough, but there is a snag: All this happens synchronously. If your \"\n\"application needs to wait for data (IO, sockets, databases, ...), it must \"\n\"either yield empty strings (busy wait) or block the current thread. Both \"\n\"solutions occupy the handling thread and prevent it from answering new \"\n\"requests. There is consequently only one ongoing request per thread.\"\nmsgstr \"\"\n\n#: ../../async.rst:13\nmsgid \"\"\n\"Most servers limit the number of threads to avoid their relatively high \"\n\"overhead. Pools of 20 or less threads are common. As soon as all threads are\"\n\" occupied, any new connection is stalled. The server is effectively dead for\"\n\" everyone else. If you want to implement a chat that uses long-polling ajax \"\n\"requests to get real-time updates, you'd reach the limited at 20 concurrent \"\n\"connections. That's a pretty small chat.\"\nmsgstr \"\"\n\n#: ../../async.rst:16\nmsgid \"Greenlets to the rescue\"\nmsgstr \"\"\n\n#: ../../async.rst:18\nmsgid \"\"\n\"Most servers limit the size of their worker pools to a relatively low number\"\n\" of concurrent threads, due to the high overhead involved in switching \"\n\"between and creating new threads. While threads are cheap compared to \"\n\"processes (forks), they are still expensive to create for each new \"\n\"connection.\"\nmsgstr \"\"\n\n#: ../../async.rst:20\nmsgid \"\"\n\"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. \"\n\"Greenlets behave similar to traditional threads, but are very cheap to \"\n\"create. A gevent-based server can spawn thousands of greenlets (one for each\"\n\" connection) with almost no overhead. Blocking individual greenlets has no \"\n\"impact on the servers ability to accept new requests. The number of \"\n\"concurrent connections is virtually unlimited.\"\nmsgstr \"\"\n\n#: ../../async.rst:22\nmsgid \"\"\n\"This makes creating asynchronous applications incredibly easy, because they \"\n\"look and feel like synchronous applications. A gevent-based server is \"\n\"actually not asynchronous, but massively multi-threaded. Here is an \"\n\"example::\"\nmsgstr \"\"\n\n#: ../../async.rst:39\nmsgid \"\"\n\"The first line is important. It causes gevent to monkey-patch most of \"\n\"Python's blocking APIs to not block the current thread, but pass the CPU to \"\n\"the next greenlet instead. It actually replaces Python's threading with \"\n\"gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` \"\n\"which would normally block the whole thread. If you don't feel comfortable \"\n\"with monkey-patching python built-ins, you can use the corresponding gevent \"\n\"functions (``gevent.sleep()`` in this case).\"\nmsgstr \"\"\n\n#: ../../async.rst:41\nmsgid \"\"\n\"If you run this script and point your browser to \"\n\"``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and \"\n\"`END` show up one by one (rather than waiting 8 seconds to see them all at \"\n\"once). It works exactly as with normal threads, but now your server can \"\n\"handle thousands of concurrent requests without any problems.\"\nmsgstr \"\"\n\n#: ../../async.rst:45\nmsgid \"\"\n\"Some browsers buffer a certain amount of data before they start rendering a \"\n\"page. You might need to yield more than a few bytes to see an effect in \"\n\"these browsers. Additionally, many browsers have a limit of one concurrent \"\n\"connection per URL. If this is the case, you can use a second browser or a \"\n\"benchmark tool (e.g. `ab` or `httperf`) to measure performance.\"\nmsgstr \"\"\n\n#: ../../async.rst:52\nmsgid \"Event Callbacks\"\nmsgstr \"\"\n\n#: ../../async.rst:54\nmsgid \"\"\n\"A very common design pattern in asynchronous frameworks (including tornado, \"\n\"twisted, node.js and friends) is to use non-blocking APIs and bind callbacks\"\n\" to asynchronous events. The socket object is kept open until it is closed \"\n\"explicitly to allow callbacks to write to the socket at a later point. Here \"\n\"is an example based on the `tornado library \"\n\"<http://www.tornadoweb.org/documentation#non-blocking-asynchronous-\"\n\"requests>`_::\"\nmsgstr \"\"\n\n#: ../../async.rst:63\nmsgid \"\"\n\"The main benefit is that the request handler terminates early. The handling \"\n\"thread can move on and accept new requests while the callbacks continue to \"\n\"write to sockets of previous requests. This is how these frameworks manage \"\n\"to process a lot of concurrent requests with only a small number of OS \"\n\"threads.\"\nmsgstr \"\"\n\n#: ../../async.rst:65\nmsgid \"\"\n\"With Gevent+WSGI, things are different: First, terminating early has no \"\n\"benefit because we have an unlimited pool of (pseudo)threads to accept new \"\n\"connections. Second, we cannot terminate early because that would close the \"\n\"socket (as required by WSGI). Third, we must return an iterable to conform \"\n\"to WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:67\nmsgid \"\"\n\"In order to conform to the WSGI standard, all we have to do is to return a \"\n\"body iterable that we can write to asynchronously. With the help of \"\n\"`gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate*\"\n\" a detached socket and rewrite the previous example as follows::\"\nmsgstr \"\"\n\n#: ../../async.rst:78\nmsgid \"\"\n\"From the server perspective, the queue object is iterable. It blocks if \"\n\"empty and stops as soon as it reaches ``StopIteration``. This conforms to \"\n\"WSGI. On the application side, the queue object behaves like a non-blocking \"\n\"socket. You can write to it at any time, pass it around and even start a new\"\n\" (pseudo)thread that writes to it asynchronously. This is how long-polling \"\n\"is implemented most of the time.\"\nmsgstr \"\"\n\n#: ../../async.rst:82\nmsgid \"Finally: WebSockets\"\nmsgstr \"\"\n\n#: ../../async.rst:84\nmsgid \"\"\n\"Lets forget about the low-level details for a while and speak about \"\n\"WebSockets. Since you are reading this article, you probably know what \"\n\"WebSockets are: A bidirectional communication channel between a browser \"\n\"(client) and a web application (server).\"\nmsgstr \"\"\n\n#: ../../async.rst:86\nmsgid \"\"\n\"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-\"\n\"websocket/>`_ package does all the hard work for us. Here is a simple \"\n\"WebSocket endpoint that receives messages and just sends them back to the \"\n\"client::\"\nmsgstr \"\"\n\n#: ../../async.rst:111\nmsgid \"\"\n\"The while-loop runs until the client closes the connection. You get the idea\"\n\" :)\"\nmsgstr \"\"\n\n#: ../../async.rst:113\nmsgid \"The client-site JavaScript API is really straight forward, too::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/changelog.po",
    "content": "#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../changelog.rst:6\nmsgid \"Release Notes and Changelog\"\nmsgstr \"\"\n\n#: ../../changelog.rst:9\nmsgid \"Release 0.13\"\nmsgstr \"\"\n\n#: ../../changelog.rst:13\nmsgid \"Added :func:`patch` shortcut for `route(..., method='PATCH')`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:17\nmsgid \"Release 0.12\"\nmsgstr \"\"\n\n#: ../../changelog.rst:19\nmsgid \"\"\n\"New SimpleTemplate parser implementation * Support for multi-line code \"\n\"blocks (`<% ... %>`). * The keywords `include` and `rebase` are functions \"\n\"now and can accept variable template names.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:22\nmsgid \"\"\n\"The new :meth:`BaseRequest.route` property returns the :class:`Route` that \"\n\"originally matched the request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:23\nmsgid \"\"\n\"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in \"\n\"CPythons dict() implementation was fixed over a year ago. If you are still \"\n\"using Python 2.5 in production, consider upgrading or at least make sure \"\n\"that you get security fixed from your distributor.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:24\nmsgid \"New :class:`ConfigDict` API (see :doc:`configuration`)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:26\nmsgid \"\"\n\"More information can be found in this `development blog post \"\n\"<http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:30\nmsgid \"Release 0.11\"\nmsgstr \"\"\n\n#: ../../changelog.rst:32\nmsgid \"\"\n\"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:33\nmsgid \"\"\n\"Support for partial downloads (``Range`` header) in :func:`static_file`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:34\nmsgid \"\"\n\"The new :class:`ResourceManager` interface helps locating files bundled with\"\n\" an application.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:35\nmsgid \"\"\n\"Added a server adapter for `waitress \"\n\"<http://docs.pylonsproject.org/projects/waitress/en/latest/>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:36\nmsgid \"\"\n\"New :meth:`Bottle.merge` method to install all routes from one application \"\n\"into another.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:37\nmsgid \"\"\n\"New :attr:`BaseRequest.app` property to get the application object that \"\n\"handles a request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:38\nmsgid \"\"\n\"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by \"\n\"WTForms).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:39\nmsgid \":class:`MultiDict` and subclasses are now pickle-able.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:42\nmsgid \"API Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:43\nmsgid \"\"\n\":attr:`Response.status` is a read-write property that can be assigned either\"\n\" a numeric status code or a status string with a reason phrase (``200 OK``).\"\n\" The return value is now a string to better match existing APIs (WebOb, \"\n\"werkzeug). To be absolutely clear, you can use the read-only properties \"\n\":attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:46\nmsgid \"API Deprecations\"\nmsgstr \"\"\n\n#: ../../changelog.rst:47\nmsgid \"\"\n\":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:50\nmsgid \"Release 0.10\"\nmsgstr \"\"\n\n#: ../../changelog.rst:52\nmsgid \"Plugin API v2\"\nmsgstr \"\"\n\n#: ../../changelog.rst:54\nmsgid \"To use the new API, set :attr:`Plugin.api` to ``2``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:55\nmsgid \"\"\n\":meth:`Plugin.apply` receives a :class:`Route` object instead of a context \"\n\"dictionary as second parameter. The new object offers some additional \"\n\"information and may be extended in the future.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:56\nmsgid \"\"\n\"Plugin names are considered unique now. The topmost plugin with a given name\"\n\" on a given route is installed, all other plugins with the same name are \"\n\"silently ignored.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:58\nmsgid \"The Request/Response Objects\"\nmsgstr \"\"\n\n#: ../../changelog.rst:60\nmsgid \"\"\n\"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, \"\n\":attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and \"\n\":attr:`BaseRequest.script_name`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:61\nmsgid \"\"\n\"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` \"\n\"attributes. In future releases, :attr:`BaseResponse.status` will return a \"\n\"string (e.g. ``200 OK``) instead of an integer to match the API of other \"\n\"common frameworks. To make the transition as smooth as possible, you should \"\n\"use the verbose attributes from now on.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:62\nmsgid \"\"\n\"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many \"\n\"places. The new dict implementation allows attribute access and handles \"\n\"unicode form values transparently.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:64\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../changelog.rst:66\nmsgid \"\"\n\"Added three new functions to the SimpleTemplate default namespace that \"\n\"handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and \"\n\":func:`stpl.setdefault`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:67\nmsgid \"\"\n\"The default escape function for SimpleTemplate now additionally escapes \"\n\"single and double quotes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:69\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../changelog.rst:71\nmsgid \"\"\n\"A new route syntax (e.g. ``/object/<id:int>``) and support for route \"\n\"wildcard filters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:72\nmsgid \"Four new wildcard filters: `int`, `float`, `path` and `re`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:74\nmsgid \"Other changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:76\nmsgid \"Added command line interface to load applications and start servers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:77\nmsgid \"\"\n\"Introduced a :class:`ConfigDict` that makes accessing configuration a lot \"\n\"easier (attribute access and auto-expanding namespaces).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:78\nmsgid \"Added support for raw WSGI applications to :meth:`Bottle.mount`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:79\nmsgid \":meth:`Bottle.mount` parameter order changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:80\nmsgid \"\"\n\":meth:`Bottle.route` now accpets an import string for the ``callback`` \"\n\"parameter.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:81\nmsgid \"Dropped Gunicorn 0.8 support. Current supported version is 0.13.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:82\nmsgid \"Added custom options to Gunicorn server.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:83\nmsgid \"\"\n\"Finally dropped support for type filters. Replace with a custom plugin of \"\n\"needed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:87\nmsgid \"Release 0.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:90\nmsgid \"Whats new?\"\nmsgstr \"\"\n\n#: ../../changelog.rst:91\nmsgid \"\"\n\"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:92\nmsgid \"\"\n\"The :func:`route` decorator got a lot of new features. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:93\nmsgid \"\"\n\"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld \"\n\"<http://meinheld.org/>`_ and `bjoern \"\n\"<https://github.com/jonashaag/bjoern>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:94\nmsgid \"Support for SimpleTAL templates.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:95\nmsgid \"Better runtime exception handling for mako templates in debug mode.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:96\nmsgid \"Lots of documentation, fixes and small improvements.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:97\nmsgid \"A new :data:`Request.urlparts` property.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:100\nmsgid \"Performance improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:101\nmsgid \"\"\n\"The :class:`Router` now special-cases ``wsgi.run_once`` environments to \"\n\"speed up CGI.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:102\nmsgid \"\"\n\"Reduced module load time by ~30% and optimized template parser. See `8ccb2d \"\n\"<http://github.com/bottlepy/bottle/commit/8ccb2d>`_, `f72a7c <http://github.com/bottlepy/bottle/commit/f72a7c>`_ and `b14b9a \"\n\"<http://github.com/bottlepy/bottle/commit/b14b9a>`_ for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:103\nmsgid \"\"\n\"Support for \\\"App Caching\\\" on Google App Engine. See `af93ec \"\n\"<http://github.com/bottlepy/bottle/commit/af93ec>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:104\nmsgid \"\"\n\"Some of the rarely used or deprecated features are now plugins that avoid \"\n\"overhead if the feature is not used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:107 ../../changelog.rst:118\nmsgid \"API changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:108\nmsgid \"\"\n\"This release is mostly backward compatible, but some APIs are marked \"\n\"deprecated now and will be removed for the next release. Most noteworthy:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:110\nmsgid \"\"\n\"The ``static`` route parameter is deprecated. You can escape wild-cards with\"\n\" a backslash.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:111\nmsgid \"\"\n\"Type-based output filters are deprecated. They can easily be replaced with \"\n\"plugins.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:115\nmsgid \"Release 0.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:119\nmsgid \"These changes may break compatibility with previous versions.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:121\nmsgid \"\"\n\"The built-in Key/Value database is not available anymore. It is marked \"\n\"deprecated since 0.6.4\"\nmsgstr \"\"\n\n#: ../../changelog.rst:122\nmsgid \"The Route syntax and behaviour changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:124\nmsgid \"\"\n\"Regular expressions must be encapsulated with ``#``. In 0.6 all non-\"\n\"alphanumeric characters not present in the regular expression were allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:125\nmsgid \"\"\n\"Regular expressions not part of a route wildcard are escaped automatically. \"\n\"You don't have to escape dots or other regular control characters anymore. \"\n\"In 0.6 the whole URL was interpreted as a regular expression. You can use \"\n\"anonymous wildcards (``/index:#(\\\\.html)?#``) to achieve a similar \"\n\"behaviour.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:127\nmsgid \"\"\n\"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:128\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine escapes HTML special characters in \"\n\"``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` \"\n\"syntax to get old behaviour (no escaping).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:129\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine returns unicode strings instead of lists \"\n\"of byte strings.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:130\nmsgid \"\"\n\"``bottle.optimize()`` and the automatic route optimization is obsolete.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:131\nmsgid \"Some functions and attributes were renamed:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:133\nmsgid \":attr:`Request._environ` is now :attr:`Request.environ`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:134\nmsgid \":attr:`Response.header` is now :attr:`Response.headers`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:135\nmsgid \":func:`default_app` is obsolete. Use :func:`app` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:137\nmsgid \"The default :func:`redirect` code changed from 307 to 303.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:138\nmsgid \"Removed support for ``@default``. Use ``@error(404)`` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:142\nmsgid \"New features\"\nmsgstr \"\"\n\n#: ../../changelog.rst:143\nmsgid \"This is an incomplete list of new features and improved functionality.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:145\nmsgid \"\"\n\"The :class:`Request` object got new properties: :attr:`Request.body`, \"\n\":attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, \"\n\":attr:`Request.forms`, :attr:`Request.files`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:146\nmsgid \"\"\n\"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are \"\n\"now able to encode and decode python objects. This is called a *secure \"\n\"cookie* because the encoded values are signed and protected from changes on \"\n\"client side. All pickle-able data structures are allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:147\nmsgid \"\"\n\"The new :class:`Router` class drastically improves performance for setups \"\n\"with lots of dynamic routes and supports named routes (named route + dict = \"\n\"URL string).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:148\nmsgid \"\"\n\"It is now possible (and recommended) to return :exc:`HTTPError` and \"\n\":exc:`HTTPResponse` instances or other exception objects instead of raising \"\n\"them.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:149\nmsgid \"\"\n\"The new function :func:`static_file` equals :func:`send_file` but returns a \"\n\":exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. \"\n\":func:`send_file` is deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:150\nmsgid \"\"\n\"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:151\nmsgid \"The :class:`SimpleTemplate` engine got full unicode support.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:152\nmsgid \"Lots of non-critical bugfixes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:158\nmsgid \"Contributors\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:1\nmsgid \"\"\n\"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:3\nmsgid \"\"\n\"Thanks to all the people who found bugs, sent patches, spread the word, \"\n\"helped each other on the mailing-list and made this project possible. I hope\"\n\" the following (alphabetically sorted) list is complete. If you miss your \"\n\"name on that list (or want your name removed) please :doc:`tell me \"\n\"<contact>` or add it yourself.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:5\nmsgid \"acasajus\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:6\nmsgid \"Adam R. Smith\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:7\nmsgid \"Alexey Borzenkov\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:8\nmsgid \"Alexis Daboville\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:9\nmsgid \"Anton I. Sipos\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:10\nmsgid \"Anton Kolechkin\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:11\nmsgid \"apexi200sx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:12\nmsgid \"apheage\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:13\nmsgid \"BillMa\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:14\nmsgid \"Brad Greenlee\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:15\nmsgid \"Brandon Gilmore\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:16\nmsgid \"Branko Vukelic\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:17\nmsgid \"Brian Sierakowski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:18\nmsgid \"Brian Wickman\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:19\nmsgid \"Carl Scharenberg\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:20\nmsgid \"Damien Degois\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:21\nmsgid \"David Buxton\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:22\nmsgid \"Duane Johnson\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:23\nmsgid \"fcamel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:24\nmsgid \"Frank Murphy\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:25\nmsgid \"Frederic Junod\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:26\nmsgid \"goldfaber3012\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:27\nmsgid \"Greg Milby\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:28\nmsgid \"gstein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:29\nmsgid \"Ian Davis\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:30\nmsgid \"Itamar Nabriski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:31\nmsgid \"Iuri de Silvio\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:32\nmsgid \"Jaimie Murdock\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:33\nmsgid \"Jeff Nichols\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:34\nmsgid \"Jeremy Kelley\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:35\nmsgid \"joegester\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:36\nmsgid \"Johannes Krampf\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:37\nmsgid \"Jonas Haag\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:38\nmsgid \"Joshua Roesslein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:39\nmsgid \"Judson Neer\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:40\nmsgid \"Karl\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:41\nmsgid \"Kevin Zuber\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:42\nmsgid \"Kraken\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:43\nmsgid \"Kyle Fritz\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:44\nmsgid \"m35\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:45\nmsgid \"Marcos Neves\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:46\nmsgid \"masklinn\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:47\nmsgid \"Michael Labbe\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:48\nmsgid \"Michael Soulier\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:49\nmsgid \"`reddit <http://reddit.com/r/python>`_\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:50\nmsgid \"Nicolas Vanhoren\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:51\nmsgid \"Robert Rollins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:52\nmsgid \"rogererens\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:53\nmsgid \"rwxrwx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:54\nmsgid \"Santiago Gala\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:55\nmsgid \"Sean M. Collins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:56\nmsgid \"Sebastian Wollrath\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:57\nmsgid \"Seth\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:58\nmsgid \"Sigurd Høgsbro\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:59\nmsgid \"Stuart Rackham\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:60\nmsgid \"Sun Ning\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:61\nmsgid \"Tomás A. Schertel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:62\nmsgid \"Tristan Zajonc\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:63\nmsgid \"voltron\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:64\nmsgid \"Wieland Hoffmann\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:65\nmsgid \"zombat\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:66\nmsgid \"Thiago Avelino\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/configuration.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../configuration.rst:3\nmsgid \"Configuration (DRAFT)\"\nmsgstr \"\"\n\n#: ../../configuration.rst:8\nmsgid \"\"\n\"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_\"\n\" what you think.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:10\nmsgid \"\"\n\"Bottle applications can store their configuration in :attr:`Bottle.config`, \"\n\"a dict-like object and central place for application specific settings. This\"\n\" dictionary controls many aspects of the framework, tells (newer) plugins \"\n\"what to do, and can be used to store your own configuration as well.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:13\nmsgid \"Configuration Basics\"\nmsgstr \"\"\n\n#: ../../configuration.rst:15\nmsgid \"\"\n\"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. \"\n\"All the common dict methods work as expected. Let us start with some \"\n\"examples::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:44\nmsgid \"\"\n\"The app object is not always available, but as long as you are within a \"\n\"request context, you can use the `request` object to get the current \"\n\"application and its configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:51\nmsgid \"Naming Convention\"\nmsgstr \"\"\n\n#: ../../configuration.rst:53\nmsgid \"\"\n\"To make life easier, plugins and applications should follow some simple \"\n\"rules when it comes to config parameter names:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:55\nmsgid \"\"\n\"All keys should be lowercase strings and follow the rules for python \"\n\"identifiers (no special characters but the underscore).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:56\nmsgid \"\"\n\"Namespaces are separated by dots (e.g. ``namespace.field`` or \"\n\"``namespace.subnamespace.field``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:57\nmsgid \"\"\n\"Bottle uses the root namespace for its own configuration. Plugins should \"\n\"store all their variables in their own namespace (e.g. ``sqlite.db`` or \"\n\"``werkzeug.use_debugger``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:58\nmsgid \"\"\n\"Your own application should use a separate namespace (e.g. ``myapp.*``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:62\nmsgid \"Loading Configuration from a File\"\nmsgstr \"\"\n\n#: ../../configuration.rst:66\nmsgid \"\"\n\"Configuration files are useful if you want to enable non-programmers to \"\n\"configure your application, or just don't want to hack python module files \"\n\"just to change the database port. A very common syntax for configuration \"\n\"files is shown here:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:78\nmsgid \"\"\n\"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style \"\n\"configuration files from disk and import their values into your existing \"\n\"configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:84\nmsgid \"Loading Configuration from a nested :class:`dict`\"\nmsgstr \"\"\n\n#: ../../configuration.rst:88\nmsgid \"\"\n\"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an \"\n\"entire structure of nested dictionaries and turns it into a flat list of \"\n\"keys and values with namespaced keys::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:109\nmsgid \"Listening to configuration changes\"\nmsgstr \"\"\n\n#: ../../configuration.rst:113\nmsgid \"\"\n\"The ``config`` hook on the application object is triggered each time a value\"\n\" in :attr:`Bottle.config` is changed. This hook can be used to react on \"\n\"configuration changes at runtime, for example reconnect to a new database, \"\n\"change the debug settings on a background service or resize worker thread \"\n\"pools. The hook callback receives two arguments (key, new_value) and is \"\n\"called before the value is actually changed in the dictionary. Raising an \"\n\"exception from a hook callback cancels the change and the old value is \"\n\"preserved.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:122\nmsgid \"\"\n\"The hook callbacks cannot *change* the value that is to be stored to the \"\n\"dictionary. That is what filters are for.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:128\nmsgid \"Filters and other Meta Data\"\nmsgstr \"\"\n\n#: ../../configuration.rst:132\nmsgid \"\"\n\":class:`ConfigDict` allows you to store meta data along with configuration \"\n\"keys. Two meta fields are currently defined:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:136\nmsgid \"help\"\nmsgstr \"\"\n\n#: ../../configuration.rst:135\nmsgid \"\"\n\"A help or description string. May be used by debugging, introspection or \"\n\"admin tools to help the site maintainer configuring their application.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:139\nmsgid \"filter\"\nmsgstr \"\"\n\n#: ../../configuration.rst:139\nmsgid \"\"\n\"A callable that accepts and returns a single value. If a filter is defined \"\n\"for a key, any new value stored to that key is first passed through the \"\n\"filter callback. The filter can be used to cast the value to a different \"\n\"type, check for invalid values (throw a ValueError) or trigger side effects.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:141\nmsgid \"\"\n\"This feature is most useful for plugins. They can validate their config \"\n\"parameters or trigger side effects using filters and document their \"\n\"configuration via ``help`` fields::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:163\nmsgid \"API Documentation\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:1\nmsgid \"\"\n\"A dict-like configuration storage with additional support for namespaces, \"\n\"validators, meta-data, on_change listeners and more.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:1\nmsgid \"Load values from an ``*.ini`` style config file.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:3\nmsgid \"\"\n\"If the config file contains sections, their names are used as namespaces for\"\n\" the values within. The two special sections ``DEFAULT`` and ``bottle`` \"\n\"refer to the root namespace (no prefix).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_dict:1\nmsgid \"\"\n\"Load values from a dictionary structure. Nesting can be used to represent \"\n\"namespaces.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.update:1\nmsgid \"\"\n\"If the first parameter is a string, all keys are prefixed with this \"\n\"namespace. Apart from that it works just as the usual dict.update(). \"\n\"Example: ``update('some.namespace', key='value')``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_get:1\nmsgid \"Return the value of a meta field for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_set:1\nmsgid \"\"\n\"Set the meta field for a key to a new value. This triggers the on-change \"\n\"handler for existing keys.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_list:1\nmsgid \"Return an iterable of meta field names defined for a key.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/contact.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../contact.rst:3\nmsgid \"Contact\"\nmsgstr \"\"\n\n#: ../../contact.rst:6\nmsgid \"About the Autor\"\nmsgstr \"\"\n\n#: ../../contact.rst:7\nmsgid \"\"\n\"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy \"\n\"behind this website. I'm 27 years old and studying computer science at the \"\n\"Georg-August-University in Göttingen, Germany. Python is my favorite \"\n\"language, but I also code in ruby and JavaScript a lot. Watch me on `twitter\"\n\" <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub \"\n\"<http://github.com/defnull>`_ to get in contact. A `mailinglist \"\n\"<http://groups.google.de/group/bottlepy>`_ is open for Bottle related \"\n\"questions, too.\"\nmsgstr \"\"\n\n#: ../../contact.rst:10\nmsgid \"About Bottle\"\nmsgstr \"\"\n\n#: ../../contact.rst:11\nmsgid \"\"\n\"This is my first open source project so far. It started and a small \"\n\"experiment but soon got so much positive feedback I decided to make \"\n\"something real out of it. Here it is.\"\nmsgstr \"\"\n\n#: ../../contact.rst:14\nmsgid \"Impressum und Kontaktdaten\"\nmsgstr \"\"\n\n#: ../../contact.rst:15\nmsgid \"\"\n\"(This is required by `German law \"\n\"<http://bundesrecht.juris.de/tmg/__5.html>`_)\"\nmsgstr \"\"\n\n#: ../../contact.rst:17\nmsgid \"\"\n\"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die \"\n\"Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen \"\n\"vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist \"\n\"ausdrücklich untersagt.\"\nmsgstr \"\"\n\n#: ../../contact.rst:22\nmsgid \"**Betreiber**: Marcel Hellkamp\"\nmsgstr \"\"\n\n#: ../../contact.rst:23\nmsgid \"**Ort**: D - 37075 Göttingen\"\nmsgstr \"\"\n\n#: ../../contact.rst:24\nmsgid \"**Strasse**: Theodor-Heuss Strasse 13\"\nmsgstr \"\"\n\n#: ../../contact.rst:25\nmsgid \"**Telefon**: +49 (0) 551 20005915\"\nmsgstr \"\"\n\n#: ../../contact.rst:26\nmsgid \"**E-Mail**: marc at gsites dot de\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/deployment.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../deployment.rst:27\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../deployment.rst:29\nmsgid \"\"\n\"The bottle :func:`run` function, when called without any parameters, starts \"\n\"a local development server on port 8080. You can access and test your \"\n\"application via http://localhost:8080/ if you are on the same host.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:31\nmsgid \"\"\n\"To get your application available to the outside world, specify the IP of \"\n\"the interface the server should listen to (e.g. ``run(host='192.168.0.1')``)\"\n\" or let the server listen to all interfaces at once (e.g. \"\n\"``run(host='0.0.0.0')``). The listening port can be changed in a similar \"\n\"way, but you need root or admin rights to choose a port below 1024. Port 80 \"\n\"is the standard for HTTP servers::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:36\nmsgid \"Server Options\"\nmsgstr \"\"\n\n#: ../../deployment.rst:38\nmsgid \"\"\n\"The built-in default server is based on `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-\"\n\"wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine \"\n\"for development and early production, but may become a performance \"\n\"bottleneck when server load increases. There are three ways to eliminate \"\n\"this bottleneck:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:40\nmsgid \"Use a different server that is either multi-threaded or asynchronous.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:41\nmsgid \"\"\n\"Start multiple server processes and spread the load with a load-balancer.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:42\nmsgid \"Do both.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:44\nmsgid \"\"\n\"**Multi-threaded** servers are the 'classic' way to do it. They are very \"\n\"robust, reasonably fast and easy to manage. As a drawback, they can only \"\n\"handle a limited number of connections at the same time and utilize only one\"\n\" CPU core due to the \\\"Global Interpreter Lock\\\" (GIL) of the Python \"\n\"runtime. This does not hurt most applications, they are waiting for network \"\n\"IO most of the time anyway, but may slow down CPU intensive tasks (e.g. \"\n\"image processing).\"\nmsgstr \"\"\n\n#: ../../deployment.rst:46\nmsgid \"\"\n\"**Asynchronous** servers are very fast, can handle a virtually unlimited \"\n\"number of concurrent connections and are easy to manage. To take full \"\n\"advantage of their potential, you need to design your application \"\n\"accordingly and understand the concepts of the specific server.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:48\nmsgid \"\"\n\"**Multi-processing** (forking) servers are not limited by the GIL and \"\n\"utilize more than one CPU core, but make communication between server \"\n\"instances more expensive. You need a database or external message query to \"\n\"share state between processes, or design your application so that it does \"\n\"not need any shared state. The setup is also a bit more complicated, but \"\n\"there are good tutorials available.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:51\nmsgid \"Switching the Server Backend\"\nmsgstr \"\"\n\n#: ../../deployment.rst:53\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded default server::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:57\nmsgid \"\"\n\"Bottle ships with a lot of ready-to-use adapters for the most common WSGI \"\n\"servers and automates the setup process. Here is an incomplete list:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:60\nmsgid \"Name\"\nmsgstr \"\"\n\n#: ../../deployment.rst:60\nmsgid \"Homepage\"\nmsgstr \"\"\n\n#: ../../deployment.rst:60\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../deployment.rst:62\nmsgid \"cgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:62\nmsgid \"Run as CGI script\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"flup\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"flup_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"Run as FastCGI process\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"gae\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"gae_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"Helper for Google App Engine deployments\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"wsgiref\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"wsgiref_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"Single-threaded default server\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"cherrypy\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"cherrypy_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"Multi-threaded and very stable\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"paste\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"paste_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"Multi-threaded, stable, tried and tested\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"Multi-threaded\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"Multi-threaded, poweres Pyramid\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"Pre-forked, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"Asynchronous framework with WSGI support.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72 ../../deployment.rst:73\nmsgid \"Asynchronous (greenlets)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"fapws3\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"fapws3_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"Asynchronous (network side only), written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"tornado\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"tornado_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"Asynchronous, powers some parts of Facebook\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"twisted_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"Asynchronous, well tested but... twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"meinheld\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"meinheld_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"Asynchronous, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"bjoern\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"bjoern_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"Asynchronous, very fast and written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:79\nmsgid \"auto\"\nmsgstr \"\"\n\n#: ../../deployment.rst:79\nmsgid \"Automatically selects an available server adapter\"\nmsgstr \"\"\n\n#: ../../deployment.rst:82\nmsgid \"The full list is available through :data:`server_names`.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:84\nmsgid \"\"\n\"If there is no adapter for your favorite server or if you need more control \"\n\"over the server setup, you may want to start the server manually. Refer to \"\n\"the server documentation on how to run WSGI applications. Here is an example\"\n\" for paste_::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:93\nmsgid \"Apache mod_wsgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:95\nmsgid \"\"\n\"Instead of running your own HTTP server from within Bottle, you can attach \"\n\"Bottle applications to an `Apache server <apache>`_ using mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:97\nmsgid \"\"\n\"All you need is an ``app.wsgi`` file that provides an ``application`` \"\n\"object. This object is used by mod_wsgi to start your application and should\"\n\" be a WSGI-compatible Python callable.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:99\nmsgid \"File ``/var/www/yourapp/app.wsgi``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:109\nmsgid \"The Apache configuration may look like this::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:128\nmsgid \"Google AppEngine\"\nmsgstr \"\"\n\n#: ../../deployment.rst:132\nmsgid \"\"\n\"New App Engine applications using the Python 2.7 runtime environment support\"\n\" any WSGI application and should be configured to use the Bottle application\"\n\" object directly. For example suppose your application's main module is \"\n\"``myapp.py``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:142\nmsgid \"\"\n\"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object \"\n\"like so::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:153\nmsgid \"\"\n\"Bottle also provides a ``gae`` server adapter for legacy App Engine \"\n\"applications using the Python 2.5 runtime environment. It works similar to \"\n\"the ``cgi`` adapter in that it does not start a new HTTP server, but \"\n\"prepares and optimizes your application for Google App Engine and makes sure\"\n\" it conforms to their API::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:157\nmsgid \"\"\n\"It is always a good idea to let GAE serve static files directly. Here is \"\n\"example for a working  ``app.yaml`` (using the legacy Python 2.5 runtime \"\n\"environment)::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:173\nmsgid \"Load Balancer (Manual Setup)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:175\nmsgid \"\"\n\"A single Python process can utilize only one CPU at a time, even if there \"\n\"are more CPU cores available. The trick is to balance the load between \"\n\"multiple independent Python processes to utilize all of your CPU cores.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:177\nmsgid \"\"\n\"Instead of a single Bottle application server, you start one instance for \"\n\"each CPU core available using different local port (localhost:8080, 8081, \"\n\"8082, ...). You can choose any server adapter you want, even asynchronous \"\n\"ones. Then a high performance load balancer acts as a reverse proxy and \"\n\"forwards each new requests to a random port, spreading the load between all \"\n\"available back-ends. This way you can use all of your CPU cores and even \"\n\"spread out the load between different physical servers.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:179\nmsgid \"\"\n\"One of the fastest load balancers available is Pound_ but most common web \"\n\"servers have a proxy-module that can do the work just fine.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:181\nmsgid \"Pound example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:199\nmsgid \"Apache example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:207\nmsgid \"Lighttpd example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:219\nmsgid \"Good old CGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:221\nmsgid \"\"\n\"A CGI server starts a new process for each request. This adds a lot of \"\n\"overhead but is sometimes the only option, especially on cheap hosting \"\n\"packages. The `cgi` server adapter does not actually start a CGI server, but\"\n\" transforms your bottle application into a valid CGI application::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/development.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../development.rst:2\nmsgid \"Developer Notes\"\nmsgstr \"\"\n\n#: ../../development.rst:4\nmsgid \"\"\n\"This document is intended for developers and package maintainers interested \"\n\"in the bottle development and release workflow. If you want to contribute, \"\n\"you are just right!\"\nmsgstr \"\"\n\n#: ../../development.rst:8\nmsgid \"Get involved\"\nmsgstr \"\"\n\n#: ../../development.rst:10\nmsgid \"\"\n\"There are several ways to join the community and stay up to date. Here are \"\n\"some of them:\"\nmsgstr \"\"\n\n#: ../../development.rst:12\nmsgid \"\"\n\"**Mailing list**: Join our mailing list by sending an email to \"\n\"`bottlepy+subscribe@googlegroups.com \"\n\"<mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required).\"\nmsgstr \"\"\n\n#: ../../development.rst:13\nmsgid \"\"\n\"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or \"\n\"search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag.\"\nmsgstr \"\"\n\n#: ../../development.rst:14\nmsgid \"\"\n\"**IRC**: Join `#bottlepy on irc.freenode.net \"\n\"<irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:15\nmsgid \"\"\n\"**Google plus**: We sometimes `blog about Bottle, releases and technical \"\n\"stuff \"\n\"<https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_\"\n\" on our Google+ page.\"\nmsgstr \"\"\n\n#: ../../development.rst:19\nmsgid \"Get the Sources\"\nmsgstr \"\"\n\n#: ../../development.rst:21\nmsgid \"\"\n\"The bottle `development repository <https://github.com/bottlepy/bottle>`_ \"\n\"and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are \"\n\"both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan \"\n\"to contribute, it is a good idea to create an account there and fork the \"\n\"main repository. This way your changes and ideas are visible to other \"\n\"developers and can be discussed openly. Even without an account, you can \"\n\"clone the repository or just download the latest development version as a \"\n\"source archive.\"\nmsgstr \"\"\n\n#: ../../development.rst:23\nmsgid \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:24\nmsgid \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:25\nmsgid \"\"\n\"**Download:** Development branch as `tar archive \"\n\"<http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file \"\n\"<http://github.com/bottlepy/bottle/zipball/master>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:29\nmsgid \"Releases and Updates\"\nmsgstr \"\"\n\n#: ../../development.rst:31\nmsgid \"\"\n\"Bottle is released at irregular intervals and distributed through `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-\"\n\"revisions of outdated releases are only available from the git repository \"\n\"mentioned above. Some Linux distributions may offer packages for outdated \"\n\"releases, though.\"\nmsgstr \"\"\n\n#: ../../development.rst:33\nmsgid \"\"\n\"The Bottle version number splits into three parts \"\n\"(**major.minor.revision**). These are *not* used to promote new features but\"\n\" to indicate important bug-fixes and/or API changes. Critical bugs are fixed\"\n\" in at least the two latest minor releases and announced in all available \"\n\"channels (mailinglist, twitter, github). Non-critical bugs or features are \"\n\"not guaranteed to be backported. This may change in the future, through.\"\nmsgstr \"\"\n\n#: ../../development.rst:36\nmsgid \"Major Release (x.0)\"\nmsgstr \"\"\n\n#: ../../development.rst:36\nmsgid \"\"\n\"The major release number is increased on important milestones or updates \"\n\"that completely break backward compatibility. You probably have to work over\"\n\" your entire application to use a new release. These releases are very rare,\"\n\" through.\"\nmsgstr \"\"\n\n#: ../../development.rst:39\nmsgid \"Minor Release (x.y)\"\nmsgstr \"\"\n\n#: ../../development.rst:39\nmsgid \"\"\n\"The minor release number is increased on updates that change the API or \"\n\"behaviour in some way. You might get some depreciation warnings any may have\"\n\" to tweak some configuration settings to restore the old behaviour, but in \"\n\"most cases these changes are designed to be backward compatible for at least\"\n\" one minor release. You should update to stay up do date, but don't have to.\"\n\" An exception is 0.8, which *will* break backward compatibility hard. (This \"\n\"is why 0.7 was skipped). Sorry about that.\"\nmsgstr \"\"\n\n#: ../../development.rst:42\nmsgid \"Revision (x.y.z)\"\nmsgstr \"\"\n\n#: ../../development.rst:42\nmsgid \"\"\n\"The revision number is increased on bug-fixes and other patches that do not \"\n\"change the API or behaviour. You can safely update without editing your \"\n\"application code. In fact, you really should as soon as possible, because \"\n\"important security fixes are released this way.\"\nmsgstr \"\"\n\n#: ../../development.rst:46\nmsgid \"Pre-Release Versions\"\nmsgstr \"\"\n\n#: ../../development.rst:45\nmsgid \"\"\n\"Release candidates are marked by an ``rc`` in their revision number. These \"\n\"are API stable most of the time and open for testing, but not officially \"\n\"released yet. You should not use these for production.\"\nmsgstr \"\"\n\n#: ../../development.rst:49\nmsgid \"Repository Structure\"\nmsgstr \"\"\n\n#: ../../development.rst:51\nmsgid \"The source repository is structured as follows:\"\nmsgstr \"\"\n\n#: ../../development.rst:54\nmsgid \"``master`` branch\"\nmsgstr \"\"\n\n#: ../../development.rst:54\nmsgid \"\"\n\"This is the integration, testing and development branch. All changes that \"\n\"are planned to be part of the next release are merged and tested here.\"\nmsgstr \"\"\n\n#: ../../development.rst:57\nmsgid \"``release-x.y`` branches\"\nmsgstr \"\"\n\n#: ../../development.rst:57\nmsgid \"\"\n\"As soon as the master branch is (almost) ready for a new release, it is \"\n\"branched into a new release branch. This \\\"release candidate\\\" is feature-\"\n\"frozen but may receive bug-fixes and last-minute changes until it is \"\n\"considered production ready and officially released. From that point on it \"\n\"is called a \\\"support branch\\\" and still receives bug-fixes, but only \"\n\"important ones. The revision number is increased on each push to these \"\n\"branches, so you can keep up with important changes.\"\nmsgstr \"\"\n\n#: ../../development.rst:60\nmsgid \"``bugfix_name-x.y`` branches\"\nmsgstr \"\"\n\n#: ../../development.rst:60\nmsgid \"\"\n\"These branches are only temporary and used to develop and share non-trivial \"\n\"bug-fixes for existing releases. They are merged into the corresponding \"\n\"release branch and deleted soon after that.\"\nmsgstr \"\"\n\n#: ../../development.rst:64\nmsgid \"Feature branches\"\nmsgstr \"\"\n\n#: ../../development.rst:63\nmsgid \"\"\n\"All other branches are feature branches. These are based on the master \"\n\"branch and only live as long as they are still active and not merged back \"\n\"into ``master``.\"\nmsgstr \"\"\n\n#: ../../development.rst:67\nmsgid \"What does this mean for a developer?\"\nmsgstr \"\"\n\n#: ../../development.rst:68\nmsgid \"\"\n\"If you want to add a feature, create a new branch from ``master``. If you \"\n\"want to fix a bug, branch ``release-x.y`` for each affected release. Please \"\n\"use a separate branch for each feature or bug to make integration as easy as\"\n\" possible. Thats all. There are git workflow examples at the bottom of this \"\n\"page.\"\nmsgstr \"\"\n\n#: ../../development.rst:70\nmsgid \"\"\n\"Oh, and never ever change the release number. We'll do that on integration. \"\n\"You never know in which order we pull pending requests anyway :)\"\nmsgstr \"\"\n\n#: ../../development.rst:74\nmsgid \"What does this mean for a maintainer ?\"\nmsgstr \"\"\n\n#: ../../development.rst:75\nmsgid \"\"\n\"Watch the tags (and the mailing list) for bug-fixes and new releases. If you\"\n\" want to fetch a specific release from the git repository, trust the tags, \"\n\"not the branches. A branch may contain changes that are not released yet, \"\n\"but a tag marks the exact commit which changed the version number.\"\nmsgstr \"\"\n\n#: ../../development.rst:79\nmsgid \"Submitting Patches\"\nmsgstr \"\"\n\n#: ../../development.rst:81\nmsgid \"\"\n\"The best way to get your changes integrated into the main development branch\"\n\" is to fork the main repository at github, create a new feature-branch, \"\n\"apply your changes and send a pull-request. Further down this page is a \"\n\"small collection of git workflow examples that may guide you. Submitting \"\n\"git-compatible patches to the mailing list is fine too. In any case, please \"\n\"follow some basic rules:\"\nmsgstr \"\"\n\n#: ../../development.rst:83\nmsgid \"\"\n\"**Documentation:** Tell us what your patch does. Comment your code. If you \"\n\"introduced a new feature, add to the documentation so others can learn about\"\n\" it.\"\nmsgstr \"\"\n\n#: ../../development.rst:84\nmsgid \"\"\n\"**Test:** Write tests to prove that your code works as expected and does not\"\n\" break anything. If you fixed a bug, write at least one test-case that \"\n\"triggers the bug. Make sure that all tests pass before you submit a patch.\"\nmsgstr \"\"\n\n#: ../../development.rst:85\nmsgid \"\"\n\"**One patch at a time:** Only fix one bug or add one feature at a time. \"\n\"Design your patches so that they can be applyed as a whole. Keep your \"\n\"patches clean, small and focused.\"\nmsgstr \"\"\n\n#: ../../development.rst:86\nmsgid \"\"\n\"**Sync with upstream:** If the ``upstream/master`` branch changed while you \"\n\"were working on your patch, rebase or pull to make sure that your patch \"\n\"still applies without conflicts.\"\nmsgstr \"\"\n\n#: ../../development.rst:90\nmsgid \"Building the Documentation\"\nmsgstr \"\"\n\n#: ../../development.rst:92\nmsgid \"\"\n\"You need a recent version of Sphinx to build the documentation. The \"\n\"recommended way is to install :command:`virtualenv` using your distribution \"\n\"package repository and install sphinx manually to get an up-to-date version.\"\nmsgstr \"\"\n\n#: ../../development.rst:123\nmsgid \"GIT Workflow Examples\"\nmsgstr \"\"\n\n#: ../../development.rst:125\nmsgid \"\"\n\"The following examples assume that you have an (free) `github account \"\n\"<https://github.com>`_. This is not mandatory, but makes things a lot \"\n\"easier.\"\nmsgstr \"\"\n\n#: ../../development.rst:127\nmsgid \"\"\n\"First of all you need to create a fork (a personal clone) of the official \"\n\"repository. To do this, you simply click the \\\"fork\\\" button on the `bottle \"\n\"project page <https://github.com/bottlepy/bottle>`_. When the fork is done, \"\n\"you will be presented with a short introduction to your new repository.\"\nmsgstr \"\"\n\n#: ../../development.rst:129\nmsgid \"\"\n\"The fork you just created is hosted at github and read-able by everyone, but\"\n\" write-able only by you. Now you need to clone the fork locally to actually \"\n\"make changes to it. Make sure you use the private (read-write) URL and *not*\"\n\" the public (read-only) one::\"\nmsgstr \"\"\n\n#: ../../development.rst:133\nmsgid \"\"\n\"Once the clone is complete your repository will have a remote named \"\n\"\\\"origin\\\" that points to your fork on github. Don’t let the name confuse \"\n\"you, this does not point to the original bottle repository, but to your own \"\n\"fork. To keep track of the official repository, add another remote named \"\n\"\\\"upstream\\\"::\"\nmsgstr \"\"\n\n#: ../../development.rst:139\nmsgid \"\"\n\"Note that \\\"upstream\\\" is a public clone URL, which is read-only. You cannot\"\n\" push changes directly to it. Instead, we will pull from your public \"\n\"repository. This is described later.\"\nmsgstr \"\"\n\n#: ../../development.rst:142\nmsgid \"Submit a Feature\"\nmsgstr \"\"\n\n#: ../../development.rst:143\nmsgid \"\"\n\"New features are developed in separate feature-branches to make integration \"\n\"easy. Because they are going to be integrated into the ``master`` branch, \"\n\"they must be based on ``upstream/master``. To create a new feature-branch, \"\n\"type the following::\"\nmsgstr \"\"\n\n#: ../../development.rst:147\nmsgid \"\"\n\"Now implement your feature, write tests, update the documentation, make sure\"\n\" that all tests pass and commit your changes::\"\nmsgstr \"\"\n\n#: ../../development.rst:151\nmsgid \"\"\n\"If the ``upstream/master`` branch changed in the meantime, there may be \"\n\"conflicts with your changes. To solve these, 'rebase' your feature-branch \"\n\"onto the top of the updated ``upstream/master`` branch::\"\nmsgstr \"\"\n\n#: ../../development.rst:156\nmsgid \"\"\n\"This is equivalent to undoing all your changes, updating your branch to the \"\n\"latest version and reapplying all your patches again. If you released your \"\n\"branch already (see next step), this is not an option because it rewrites \"\n\"your history. You can do a normal pull instead. Resolve any conflicts, run \"\n\"the tests again and commit.\"\nmsgstr \"\"\n\n#: ../../development.rst:158\nmsgid \"\"\n\"Now you are almost ready to send a pull request. But first you need to make \"\n\"your feature-branch public by pushing it to your github fork::\"\nmsgstr \"\"\n\n#: ../../development.rst:162\nmsgid \"\"\n\"After you’ve pushed your commit(s) you need to inform us about the new \"\n\"feature. One way is to send a pull-request using github. Another way would \"\n\"be to start a thread in the mailing-list, which is recommended. It allows \"\n\"other developers to see and discuss your patches and you get some feedback \"\n\"for free :)\"\nmsgstr \"\"\n\n#: ../../development.rst:164\nmsgid \"\"\n\"If we accept your patch, we will integrate it into the official development \"\n\"branch and make it part of the next release.\"\nmsgstr \"\"\n\n#: ../../development.rst:167\nmsgid \"Fix a Bug\"\nmsgstr \"\"\n\n#: ../../development.rst:168\nmsgid \"\"\n\"The workflow for bug-fixes is very similar to the one for features, but \"\n\"there are some differences:\"\nmsgstr \"\"\n\n#: ../../development.rst:170\nmsgid \"\"\n\"Branch off of the affected release branches instead of just the development \"\n\"branch.\"\nmsgstr \"\"\n\n#: ../../development.rst:171\nmsgid \"Write at least one test-case that triggers the bug.\"\nmsgstr \"\"\n\n#: ../../development.rst:172\nmsgid \"\"\n\"Do this for each affected branch including ``upstream/master`` if it is \"\n\"affected. ``git cherry-pick`` may help you reducing repetitive work.\"\nmsgstr \"\"\n\n#: ../../development.rst:173\nmsgid \"\"\n\"Name your branch after the release it is based on to avoid confusion. \"\n\"Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/faq.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../faq.rst:10\nmsgid \"Frequently Asked Questions\"\nmsgstr \"\"\n\n#: ../../faq.rst:13\nmsgid \"About Bottle\"\nmsgstr \"\"\n\n#: ../../faq.rst:16\nmsgid \"Is bottle suitable for complex applications?\"\nmsgstr \"\"\n\n#: ../../faq.rst:18\nmsgid \"\"\n\"Bottle is a *micro* framework designed for prototyping and building small \"\n\"web applications and services. It stays out of your way and allows you to \"\n\"get things done fast, but misses some advanced features and ready-to-use \"\n\"solutions found in other frameworks (MVC, ORM, form validation, scaffolding,\"\n\" XML-RPC). Although it *is* possible to add these features and build complex\"\n\" applications with Bottle, you should consider using a full-stack Web \"\n\"framework like pylons_ or paste_ instead.\"\nmsgstr \"\"\n\n#: ../../faq.rst:22\nmsgid \"Common Problems and Pitfalls\"\nmsgstr \"\"\n\n#: ../../faq.rst:29\nmsgid \"\\\"Template Not Found\\\" in mod_wsgi/mod_python\"\nmsgstr \"\"\n\n#: ../../faq.rst:31\nmsgid \"\"\n\"Bottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ \"\n\"or mod_wsgi_ environment, the working directory (``./``) depends on your \"\n\"Apache settings. You should add an absolute path to the template search \"\n\"path::\"\nmsgstr \"\"\n\n#: ../../faq.rst:35\nmsgid \"so bottle searches the right paths.\"\nmsgstr \"\"\n\n#: ../../faq.rst:38\nmsgid \"Dynamic Routes and Slashes\"\nmsgstr \"\"\n\n#: ../../faq.rst:40\nmsgid \"\"\n\"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder \"\n\"token (``:name``) matches everything up to the next slash. This equals to \"\n\"``[^/]+`` in regular expression syntax. To accept slashes too, you have to \"\n\"add a custom regular pattern to the placeholder. An example: \"\n\"``/images/:filepath#.*#`` would match ``/images/icons/error.png`` but \"\n\"``/images/:filename`` won't.\"\nmsgstr \"\"\n\n#: ../../faq.rst:43\nmsgid \"Problems with reverse proxies\"\nmsgstr \"\"\n\n#: ../../faq.rst:45\nmsgid \"\"\n\"Redirects and url-building only works if bottle knows the public address and\"\n\" location of your application. If you run bottle locally behind a reverse \"\n\"proxy or load balancer, some information might get lost along the way. For \"\n\"example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect \"\n\"the local request by your proxy, not the real request by the client. Here is\"\n\" a small WSGI middleware snippet that helps to fix these values::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/index.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../index.rst:21\nmsgid \"Bottle: Python Web Framework\"\nmsgstr \"\"\n\n#: ../../index.rst:23\nmsgid \"\"\n\"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for \"\n\"Python_. It is distributed as a single file module and has no dependencies \"\n\"other than the `Python Standard Library <http://docs.python.org/library/>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:26\nmsgid \"\"\n\"**Routing:** Requests to function-call mapping with support for clean and  \"\n\"dynamic URLs.\"\nmsgstr \"\"\n\n#: ../../index.rst:27\nmsgid \"\"\n\"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-\"\n\"templates>` and support for mako_, jinja2_ and cheetah_ templates.\"\nmsgstr \"\"\n\n#: ../../index.rst:28\nmsgid \"\"\n\"**Utilities:** Convenient access to form data, file uploads, cookies, \"\n\"headers and other HTTP-related metadata.\"\nmsgstr \"\"\n\n#: ../../index.rst:29\nmsgid \"\"\n\"**Server:** Built-in HTTP development server and support for paste_, \"\n\"fapws3_, bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server.\"\nmsgstr \"\"\n\n#: ../../index.rst:32\nmsgid \"Example: \\\"Hello World\\\" in a bottle\"\nmsgstr \"\"\n\n#: ../../index.rst:43\nmsgid \"\"\n\"Run this script or paste it into a Python console, then point your browser \"\n\"to `<http://localhost:8080/hello/world>`_. That's it.\"\nmsgstr \"\"\n\n#: ../../index.rst:46\nmsgid \"Download and Install\"\nmsgstr \"\"\n\n#: ../../index.rst:49\nmsgid \"\"\n\"Install the latest stable release with ``pip install bottle``, \"\n\"``easy_install -U bottle`` or download `bottle.py`__ (unstable) into your \"\n\"project directory. There are no hard [1]_ dependencies other than the Python\"\n\" standard library. Bottle runs with **Python 2.5+ and 3.x**.\"\nmsgstr \"\"\n\n#: ../../index.rst:52\nmsgid \"User's Guide\"\nmsgstr \"\"\n\n#: ../../index.rst:53\nmsgid \"\"\n\"Start here if you want to learn how to use the bottle framework for web \"\n\"development. If you have any questions not answered here, feel free to ask \"\n\"the `mailing list <mailto:bottlepy@googlegroups.com>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:68\nmsgid \"Knowledge Base\"\nmsgstr \"\"\n\n#: ../../index.rst:69\nmsgid \"A collection of articles, guides and HOWTOs.\"\nmsgstr \"\"\n\n#: ../../index.rst:81\nmsgid \"Development and Contribution\"\nmsgstr \"\"\n\n#: ../../index.rst:83\nmsgid \"\"\n\"These chapters are intended for developers interested in the bottle \"\n\"development and release workflow.\"\nmsgstr \"\"\n\n#: ../../index.rst:100\nmsgid \"License\"\nmsgstr \"\"\n\n#: ../../index.rst:102\nmsgid \"Code and documentation are available according to the MIT License:\"\nmsgstr \"\"\n\n#: ../../index.rst:107\nmsgid \"\"\n\"The Bottle logo however is *NOT* covered by that license. It is allowed to \"\n\"use the logo as a link to the bottle homepage or in direct context with the \"\n\"unmodified library. In all other cases please ask first.\"\nmsgstr \"\"\n\n#: ../../index.rst:112\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../index.rst:113\nmsgid \"\"\n\"Usage of the template or server adapter classes of course requires the \"\n\"corresponding template or server modules.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/plugindev.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../plugindev.rst:6\nmsgid \"Plugin Development Guide\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:8\nmsgid \"\"\n\"This guide explains the plugin API and how to write custom plugins. I \"\n\"suggest reading :ref:`plugins` first if you have not done that already. You \"\n\"might also want to have a look at the :doc:`/plugins/index` for some \"\n\"practical examples.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:12\nmsgid \"\"\n\"This is a draft. If you see any errors or find that a specific part is not \"\n\"explained clear enough, please tell the `mailing-list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or file a `bug report \"\n\"<https://github.com/bottlepy/bottle/issues>`_.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:16\nmsgid \"How Plugins Work: The Basics\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:18\nmsgid \"\"\n\"The plugin API builds on the concept of `decorators \"\n\"<http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, \"\n\"a plugin is a decorator applied to every single route callback of an \"\n\"application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:20\nmsgid \"\"\n\"Of course, this is just a simplification. Plugins can do a lot more than \"\n\"just decorating route callbacks, but it is a good starting point. Lets have \"\n\"a look at some code::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:36\nmsgid \"\"\n\"This plugin measures the execution time for each request and adds an \"\n\"appropriate ``X-Exec-Time`` header to the response. As you can see, the \"\n\"plugin returns a wrapper and the wrapper calls the original callback \"\n\"recursively. This is how decorators usually work.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:38\nmsgid \"\"\n\"The last line tells Bottle to install the plugin to the default application.\"\n\" This causes the plugin to be automatically applied to all routes of that \"\n\"application. In other words, ``stopwatch()`` is called once for each route \"\n\"callback and the return value is used as a replacement for the original \"\n\"callback.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:40\nmsgid \"\"\n\"Plugins are applied on demand, that is, as soon as a route is requested for \"\n\"the first time. For this to work properly in multi-threaded environments, \"\n\"the plugin should be thread-safe. This is not a problem most of the time, \"\n\"but keep it in mind.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:42\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped callback is cached and \"\n\"subsequent requests are handled by the cached version directly. This means \"\n\"that a plugin is usually applied only once to a specific route. That cache, \"\n\"however, is cleared every time the list of installed plugins changes. Your \"\n\"plugin should be able to decorate the same route more than once.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:44\nmsgid \"\"\n\"The decorator API is quite limited, though. You don't know anything about \"\n\"the route being decorated or the associated application object and have no \"\n\"way to efficiently store data that is shared among all routes. But fear not!\"\n\" Plugins are not limited to just decorator functions. Bottle accepts \"\n\"anything as a plugin as long as it is callable or implements an extended \"\n\"API. This API is described below and gives you a lot of control over the \"\n\"whole process.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:48\nmsgid \"Plugin API\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:50\nmsgid \"\"\n\":class:`Plugin` is not a real class (you cannot import it from \"\n\":mod:`bottle`) but an interface that plugins are expected to implement. \"\n\"Bottle accepts any object of any type as a plugin, as long as it conforms to\"\n\" the following API.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:54\nmsgid \"\"\n\"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is \"\n\"defined, it is always preferred over calling the plugin directly. All other \"\n\"methods and attributes are optional.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:58\nmsgid \"\"\n\"Both :meth:`Bottle.uninstall` and the `skip` parameter of \"\n\":meth:`Bottle.route()` accept a name string to refer to a plugin or plugin \"\n\"type. This works only for plugins that have a name attribute.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:62\nmsgid \"\"\n\"The Plugin API is still evolving. This integer attribute tells bottle which \"\n\"version to use. If it is missing, bottle defaults to the first version. The \"\n\"current version is ``2``. See :ref:`plugin-changelog` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:66\nmsgid \"\"\n\"Called as soon as the plugin is installed to an application (see \"\n\":meth:`Bottle.install`). The only parameter is the associated application \"\n\"object.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:70\nmsgid \"\"\n\"As long as :meth:`apply` is not defined, the plugin itself is used as a \"\n\"decorator and applied directly to each route callback. The only parameter is\"\n\" the callback to decorate. Whatever is returned by this method replaces the \"\n\"original callback. If there is no need to wrap or replace a given callback, \"\n\"just return the unmodified callback parameter.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:74\nmsgid \"\"\n\"If defined, this method is used in favor of :meth:`__call__` to decorate \"\n\"route callbacks. The additional `route` parameter is an instance of \"\n\":class:`Route` and provides a lot of meta-information and context for that \"\n\"route. See :ref:`route-context` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:78\nmsgid \"\"\n\"Called immediately before the plugin is uninstalled or the application is \"\n\"closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:81\nmsgid \"\"\n\"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for \"\n\"plugins that are applied directly to a route via the :meth:`Bottle.route()` \"\n\"decorator, but only for plugins installed to an application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:87\nmsgid \"Plugin API changes\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:89\nmsgid \"\"\n\"The Plugin API is still evolving and changed with Bottle 0.10 to address \"\n\"certain issues with the route context dictionary. To ensure backwards \"\n\"compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` \"\n\"attribute to tell bottle which API to use. The API differences are \"\n\"summarized here.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:91\nmsgid \"**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:93\nmsgid \"Original Plugin API as described in the 0.9 docs.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:95\nmsgid \"**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:97\nmsgid \"\"\n\"The `context` parameter of the :meth:`Plugin.apply` method is now an \"\n\"instance of :class:`Route` instead of a context dictionary.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:103\nmsgid \"The Route Context\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:105\nmsgid \"\"\n\"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed\"\n\" informations about the associated route. The most important attributes are \"\n\"summarized here:\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"app\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"The application object this route is installed to.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"rule\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"The rule string (e.g. ``/wiki/:page``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"method\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"name\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"plugins\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"\"\n\"A list of route-specific plugins. These are applied in addition to \"\n\"application-wide plugins. (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"skiplist\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"\"\n\"A list of plugins to not apply to this route (again, see \"\n\":meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"config\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific configuration and \"\n\"meta-data.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:125\nmsgid \"\"\n\"For your plugin, :attr:`Route.config` is probably the most important \"\n\"attribute. Keep in mind that this dictionary is local to the route, but \"\n\"shared between all plugins. It is always a good idea to add a unique prefix \"\n\"or, if your plugin needs a lot of configuration, store it in a separate \"\n\"namespace within the `config` dictionary. This helps to avoid naming \"\n\"collisions between plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:129\nmsgid \"Changing the :class:`Route` object\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:131\nmsgid \"\"\n\"While some :class:`Route` attributes are mutable, changes may have unwanted \"\n\"effects on other plugins. It is most likely a bad idea to monkey-patch a \"\n\"broken route instead of providing a helpful error message and let the user \"\n\"fix the problem.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:133\nmsgid \"\"\n\"In some rare cases, however, it might be justifiable to break this rule. \"\n\"After you made your changes to the :class:`Route` instance, raise \"\n\":exc:`RouteReset` as an exception. This removes the current route from the \"\n\"cache and causes all plugins to be re-applied. The router is not updated, \"\n\"however. Changes to `rule` or `method` values have no effect on the router, \"\n\"but only on plugins. This may change in the future, though.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:137\nmsgid \"Runtime optimizations\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:139\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped route callback is \"\n\"cached to speed up subsequent requests. If the behavior of your plugin \"\n\"depends on configuration, and you want to be able to change that \"\n\"configuration at runtime, you need to read the configuration on each \"\n\"request. Easy enough.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:141\nmsgid \"\"\n\"For performance reasons, however, it might be worthwhile to choose a \"\n\"different wrapper based on current needs, work with closures, or enable or \"\n\"disable a plugin at runtime. Let's take the built-in HooksPlugin as an \"\n\"example: If no hooks are installed, the plugin removes itself from all \"\n\"affected routes and has virtaully no overhead. As soon as you install the \"\n\"first hook, the plugin activates itself and takes effect again.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:143\nmsgid \"\"\n\"To achieve this, you need control over the callback cache: \"\n\":meth:`Route.reset` clears the cache for a single route and \"\n\":meth:`Bottle.reset` clears all caches for all routes of an application at \"\n\"once. On the next request, all plugins are re-applied to the route as if it \"\n\"were requested for the first time.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:145\nmsgid \"\"\n\"Both methods won't affect the current request if called from within a route \"\n\"callback, of cause. To force a restart of the current request, raise \"\n\":exc:`RouteReset` as an exception.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:149\nmsgid \"Plugin Example: SQLitePlugin\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:151\nmsgid \"\"\n\"This plugin provides an sqlite3 database connection handle as an additional \"\n\"keyword argument to wrapped callbacks, but only if the callback expects it. \"\n\"If not, the route is ignored and no overhead is added. The wrapper does not \"\n\"affect the return value, but handles plugin-related exceptions properly. \"\n\":meth:`Plugin.setup` is used to inspect the application and search for \"\n\"conflicting plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:218\nmsgid \"\"\n\"This plugin is actually useful and very similar to the version bundled with \"\n\"Bottle. Not bad for less than 60 lines of code, don't you think? Here is a \"\n\"usage example::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:239\nmsgid \"\"\n\"The first route needs a database connection and tells the plugin to create a\"\n\" handle by requesting a ``db`` keyword argument. The second route does not \"\n\"need a database and is therefore ignored by the plugin. The third route does\"\n\" expect a 'db' keyword argument, but explicitly skips the sqlite plugin. \"\n\"This way the argument is not overruled by the plugin and still contains the \"\n\"value of the same-named url argument.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/plugins/index.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../plugins/index.rst:5\nmsgid \"List of available Plugins\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:7\nmsgid \"\"\n\"This is a list of third-party plugins that add extend Bottles core \"\n\"functionality or integrate other libraries with the Bottle framework.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:9\nmsgid \"\"\n\"Have a look at :ref:`plugins` for general questions about plugins \"\n\"(installation, usage). If you plan to develop a new plugin, the \"\n\":doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"Beaker to session and caching library with WSGI Middleware\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"`Bottle-Cork <http://cork.firelet.net/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"\"\n\"Cork provides a simple set of methods to implement Authentication and \"\n\"Authorization in web applications based on Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"Meta package to install the bottle plugin collection.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"flash plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"FIFO Queue for Bottle built upon redis\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"`Macaron <http://nobrin.github.com/macaron/webapp.html>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"Macaron is an object-relational mapper (ORM) for SQLite.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"Memcache integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"MongoDB integration for Bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"Redis integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"Renderer plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"A reusable app that serves static files for bottle apps\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"SQLAlchemy integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"SQLite3 database integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"Web2py Dal integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"\"\n\"Integrates the `werkzeug` library (alternative request and response objects,\"\n\" advanced debugging middleware and more).\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:56\nmsgid \"\"\n\"Plugins listed here are not part of Bottle or the Bottle project, but \"\n\"developed and maintained by third parties.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/recipes.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../recipes.rst:16\nmsgid \"Recipes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:18\nmsgid \"\"\n\"This is a collection of code snippets and examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:21\nmsgid \"Keeping track of Sessions\"\nmsgstr \"\"\n\n#: ../../recipes.rst:23\nmsgid \"\"\n\"There is no built-in support for sessions because there is no *right* way to\"\n\" do it (in a micro framework). Depending on requirements and environment you\"\n\" could use beaker_ middleware with a fitting backend or implement it \"\n\"yourself. Here is an example for beaker sessions with a file-based backend::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:46\nmsgid \"Debugging with Style: Debugging Middleware\"\nmsgstr \"\"\n\n#: ../../recipes.rst:48\nmsgid \"\"\n\"Bottle catches all Exceptions raised in your app code to prevent your WSGI \"\n\"server from crashing. If the built-in :func:`debug` mode is not enough and \"\n\"you need exceptions to propagate to a debugging middleware, you can turn off\"\n\" this behaviour::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:56\nmsgid \"\"\n\"Now, bottle only catches its own exceptions (:exc:`HTTPError`, \"\n\":exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can \"\n\"handle the rest.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:58\nmsgid \"\"\n\"The werkzeug_ and paste_ libraries both ship with very powerful debugging \"\n\"WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for \"\n\"werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for \"\n\"paste_. They both allow you do inspect the stack and even execute python \"\n\"code within the stack context, so **do not use them in production**.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:62\nmsgid \"Unit-Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:64\nmsgid \"\"\n\"Unit-testing is usually performed against methods defined in your web \"\n\"application without running a WSGI environment.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:66\nmsgid \"A simple example using `Nose <http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:77\nmsgid \"Test script::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:84\nmsgid \"\"\n\"In the example the Bottle route() method is never executed - only index() is\"\n\" tested.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:88\nmsgid \"Functional Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:90\nmsgid \"\"\n\"Any HTTP-based testing system can be used with a running WSGI server, but \"\n\"some testing frameworks work more intimately with WSGI, and provide the \"\n\"ability the call WSGI applications in a controlled environment, with \"\n\"tracebacks and full use of debugging tools. `Testing tools for WSGI \"\n\"<http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:92\nmsgid \"\"\n\"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose \"\n\"<http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:112\nmsgid \"Embedding other WSGI Apps\"\nmsgstr \"\"\n\n#: ../../recipes.rst:114\nmsgid \"\"\n\"This is not the recommend way (you should use a middleware in front of \"\n\"bottle to do this) but you can call other WSGI applications from within your\"\n\" bottle app and let bottle act as a pseudo-middleware. Here is an example::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:130\nmsgid \"\"\n\"Again, this is not the recommend way to implement subprojects. It is only \"\n\"here because many people asked for this and to show how bottle maps to WSGI.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:134\nmsgid \"Ignore trailing slashes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:136\nmsgid \"\"\n\"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To\"\n\" treat both URLs the same you can add two ``@route`` decorators::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:142\nmsgid \"or add a WSGI middleware that strips trailing slashes from all URLs::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:156\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:157\nmsgid \"Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>\"\nmsgstr \"\"\n\n#: ../../recipes.rst:161\nmsgid \"Keep-alive requests\"\nmsgstr \"\"\n\n#: ../../recipes.rst:165\nmsgid \"For a more detailed explanation, see :doc:`async`.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:167\nmsgid \"\"\n\"Several \\\"push\\\" mechanisms like XHR multipart need the ability to write \"\n\"response data without closing the connection in conjunction with the \"\n\"response header \\\"Connection: keep-alive\\\". WSGI does not easily lend itself\"\n\" to this behavior, but it is still possible to do so in Bottle by using the \"\n\"gevent_ async framework. Here is a sample that works with either the gevent_\"\n\" HTTP server or the paste_ HTTP server (it may work with others, but I have \"\n\"not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the\"\n\" paste_ server::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:184\nmsgid \"\"\n\"If you browse to ``http://localhost:8080/stream``, you should see 'START', \"\n\"'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to \"\n\"see them all at once).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:187\nmsgid \"Gzip Compression in Bottle\"\nmsgstr \"\"\n\n#: ../../recipes.rst:190\nmsgid \"For a detailed discussion, see compression_\"\nmsgstr \"\"\n\n#: ../../recipes.rst:192\nmsgid \"\"\n\"A common feature request is for Bottle to support Gzip compression, which \"\n\"speeds up sites by compressing static resources (like CSS and JS files) \"\n\"during a request.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:194\nmsgid \"\"\n\"Supporting Gzip compression is not a straightforward proposition, due to a \"\n\"number of corner cases that crop up frequently. A proper Gzip implementation\"\n\" must:\"\nmsgstr \"\"\n\n#: ../../recipes.rst:196\nmsgid \"Compress on the fly and be fast doing so.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:197\nmsgid \"Do not compress for browsers that don't support it.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:198\nmsgid \"Do not compress files that are compressed already (images, videos).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:199\nmsgid \"Do not compress dynamic files.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:200\nmsgid \"Support two differed compression algorithms (gzip and deflate).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:201\nmsgid \"Cache compressed files that don't change often.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:202\nmsgid \"De-validate the cache if one of the files changed anyway.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:203\nmsgid \"Make sure the cache does not get to big.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:204\nmsgid \"\"\n\"Do not cache small files because a disk seek would take longer than on-the-\"\n\"fly compression.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:206\nmsgid \"\"\n\"Because of these requirements, it is the recommendation of the Bottle \"\n\"project that Gzip compression is best handled by the WSGI server Bottle runs\"\n\" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware \"\n\"that can be used to accomplish this.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:210\nmsgid \"Using the hooks plugin\"\nmsgstr \"\"\n\n#: ../../recipes.rst:212\nmsgid \"\"\n\"For example, if you want to allow Cross-Origin Resource Sharing for the \"\n\"content returned by all of your URL, you can use the hook decorator and \"\n\"setup a callback function::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:230\nmsgid \"\"\n\"You can also use the ``before_request`` to take an action before every \"\n\"function gets called.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:235\nmsgid \"Using Bottle with Heroku\"\nmsgstr \"\"\n\n#: ../../recipes.rst:237\nmsgid \"\"\n\"Heroku_, a popular cloud application platform now provides support for \"\n\"running Python applications on their infastructure.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:240\nmsgid \"\"\n\"This recipe is based upon the `Heroku Quickstart \"\n\"<http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific \"\n\"code replacing the `Write Your App \"\n\"<http://devcenter.heroku.com/articles/python#write_your_app>`_ section of \"\n\"the `Getting Started with Python on Heroku/Cedar \"\n\"<http://devcenter.heroku.com/articles/python>`_ guide::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:256\nmsgid \"\"\n\"Heroku's app stack passes the port that the application needs to listen on \"\n\"for requests, using the `os.environ` dictionary.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/routing.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../routing.rst:3\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../routing.rst:5\nmsgid \"\"\n\"Bottle uses a powerful routing engine to find the right callback for each \"\n\"request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This \"\n\"document covers advanced techniques and rule mechanics in detail.\"\nmsgstr \"\"\n\n#: ../../routing.rst:8\nmsgid \"Rule Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:10\nmsgid \"\"\n\"The :class:`Router` distinguishes between two basic types of routes: \"\n\"**static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. \"\n\"``/hello/<name>``). A route that contains one or more *wildcards* it is \"\n\"considered dynamic. All other routes are static.\"\nmsgstr \"\"\n\n#: ../../routing.rst:14\nmsgid \"\"\n\"The simplest form of a wildcard consists of a name enclosed in angle \"\n\"brackets (e.g. ``<name>``). The name should be unique for a given route and \"\n\"form a valid python identifier (alphanumeric, starting with a letter). This \"\n\"is because wildcards are used as keyword arguments for the request callback \"\n\"later.\"\nmsgstr \"\"\n\n#: ../../routing.rst:16\nmsgid \"\"\n\"Each wildcard matches one or more characters, but stops at the first slash \"\n\"(``/``). This equals a regular expression of ``[^/]+`` and ensures that only\"\n\" one path segment is matched and routes with more than one wildcard stay \"\n\"unambiguous.\"\nmsgstr \"\"\n\n#: ../../routing.rst:18\nmsgid \"The rule ``/<action>/<item>`` matches as follows:\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Path\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Result\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"/save/123\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"``{'action': 'save', 'item': '123'}``\"\nmsgstr \"\"\n\n#: ../../routing.rst:24\nmsgid \"/save/123/\"\nmsgstr \"\"\n\n#: ../../routing.rst:24 ../../routing.rst:25 ../../routing.rst:26\nmsgid \"`No Match`\"\nmsgstr \"\"\n\n#: ../../routing.rst:25\nmsgid \"/save/\"\nmsgstr \"\"\n\n#: ../../routing.rst:26\nmsgid \"//123\"\nmsgstr \"\"\n\n#: ../../routing.rst:29\nmsgid \"\"\n\"You can change the exact behaviour in many ways using filters. This is \"\n\"described in the next section.\"\nmsgstr \"\"\n\n#: ../../routing.rst:32\nmsgid \"Wildcard Filters\"\nmsgstr \"\"\n\n#: ../../routing.rst:36\nmsgid \"\"\n\"Filters are used to define more specific wildcards, and/or transform the \"\n\"matched part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../routing.rst:38\nmsgid \"The following standard filters are implemented:\"\nmsgstr \"\"\n\n#: ../../routing.rst:40\nmsgid \"**:int** matches (signed) digits and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../routing.rst:41\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../routing.rst:42\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and may be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../routing.rst:43\nmsgid \"\"\n\"**:re[:exp]** allows you to specify a custom regular expression in the \"\n\"config field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../routing.rst:45\nmsgid \"\"\n\"You can add your own filters to the router. All you need is a function that \"\n\"returns three elements: A regular expression string, a callable to convert \"\n\"the URL fragment to a python value, and a callable that does the opposite. \"\n\"The filter function is called with the configuration string as the only \"\n\"parameter and may parse it as needed::\"\nmsgstr \"\"\n\n#: ../../routing.rst:71\nmsgid \"Legacy Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:75\nmsgid \"\"\n\"The new rule syntax was introduce in **Bottle 0.10** to simplify some common\"\n\" use cases, but the old syntax still works and you can find lot code \"\n\"examples still using it. The differences are best described by example:\"\nmsgstr \"\"\n\n#: ../../routing.rst:78\nmsgid \"Old Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:78\nmsgid \"New Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:80\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../routing.rst:80\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:81\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:81\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:83\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../routing.rst:83\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"\"\n\"Try to avoid the old syntax in future projects if you can. It is not \"\n\"currently deprecated, but will be eventually.\"\nmsgstr \"\"\n\n#: ../../routing.rst:91\nmsgid \"Explicit routing configuration\"\nmsgstr \"\"\n\n#: ../../routing.rst:93\nmsgid \"\"\n\"Route decorator can also be directly called as method. This way provides \"\n\"flexibility in complex setups, allowing you to directly control, when and \"\n\"how routing configuration done.\"\nmsgstr \"\"\n\n#: ../../routing.rst:95\nmsgid \"\"\n\"Here is a basic example of explicit routing configuration for default bottle\"\n\" application::\"\nmsgstr \"\"\n\n#: ../../routing.rst:101\nmsgid \"\"\n\"In fact, any :class:`Bottle` instance routing can be configured same way::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/stpl.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../stpl.rst:3\nmsgid \"SimpleTemplate Engine\"\nmsgstr \"\"\n\n#: ../../stpl.rst:7\nmsgid \"\"\n\"Bottle comes with a fast, powerful and easy to learn built-in template \"\n\"engine called *SimpleTemplate* or *stpl* for short. It is the default engine\"\n\" used by the :func:`view` and :func:`template` helpers but can be used as a \"\n\"stand-alone general purpose template engine too. This document explains the \"\n\"template syntax and shows examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:10\nmsgid \"Basic API Usage:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:11\nmsgid \":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:18\nmsgid \"\"\n\"In this document we use the :func:`template` helper in examples for the sake\"\n\" of simplicity::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:24\nmsgid \"\"\n\"You can also pass a dictionary into the template using keyword arguments::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:31\nmsgid \"\"\n\"Just keep in mind that compiling and rendering templates are two different \"\n\"actions, even if the :func:`template` helper hides this fact. Templates are \"\n\"usually compiled only once and cached internally, but rendered many times \"\n\"with different keyword arguments.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:34\nmsgid \":class:`SimpleTemplate` Syntax\"\nmsgstr \"\"\n\n#: ../../stpl.rst:36\nmsgid \"\"\n\"Python is a very powerful language but its whitespace-aware syntax makes it \"\n\"difficult to use as a template language. SimpleTemplate removes some of \"\n\"these restrictions and allows you to write clean, readable and maintainable \"\n\"templates while preserving full access to the features, libraries and speed \"\n\"of the Python language.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:40\nmsgid \"\"\n\"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and \"\n\"is executed on each :meth:`SimpleTemplate.render` call. Do not render \"\n\"untrusted templates! They may contain and execute harmful python code.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:43\nmsgid \"Inline Expressions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:45\nmsgid \"\"\n\"You already learned the use of the ``{{...}}`` syntax from the \\\"Hello \"\n\"World!\\\" example above, but there is more: any python expression is allowed \"\n\"within the curly brackets as long as it evaluates to a string or something \"\n\"that has a string representation::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:54\nmsgid \"\"\n\"The contained python expression is executed at render-time and has access to\"\n\" all keyword arguments passed to the :meth:`SimpleTemplate.render` method. \"\n\"HTML special characters are escaped automatically to prevent `XSS \"\n\"<http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start\"\n\" the expression with an exclamation mark to disable escaping for that \"\n\"expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:62\nmsgid \"Embedded python code\"\nmsgstr \"\"\n\n#: ../../stpl.rst:66\nmsgid \"\"\n\"The template engine allows you to embed lines or blocks of python code \"\n\"within your template. Code lines start with ``%`` and code blocks are \"\n\"surrounded by ``<%`` and ``%>`` tokens::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:76\nmsgid \"\"\n\"Embedded python code follows regular python syntax, but with two additional \"\n\"syntax rules:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:78\nmsgid \"\"\n\"**Indentation is ignored.** You can put as much whitespace in front of \"\n\"statements as you want. This allows you to align your code with the \"\n\"surrounding markup and can greatly improve readability.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:79\nmsgid \"\"\n\"Blocks that are normally indented now have to be closed explicitly with an \"\n\"``end`` keyword.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:89\nmsgid \"\"\n\"Both the ``%`` and the ``<%`` tokens are only recognized if they are the \"\n\"first non-whitespace characters in a line. You don't have to escape them if \"\n\"they appear mid-text in your template markup. Only if a line of text starts \"\n\"with one of these tokens, you have to escape it with a backslash. In the \"\n\"rare case where the backslash + token combination appears in your markup at \"\n\"the beginning of a line, you can always help yourself with a string literal \"\n\"in an inline expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:96\nmsgid \"\"\n\"If you find yourself to escape a lot, consider using :ref:`custom tokens \"\n\"<stpl-custom-tokens>`.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:99\nmsgid \"Whitespace Control\"\nmsgstr \"\"\n\n#: ../../stpl.rst:101\nmsgid \"\"\n\"Code blocks and code lines always span the whole line. Whitespace in front \"\n\"of after a code segment is stripped away. You won't see empty lines or \"\n\"dangling whitespace in your template because of embedded code::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:109\nmsgid \"This snippet renders to clean and compact html::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:115\nmsgid \"\"\n\"But embedding code still requires you to start a new line, which may not \"\n\"what you want to see in your rendered template. To skip the newline in front\"\n\" of a code segment, end the text line with a double-backslash::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:123\nmsgid \"THis time the rendered template looks like this::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:127\nmsgid \"\"\n\"This only works directly in front of code segments. In all other places you \"\n\"can control the whitespace yourself and don't need any special syntax.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:130\nmsgid \"Template Functions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:132\nmsgid \"\"\n\"Each template is preloaded with a bunch of functions that help with the most\"\n\" common use cases. These functions are always available. You don't have to \"\n\"import or provide them yourself. For everything not covered here there are \"\n\"probably good python libraries available. Remember that you can ``import`` \"\n\"anything you want within your templates. They are python programs after all.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:136\nmsgid \"\"\n\"Prior to this release, :func:`include` and :func:`rebase` were syntax \"\n\"keywords, not functions.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:141\nmsgid \"\"\n\"Render a sub-template with the specified variables and insert the resulting \"\n\"text into the current template. The function returns a dictionary containing\"\n\" the local variables passed to or defined within the sub-template::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:149\nmsgid \"\"\n\"Mark the current template to be later included into a different template. \"\n\"After the current template is rendered, its resulting text is stored in a \"\n\"variable named ``base`` and passed to the base-template, which is then \"\n\"rendered. This can be used to `wrap` a template with surrounding text, or \"\n\"simulate the inheritance feature found in other template engines::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:154\nmsgid \"This can be combined with the following ``base.tpl``::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:166\nmsgid \"\"\n\"Accessing undefined variables in a template raises :exc:`NameError` and \"\n\"stops rendering immediately. This is standard python behavior and nothing \"\n\"new, but vanilla python lacks an easy way to check the availability of a \"\n\"variable. This quickly gets annoying if you want to support flexible inputs \"\n\"or use the same template in different situations. These functions may help:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:174\nmsgid \"\"\n\"Return True if the variable is defined in the current template namespace, \"\n\"False otherwise.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:179\nmsgid \"Return the variable, or a default value.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:183\nmsgid \"\"\n\"If the variable is not defined, create it with the given default value. \"\n\"Return the variable.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:186\nmsgid \"\"\n\"Here is an example that uses all three functions to implement optional \"\n\"template variables in different ways::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:200\nmsgid \":class:`SimpleTemplate` API\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.render:1\nmsgid \"Render the template using keyword arguments as local variables.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/tutorial.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../tutorial.rst:24\nmsgid \"Tutorial\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:26\nmsgid \"\"\n\"This tutorial introduces you to the concepts and features of the Bottle web \"\n\"framework and covers basic and advanced topics alike. You can read it from \"\n\"start to end, or use it as a reference later on. The automatically generated\"\n\" :doc:`api` may be interesting for you, too. It covers more details, but \"\n\"explains less than this tutorial. Solutions for the most common questions \"\n\"can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If \"\n\"you need any help, join our `mailing list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:31\nmsgid \"Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:33\nmsgid \"\"\n\"Bottle does not depend on any external libraries. You can just download \"\n\"`bottle.py </bottle.py>`_ into your project directory and start coding:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:39\nmsgid \"\"\n\"This will get you the latest development snapshot that includes all the new \"\n\"features. If you prefer a more stable environment, you should stick with the\"\n\" stable releases. These are available on `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_ and can be installed via \"\n\":command:`pip` (recommended), :command:`easy_install` or your package \"\n\"manager:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:47\nmsgid \"\"\n\"Either way, you'll need Python 2.5 or newer (including 3.x) to run bottle \"\n\"applications. If you do not have permissions to install packages system-wide\"\n\" or simply don't want to, create a `virtualenv \"\n\"<http://pypi.python.org/pypi/virtualenv>`_ first:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:55\nmsgid \"Or, if virtualenv is not installed on your system:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:67\nmsgid \"Quickstart: \\\"Hello World\\\"\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:69\nmsgid \"\"\n\"This tutorial assumes you have Bottle either :ref:`installed <installation>`\"\n\" or copied into your project directory. Let's start with a very basic \"\n\"\\\"Hello World\\\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:79\nmsgid \"\"\n\"This is it. Run this script, visit http://localhost:8080/hello and you will \"\n\"see \\\"Hello World!\\\" in your browser. Here is how it works:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:81\nmsgid \"\"\n\"The :func:`route` decorator binds a piece of code to an URL path. In this \"\n\"case, we link the ``/hello`` path to the ``hello()`` function. This is \"\n\"called a `route` (hence the decorator name) and is the most important \"\n\"concept of this framework. You can define as many routes as you want. \"\n\"Whenever a browser requests a URL, the associated function is called and the\"\n\" return value is sent back to the browser. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:83\nmsgid \"\"\n\"The :func:`run` call in the last line starts a built-in development server. \"\n\"It runs on ``localhost`` port ``8080`` and serves requests until you hit \"\n\":kbd:`Control-c`. You can switch the server backend later, but for now a \"\n\"development server is all we need. It requires no setup at all and is an \"\n\"incredibly painless way to get your application up and running for local \"\n\"tests.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:85\nmsgid \"\"\n\"The :ref:`tutorial-debugging` is very helpful during early development, but \"\n\"should be switched off for public applications. Keep that in mind.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:87\nmsgid \"\"\n\"Of course this is a very simple example, but it shows the basic concept of \"\n\"how applications are built with Bottle. Continue reading and you'll see what\"\n\" else is possible.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:92\nmsgid \"The Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:94\nmsgid \"\"\n\"For the sake of simplicity, most examples in this tutorial use a module-\"\n\"level :func:`route` decorator to define routes. This adds routes to a global\"\n\" \\\"default application\\\", an instance of :class:`Bottle` that is \"\n\"automatically created the first time you call :func:`route`. Several other \"\n\"module-level decorators and functions relate to this default application, \"\n\"but if you prefer a more object oriented approach and don't mind the extra \"\n\"typing, you can create a separate application object and use that instead of\"\n\" the global one::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:106\nmsgid \"\"\n\"The object-oriented approach is further described in the :ref:`default-app` \"\n\"section. Just keep in mind that you have a choice.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:114\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:116\nmsgid \"\"\n\"In the last chapter we built a very simple web application with only a \"\n\"single route. Here is the routing part of the \\\"Hello World\\\" example \"\n\"again::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:122\nmsgid \"\"\n\"The :func:`route` decorator links an URL path to a callback function, and \"\n\"adds a new route to the :ref:`default application <tutorial-default>`. An \"\n\"application with just one route is kind of boring, though. Let's add some \"\n\"more (don't forget ``from bottle import template``)::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:129\nmsgid \"\"\n\"This example demonstrates two things: You can bind more than one route to a \"\n\"single callback, and you can add wildcards to URLs and access them via \"\n\"keyword arguments.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:136\nmsgid \"Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:138\nmsgid \"\"\n\"Routes that contain wildcards are called `dynamic routes` (as opposed to \"\n\"`static routes`) and match more than one URL at the same time. A simple \"\n\"wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and\"\n\" accepts one or more characters up to the next slash (``/``). For example, \"\n\"the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as\"\n\" ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:140\nmsgid \"\"\n\"Each wildcard passes the covered part of the URL as a keyword argument to \"\n\"the request callback. You can use them right away and implement RESTful, \"\n\"nice-looking and meaningful URLs with ease. Here are some other examples \"\n\"along with the URLs they'd match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:152\nmsgid \"\"\n\"Filters are used to define more specific wildcards, and/or transform the \"\n\"covered part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:154\nmsgid \"\"\n\"The following filters are implemented by default and more may be added:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:156\nmsgid \"\"\n\"**:int** matches (signed) digits only and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:157\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:158\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and can be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:159\nmsgid \"\"\n\"**:re** allows you to specify a custom regular expression in the config \"\n\"field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:161\nmsgid \"Let's have a look at some practical examples::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:175\nmsgid \"You can add your own filters as well. See :doc:`routing` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:179\nmsgid \"\"\n\"The new rule syntax was introduced in **Bottle 0.10** to simplify some \"\n\"common use cases, but the old syntax still works and you can find a lot of \"\n\"code examples still using it. The differences are best described by example:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:182\nmsgid \"Old Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:182\nmsgid \"New Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:184\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:184\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:185\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:185\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:186\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:186\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:187\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:187\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:190\nmsgid \"\"\n\"Try to avoid the old syntax in future projects if you can. It is not \"\n\"currently deprecated, but will be eventually.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:194\nmsgid \"HTTP Request Methods\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:198\nmsgid \"\"\n\"The HTTP protocol defines several `request methods`__ (sometimes referred to\"\n\" as \\\"verbs\\\") for different tasks. GET is the default for all routes with \"\n\"no other method specified. These routes will match GET requests only. To \"\n\"handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` \"\n\"keyword argument to the :func:`route` decorator or use one of the four \"\n\"alternative decorators: :func:`get`, :func:`post`, :func:`put`, \"\n\":func:`delete` or :func:`patch`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:200\nmsgid \"\"\n\"The POST method is commonly used for HTML form submission. This example \"\n\"shows how to handle a login form using POST::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:223\nmsgid \"\"\n\"In this example the ``/login`` URL is linked to two distinct callbacks, one \"\n\"for GET requests and another for POST requests. The first one displays a \"\n\"HTML form to the user. The second callback is invoked on a form submission \"\n\"and checks the login credentials the user entered into the form. The use of \"\n\":attr:`Request.forms` is further described in the :ref:`tutorial-request` \"\n\"section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:226\nmsgid \"Special Methods: HEAD and ANY\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:227\nmsgid \"\"\n\"The HEAD method is used to ask for the response identical to the one that \"\n\"would correspond to a GET request, but without the response body. This is \"\n\"useful for retrieving meta-information about a resource without having to \"\n\"download the entire document. Bottle handles these requests automatically by\"\n\" falling back to the corresponding GET route and cutting off the request \"\n\"body, if present. You don't have to specify any HEAD routes yourself.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:229\nmsgid \"\"\n\"Additionally, the non-standard ANY method works as a low priority fallback: \"\n\"Routes that listen to ANY will match requests regardless of their HTTP \"\n\"method but only if no other more specific route is defined. This is helpful \"\n\"for *proxy-routes* that redirect requests to more specific sub-applications.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:231\nmsgid \"\"\n\"To sum it up: HEAD requests fall back to GET routes and all requests fall \"\n\"back to ANY routes, but only if there is no matching route for the original \"\n\"request method. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:236\nmsgid \"Routing Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:238\nmsgid \"\"\n\"Static files such as images or CSS files are not served automatically. You \"\n\"have to add a route and a callback to control which files get served and \"\n\"where to find them::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:245\nmsgid \"\"\n\"The :func:`static_file` function is a helper to serve files in a safe and \"\n\"convenient way (see :ref:`tutorial-static-files`). This example is limited \"\n\"to files directly within the ``/path/to/your/static/files`` directory \"\n\"because the ``<filename>`` wildcard won't match a path with a slash in it. \"\n\"To serve files in subdirectories, change the wildcard to use the `path` \"\n\"filter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:251\nmsgid \"\"\n\"Be careful when specifying a relative root-path such as \"\n\"``root='./static/files'``. The working directory (``./``) and the project \"\n\"directory are not always the same.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:259\nmsgid \"Error Pages\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:261\nmsgid \"\"\n\"If anything goes wrong, Bottle displays an informative but fairly plain \"\n\"error page. You can override the default for a specific HTTP status code \"\n\"with the :func:`error` decorator::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:268\nmsgid \"\"\n\"From now on, `404 File not Found` errors will display a custom error page to\"\n\" the user. The only parameter passed to the error-handler is an instance of \"\n\":exc:`HTTPError`. Apart from that, an error-handler is quite similar to a \"\n\"regular request callback. You can read from :data:`request`, write to \"\n\":data:`response` and return any supported data-type except for \"\n\":exc:`HTTPError` instances.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"\"\n\"Error handlers are used only if your application returns or raises an \"\n\":exc:`HTTPError` exception (:func:`abort` does just that). Changing \"\n\":attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the \"\n\"error handler.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:280\nmsgid \"Generating content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"\"\n\"In pure WSGI, the range of types you may return from your application is \"\n\"very limited. Applications must return an iterable yielding byte strings. \"\n\"You may return a string (because strings are iterable) but this causes most \"\n\"servers to transmit your content char by char. Unicode strings are not \"\n\"allowed at all. This is not very practical.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:284\nmsgid \"\"\n\"Bottle is much more flexible and supports a wide range of types. It even \"\n\"adds a ``Content-Length`` header if possible and encodes unicode \"\n\"automatically, so you don't have to. What follows is a list of data types \"\n\"you may return from your application callbacks and a short description of \"\n\"how these are handled by the framework:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:287\nmsgid \"Dictionaries\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:287\nmsgid \"\"\n\"As mentioned above, Python dictionaries (or subclasses thereof) are \"\n\"automatically transformed into JSON strings and returned to the browser with\"\n\" the ``Content-Type`` header set to ``application/json``. This makes it easy\"\n\" to implement json-based APIs. Data formats other than json are supported \"\n\"too. See the :ref:`tutorial-output-filter` to learn more.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:290\nmsgid \"Empty Strings, ``False``, ``None`` or other non-true values:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:290\nmsgid \"\"\n\"These produce an empty output with the ``Content-Length`` header set to 0.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:293\nmsgid \"Unicode strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:293\nmsgid \"\"\n\"Unicode strings (or iterables yielding unicode strings) are automatically \"\n\"encoded with the codec specified in the ``Content-Type`` header (utf8 by \"\n\"default) and then treated as normal byte strings (see below).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:296\nmsgid \"Byte strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:296\nmsgid \"\"\n\"Bottle returns strings as a whole (instead of iterating over each char) and \"\n\"adds a ``Content-Length`` header based on the string length. Lists of byte \"\n\"strings are joined first. Other iterables yielding byte strings are not \"\n\"joined because they may grow too big to fit into memory. The ``Content-\"\n\"Length`` header is not set in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:299\nmsgid \"Instances of :exc:`HTTPError` or :exc:`HTTPResponse`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:299\nmsgid \"\"\n\"Returning these has the same effect as when raising them as an exception. In\"\n\" case of an :exc:`HTTPError`, the error handler is applied. See :ref\"\n\":`tutorial-errorhandling` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:302\nmsgid \"File objects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:302\nmsgid \"\"\n\"Everything that has a ``.read()`` method is treated as a file or file-like \"\n\"object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI \"\n\"server framework. Some WSGI server implementations can make use of optimized\"\n\" system calls (sendfile) to transmit files more efficiently. In other cases \"\n\"this just iterates over chunks that fit into memory. Optional headers such \"\n\"as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use \"\n\":func:`send_file` if possible. See :ref:`tutorial-static-files` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:305\nmsgid \"Iterables and generators\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:305\nmsgid \"\"\n\"You are allowed to use ``yield`` within your callbacks or return an \"\n\"iterable, as long as the iterable yields byte strings, unicode strings, \"\n\":exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not \"\n\"supported, sorry. Please note that the HTTP status code and the headers are \"\n\"sent to the browser as soon as the iterable yields its first non-empty \"\n\"value. Changing these later has no effect.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:307\nmsgid \"\"\n\"The ordering of this list is significant. You may for example return a \"\n\"subclass of :class:`str` with a ``read()`` method. It is still treated as a \"\n\"string instead of a file, because strings are handled first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:310\nmsgid \"Changing the Default Encoding\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:311\nmsgid \"\"\n\"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide\"\n\" how to encode unicode strings. This header defaults to ``text/html; \"\n\"charset=UTF8`` and can be changed using the :attr:`Response.content_type` \"\n\"attribute or by setting the :attr:`Response.charset` attribute directly. \"\n\"(The :class:`Response` object is described in the section :ref:`tutorial-\"\n\"response`.)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:326\nmsgid \"\"\n\"In some rare cases the Python encoding names differ from the names supported\"\n\" by the HTTP specification. Then, you have to do both: first set the \"\n\":attr:`Response.content_type` header (which is sent to the client unchanged)\"\n\" and then set the :attr:`Response.charset` attribute (which is used to \"\n\"encode unicode).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:331\nmsgid \"Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:333\nmsgid \"\"\n\"You can directly return file objects, but :func:`static_file` is the \"\n\"recommended way to serve static files. It automatically guesses a mime-type,\"\n\" adds a ``Last-Modified`` header, restricts paths to a ``root`` directory \"\n\"for security reasons and generates appropriate error responses (403 on \"\n\"permission errors, 404 on missing files). It even supports the ``If-\"\n\"Modified-Since`` header and eventually generates a ``304 Not Modified`` \"\n\"response. You can pass a custom MIME type to disable guessing.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:346\nmsgid \"\"\n\"You can raise the return value of :func:`static_file` as an exception if you\"\n\" really need to.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:349\nmsgid \"Forced Download\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:350\nmsgid \"\"\n\"Most browsers try to open downloaded files if the MIME type is known and \"\n\"assigned to an application (e.g. PDF files). If this is not what you want, \"\n\"you can force a download dialog and even suggest a filename to the user::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:356\nmsgid \"\"\n\"If the ``download`` parameter is just ``True``, the original filename is \"\n\"used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:361\nmsgid \"HTTP Errors and Redirects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:363\nmsgid \"\"\n\"The :func:`abort` function is a shortcut for generating HTTP error pages.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:372\nmsgid \"\"\n\"To redirect a client to a different URL, you can send a ``303 See Other`` \"\n\"response with the ``Location`` header set to the new URL. :func:`redirect` \"\n\"does that for you::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:379\nmsgid \"You may provide a different HTTP status code as a second parameter.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:382\nmsgid \"\"\n\"Both functions will interrupt your callback code by raising an \"\n\":exc:`HTTPError` exception.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:385\nmsgid \"Other Exceptions\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:386\nmsgid \"\"\n\"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will \"\n\"result in a ``500 Internal Server Error`` response, so they won't crash your\"\n\" WSGI server. You can turn off this behavior to handle exceptions in your \"\n\"middleware by setting ``bottle.app().catchall`` to ``False``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:392\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:394\nmsgid \"\"\n\"Response metadata such as the HTTP status code, response headers and cookies\"\n\" are stored in an object called :data:`response` up to the point where they \"\n\"are transmitted to the browser. You can manipulate these metadata directly \"\n\"or use the predefined helper methods to do so. The full API and feature list\"\n\" is described in the API section (see :class:`Response`), but the most \"\n\"common use cases and features are covered here, too.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:397\nmsgid \"Status Code\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:398\nmsgid \"\"\n\"The `HTTP status code <http_code>`_ controls the behavior of the browser and\"\n\" defaults to ``200 OK``. In most scenarios you won't need to set the \"\n\":attr:`Response.status` attribute manually, but use the :func:`abort` helper\"\n\" or return an :exc:`HTTPResponse` instance with the appropriate status code.\"\n\" Any integer is allowed, but codes other than the ones defined by the `HTTP \"\n\"specification <http_code>`_ will only confuse the browser and break \"\n\"standards.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:401\nmsgid \"Response Header\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:402\nmsgid \"\"\n\"Response headers such as ``Cache-Control`` or ``Location`` are defined via \"\n\":meth:`Response.set_header`. This method takes two parameters, a header name\"\n\" and a value. The name part is case-insensitive::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:409\nmsgid \"\"\n\"Most headers are unique, meaning that only one header per name is send to \"\n\"the client. Some special headers however are allowed to appear more than \"\n\"once in a response. To add an additional header, use \"\n\":meth:`Response.add_header` instead of :meth:`Response.set_header`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:414\nmsgid \"\"\n\"Please note that this is just an example. If you want to work with cookies, \"\n\"read :ref:`ahead <tutorial-cookies>`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:420 ../../tutorial.rst:549\nmsgid \"Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:422\nmsgid \"\"\n\"A cookie is a named piece of text stored in the user's browser profile. You \"\n\"can access previously defined cookies via :meth:`Request.get_cookie` and set\"\n\" new cookies with :meth:`Response.set_cookie`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:432\nmsgid \"\"\n\"The :meth:`Response.set_cookie` method accepts a number of additional \"\n\"keyword arguments that control the cookies lifetime and behavior. Some of \"\n\"the most common settings are described here:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:434\nmsgid \"**max_age:**    Maximum age in seconds. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:435\nmsgid \"\"\n\"**expires:**    A datetime object or UNIX timestamp. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:436\nmsgid \"\"\n\"**domain:**     The domain that is allowed to read the cookie. (default: \"\n\"current domain)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:437\nmsgid \"**path:**       Limit the cookie to a given path (default: ``/``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:438\nmsgid \"**secure:**     Limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:439\nmsgid \"\"\n\"**httponly:**   Prevent client-side javascript to read this cookie (default:\"\n\" off, requires Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:441\nmsgid \"\"\n\"If neither `expires` nor `max_age` is set, the cookie expires at the end of \"\n\"the browser session or as soon as the browser window is closed. There are \"\n\"some other gotchas you should consider when using cookies:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:443\nmsgid \"Cookies are limited to 4 KB of text in most browsers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:444\nmsgid \"\"\n\"Some users configure their browsers to not accept cookies at all. Most \"\n\"search engines ignore cookies too. Make sure that your application still \"\n\"works without cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:445\nmsgid \"\"\n\"Cookies are stored at client side and are not encrypted in any way. Whatever\"\n\" you store in a cookie, the user can read it. Worse than that, an attacker \"\n\"might be able to steal a user's cookies through `XSS \"\n\"<http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_\"\n\" vulnerabilities on your side. Some viruses are known to read the browser \"\n\"cookies, too. Thus, never store confidential information in cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:446\nmsgid \"Cookies are easily forged by malicious clients. Do not trust cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:451\nmsgid \"Signed Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:452\nmsgid \"\"\n\"As mentioned above, cookies are easily forged by malicious clients. Bottle \"\n\"can cryptographically sign your cookies to prevent this kind of \"\n\"manipulation. All you have to do is to provide a signature key via the \"\n\"`secret` keyword argument whenever you read or set a cookie and keep that \"\n\"key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` \"\n\"if the cookie is not signed or the signature keys don't match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:472\nmsgid \"\"\n\"In addition, Bottle automatically pickles and unpickles any data stored to \"\n\"signed cookies. This allows you to store any pickle-able object (not only \"\n\"strings) to cookies, as long as the pickled data does not exceed the 4 KB \"\n\"limit.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:474\nmsgid \"\"\n\"Signed cookies are not encrypted (the client can still see the content) and \"\n\"not copy-protected (the client can restore an old cookie). The main \"\n\"intention is to make pickling and unpickling safe and prevent manipulation, \"\n\"not to store secret information at client side.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:487\nmsgid \"Request Data\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:489\nmsgid \"\"\n\"Cookies, HTTP header, HTML ``<form>`` fields and other request data is \"\n\"available through the global :data:`request` object. This special object \"\n\"always refers to the *current* request, even in multi-threaded environments \"\n\"where multiple client connections are handled at the same time::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:498\nmsgid \"\"\n\"The :data:`request` object is a subclass of :class:`BaseRequest` and has a \"\n\"very rich API to access data. We only cover the most commonly used features \"\n\"here, but it should be enough to get started.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:503\nmsgid \"Introducing :class:`FormsDict`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:505\nmsgid \"\"\n\"Bottle uses a special type of dictionary to store form data and cookies. \"\n\":class:`FormsDict` behaves like a normal dictionary, but has some additional\"\n\" features to make your life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:507\nmsgid \"\"\n\"**Attribute access**: All values in the dictionary are also accessible as \"\n\"attributes. These virtual attributes return unicode strings, even if the \"\n\"value is missing or unicode decoding fails. In that case, the string is \"\n\"empty, but still present::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:522\nmsgid \"\"\n\"**Multiple values per key:** :class:`FormsDict` is a subclass of \"\n\":class:`MultiDict` and can store more than one value per key. The standard \"\n\"dictionary access methods will only return a single value, but the \"\n\":meth:`~MultiDict.getall` method returns a (possibly empty) list of all \"\n\"values for a specific key::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:527\nmsgid \"\"\n\"**WTForms support:** Some libraries (e.g. `WTForms \"\n\"<http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input.\"\n\" :meth:`FormsDict.decode` does that for you. It decodes all values and \"\n\"returns a copy of itself, while preserving multiple values per key and all \"\n\"the other features.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:531\nmsgid \"\"\n\"In **Python 2** all keys and values are byte-strings. If you need unicode, \"\n\"you can call :meth:`FormsDict.getunicode` or fetch values via attribute \"\n\"access. Both methods try to decode the string (default: utf8) and return an \"\n\"empty string if that fails. No need to catch :exc:`UnicodeError`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:538\nmsgid \"\"\n\"In **Python 3** all strings are unicode, but HTTP is a byte-based wire \"\n\"protocol. The server has to decode the byte strings somehow before they are \"\n\"passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 \"\n\"(aka latin1), a reversible single-byte codec that can be re-encoded with a \"\n\"different encoding later. Bottle does that for :meth:`FormsDict.getunicode` \"\n\"and attribute access, but not for the dict-access methods. These return the \"\n\"unchanged values as provided by the server implementation, which is probably\"\n\" not what you want.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:545\nmsgid \"\"\n\"If you need the whole dictionary with correctly decoded values (e.g. for \"\n\"WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:551\nmsgid \"\"\n\"Cookies are small pieces of text stored in the clients browser and sent back\"\n\" to the server with each request. They are useful to keep some state around \"\n\"for more than one request (HTTP itself is stateless), but should not be used\"\n\" for security related stuff. They can be easily forged by the client.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:553\nmsgid \"\"\n\"All cookies sent by the client are available through \"\n\":attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a \"\n\"simple cookie-based view counter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:563\nmsgid \"\"\n\"The :meth:`BaseRequest.get_cookie` method is a different way do access \"\n\"cookies. It supports decoding :ref:`signed cookies <tutorial-signed-\"\n\"cookies>` as described in a separate section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:566\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:568\nmsgid \"\"\n\"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or \"\n\"``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible \"\n\"through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict`\"\n\" is basically a dictionary with case-insensitive keys::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:580\nmsgid \"Query Variables\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:582\nmsgid \"\"\n\"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit\"\n\" a small number of key/value pairs to the server. You can use the \"\n\":attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these \"\n\"values and the :attr:`BaseRequest.query_string` attribute to get the whole \"\n\"string.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:595\nmsgid \"HTML `<form>` Handling\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:597\nmsgid \"\"\n\"Let us start from the beginning. In HTML, a typical ``<form>`` looks \"\n\"something like this:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:607\nmsgid \"\"\n\"The ``action`` attribute specifies the URL that will receive the form data. \"\n\"``method`` defines the HTTP method to use (``GET`` or ``POST``). With \"\n\"``method=\\\"get\\\"`` the form values are appended to the URL and available \"\n\"through :attr:`BaseRequest.query` as described above. This is considered \"\n\"insecure and has other limitations, so we use ``method=\\\"post\\\"`` here. If \"\n\"in doubt, use ``POST`` forms.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:609\nmsgid \"\"\n\"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms`\"\n\" as a :class:`FormsDict`. The server side code may look like this::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:632\nmsgid \"\"\n\"There are several other attributes used to access form data. Some of them \"\n\"combine values from different sources for easier access. The following table\"\n\" should give you a decent overview.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:635\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:635\nmsgid \"GET Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:635\nmsgid \"POST Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:635\nmsgid \"File Uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:637\nmsgid \":attr:`BaseRequest.query`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:637 ../../tutorial.rst:638 ../../tutorial.rst:639\n#: ../../tutorial.rst:640 ../../tutorial.rst:640 ../../tutorial.rst:641\n#: ../../tutorial.rst:642 ../../tutorial.rst:642\nmsgid \"yes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:637 ../../tutorial.rst:637 ../../tutorial.rst:638\n#: ../../tutorial.rst:638 ../../tutorial.rst:639 ../../tutorial.rst:639\n#: ../../tutorial.rst:640 ../../tutorial.rst:641 ../../tutorial.rst:641\n#: ../../tutorial.rst:642\nmsgid \"no\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:638\nmsgid \":attr:`BaseRequest.forms`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:639\nmsgid \":attr:`BaseRequest.files`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:640\nmsgid \":attr:`BaseRequest.params`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:641\nmsgid \":attr:`BaseRequest.GET`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:642\nmsgid \":attr:`BaseRequest.POST`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:647\nmsgid \"File uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:649\nmsgid \"\"\n\"To support file uploads, we have to change the ``<form>`` tag a bit. First, \"\n\"we tell the browser to encode the form data in a different way by adding an \"\n\"``enctype=\\\"multipart/form-data\\\"`` attribute to the ``<form>`` tag. Then, \"\n\"we add ``<input type=\\\"file\\\" />`` tags to allow the user to select a file. \"\n\"Here is an example:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:659\nmsgid \"\"\n\"Bottle stores file uploads in :attr:`BaseRequest.files` as \"\n\":class:`FileUpload` instances, along with some metadata about the upload. \"\n\"Let us assume you just want to save the file to disk::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:673\nmsgid \"\"\n\":attr:`FileUpload.filename` contains the name of the file on the clients \"\n\"file system, but is cleaned up and normalized to prevent bugs caused by \"\n\"unsupported characters or path segments in the filename. If you need the \"\n\"unmodified name as sent by the client, have a look at \"\n\":attr:`FileUpload.raw_filename`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:675\nmsgid \"\"\n\"The :attr:`FileUpload.save` method is highly recommended if you want to \"\n\"store the file to disk. It prevents some common errors (e.g. it does not \"\n\"overwrite existing files unless you tell it to) and stores the file in a \"\n\"memory efficient way. You can access the file object directly via \"\n\":attr:`FileUpload.file`. Just be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:679\nmsgid \"JSON Content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:681\nmsgid \"\"\n\"Some JavaScript or REST clients send ``application/json`` content to the \"\n\"server. The :attr:`BaseRequest.json` attribute contains the parsed data \"\n\"structure, if available.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:685\nmsgid \"The raw request body\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:687\nmsgid \"\"\n\"You can access the raw body data as a file-like object via \"\n\":attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary \"\n\"file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` \"\n\"setting. In both cases the body is completely buffered before you can access\"\n\" the attribute. If you expect huge amounts of data and want to get direct \"\n\"unbuffered access to the stream, have a look at ``request['wsgi.input']``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:692\nmsgid \"WSGI Environment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:694\nmsgid \"\"\n\"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The \"\n\"original is stored in :attr:`BaseRequest.environ`, but the request object \"\n\"itself behaves like a dictionary, too. Most of the interesting data is \"\n\"exposed through special methods or attributes, but if you want to access \"\n\"`WSGI environ variables <WSGI specification>`_ directly, you can do so::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:712\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:714\nmsgid \"\"\n\"Bottle comes with a fast and powerful built-in template engine called \"\n\":doc:`stpl`. To render a template you can use the :func:`template` function \"\n\"or the :func:`view` decorator. All you have to do is to provide the name of \"\n\"the template and the variables you want to pass to the template as keyword \"\n\"arguments. Here’s a simple example of how to render a template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:721\nmsgid \"\"\n\"This will load the template file ``hello_template.tpl`` and render it with \"\n\"the ``name`` variable set. Bottle will look for templates in the \"\n\"``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` \"\n\"list.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:723\nmsgid \"\"\n\"The :func:`view` decorator allows you to return a dictionary with the \"\n\"template variables instead of calling :func:`template`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:732\nmsgid \"Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:735\nmsgid \"\"\n\"The template syntax is a very thin layer around the Python language. Its \"\n\"main purpose is to ensure correct indentation of blocks, so you can format \"\n\"your template without worrying about indentation. Follow the link for a full\"\n\" syntax description: :doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:737\nmsgid \"Here is an example template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:748\nmsgid \"Caching\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:749\nmsgid \"\"\n\"Templates are cached in memory after compilation. Modifications made to the \"\n\"template files will have no affect until you clear the template cache. Call \"\n\"``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:759\nmsgid \"Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:763\nmsgid \"\"\n\"Bottle's core features cover most common use-cases, but as a micro-framework\"\n\" it has its limits. This is where \\\"Plugins\\\" come into play. Plugins add \"\n\"missing functionality to the framework, integrate third party libraries, or \"\n\"just automate some repetitive work.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:765\nmsgid \"\"\n\"We have a growing :doc:`/plugins/index` and most plugins are designed to be \"\n\"portable and re-usable across applications. The chances are high that your \"\n\"problem has already been solved and a ready-to-use plugin exists. If not, \"\n\"the :doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:767\nmsgid \"\"\n\"The effects and APIs of plugins are manifold and depend on the specific \"\n\"plugin. The ``SQLitePlugin`` plugin for example detects callbacks that \"\n\"require a ``db`` keyword argument and creates a fresh database connection \"\n\"object every time the callback is called. This makes it very convenient to \"\n\"use a database::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:787\nmsgid \"\"\n\"Other plugin may populate the thread-safe :data:`local` object, change \"\n\"details of the :data:`request` object, filter the data returned by the \"\n\"callback or bypass the callback completely. An \\\"auth\\\" plugin for example \"\n\"could check for a valid session and return a login page instead of calling \"\n\"the original callback. What happens exactly depends on the plugin.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:791\nmsgid \"Application-wide Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:793\nmsgid \"\"\n\"Plugins can be installed application-wide or just to some specific routes \"\n\"that need additional functionality. Most plugins can safely be installed to \"\n\"all routes and are smart enough to not add overhead to callbacks that do not\"\n\" need their functionality.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:795\nmsgid \"\"\n\"Let us take the ``SQLitePlugin`` plugin for example. It only affects route \"\n\"callbacks that need a database connection. Other routes are left alone. \"\n\"Because of this, we can install the plugin application-wide with no \"\n\"additional overhead.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:797\nmsgid \"\"\n\"To install a plugin, just call :func:`install` with the plugin as first \"\n\"argument::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:802\nmsgid \"\"\n\"The plugin is not applied to the route callbacks yet. This is delayed to \"\n\"make sure no routes are missed. You can install plugins first and add routes\"\n\" later, if you want to. The order of installed plugins is significant, \"\n\"though. If a plugin requires a database connection, you need to install the \"\n\"database plugin first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:806\nmsgid \"Uninstall Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:807\nmsgid \"\"\n\"You can use a name, class or instance to :func:`uninstall` a previously \"\n\"installed plugin::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:817\nmsgid \"\"\n\"Plugins can be installed and removed at any time, even at runtime while \"\n\"serving requests. This enables some neat tricks (installing slow debugging \"\n\"or profiling plugins only when needed) but should not be overused. Each time\"\n\" the list of plugins changes, the route cache is flushed and all plugins are\"\n\" re-applied.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:820\nmsgid \"\"\n\"The module-level :func:`install` and :func:`uninstall` functions affect the \"\n\":ref:`default-app`. To manage plugins for a specific application, use the \"\n\"corresponding methods on the :class:`Bottle` application object.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:824\nmsgid \"Route-specific Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:826\nmsgid \"\"\n\"The ``apply`` parameter of the :func:`route` decorator comes in handy if you\"\n\" want to install plugins to only a small number of routes::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:836\nmsgid \"Blacklisting Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:838\nmsgid \"\"\n\"You may want to explicitly disable a plugin for a number of routes. The \"\n\":func:`route` decorator has a ``skip`` parameter for this purpose::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:860\nmsgid \"\"\n\"The ``skip`` parameter accepts a single value or a list of values. You can \"\n\"use a name, class or instance to identify the plugin that is to be skipped. \"\n\"Set ``skip=True`` to skip all plugins at once.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:863\nmsgid \"Plugins and Sub-Applications\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:865\nmsgid \"\"\n\"Most plugins are specific to the application they were installed to. \"\n\"Consequently, they should not affect sub-applications mounted with \"\n\":meth:`Bottle.mount`. Here is an example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:876\nmsgid \"\"\n\"Whenever you mount an application, Bottle creates a proxy-route on the main-\"\n\"application that forwards all requests to the sub-application. Plugins are \"\n\"disabled for this kind of proxy-route by default. As a result, our \"\n\"(fictional) `WTForms` plugin affects the ``/contact`` route, but does not \"\n\"affect the routes of the ``/blog`` sub-application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:878\nmsgid \"\"\n\"This behavior is intended as a sane default, but can be overridden. The \"\n\"following example re-activates all plugins for a specific proxy-route::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:882\nmsgid \"\"\n\"But there is a snag: The plugin sees the whole sub-application as a single \"\n\"route, namely the proxy-route mentioned above. In order to affect each \"\n\"individual route of the sub-application, you have to install the plugin to \"\n\"the mounted application explicitly.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:887\nmsgid \"Development\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:889\nmsgid \"\"\n\"So you have learned the basics and want to write your own application? Here \"\n\"are some tips that might help you beeing more productive.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:895\nmsgid \"Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:897\nmsgid \"\"\n\"Bottle maintains a global stack of :class:`Bottle` instances and uses the \"\n\"top of the stack as a default for some of the module-level functions and \"\n\"decorators. The :func:`route` decorator, for example, is a shortcut for \"\n\"calling :meth:`Bottle.route` on the default application::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:905\nmsgid \"\"\n\"This is very convenient for small applications and saves you some typing, \"\n\"but also means that, as soon as your module is imported, routes are \"\n\"installed to the global default application. To avoid this kind of import \"\n\"side-effects, Bottle offers a second, more explicit way to build \"\n\"applications::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:915\nmsgid \"\"\n\"Separating the application object improves re-usability a lot, too. Other \"\n\"developers can safely import the ``app`` object from your module and use \"\n\":meth:`Bottle.mount` to merge applications together.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:920\nmsgid \"\"\n\"Starting with bottle-0.13 you can use :class:`Bottle` instances as context \"\n\"managers::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:945\nmsgid \"Debug Mode\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:947\nmsgid \"During early development, the debug mode can be very helpful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:955\nmsgid \"\"\n\"In this mode, Bottle is much more verbose and provides helpful debugging \"\n\"information whenever an error occurs. It also disables some optimisations \"\n\"that might get in your way and adds some checks that warn you about possible\"\n\" misconfiguration.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:957\nmsgid \"Here is an incomplete list of things that change in debug mode:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:959\nmsgid \"The default error page shows a traceback.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:960\nmsgid \"Templates are not cached.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:961\nmsgid \"Plugins are applied immediately.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:963\nmsgid \"Just make sure not to use the debug mode on a production server.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:966\nmsgid \"Auto Reloading\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:968\nmsgid \"\"\n\"During development, you have to restart the server a lot to test your recent\"\n\" changes. The auto reloader can do this for you. Every time you edit a \"\n\"module file, the reloader restarts the server process and loads the newest \"\n\"version of your code.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:978\nmsgid \"\"\n\"How it works: the main process will not start a server, but spawn a new \"\n\"child process using the same command line arguments used to start the main \"\n\"process. All module-level code is executed at least twice! Be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:983\nmsgid \"\"\n\"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` \"\n\"and start as a normal non-reloading app server. As soon as any of the loaded\"\n\" modules changes, the child process is terminated and re-spawned by the main\"\n\" process. Changes in template files will not trigger a reload. Please use \"\n\"debug mode to deactivate template caching.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:989\nmsgid \"\"\n\"The reloading depends on the ability to stop the child process. If you are \"\n\"running on Windows or any other operating system not supporting \"\n\"``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), \"\n\"``signal.SIGTERM`` is used to kill the child. Note that exit handlers and \"\n\"finally clauses, etc., are not executed after a ``SIGTERM``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:997\nmsgid \"Command Line Interface\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1001\nmsgid \"Starting with version 0.10 you can use bottle as a command-line tool:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1021\nmsgid \"\"\n\"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to \"\n\"``localhost:8080``. The other parameters should be self-explanatory.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1023\nmsgid \"\"\n\"Both plugins and applications are specified via import expressions. These \"\n\"consist of an import path (e.g. ``package.module``) and an expression to be \"\n\"evaluated in the namespace of that module, separated by a colon. See \"\n\":func:`load` for details. Here are some examples:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1044\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1046\nmsgid \"\"\n\"Bottle runs on the built-in `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_\"\n\"  by default. This non-threading HTTP server is perfectly fine for \"\n\"development and early production, but may become a performance bottleneck \"\n\"when server load increases.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1048\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded server::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1052\nmsgid \"\"\n\"This, and many other deployment options are described in a separate article:\"\n\" :doc:`deployment`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1060\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1063\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1065\nmsgid \"\"\n\"Programmer code that is to be called when some external action happens. In \"\n\"the context of web frameworks, the mapping between URL paths and application\"\n\" code is often achieved by specifying a callback function for each URL.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1069\nmsgid \"decorator\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1071\nmsgid \"\"\n\"A function returning another function, usually applied as a function \"\n\"transformation using the ``@decorator`` syntax. See `python documentation \"\n\"for function definition  \"\n\"<http://docs.python.org/reference/compound_stmts.html#function>`_ for more \"\n\"about decorators.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1072\nmsgid \"environ\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1074\nmsgid \"\"\n\"A structure where information about all documents under the root is saved, \"\n\"and used for cross-referencing.  The environment is pickled after the \"\n\"parsing stage, so that successive runs only need to read and parse new and \"\n\"changed documents.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1078\nmsgid \"handler function\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1080\nmsgid \"\"\n\"A function to handle some specific event or situation. In a web framework, \"\n\"the application is developed by attaching a handler function as callback for\"\n\" each specific URL comprising the application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1083\nmsgid \"source directory\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1085\nmsgid \"\"\n\"The directory which, including its subdirectories, contains all source files\"\n\" for one Sphinx project.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/_pot/tutorial_app.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../tutorial_app.rst:20\nmsgid \"Tutorial: Todo-List Application\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:24\nmsgid \"\"\n\"This tutorial is a work in progess and written by `noisefloor \"\n\"<http://github.com/noisefloor>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:27\nmsgid \"\"\n\"This tutorial should give a brief introduction to the Bottle_ WSGI \"\n\"Framework. The main goal is to be able, after reading through this tutorial,\"\n\" to create a project using Bottle. Within this document, not all abilities \"\n\"will be shown, but at least the main and important ones like routing, \"\n\"utilizing the Bottle template abilities to format output and handling GET / \"\n\"POST parameters.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:29\nmsgid \"\"\n\"To understand the content here, it is not necessary to have a basic \"\n\"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. \"\n\"You should have a fair understanding of the Python_ programming language. \"\n\"Furthermore, the example used in the tutorial retrieves and stores data in a\"\n\" SQL databse, so a basic idea about SQL helps, but is not a must to \"\n\"understand the concepts of Bottle. Right here, SQLite_ is used. The output \"\n\"of Bottle sent to the browser is formatted in some examples by the help of \"\n\"HTML. Thus, a basic idea about the common HTML tags does help as well.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:31\nmsgid \"\"\n\"For the sake of introducing Bottle, the Python code \\\"in between\\\" is kept \"\n\"short, in order to keep the focus. Also all code within the tutorial is \"\n\"working fine, but you may not necessarily use it \\\"in the wild\\\", e.g. on a \"\n\"public web server. In order to do so, you may add e.g. more error handling, \"\n\"protect the database with a password, test and escape the input etc.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:0\nmsgid \"Table of Contents\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:36\nmsgid \"Goals\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:38\nmsgid \"\"\n\"At the end of this tutorial, we will have a simple, web-based ToDo list. The\"\n\" list contains a text (with max 100 characters) and a status (0 for closed, \"\n\"1 for open) for each item. Through the web-based user interface, open items \"\n\"can be view and edited and new items can be added.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:40\nmsgid \"\"\n\"During development, all pages will be available on ``localhost`` only, but \"\n\"later on it will be shown how to adapt the application for a \\\"real\\\" \"\n\"server, including how to use with Apache's mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:42\nmsgid \"\"\n\"Bottle will do the routing and format the output, with the help of \"\n\"templates. The items of the list will be stored inside a SQLite database. \"\n\"Reading and  writing the database will be done by Python code.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:44\nmsgid \"\"\n\"We will end up with an application with the following pages and \"\n\"functionality:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:46\nmsgid \"start page ``http://localhost:8080/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:47\nmsgid \"adding new items to the list: ``http://localhost:8080/new``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:48\nmsgid \"page for editing items: ``http://localhost:8080/edit/:no``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:49\nmsgid \"\"\n\"validating data assigned by dynamic routes with the @validate decorator\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:50\nmsgid \"catching errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:53\nmsgid \"Before We Start...\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:57\nmsgid \"Install Bottle\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:58\nmsgid \"\"\n\"Assuming that you have a fairly new installation of Python (version 2.5 or \"\n\"higher), you only need to install Bottle in addition to that. Bottle has no \"\n\"other dependencies than Python itself.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:60\nmsgid \"\"\n\"You can either manually install Bottle or use Python's easy_install: \"\n\"``easy_install bottle``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:64\nmsgid \"Further Software Necessities\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:65\nmsgid \"\"\n\"As we use SQLite3 as a database, make sure it is installed. On Linux \"\n\"systems, most distributions have SQLite3 installed by default. SQLite is \"\n\"available for Windows and MacOS X as well and the `sqlite3` module is part \"\n\"of the python standard library.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:68\nmsgid \"Create An SQL Database\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:69\nmsgid \"\"\n\"First, we need to create the database we use later on. To do so, save the \"\n\"following script in your project directory and run it with python. You can \"\n\"use the interactive interpreter too::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:80\nmsgid \"\"\n\"This generates a database-file `todo.db` with tables called ``todo`` and \"\n\"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for \"\n\"each row, which is used later on to reference the rows. The column ``task`` \"\n\"holds the text which describes the task, it can be max 100 characters long. \"\n\"Finally, the column ``status`` is used to mark a task as open (value 1) or \"\n\"closed (value 0).\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:83\nmsgid \"Using Bottle for a Web-Based ToDo List\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:85\nmsgid \"\"\n\"Now it is time to introduce Bottle in order to create a web-based \"\n\"application. But first, we need to look into a basic concept of Bottle: \"\n\"routes.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:89\nmsgid \"Understanding routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:90\nmsgid \"\"\n\"Basically, each page visible in the browser is dynamically generated when \"\n\"the page address is called. Thus, there is no static content. That is \"\n\"exactly what is called a \\\"route\\\" within Bottle: a certain address on the \"\n\"server. So, for example, when the page ``http://localhost:8080/todo`` is \"\n\"called from the browser, Bottle \\\"grabs\\\" the call and checks if there is \"\n\"any (Python) function defined for the route \\\"todo\\\". If so, Bottle will \"\n\"execute the corresponding Python code and return its result.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:94\nmsgid \"First Step - Showing All Open Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:95\nmsgid \"\"\n\"So, after understanding the concept of routes, let's create the first one. \"\n\"The goal is to see all open items from the ToDo list::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:110\nmsgid \"\"\n\"Save the code a ``todo.py``, preferably in the same directory as the file \"\n\"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the \"\n\"``sqlite3.connect()`` statement.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:112\nmsgid \"\"\n\"Let's have a look what we just did: We imported the necessary module \"\n\"``sqlite3`` to access to SQLite database and from Bottle we imported \"\n\"``route`` and ``run``. The ``run()`` statement simply starts the web server \"\n\"included in Bottle. By default, the web server serves the pages on localhost\"\n\" and port 8080. Furthermore, we imported ``route``, which is the function \"\n\"responsible for Bottle's routing. As you can see, we defined one function, \"\n\"``todo_list()``, with a few lines of code reading from the database. The \"\n\"important point is the `decorator statement`_ ``@route('/todo')`` right \"\n\"before the ``def todo_list()`` statement. By doing this, we bind this \"\n\"function to the route ``/todo``, so every time the browsers calls \"\n\"``http://localhost:8080/todo``, Bottle returns the result of the function \"\n\"``todo_list()``. That is how routing within bottle works.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:114\nmsgid \"\"\n\"Actually you can bind more than one route to a function. So the following \"\n\"code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:121\nmsgid \"\"\n\"will work fine, too. What will not work is to bind one route to more than \"\n\"one function.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:123\nmsgid \"\"\n\"What you will see in the browser is what is returned, thus the value given \"\n\"by the ``return`` statement. In this example, we need to convert ``result`` \"\n\"in to a string by ``str()``, as Bottle expects a string or a list of strings\"\n\" from the return statement. But here, the result of the database query is a \"\n\"list of tuples, which is the standard defined by the `Python DB API`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:125\nmsgid \"\"\n\"Now, after understanding the little script above, it is time to execute it \"\n\"and watch the result yourself. Remember that on Linux- / Unix-based systems \"\n\"the file ``todo.py`` needs to be executable first. Then, just run ``python \"\n\"todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. \"\n\"In case you made no mistake writing the script, the output should look like \"\n\"this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:129\nmsgid \"\"\n\"If so - congratulations! You are now a successful user of Bottle. In case it\"\n\" did not work and you need to make some changes to the script, remember to \"\n\"stop Bottle serving the page, otherwise the revised version will not be \"\n\"loaded.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:131\nmsgid \"\"\n\"Actually, the output is not really exciting nor nice to read. It is the raw \"\n\"result returned from the SQL query.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:133\nmsgid \"\"\n\"So, in the next step we format the output in a nicer way. But before we do \"\n\"that, we make our life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:137\nmsgid \"Debugging and Auto-Reload\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:138\nmsgid \"\"\n\"Maybe you already noticed that Bottle sends a short error message to the \"\n\"browser in case something within the script is wrong, e.g. the connection to\"\n\" the database is not working. For debugging purposes it is quite helpful to \"\n\"get more details. This can be easily achieved by adding the following \"\n\"statement to the script::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:146\nmsgid \"\"\n\"By enabling \\\"debug\\\", you will get a full stacktrace of the Python \"\n\"interpreter, which usually contains useful information for finding bugs. \"\n\"Furthermore, templates (see below) are not cached, thus changes to templates\"\n\" will take effect without stopping the server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:150\nmsgid \"\"\n\"That ``debug(True)`` is supposed to be used for development only, it should \"\n\"*not* be used in production environments.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:154\nmsgid \"\"\n\"Another quite nice feature is auto-reloading, which is enabled by modifying \"\n\"the ``run()`` statement to\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:160\nmsgid \"\"\n\"This will automatically detect changes to the script and reload the new \"\n\"version once it is called again, without the need to stop and start the \"\n\"server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:162\nmsgid \"\"\n\"Again, the feature is mainly supposed to be used while developing, not on \"\n\"production systems.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:166\nmsgid \"Bottle Template To Format The Output\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:167\nmsgid \"\"\n\"Now let's have a look at casting the output of the script into a proper \"\n\"format.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:169\nmsgid \"\"\n\"Actually Bottle expects to receive a string or a list of strings from a \"\n\"function and returns them by the help of the built-in server to the browser.\"\n\" Bottle does not bother about the content of the string itself, so it can be\"\n\" text formatted with HTML markup, too.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:171\nmsgid \"\"\n\"Bottle brings its own easy-to-use template engine with it. Templates are \"\n\"stored as separate files having a ``.tpl`` extension. The template can be \"\n\"called then from within a function. Templates can contain any type of text \"\n\"(which will be most likely HTML-markup mixed with Python statements). \"\n\"Furthermore, templates can take arguments, e.g. the result set of a database\"\n\" query, which will be then formatted nicely within the template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:173\nmsgid \"\"\n\"Right here, we are going to cast the result of our query showing the open \"\n\"ToDo items into a simple table with two columns: the first column will \"\n\"contain the ID of the item, the second column the text. The result set is, \"\n\"as seen above, a list of tuples, each tuple contains one set of results.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:175\nmsgid \"To include the template in our example, just add the following lines::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:185\nmsgid \"\"\n\"So we do here two things: first, we import ``template`` from Bottle in order\"\n\" to be able to use templates. Second, we assign the output of the template \"\n\"``make_table`` to the variable ``output``, which is then returned. In \"\n\"addition to calling the template, we assign ``result``, which we received \"\n\"from the database query, to the variable ``rows``, which is later on used \"\n\"within the template. If necessary, you can assign more than one variable / \"\n\"value to a template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:187\nmsgid \"\"\n\"Templates always return a list of strings, thus there is no need to convert \"\n\"anything. Of course, we can save one line of code by writing ``return \"\n\"template('make_table', rows=result)``, which gives exactly the same result \"\n\"as above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:189\nmsgid \"\"\n\"Now it is time to write the corresponding template, which looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:203\nmsgid \"\"\n\"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` \"\n\"is stored.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:205\nmsgid \"\"\n\"Let's have a look at the code: every line starting with % is interpreted as \"\n\"Python code. Please note that, of course, only valid Python statements are \"\n\"allowed, otherwise the template will raise an exception, just as any other \"\n\"Python code. The other lines are plain HTML markup.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:207\nmsgid \"\"\n\"As you can see, we use Python's ``for`` statement two times, in order to go \"\n\"through ``rows``. As seen above, ``rows`` is a variable which holds the \"\n\"result of the database query, so it is a list of tuples. The first ``for`` \"\n\"statement accesses the tuples within the list, the second one the items \"\n\"within the tuple, which are put each into a cell of the table. It is \"\n\"important that you close all ``for``, ``if``, ``while`` etc. statements with\"\n\" ``%end``, otherwise the output may not be what you expect.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:209\nmsgid \"\"\n\"If you need to access a variable within a non-Python code line inside the \"\n\"template, you need to put it into double curly braces. This tells the \"\n\"template to insert the actual value of the variable right in place.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:211\nmsgid \"\"\n\"Run the script again and look at the output. Still not really nice, but at \"\n\"least more readable than the list of tuples. Of course, you can spice-up the\"\n\" very simple HTML markup above, e.g. by using in-line styles to get a better\"\n\" looking output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:215\nmsgid \"Using GET and POST Values\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:216\nmsgid \"\"\n\"As we can review all open items properly, we move to the next step, which is\"\n\" adding new items to the ToDo list. The new item should be received from a \"\n\"regular HTML-based form, which sends its data by the GET method.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:218\nmsgid \"\"\n\"To do so, we first add a new route to our script and tell the route that it \"\n\"should get GET data::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:241\nmsgid \"\"\n\"To access GET (or POST) data, we need to import ``request`` from Bottle. To \"\n\"assign the actual data to a variable, we use the statement \"\n\"``request.GET.get('task','').strip()`` statement, where ``task`` is the name\"\n\" of the GET data we want to access. That's all. If your GET data has more \"\n\"than one variable, multiple ``request.GET.get()`` statements can be used and\"\n\" assigned to other variables.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:243\nmsgid \"\"\n\"The rest of this piece of code is just processing of the gained data: \"\n\"writing to the database, retrieve the corresponding id from the database and\"\n\" generate the output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:245\nmsgid \"\"\n\"But where do we get the GET data from? Well, we can use a static HTML page \"\n\"holding the form. Or, what we do right now, is to use a template which is \"\n\"output when the route ``/new`` is called without GET data.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:247\nmsgid \"The code needs to be extended to::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:270\nmsgid \"``new_task.tpl`` looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:278\nmsgid \"That's all. As you can see, the template is plain HTML this time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:280\nmsgid \"Now we are able to extend our to do list.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:282\nmsgid \"\"\n\"By the way, if you prefer to use POST data: this works exactly the same way,\"\n\" just use ``request.POST.get()`` instead.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:286\nmsgid \"Editing Existing Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:287\nmsgid \"The last point to do is to enable editing of existing items.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:289\nmsgid \"\"\n\"By using only the routes we know so far it is possible, but may be quite \"\n\"tricky. But Bottle knows something called \\\"dynamic routes\\\", which makes \"\n\"this task quite easy.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:291\nmsgid \"The basic statement for a dynamic route looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:295\nmsgid \"\"\n\"The key point here is the colon. This tells Bottle to accept for \"\n\"``:something`` any string up to the next slash. Furthermore, the value of \"\n\"``something`` will be passed to the function assigned to that route, so the \"\n\"data can be processed within the function.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:297\nmsgid \"\"\n\"For our ToDo list, we will create a route ``@route('/edit/:no)``, where \"\n\"``no`` is the id of the item to edit.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:299\nmsgid \"The code looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:327\nmsgid \"\"\n\"It is basically pretty much the same what we already did above when adding \"\n\"new items, like using ``GET`` data etc. The main addition here is using the \"\n\"dynamic route ``:no``, which here passes the number to the corresponding \"\n\"function. As you can see, ``no`` is used within the function to access the \"\n\"right row of data within the database.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:329\nmsgid \"\"\n\"The template ``edit_task.tpl`` called within the function looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:344\nmsgid \"\"\n\"Again, this template is a mix of Python statements and HTML, as already \"\n\"explained above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:346\nmsgid \"\"\n\"A last word on dynamic routes: you can even use a regular expression for a \"\n\"dynamic route, as demonstrated later.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:350\nmsgid \"Validating Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:351\nmsgid \"\"\n\"Using dynamic routes is fine, but for many cases it makes sense to validate \"\n\"the dynamic part of the route. For example, we expect an integer number in \"\n\"our route for editing above. But if a float, characters or so are received, \"\n\"the Python interpreter throws an exception, which is not what we want.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:353\nmsgid \"\"\n\"For those cases, Bottle offers the ``@validate`` decorator, which validates \"\n\"the \\\"input\\\" prior to passing it to the function. In order to apply the \"\n\"validator, extend the code as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:362\nmsgid \"\"\n\"At first, we imported ``validate`` from the Bottle framework, than we apply \"\n\"the @validate-decorator. Right here, we validate if ``no`` is an integer. \"\n\"Basically, the validation works with all types of data like floats, lists \"\n\"etc.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:364\nmsgid \"\"\n\"Save the code and call the page again using a \\\"403 forbidden\\\" value for \"\n\"``:no``, e.g. a float. You will receive not an exception, but a \\\"403 - \"\n\"Forbidden\\\" error, saying that an integer was expected.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:367\nmsgid \"Dynamic Routes Using Regular Expressions\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:368\nmsgid \"\"\n\"Bottle can also handle dynamic routes, where the \\\"dynamic part\\\" of the \"\n\"route can be a regular expression.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:370\nmsgid \"\"\n\"So, just to demonstrate that, let's assume that all single items in our ToDo\"\n\" list should be accessible by their plain number, by a term like e.g. \"\n\"\\\"item1\\\". For obvious reasons, you do not want to create a route for every \"\n\"item. Furthermore, the simple dynamic routes do not work either, as part of \"\n\"the route, the term \\\"item\\\" is static.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:372\nmsgid \"As said above, the solution is a regular expression::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:386\nmsgid \"\"\n\"Of course, this example is somehow artificially constructed - it would be \"\n\"easier to use a plain dynamic route only combined with a validation. \"\n\"Nevertheless, we want to see how regular expression routes work: the line \"\n\"``@route(/item:item_#[0-9]+#)`` starts like a normal route, but the part \"\n\"surrounded by # is interpreted as a regular expression, which is the dynamic\"\n\" part of the route. So in this case, we want to match any digit between 0 \"\n\"and 9. The following function \\\"show_item\\\" just checks whether the given \"\n\"item is present in the database or not. In case it is present, the \"\n\"corresponding text of the task is returned. As you can see, only the regular\"\n\" expression part of the route is passed forward. Furthermore, it is always \"\n\"forwarded as a string, even if it is a plain integer number, like in this \"\n\"case.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:390\nmsgid \"Returning Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:391\nmsgid \"\"\n\"Sometimes it may become necessary to associate a route not to a Python \"\n\"function, but just return a static file. So if you have for example a help \"\n\"page for your application, you may want to return this page as plain HTML. \"\n\"This works as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:399\nmsgid \"\"\n\"At first, we need to import the ``static_file`` function from Bottle. As you\"\n\" can see, the ``return static_file`` statement replaces the ``return`` \"\n\"statement. It takes at least two arguments: the name of the file to be \"\n\"returned and the path to the file. Even if the file is in the same directory\"\n\" as your application, the path needs to be stated. But in this case, you can\"\n\" use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file \"\n\"automatically, but in case you like to state it explicitly, add a third \"\n\"argument to ``static_file``, which would be here ``mimetype='text/html'``. \"\n\"``static_file`` works with any type of route, including the dynamic ones.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:403\nmsgid \"Returning JSON Data\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:404\nmsgid \"\"\n\"There may be cases where you do not want your application to generate the \"\n\"output directly, but return data to be processed further on, e.g. by \"\n\"JavaScript. For those cases, Bottle offers the possibility to return JSON \"\n\"objects, which is sort of standard for exchanging data between web \"\n\"applications. Furthermore, JSON can be processed by many programming \"\n\"languages, including Python\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:406\nmsgid \"\"\n\"So, let's assume we want to return the data generated in the regular \"\n\"expression route example as a JSON object. The code looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:421\nmsgid \"\"\n\"As you can, that is fairly simple: just return a regular Python dictionary \"\n\"and Bottle will convert it automatically into a JSON object prior to \"\n\"sending. So if you e.g. call \\\"http://localhost/json1\\\" Bottle should in \"\n\"this case return the JSON object ``{\\\"Task\\\": [\\\"Read A-byte-of-python to \"\n\"get a good introduction into Python\\\"]}``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:426\nmsgid \"Catching Errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:427\nmsgid \"\"\n\"The next step may is to catch the error with Bottle itself, to keep away any\"\n\" type of error message from the user of your application. To do that, Bottle\"\n\" has an \\\"error-route\\\", which can be a assigned to a HTML-error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:429\nmsgid \"In our case, we want to catch a 403 error. The code is as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:437\nmsgid \"\"\n\"So, at first we need to import ``error`` from Bottle and define a route by \"\n\"``error(403)``, which catches all \\\"403 forbidden\\\" errors. The function \"\n\"\\\"mistake\\\" is assigned to that. Please note that ``error()`` always passes \"\n\"the error-code to the function - even if you do not need it. Thus, the \"\n\"function always needs to accept one argument, otherwise it will not work.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:439\nmsgid \"\"\n\"Again, you can assign more than one error-route to a function, or catch \"\n\"various errors with one function each. So this code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:446\nmsgid \"works fine, the following one as well::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:458\nmsgid \"Summary\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:459\nmsgid \"\"\n\"After going through all the sections above, you should have a brief \"\n\"understanding how the Bottle WSGI framework works. Furthermore you have all \"\n\"the knowledge necessary to use Bottle for your applications.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:461\nmsgid \"\"\n\"The following chapter give a short introduction how to adapt Bottle for \"\n\"larger projects. Furthermore, we will show how to operate Bottle with web \"\n\"servers which perform better on a higher load / more web traffic than the \"\n\"one we used so far.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:464\nmsgid \"Server Setup\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:466\nmsgid \"\"\n\"So far, we used the standard server used by Bottle, which is the `WSGI \"\n\"reference Server`_ shipped along with Python. Although this server is \"\n\"perfectly suitable for development purposes, it is not really suitable for \"\n\"larger applications. But before we have a look at the alternatives, let's \"\n\"have a look how to tweak the settings of the standard server first.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:470\nmsgid \"Running Bottle on a different port and IP\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:471\nmsgid \"\"\n\"As standard, Bottle serves the pages on the IP adress 127.0.0.1, also known \"\n\"as ``localhost``, and on port ``8080``. To modify the setting is pretty \"\n\"simple, as additional parameters can be passed to Bottle's ``run()`` \"\n\"function to change the port and the address.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:473\nmsgid \"\"\n\"To change the port, just add ``port=portnumber`` to the run command. So, for\"\n\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:477\nmsgid \"would make Bottle listen to port 80.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:479\nmsgid \"To change the IP address where Bottle is listening::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:483\nmsgid \"Of course, both parameters can be combined, like::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:487\nmsgid \"\"\n\"The ``port`` and ``host`` parameter can also be applied when Bottle is \"\n\"running with a different server, as shown in the following section.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:491\nmsgid \"Running Bottle with a different server\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:492\nmsgid \"\"\n\"As said above, the standard server is perfectly suitable for development, \"\n\"personal use or a small group of people only using your application based on\"\n\" Bottle. For larger tasks, the standard server may become a bottleneck, as \"\n\"it is single-threaded, thus it can only serve one request at a time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:494\nmsgid \"\"\n\"But Bottle has already various adapters to multi-threaded servers on board, \"\n\"which perform better on higher load. Bottle supports Cherrypy_, Fapws3_, \"\n\"Flup_ and Paste_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:496\nmsgid \"\"\n\"If you want to run for example Bottle with the Paste server, use the \"\n\"following code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:502\nmsgid \"\"\n\"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and \"\n\"``FapwsServer``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:506\nmsgid \"Running Bottle on Apache with mod_wsgi\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:507\nmsgid \"\"\n\"Maybe you already have an Apache_ or you want to run a Bottle-based \"\n\"application large scale - then it is time to think about Apache with \"\n\"mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:509\nmsgid \"\"\n\"We assume that your Apache server is up and running and mod_wsgi is working \"\n\"fine as well. On a lot of Linux distributions, mod_wsgi can be easily \"\n\"installed via whatever package management system is in use.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:511\nmsgid \"\"\n\"Bottle brings an adapter for mod_wsgi with it, so serving your application \"\n\"is an easy task.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:513\nmsgid \"\"\n\"In the following example, we assume that you want to make your application \"\n\"\\\"ToDo list\\\" accessible through ``http://www.mypage.com/todo`` and your \"\n\"code, templates and SQLite database are stored in the path \"\n\"``/var/www/todo``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:515\nmsgid \"\"\n\"When you run your application via mod_wsgi, it is imperative to remove the \"\n\"``run()`` statement from your code, otherwise it won't work here.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:517\nmsgid \"\"\n\"After that, create a file called ``adapter.wsgi`` with the following \"\n\"content::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:528\nmsgid \"\"\n\"and save it in the same path, ``/var/www/todo``. Actually the name of the \"\n\"file can be anything, as long as the extension is ``.wsgi``. The name is \"\n\"only used to reference the file from your virtual host.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:530\nmsgid \"\"\n\"Finally, we need to add a virtual host to the Apache configuration, which \"\n\"looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:546\nmsgid \"\"\n\"After restarting the server, your ToDo list should be accessible at \"\n\"``http://www.mypage.com/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:549\nmsgid \"Final Words\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:551\nmsgid \"\"\n\"Now we are at the end of this introduction and tutorial to Bottle. We \"\n\"learned about the basic concepts of Bottle and wrote a first application \"\n\"using the Bottle framework. In addition to that, we saw how to adapt Bottle \"\n\"for large tasks and serve Bottle through an Apache web server with mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:553\nmsgid \"\"\n\"As said in the introduction, this tutorial is not showing all shades and \"\n\"possibilities of Bottle. What we skipped here is e.g. receiving file objects\"\n\" and streams and how to handle authentication data. Furthermore, we did not \"\n\"show how templates can be called from within another template. For an \"\n\"introduction into those points, please refer to the full `Bottle \"\n\"documentation`_ .\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:556\nmsgid \"Complete Example Listing\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:558\nmsgid \"\"\n\"As the ToDo list example was developed piece by piece, here is the complete \"\n\"listing:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:560\nmsgid \"Main code for the application ``todo.py``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:675\nmsgid \"Template ``make_table.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:689\nmsgid \"Template ``edit_task.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:704\nmsgid \"Template ``new_task.tpl``::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/api.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Igor P. Leroy <ip.leroy@gmail.com>, 2015\n# john snow <mfrcouto@hotmail.com>, 2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../api.rst:3\nmsgid \"API Reference\"\nmsgstr \"API Referências\"\n\n#: ../../api.rst:10\nmsgid \"\"\n\"This is a mostly auto-generated API. If you are new to bottle, you might \"\n\"find the narrative :doc:`tutorial` more helpful.\"\nmsgstr \"\"\n\n#: ../../api.rst:17\nmsgid \"Module Contents\"\nmsgstr \"Conteúdo dos Módulos\"\n\n#: ../../api.rst:19\nmsgid \"The module defines several functions, constants, and an exception.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.debug:1\nmsgid \"\"\n\"Change the debug level. There is only one debug level supported at the \"\n\"moment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:1\nmsgid \"\"\n\"Start a server instance. This method blocks until the server terminates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:0 ../../../bottle.pydocstring of\n#: bottle.path_shift:0 ../../../bottle.pydocstring of bottle.MultiDict.get:0\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:0\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:0\n#: ../../../bottle.pydocstring of bottle.Bottle:0 ../../../bottle.pydocstring\n#: of bottle.Bottle.mount:0 ../../../bottle.pydocstring of\n#: bottle.Bottle.route:0 ../../../bottle.pydocstring of\n#: bottle.BaseRequest.path_shift:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:3\nmsgid \"\"\n\"WSGI application or target string supported by :func:`load_app`. (default: \"\n\":func:`default_app`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:5\nmsgid \"\"\n\"Server adapter to use. See :data:`server_names` keys for valid names or pass\"\n\" a :class:`ServerAdapter` subclass. (default: `wsgiref`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:8\nmsgid \"\"\n\"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces \"\n\"including the external one. (default: 127.0.0.1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:10\nmsgid \"\"\n\"Server port to bind to. Values below 1024 require root privileges. (default:\"\n\" 8080)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:12\nmsgid \"Start auto-reloading server? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:13\nmsgid \"Auto-reloader interval in seconds (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:14\nmsgid \"Suppress output to stdout and stderr? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:15\nmsgid \"Options passed to the server adapter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:1\nmsgid \"Import a module or fetch an object from a module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:3\nmsgid \"``package.module`` returns `module` as a module object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:4\nmsgid \"``pack.mod:name`` returns the module variable `name` from `pack.mod`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:5\nmsgid \"``pack.mod:func()`` calls `pack.mod.func()` and returns the result.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:7\nmsgid \"\"\n\"The last form accepts not only function calls, but any type of expression. \"\n\"Keyword arguments passed to this function are available as local variables. \"\n\"Example: ``import_string('re:compile(x)', x='[a-z]')``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load_app:1\nmsgid \"\"\n\"Load a bottle application from a module and make sure that the import does \"\n\"not affect the current default application, but returns a separate \"\n\"application object. See :func:`load` for the target parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.request:1 ../../../bottle.pydocstring\n#: of bottle.request:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalRequest`. If accessed from within a \"\n\"request callback, this instance always refers to the *current* request (even\"\n\" on a multi-threaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.response:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalResponse`. It is used to change the \"\n\"HTTP response for the *current* request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HTTP_CODES:1\nmsgid \"\"\n\"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')\"\nmsgstr \"\"\n\n#: ../../api.rst:38\nmsgid \"\"\n\"Return the current :ref:`default-app`. Actually, these are callable \"\n\"instances of :class:`AppStack` and implement a stack-like API.\"\nmsgstr \"\"\n\n#: ../../api.rst:42\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../api.rst:44\nmsgid \"\"\n\"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and \"\n\":class:`AppStack`) and uses the top of the stack as a *default application* \"\n\"for some of the module-level functions and decorators.\"\nmsgstr \"\"\n\n#: ../../api.rst:54\nmsgid \"\"\n\"Decorator to install a route to the current default application. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:59\nmsgid \"\"\n\"Decorator to install an error handler to the current default application. \"\n\"See :meth:`Bottle.error` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:63\nmsgid \"WSGI and HTTP Utilities\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_date:1\nmsgid \"Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_auth:1\nmsgid \"\"\n\"Parse rfc2617 HTTP authentication header string (basic) and return \"\n\"(user,pass) tuple or None\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_encode:1\nmsgid \"Encode and sign a pickle-able object. Return a (byte) string\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_decode:1\nmsgid \"Verify and decode an encoded string. Return an object or None.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_is_encoded:1\nmsgid \"Return True if the argument looks like a encoded cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.yieldroutes:1\nmsgid \"\"\n\"Return a generator for routes that match the signature (name, args) of the \"\n\"func parameter. This may yield more than one route if the function takes \"\n\"optional keyword arguments. The output is best described by example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:1\nmsgid \"Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:0\nmsgid \"Returns\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:3\nmsgid \"The modified paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:4\nmsgid \"The SCRIPT_NAME path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:5\nmsgid \"The PATH_INFO path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:6\nmsgid \"\"\n\"The number of path fragments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../api.rst:81\nmsgid \"Data Structures\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict:1\nmsgid \"\"\n\"This dict stores multiple values per key, but behaves exactly like a normal \"\n\"dict in that it returns only the newest value for any given key. There are \"\n\"special methods available to access the full list of values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.keys:1\nmsgid \"D.keys() -> a set-like object providing a view on D's keys\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.values:1\nmsgid \"D.values() -> an object providing a view on D's values\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.items:1\nmsgid \"D.items() -> a set-like object providing a view on D's items\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:1\nmsgid \"Return the most recent value for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:3\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:3\nmsgid \"\"\n\"The default value to be returned if the key is not present or the type \"\n\"conversion fails.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:5\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:5\nmsgid \"An index for the list of available values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:6\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:6\nmsgid \"\"\n\"If defined, this callable is used to cast the value into a specific type. \"\n\"Exception are suppressed and result in the default value to be returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.append:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.append:1\nmsgid \"Add a new value to the list of values for this key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.replace:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.replace:1\nmsgid \"Replace the list of values with a single value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.getall:1\nmsgid \"Return a (possibly empty) list of values for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\nmsgid \"Aliases for WTForms to mimic other multi-dict APIs (Django)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HeaderDict:1\nmsgid \"\"\n\"A case-insensitive version of :class:`MultiDict` that defaults to replace \"\n\"the old value instead of appending it.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict:1\nmsgid \"\"\n\"This :class:`MultiDict` subclass is used to store request form data. \"\n\"Additionally to the normal dict-like item access methods (which return \"\n\"unmodified data as native strings), this container also supports attribute-\"\n\"like access to its values. Attributes are automatically de- or recoded to \"\n\"match :attr:`input_encoding` (default: 'utf8'). Missing attributes default \"\n\"to an empty string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.input_encoding:1\nmsgid \"Encoding used for attribute values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.recode_unicode:1\nmsgid \"\"\n\"If true (default), unicode strings are first encoded with `latin1` and then \"\n\"decoded to match :attr:`input_encoding`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.decode:1\nmsgid \"\"\n\"Returns a copy with all keys and values de- or recoded to match \"\n\":attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode \"\n\"dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.getunicode:1\nmsgid \"Return the value as a unicode string, or the default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:1\nmsgid \"\"\n\"This dict-like class wraps a WSGI environ dict and provides convenient \"\n\"access to HTTP_* fields. Keys and values are native strings (2.x bytes or \"\n\"3.x unicode) and keys are case-insensitive. If the WSGI environment contains\"\n\" non-native string values, these are de- or encoded using a lossless \"\n\"'latin1' character set.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:7\nmsgid \"\"\n\"The API will remain stable even on changes to the relevant PEPs. Currently \"\n\"PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-\"\n\"native strings.)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.cgikeys:1\nmsgid \"List of keys that do not have a ``HTTP_`` prefix.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.raw:1\nmsgid \"Return the header value as is (may be bytes or unicode).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack:1\nmsgid \"A stack-like list. Calling it returns the head of the stack.\"\nmsgstr \"\"\n\n#: ../../api.rst:100\nmsgid \"Return the current default application and remove it from the stack.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\nmsgid \"Add a new :class:`Bottle` instance to the stack\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:1\nmsgid \"\"\n\"This class manages a list of search paths and helps to find and open \"\n\"application-bound resources (files).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:4\nmsgid \"default value for :meth:`add_path` calls.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:5\nmsgid \"callable used to open resources.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:6\nmsgid \"controls which lookups are cached. One of 'all', 'found' or 'none'.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.path:1\nmsgid \"A list of search paths. See :meth:`add_path` for details.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.cache:1\nmsgid \"A cache for resolved paths. ``res.cache.clear()`` clears the cache.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:1\nmsgid \"\"\n\"Add a new path to the list of search paths. Return False if the path does \"\n\"not exist.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:4\nmsgid \"\"\n\"The new search path. Relative paths are turned into an absolute and \"\n\"normalized form. If the path looks like a file (not ending in `/`), the \"\n\"filename is stripped off.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:7\nmsgid \"\"\n\"Path used to absolutize relative search paths. Defaults to :attr:`base` \"\n\"which defaults to ``os.getcwd()``.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:9\nmsgid \"\"\n\"Position within the list of search paths. Defaults to last index (appends to\"\n\" the list).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:12\nmsgid \"\"\n\"The `base` parameter makes it easy to reference files installed along with a\"\n\" python module or package::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:1\nmsgid \"Search for a resource and return an absolute file path, or `None`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:3\nmsgid \"\"\n\"The :attr:`path` list is searched in order. The first match is returned. \"\n\"Symlinks are followed. The result is cached to speed up future lookups.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.open:1\nmsgid \"Find a resource and return a file object, or raise IOError.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.file:1\nmsgid \"Open file(-like) object (BytesIO buffer or temporary file)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.name:1\nmsgid \"Name of the upload form field\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.raw_filename:1\nmsgid \"Raw filename as sent by the client (may contain unsafe characters)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.headers:1\nmsgid \"A :class:`HeaderDict` with additional headers (e.g. content-type)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_type:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_type:1\nmsgid \"Current value of the 'Content-Type' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_length:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_length:1\nmsgid \"Current value of the 'Content-Length' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.get_header:1\nmsgid \"Return the value of a header within the mulripart part.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:1\nmsgid \"\"\n\"Name of the file on the client file system, but normalized to ensure file \"\n\"system compatibility. An empty filename is returned as 'empty'.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:4\nmsgid \"\"\n\"Only ASCII letters, digits, dashes, underscores and dots are allowed in the \"\n\"final filename. Accents are removed, if possible. Whitespace is replaced by \"\n\"a single dash. Leading or tailing dots or dashes are removed. The filename \"\n\"is limited to 255 characters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:1\nmsgid \"\"\n\"Save file to disk or copy its content to an open file(-like) object. If \"\n\"*destination* is a directory, :attr:`filename` is added to the path. \"\n\"Existing files are not overwritten by default (IOError).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:5\nmsgid \"File path, directory or file(-like) object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:6\nmsgid \"If True, replace existing files. (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:7\nmsgid \"Bytes to read at a time. (default: 64kb)\"\nmsgstr \"\"\n\n#: ../../api.rst:109\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BottleException:1\nmsgid \"A base class for exceptions used by bottle.\"\nmsgstr \"\"\n\n#: ../../api.rst:117\nmsgid \"The :class:`Bottle` Class\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:1\nmsgid \"\"\n\"Each Bottle object represents a single, distinct web application and \"\n\"consists of routes, callbacks, plugins, resources and configuration. \"\n\"Instances are callable WSGI applications.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:5\nmsgid \"\"\n\"If true (default), handle all exceptions. Turn off to let debugging \"\n\"middleware handle exceptions.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.config:1\nmsgid \"A :class:`ConfigDict` for app specific configuration.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.resources:1\nmsgid \"A :class:`ResourceManager` for application files\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.catchall:1\nmsgid \"If true, most exceptions are caught and returned as :exc:`HTTPError`\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:1\nmsgid \"Attach a callback to a hook. Three hooks are currently implemented:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"before_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"\"\n\"Executed once before each request. The request context is available, but no \"\n\"routing has happened yet.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:6\nmsgid \"after_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:7\nmsgid \"Executed once after each request regardless of its outcome.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:8\nmsgid \"app_reset\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:9\nmsgid \"Called whenever :meth:`Bottle.reset` is called.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.remove_hook:1\nmsgid \"Remove a callback from a hook.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.trigger_hook:1\nmsgid \"Trigger a hook and return a list of results.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.hook:1\nmsgid \"\"\n\"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` \"\n\"for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:1\nmsgid \"\"\n\"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL \"\n\"prefix. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:6\nmsgid \"path prefix or `mount-point`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:7\nmsgid \"an instance of :class:`Bottle` or a WSGI application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:9\nmsgid \"\"\n\"Plugins from the parent application are not applied to the routes of the \"\n\"mounted child application. If you need plugins in the child application, \"\n\"install them separately.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:13\nmsgid \"\"\n\"While it is possible to use path wildcards within the prefix path \"\n\"(:class:`Bottle` childs only), it is highly discouraged.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:16\nmsgid \"\"\n\"The prefix path must end with a slash. If you want to access the root of the\"\n\" child application via `/prefix` in addition to `/prefix/`, consider adding \"\n\"a route with a 307 redirect to the parent application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.merge:1\nmsgid \"\"\n\"Merge the routes of another :class:`Bottle` application or a list of \"\n\":class:`Route` objects into this application. The routes keep their 'owner',\"\n\" meaning that the :data:`Route.app` attribute is not changed.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.install:1\nmsgid \"\"\n\"Add a plugin to the list of plugins and prepare it for being applied to all \"\n\"routes of this application. A plugin may be a simple decorator or an object \"\n\"that implements the :class:`Plugin` API.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.uninstall:1\nmsgid \"\"\n\"Uninstall plugins. Pass an instance to remove a specific plugin, a type \"\n\"object to remove all plugins that match that type, a string to remove all \"\n\"plugins with a matching ``name`` attribute or ``True`` to remove all \"\n\"plugins. Return the list of removed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.reset:1\nmsgid \"\"\n\"Reset all routes (force plugins to be re-applied) and clear all caches. If \"\n\"an ID or route object is given, only that specific route is affected.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.close:1\nmsgid \"Close the application and all installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.run:1\nmsgid \"Calls :func:`run` with the same parameters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.match:1\nmsgid \"\"\n\"Search for a matching route and return a (:class:`Route`, urlargs) tuple. \"\n\"The second value is a dictionary with parameters extracted from the URL. \"\n\"Raise :exc:`HTTPError` (404/405) on a non-match.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get_url:1\nmsgid \"Return a string that matches a named route\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_route:1\nmsgid \"Add a route object, but do not change the :data:`Route.app` attribute.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:1\nmsgid \"A decorator to bind a function to a request URL. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:7\nmsgid \"\"\n\"The ``<name>`` part is a wildcard. See :class:`Router` for syntax details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:10\nmsgid \"\"\n\"Request path or a list of paths to listen to. If no path is specified, it is\"\n\" automatically generated from the signature of the function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:13\nmsgid \"\"\n\"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. \"\n\"(default: `GET`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:15\nmsgid \"\"\n\"An optional shortcut to avoid the decorator syntax. ``route(..., \"\n\"callback=func)`` equals ``route(...)(func)``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:17\nmsgid \"The name for this route. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:18\nmsgid \"\"\n\"A decorator or plugin or a list of plugins. These are applied to the route \"\n\"callback in addition to installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:20\nmsgid \"\"\n\"A list of plugins, plugin classes or names. Matching plugins are not \"\n\"installed to this route. ``True`` skips all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:23\nmsgid \"\"\n\"Any additional keyword arguments are stored as route-specific configuration \"\n\"and passed to plugins (see :meth:`Plugin.apply`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get:1\nmsgid \"Equals :meth:`route`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.post:1\nmsgid \"Equals :meth:`route` with a ``POST`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.put:1\nmsgid \"Equals :meth:`route` with a ``PUT`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.delete:1\nmsgid \"Equals :meth:`route` with a ``DELETE`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.patch:1\nmsgid \"Equals :meth:`route` with a ``PATCH`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.error:1\nmsgid \"\"\n\"Register an output handler for a HTTP error code. Can be used as a decorator\"\n\" or called directly ::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.wsgi:1\nmsgid \"The bottle WSGI-interface.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route:1\nmsgid \"\"\n\"This class wraps a route callback along with route specific metadata and \"\n\"configuration and applies Plugins on demand. It is also responsible for \"\n\"turning an URL path rule into a regular expression usable by the Router.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.app:1\nmsgid \"The application this route is installed to.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.rule:1\nmsgid \"The path-rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.method:1\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.callback:1\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.name:1\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.plugins:1\nmsgid \"A list of route-specific plugins (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.skiplist:1\nmsgid \"\"\n\"A list of plugins to not apply to this route (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.config:1\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific plugin configuration \"\n\"and meta-data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.call:1\nmsgid \"\"\n\"The route callback with all plugins applied. This property is created on \"\n\"demand and then cached to speed up subsequent requests.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.reset:1\nmsgid \"\"\n\"Forget any cached values. The next time :attr:`call` is accessed, all \"\n\"plugins are re-applied.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.prepare:1\nmsgid \"Do all on-demand work immediately (useful for debugging).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.all_plugins:1\nmsgid \"Yield all Plugins affecting this route.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_undecorated_callback:1\nmsgid \"\"\n\"Return the callback. If the callback is a decorated function, try to recover\"\n\" the original function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_callback_args:1\nmsgid \"\"\n\"Return a list of argument names the callback (most likely) accepts as \"\n\"keyword arguments. If the callback is a decorated function, try to recover \"\n\"the original function before inspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_config:1\nmsgid \"\"\n\"Lookup a config field and return its value, first checking the route.config,\"\n\" then route.app.config.\"\nmsgstr \"\"\n\n#: ../../api.rst:127\nmsgid \"The :class:`Request` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:129\nmsgid \"\"\n\"The :class:`Request` class wraps a WSGI environment and provides helpful \"\n\"methods to parse and access form data, cookies, file uploads and other \"\n\"metadata. Most of the attributes are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:1\nmsgid \"\"\n\"A wrapper for WSGI environment dictionaries that adds a lot of convenient \"\n\"access methods and properties. Most of them are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:4\nmsgid \"\"\n\"Adding new attributes to a request actually adds them to the environ \"\n\"dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to \"\n\"store and access request-specific data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.MEMFILE_MAX:1\nmsgid \"Maximum size of memory buffer for :attr:`body` in bytes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.environ:1\nmsgid \"\"\n\"The wrapped WSGI environ dictionary. This is the only real attribute. All \"\n\"other attributes actually are read-only properties.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.app:1\nmsgid \"Bottle application handling this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.route:1\nmsgid \"The bottle :class:`Route` object that matches this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url_args:1\nmsgid \"The arguments extracted from the URL.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path:1\nmsgid \"\"\n\"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken \"\n\"clients and avoid the \\\"empty path\\\" edge case).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.method:1\nmsgid \"The ``REQUEST_METHOD`` value as an uppercase string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.headers:1\nmsgid \"\"\n\"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP \"\n\"request headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_header:1\nmsgid \"Return the value of a request header, or a given default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.cookies:1\nmsgid \"\"\n\"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. \"\n\"Use :meth:`get_cookie` if you expect signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_cookie:1\nmsgid \"\"\n\"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must\"\n\" match the one used to create the cookie (see \"\n\":meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or \"\n\"wrong signature), return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"\"\n\"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are \"\n\"sometimes called \\\"URL arguments\\\" or \\\"GET parameters\\\", but not to be \"\n\"confused with \\\"URL wildcards\\\" as they are provided by the :class:`Router`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.forms:1\nmsgid \"\"\n\"Form values parsed from an `url-encoded` or `multipart/form-data` encoded \"\n\"POST or PUT request body. The result is returned as a :class:`FormsDict`. \"\n\"All keys and values are strings. File uploads are stored separately in \"\n\":attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.params:1\nmsgid \"\"\n\"A :class:`FormsDict` with the combined values of :attr:`query` and \"\n\":attr:`forms`. File uploads are stored in :attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.files:1\nmsgid \"\"\n\"File uploads parsed from `multipart/form-data` encoded POST or PUT request \"\n\"body. The values are instances of :class:`FileUpload`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.json:1\nmsgid \"\"\n\"If the ``Content-Type`` header is ``application/json`` or ``application\"\n\"/json-rpc``, this property holds the parsed content of the request body. \"\n\"Only requests smaller than :attr:`MEMFILE_MAX` are processed to avoid memory\"\n\" exhaustion. Invalid JSON raises a 400 error response.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.body:1\nmsgid \"\"\n\"The HTTP request body as a seek-able file-like object. Depending on \"\n\":attr:`MEMFILE_MAX`, this is either a temporary file or a \"\n\":class:`io.BytesIO` instance. Accessing this property for the first time \"\n\"reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses \"\n\"just do a `seek(0)` on the file object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.chunked:1\nmsgid \"True if Chunked transfer encoding was.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"An alias for :attr:`query`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.POST:1\nmsgid \"\"\n\"The values of :attr:`forms` and :attr:`files` combined into a single \"\n\":class:`FormsDict`. Values are either strings (form values) or instances of \"\n\":class:`cgi.FieldStorage` (file uploads).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url:1\nmsgid \"\"\n\"The full request URI including hostname and scheme. If your app lives behind\"\n\" a reverse proxy or load balancer and you get confusing results, make sure \"\n\"that the ``X-Forwarded-Host`` header is set correctly.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.urlparts:1\nmsgid \"\"\n\"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple \"\n\"contains (scheme, host, path, query_string and fragment), but the fragment \"\n\"is always empty because it is not visible to the server.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.fullpath:1\nmsgid \"Request path including :attr:`script_name` (if present).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query_string:1\nmsgid \"\"\n\"The raw :attr:`query` part of the URL (everything in between ``?`` and \"\n\"``#``) as a string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.script_name:1\nmsgid \"\"\n\"The initial portion of the URL's `path` that was removed by a higher level \"\n\"(server or routing middleware) before the application was called. This \"\n\"script path is returned with leading and tailing slashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"Shift path segments from :attr:`path` to :attr:`script_name` and\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:4\nmsgid \"\"\n\"The number of path segments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_length:1\nmsgid \"\"\n\"The request body length as an integer. The client is responsible to set this\"\n\" header. Otherwise, the real length of the body is unknown and -1 is \"\n\"returned. In this case, :attr:`body` will be empty.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_type:1\nmsgid \"The Content-Type header as a lowercase-string (default: empty).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_xhr:1\nmsgid \"\"\n\"True if the request was triggered by a XMLHttpRequest. This only works with \"\n\"JavaScript libraries that support the `X-Requested-With` header (most of the\"\n\" popular libraries do).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_ajax:1\nmsgid \"Alias for :attr:`is_xhr`. \\\"Ajax\\\" is not the right term.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.auth:1\nmsgid \"\"\n\"HTTP authentication data as a (user, password) tuple. This implementation \"\n\"currently supports basic (not digest) authentication only. If the \"\n\"authentication happened at a higher level (e.g. in the front web-server or a\"\n\" middleware), the password field is None, but the user field is looked up \"\n\"from the ``REMOTE_USER`` environ variable. On any errors, None is returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_route:1\nmsgid \"\"\n\"A list of all IPs that were involved in this request, starting with the \"\n\"client IP and followed by zero or more proxies. This does only work if all \"\n\"proxies support the ```X-Forwarded-For`` header. Note that this information \"\n\"can be forged by malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_addr:1\nmsgid \"\"\n\"The client IP as a string. Note that this information can be forged by \"\n\"malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.copy:1\nmsgid \"Return a new :class:`Request` with a shallow :attr:`environ` copy.\"\nmsgstr \"\"\n\n#: ../../api.rst:137\nmsgid \"\"\n\"The module-level :data:`bottle.request` is a proxy object (implemented in \"\n\":class:`LocalRequest`) and always refers to the `current` request, or in \"\n\"other words, the request that is currently processed by the request handler \"\n\"in the current thread. This `thread locality` ensures that you can safely \"\n\"use a global instance in a multi-threaded environment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseRequest` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`request`). If accessed during a request/response cycle, \"\n\"this instance always refers to the *current* request (even on a \"\n\"multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.__init__:1\nmsgid \"Wrap a WSGI environ dictionary.\"\nmsgstr \"\"\n\n#: ../../api.rst:146\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:148\nmsgid \"\"\n\"The :class:`Response` class stores the HTTP status code as well as headers \"\n\"and cookies that are to be sent to the client. Similar to \"\n\":data:`bottle.request` there is a thread-local :data:`bottle.response` \"\n\"instance that can be used to adjust the `current` response. Moreover, you \"\n\"can instantiate :class:`Response` and return it from your request handler. \"\n\"In this case, the custom instance overrules the headers and cookies defined \"\n\"in the global one.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:1\nmsgid \"Storage class for a response body as well as headers and cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:3\nmsgid \"\"\n\"This class does support dict-like case-insensitive item-access to headers, \"\n\"but is NOT a dict. Most notably, iterating over a response yields parts of \"\n\"the body and not the headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:7\nmsgid \"The response body as one of the supported types.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:8\nmsgid \"\"\n\"Either an HTTP status code (e.g. 200) or a status line including the reason \"\n\"phrase (e.g. '200 OK').\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:10\nmsgid \"A dictionary or a list of name-value pairs.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:12\nmsgid \"\"\n\"Additional keyword arguments are added to the list of headers. Underscores \"\n\"in the header name are replaced with dashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.copy:1\nmsgid \"Returns a copy of self.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_line:1\nmsgid \"The HTTP status line as a string (e.g. ``404 Not Found``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_code:1\nmsgid \"The HTTP status code as an integer (e.g. 404).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status:1\nmsgid \"\"\n\"A writeable property to change the HTTP response status. It accepts either a\"\n\" numeric code (100-999) or a string with a custom reason phrase (e.g. \\\"404 \"\n\"Brain not found\\\"). Both :data:`status_line` and :data:`status_code` are \"\n\"updated accordingly. The return value is always a status string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headers:1\nmsgid \"\"\n\"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the\"\n\" response headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.get_header:1\nmsgid \"\"\n\"Return the value of a previously defined header. If there is no header with \"\n\"that name, return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_header:1\nmsgid \"\"\n\"Create a new response header, replacing any previously defined headers with \"\n\"the same name.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.add_header:1\nmsgid \"Add an additional response header, not removing duplicates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.iter_headers:1\nmsgid \"\"\n\"Yield (header, value) tuples, skipping headers that are not allowed with the\"\n\" current response status code.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headerlist:1\nmsgid \"WSGI conform list of (header, value) tuples.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.expires:1\nmsgid \"Current value of the 'Expires' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.charset:1\nmsgid \"\"\n\"Return the charset specified in the content-type header (default: utf8).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:1\nmsgid \"\"\n\"Create a new cookie or replace an old one. If the `secret` parameter is set,\"\n\" create a `Signed Cookie` (described below).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:4\nmsgid \"the name of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:5\nmsgid \"the value of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:6\nmsgid \"a signature key required for signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:8\nmsgid \"\"\n\"Additionally, this method accepts all RFC 2109 attributes that are supported\"\n\" by :class:`cookie.Morsel`, including:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:11\nmsgid \"maximum age in seconds. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:12\nmsgid \"a datetime object or UNIX timestamp. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:13\nmsgid \"\"\n\"the domain that is allowed to read the cookie. (default: current domain)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:15\nmsgid \"limits the cookie to a given path (default: current path)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:16\nmsgid \"limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:17\nmsgid \"\"\n\"prevents client-side javascript to read this cookie (default: off, requires \"\n\"Python 2.6 or newer).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:19\nmsgid \"\"\n\"Control or disable third-party use for this cookie. Possible values: `lax`, \"\n\"`strict` or `none` (default).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:22\nmsgid \"\"\n\"If neither `expires` nor `maxage` is set (default), the cookie will expire \"\n\"at the end of the browser session (as soon as the browser window is closed).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:26\nmsgid \"\"\n\"Signed cookies may store any pickle-able object and are cryptographically \"\n\"signed to prevent manipulation. Keep in mind that cookies are limited to 4kb\"\n\" in most browsers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:30\nmsgid \"\"\n\"Warning: Pickle is a potentially dangerous format. If an attacker gains \"\n\"access to the secret key, he could forge cookies that execute code on server\"\n\" side if unpickled. Using pickle is discouraged and support for it will be \"\n\"removed in later versions of bottle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:35\nmsgid \"\"\n\"Warning: Signed cookies are not encrypted (the client can still see the \"\n\"content) and not copy-protected (the client can restore an old cookie). The \"\n\"main intention is to make pickling and unpickling save, not to store secret \"\n\"information at client side.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.delete_cookie:1\nmsgid \"\"\n\"Delete a cookie. Be sure to use the same `domain` and `path` settings as \"\n\"used to create the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseResponse` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`response`). Its attributes are used to build the HTTP \"\n\"response at the end of the request/response cycle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.__init__:1\nmsgid \"Initialize self.  See help(type(self)) for accurate signature.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse.body:1\nmsgid \"Thread-local property\"\nmsgstr \"\"\n\n#: ../../api.rst:160\nmsgid \"\"\n\"The following two classes can be raised as an exception. The most noticeable\"\n\" difference is that bottle invokes error handlers for :class:`HTTPError`, \"\n\"but not for :class:`HTTPResponse` or other response types.\"\nmsgstr \"\"\n\n#: ../../api.rst:172\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../api.rst:174\nmsgid \"\"\n\"All template engines supported by :mod:`bottle` implement the \"\n\":class:`BaseTemplate` API. This way it is possible to switch and mix \"\n\"template engines without changing the application code at all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate:1\nmsgid \"Base class and minimal API for template adapters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.__init__:1\nmsgid \"\"\n\"Create a new template. If the source parameter (str or buffer) is missing, \"\n\"the name argument is used to guess a template filename. Subclasses can \"\n\"assume that self.source and/or self.filename are set. Both are strings. The \"\n\"lookup, encoding and settings parameters are stored as instance variables. \"\n\"The lookup parameter stores a list containing directory paths. The encoding \"\n\"parameter should be used to decode byte strings or files. The settings \"\n\"parameter contains a dict for engine-specific settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.search:1\nmsgid \"\"\n\"Search name in all directories specified in lookup. First without, then with\"\n\" common extensions. Return first hit.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.global_config:1\nmsgid \"This reads or sets the global settings stored in class.settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.render:1\nmsgid \"\"\n\"Render the template with the specified local variables and return a single \"\n\"byte or unicode string. If it is a byte string, the encoding must match \"\n\"self.encoding. This method must be thread-safe! Local variables may be \"\n\"provided in dictionaries (args) or directly, as keywords (kwargs).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:1\nmsgid \"\"\n\"Decorator: renders a template for a handler. The handler can control its \"\n\"behavior like that:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:4\nmsgid \"return a dict of template vars to fill out the template\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:5\nmsgid \"\"\n\"return something other than a dict and the view decorator will not process \"\n\"the template, but return the handler result as is. This includes returning a\"\n\" HTTPResponse(dict) to get, for instance, JSON with autojson or other \"\n\"castfilters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.template:1\nmsgid \"\"\n\"Get a rendered template as a string iterator. You can use a name, a filename\"\n\" or a template string as first parameter. Template rendering arguments can \"\n\"be passed as dictionaries or directly (as keyword arguments).\"\nmsgstr \"\"\n\n#: ../../api.rst:185\nmsgid \"\"\n\"You can write your own adapter for your favourite template engine or use one\"\n\" of the predefined adapters. Currently there are four fully supported \"\n\"template engines:\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Class\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"URL\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Decorator\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Render function\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":class:`SimpleTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`view`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`template`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":class:`MakoTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \"http://www.makotemplates.org\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":class:`CheetahTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \"http://www.cheetahtemplate.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":class:`Jinja2Template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \"http://jinja.pocoo.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:196\nmsgid \"\"\n\"To use :class:`MakoTemplate` as your default template engine, just import \"\n\"its specialised decorator and render function::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/async.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2015-01-22 19:17+0000\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../async.rst:2\nmsgid \"Primer to Asynchronous Applications\"\nmsgstr \"\"\n\n#: ../../async.rst:4\nmsgid \"\"\n\"Asynchronous design patterns don't mix well with the synchronous nature of \"\n\"`WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most \"\n\"asynchronous frameworks (tornado, twisted, ...) implement a specialized API \"\n\"to expose their asynchronous features. Bottle is a WSGI framework and shares\"\n\" the synchronous nature of WSGI, but thanks to the awesome `gevent project \"\n\"<http://www.gevent.org/>`_, it is still possible to write asynchronous \"\n\"applications with bottle. This article documents the usage of Bottle with \"\n\"Asynchronous WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:7\nmsgid \"The Limits of Synchronous WSGI\"\nmsgstr \"\"\n\n#: ../../async.rst:9\nmsgid \"\"\n\"Briefly worded, the `WSGI specification (pep 3333) \"\n\"<http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response \"\n\"circle as follows: The application callable is invoked once for each request\"\n\" and must return a body iterator. The server then iterates over the body and\"\n\" writes each chunk to the socket. As soon as the body iterator is exhausted,\"\n\" the client connection is closed.\"\nmsgstr \"\"\n\n#: ../../async.rst:11\nmsgid \"\"\n\"Simple enough, but there is a snag: All this happens synchronously. If your \"\n\"application needs to wait for data (IO, sockets, databases, ...), it must \"\n\"either yield empty strings (busy wait) or block the current thread. Both \"\n\"solutions occupy the handling thread and prevent it from answering new \"\n\"requests. There is consequently only one ongoing request per thread.\"\nmsgstr \"\"\n\n#: ../../async.rst:13\nmsgid \"\"\n\"Most servers limit the number of threads to avoid their relatively high \"\n\"overhead. Pools of 20 or less threads are common. As soon as all threads are\"\n\" occupied, any new connection is stalled. The server is effectively dead for\"\n\" everyone else. If you want to implement a chat that uses long-polling ajax \"\n\"requests to get real-time updates, you'd reach the limited at 20 concurrent \"\n\"connections. That's a pretty small chat.\"\nmsgstr \"\"\n\n#: ../../async.rst:16\nmsgid \"Greenlets to the rescue\"\nmsgstr \"\"\n\n#: ../../async.rst:18\nmsgid \"\"\n\"Most servers limit the size of their worker pools to a relatively low number\"\n\" of concurrent threads, due to the high overhead involved in switching \"\n\"between and creating new threads. While threads are cheap compared to \"\n\"processes (forks), they are still expensive to create for each new \"\n\"connection.\"\nmsgstr \"\"\n\n#: ../../async.rst:20\nmsgid \"\"\n\"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. \"\n\"Greenlets behave similar to traditional threads, but are very cheap to \"\n\"create. A gevent-based server can spawn thousands of greenlets (one for each\"\n\" connection) with almost no overhead. Blocking individual greenlets has no \"\n\"impact on the servers ability to accept new requests. The number of \"\n\"concurrent connections is virtually unlimited.\"\nmsgstr \"\"\n\n#: ../../async.rst:22\nmsgid \"\"\n\"This makes creating asynchronous applications incredibly easy, because they \"\n\"look and feel like synchronous applications. A gevent-based server is \"\n\"actually not asynchronous, but massively multi-threaded. Here is an \"\n\"example::\"\nmsgstr \"\"\n\n#: ../../async.rst:39\nmsgid \"\"\n\"The first line is important. It causes gevent to monkey-patch most of \"\n\"Python's blocking APIs to not block the current thread, but pass the CPU to \"\n\"the next greenlet instead. It actually replaces Python's threading with \"\n\"gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` \"\n\"which would normally block the whole thread. If you don't feel comfortable \"\n\"with monkey-patching python built-ins, you can use the corresponding gevent \"\n\"functions (``gevent.sleep()`` in this case).\"\nmsgstr \"\"\n\n#: ../../async.rst:41\nmsgid \"\"\n\"If you run this script and point your browser to \"\n\"``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and \"\n\"`END` show up one by one (rather than waiting 8 seconds to see them all at \"\n\"once). It works exactly as with normal threads, but now your server can \"\n\"handle thousands of concurrent requests without any problems.\"\nmsgstr \"\"\n\n#: ../../async.rst:45\nmsgid \"\"\n\"Some browsers buffer a certain amount of data before they start rendering a \"\n\"page. You might need to yield more than a few bytes to see an effect in \"\n\"these browsers. Additionally, many browsers have a limit of one concurrent \"\n\"connection per URL. If this is the case, you can use a second browser or a \"\n\"benchmark tool (e.g. `ab` or `httperf`) to measure performance.\"\nmsgstr \"\"\n\n#: ../../async.rst:52\nmsgid \"Event Callbacks\"\nmsgstr \"\"\n\n#: ../../async.rst:54\nmsgid \"\"\n\"A very common design pattern in asynchronous frameworks (including tornado, \"\n\"twisted, node.js and friends) is to use non-blocking APIs and bind callbacks\"\n\" to asynchronous events. The socket object is kept open until it is closed \"\n\"explicitly to allow callbacks to write to the socket at a later point. Here \"\n\"is an example based on the `tornado library \"\n\"<http://www.tornadoweb.org/documentation#non-blocking-asynchronous-\"\n\"requests>`_::\"\nmsgstr \"\"\n\n#: ../../async.rst:63\nmsgid \"\"\n\"The main benefit is that the request handler terminates early. The handling \"\n\"thread can move on and accept new requests while the callbacks continue to \"\n\"write to sockets of previous requests. This is how these frameworks manage \"\n\"to process a lot of concurrent requests with only a small number of OS \"\n\"threads.\"\nmsgstr \"\"\n\n#: ../../async.rst:65\nmsgid \"\"\n\"With Gevent+WSGI, things are different: First, terminating early has no \"\n\"benefit because we have an unlimited pool of (pseudo)threads to accept new \"\n\"connections. Second, we cannot terminate early because that would close the \"\n\"socket (as required by WSGI). Third, we must return an iterable to conform \"\n\"to WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:67\nmsgid \"\"\n\"In order to conform to the WSGI standard, all we have to do is to return a \"\n\"body iterable that we can write to asynchronously. With the help of \"\n\"`gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate*\"\n\" a detached socket and rewrite the previous example as follows::\"\nmsgstr \"\"\n\n#: ../../async.rst:78\nmsgid \"\"\n\"From the server perspective, the queue object is iterable. It blocks if \"\n\"empty and stops as soon as it reaches ``StopIteration``. This conforms to \"\n\"WSGI. On the application side, the queue object behaves like a non-blocking \"\n\"socket. You can write to it at any time, pass it around and even start a new\"\n\" (pseudo)thread that writes to it asynchronously. This is how long-polling \"\n\"is implemented most of the time.\"\nmsgstr \"\"\n\n#: ../../async.rst:82\nmsgid \"Finally: WebSockets\"\nmsgstr \"\"\n\n#: ../../async.rst:84\nmsgid \"\"\n\"Lets forget about the low-level details for a while and speak about \"\n\"WebSockets. Since you are reading this article, you probably know what \"\n\"WebSockets are: A bidirectional communication channel between a browser \"\n\"(client) and a web application (server).\"\nmsgstr \"\"\n\n#: ../../async.rst:86\nmsgid \"\"\n\"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-\"\n\"websocket/>`_ package does all the hard work for us. Here is a simple \"\n\"WebSocket endpoint that receives messages and just sends them back to the \"\n\"client::\"\nmsgstr \"\"\n\n#: ../../async.rst:111\nmsgid \"\"\n\"The while-loop runs until the client closes the connection. You get the idea\"\n\" :)\"\nmsgstr \"\"\n\n#: ../../async.rst:113\nmsgid \"The client-site JavaScript API is really straight forward, too::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/changelog.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../changelog.rst:6\nmsgid \"Release Notes and Changelog\"\nmsgstr \"\"\n\n#: ../../changelog.rst:9\nmsgid \"Release 0.13\"\nmsgstr \"\"\n\n#: ../../changelog.rst:11\nmsgid \"Not released yet.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:14\nmsgid \"Dropped support for Python versions that reached their end-of-life.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:15\nmsgid \"\"\n\"Keeping up support for ancient Python versions hinders adaptation of new \"\n\"features and serves no real purpose. If you need support for older Python \"\n\"versions, you can stay on bottle-0.12. The updated list of tested and \"\n\"supported python releases is as follows:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:20\nmsgid \"Python 2.7 (>= 2.7.3)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:21\nmsgid \"Python 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:22\nmsgid \"Python 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:23\nmsgid \"Python 3.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:24\nmsgid \"Python 3.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:25\nmsgid \"PyPy 2.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:26\nmsgid \"PyPy 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:27\nmsgid \"PyPy 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:29\nmsgid \"\"\n\"Support for Python 2.5 was marked as deprecated since 0.12. We decided to go\"\n\" a step further and also remove support for 2.6 and 3.1 to 3.5 even if it \"\n\"was never deprecated explicitly in bottle. This means that this release is \"\n\"*not* backwards compatible in Python <2.7.3 or <3.6 environments. \"\n\"Maintainers for distributions or systems that still use these old python \"\n\"versions should not update to Bottle 0.13 and stick with 0.12 instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:35\nmsgid \"Stabilized APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:36\nmsgid \"\"\n\"The documented API of the :class:`ConfigDict` class is now considered stable\"\n\" and ready to use.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:38\nmsgid \"Deprecated APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:39\nmsgid \"\"\n\"The old route syntax (``/hello/:name``) is deprecated in favor of the more \"\n\"readable and flexible ``/hello/<name>`` syntax.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:40\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes Bottle instance and will warn about \"\n\"parameters that are not compatible with the new mounting behavior. The old \"\n\"behavior (mount applications as WSGI callable) still works and is used as a \"\n\"fallback automatically.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:41\nmsgid \"The undocumented :func:`local_property` helper is now deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:42\nmsgid \"\"\n\"The server adapter for google app engine is not useful anymore and marked as\"\n\" deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:43\nmsgid \"\"\n\"Bottle uses pickle to store arbitrary objects into signed cookies. This is \"\n\"safe, as long as the signature key remains a secret. Unfortunately, people \"\n\"tend to push code with signature keys to github all the time, so we decided \"\n\"to remove pickle-support from bottle. Signed cookies will now issue a \"\n\"deprecation warning if the value is not a string, and support for non-string\"\n\" values will be removed in 0.14. The global :func:`cookie_encode`, \"\n\":func:`cookie_decode` and :func:`is_cookie_encoded` are now also deprecated.\"\n\" If you are using this feature, think about using json to serialize your \"\n\"objects before storing them into cookies, or switch to a session system that\"\n\" stores data server-side instead of client-side.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:45\nmsgid \"Removed APIs (deprecated since 0.12)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:46\nmsgid \"\"\n\"Plugins with the old API (``api=1`` or no api attribute) will no longer \"\n\"work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:47\nmsgid \"\"\n\"Parameter order of :meth:`Bottle.mount` changed in 0.10. The old order will \"\n\"now result in an error instead of a warning.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:48\nmsgid \"\"\n\"The :class:`ConfigDict` class was introduced in 0.11 and changed during \"\n\"0.12. These changes are now final.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:50\nmsgid \"\"\n\"Attribute access and assignment was removed due to high overhead and limited\"\n\" usability.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:51\nmsgid \"\"\n\"Namespaced sub-instance creation was removed. ``config[\\\"a\\\"][\\\"b\\\"]`` has a\"\n\" high overhead and little benefit over ``config[\\\"a.b\\\"]``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:52\nmsgid \"\"\n\":class:`ConfigDict` instances are no longer callable. This was a shortcut \"\n\"for :meth:`ConfigDict.update`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:53\nmsgid \"\"\n\":class:`ConfigDict` constructor no longer accepts any parameters. Use the \"\n\"`load_*` methods instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:55\nmsgid \"\"\n\"Bottle 0.12 changed some aspects of the Simple Template Engine. These \"\n\"changes are now final and the old syntax will now longer work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:57\nmsgid \"\"\n\"The magic ``{{rebase()}}`` call was replaced by a ``base`` variable. \"\n\"Example: ``{{base}}``\"\nmsgstr \"\"\n\n#: ../../changelog.rst:58\nmsgid \"\"\n\"In STPL Templates, the 'rebase' and 'include' keywords were replaced with \"\n\"functions in 0.12.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:59\nmsgid \"\"\n\"PEP-263 encoding strings are no longer recognized. Templates are always \"\n\"utf-8.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:61\nmsgid \"\"\n\"The 'geventSocketIO' server adapter was removed without notice. It did not \"\n\"work anyway.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:63\nmsgid \"Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:64\nmsgid \"These changes might require special care when updating.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:66\nmsgid \"\"\n\"Signed cookies now use a stronger HMAC algorithm by default. This will \"\n\"result in old cookies to appear invalid after the update. Pass an explicit \"\n\"``digestmod=hashlib.md5`` to :meth:`Request.get_cookie` and \"\n\":meth:`Response.set_cookie` to get the old behavior.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:68\nmsgid \"Other Improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:69\nmsgid \"\"\n\"Bottle() instances are now context managers. If used in a with-statement, \"\n\"the default application changes to the specific instance and the shortcuts \"\n\"for many instance methods can be used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:70\nmsgid \"\"\n\"Added support for ``PATCH`` requests and the :meth:`Bottle.patch` decorator.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:71\nmsgid \"\"\n\"Added `aiohttp <http://aiohttp.readthedocs.io/en/stable/>`_ and `uvloop \"\n\"<https://github.com/MagicStack/uvloop>`_ server adapters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:72\nmsgid \"Added command-line arguments for config from json or ini files.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:73\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes instances of :class:`Bottle` and mounts \"\n\"them with significantly less overhead than other WSGI applications.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:74\nmsgid \"\"\n\"The :attr:`Request.json` property now accepts ``application/json-rpc`` \"\n\"requests.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:75\nmsgid \"\"\n\":func:`static_file` gained support for ``ETag`` headers. It will generate \"\n\"ETags and recognizes ``If-None-Match`` headers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:76\nmsgid \"Jinja2 templates will produce better error messages than before.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:82\nmsgid \"Release 0.12\"\nmsgstr \"\"\n\n#: ../../changelog.rst:84\nmsgid \"New SimpleTemplate parser implementation\"\nmsgstr \"\"\n\n#: ../../changelog.rst:86\nmsgid \"Support for multi-line code blocks (`<% ... %>`).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:87\nmsgid \"\"\n\"The keywords `include` and `rebase` are functions now and can accept \"\n\"variable template names.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:89\nmsgid \"\"\n\"The new :attr:`BaseRequest.route` property returns the :class:`Route` that \"\n\"originally matched the request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:90\nmsgid \"\"\n\"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in \"\n\"CPythons dict() implementation was fixed over a year ago. If you are still \"\n\"using Python 2.5 in production, consider upgrading or at least make sure \"\n\"that you get security fixed from your distributor.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:91\nmsgid \"New :class:`ConfigDict` API (see :doc:`configuration`)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:93\nmsgid \"\"\n\"More information can be found in this `development blog post \"\n\"<http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:97\nmsgid \"Release 0.11\"\nmsgstr \"\"\n\n#: ../../changelog.rst:99\nmsgid \"\"\n\"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:100\nmsgid \"\"\n\"Support for partial downloads (``Range`` header) in :func:`static_file`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:101\nmsgid \"\"\n\"The new :class:`ResourceManager` interface helps locating files bundled with\"\n\" an application.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:102\nmsgid \"\"\n\"Added a server adapter for `waitress \"\n\"<http://docs.pylonsproject.org/projects/waitress/en/latest/>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:103\nmsgid \"\"\n\"New :meth:`Bottle.merge` method to install all routes from one application \"\n\"into another.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:104\nmsgid \"\"\n\"New :attr:`BaseRequest.app` property to get the application object that \"\n\"handles a request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:105\nmsgid \"\"\n\"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by \"\n\"WTForms).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:106\nmsgid \":class:`MultiDict` and subclasses are now pickle-able.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:109\nmsgid \"API Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:110\nmsgid \"\"\n\":attr:`Response.status` is a read-write property that can be assigned either\"\n\" a numeric status code or a status string with a reason phrase (``200 OK``).\"\n\" The return value is now a string to better match existing APIs (WebOb, \"\n\"werkzeug). To be absolutely clear, you can use the read-only properties \"\n\":attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:113\nmsgid \"API Deprecations\"\nmsgstr \"\"\n\n#: ../../changelog.rst:114\nmsgid \"\"\n\":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:117\nmsgid \"Release 0.10\"\nmsgstr \"\"\n\n#: ../../changelog.rst:119\nmsgid \"Plugin API v2\"\nmsgstr \"\"\n\n#: ../../changelog.rst:121\nmsgid \"To use the new API, set :attr:`Plugin.api` to ``2``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:122\nmsgid \"\"\n\":meth:`Plugin.apply` receives a :class:`Route` object instead of a context \"\n\"dictionary as second parameter. The new object offers some additional \"\n\"information and may be extended in the future.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:123\nmsgid \"\"\n\"Plugin names are considered unique now. The topmost plugin with a given name\"\n\" on a given route is installed, all other plugins with the same name are \"\n\"silently ignored.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:125\nmsgid \"The Request/Response Objects\"\nmsgstr \"\"\n\n#: ../../changelog.rst:127\nmsgid \"\"\n\"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, \"\n\":attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and \"\n\":attr:`BaseRequest.script_name`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:128\nmsgid \"\"\n\"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` \"\n\"attributes. In future releases, :attr:`BaseResponse.status` will return a \"\n\"string (e.g. ``200 OK``) instead of an integer to match the API of other \"\n\"common frameworks. To make the transition as smooth as possible, you should \"\n\"use the verbose attributes from now on.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:129\nmsgid \"\"\n\"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many \"\n\"places. The new dict implementation allows attribute access and handles \"\n\"unicode form values transparently.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:131\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../changelog.rst:133\nmsgid \"\"\n\"Added three new functions to the SimpleTemplate default namespace that \"\n\"handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and \"\n\":func:`stpl.setdefault`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:134\nmsgid \"\"\n\"The default escape function for SimpleTemplate now additionally escapes \"\n\"single and double quotes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:136\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../changelog.rst:138\nmsgid \"\"\n\"A new route syntax (e.g. ``/object/<id:int>``) and support for route \"\n\"wildcard filters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:139\nmsgid \"Four new wildcard filters: `int`, `float`, `path` and `re`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:141\nmsgid \"Other changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:143\nmsgid \"Added command line interface to load applications and start servers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:144\nmsgid \"\"\n\"Introduced a :class:`ConfigDict` that makes accessing configuration a lot \"\n\"easier (attribute access and auto-expanding namespaces).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:145\nmsgid \"Added support for raw WSGI applications to :meth:`Bottle.mount`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:146\nmsgid \":meth:`Bottle.mount` parameter order changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:147\nmsgid \"\"\n\":meth:`Bottle.route` now accpets an import string for the ``callback`` \"\n\"parameter.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:148\nmsgid \"Dropped Gunicorn 0.8 support. Current supported version is 0.13.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:149\nmsgid \"Added custom options to Gunicorn server.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:150\nmsgid \"\"\n\"Finally dropped support for type filters. Replace with a custom plugin of \"\n\"needed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:154\nmsgid \"Release 0.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:157\nmsgid \"Whats new?\"\nmsgstr \"\"\n\n#: ../../changelog.rst:158\nmsgid \"\"\n\"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:159\nmsgid \"\"\n\"The :func:`route` decorator got a lot of new features. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:160\nmsgid \"\"\n\"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld \"\n\"<http://meinheld.org/>`_ and `bjoern \"\n\"<https://github.com/jonashaag/bjoern>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:161\nmsgid \"Support for SimpleTAL templates.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:162\nmsgid \"Better runtime exception handling for mako templates in debug mode.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:163\nmsgid \"Lots of documentation, fixes and small improvements.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:164\nmsgid \"A new :data:`Request.urlparts` property.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:167\nmsgid \"Performance improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:168\nmsgid \"\"\n\"The :class:`Router` now special-cases ``wsgi.run_once`` environments to \"\n\"speed up CGI.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:169\nmsgid \"\"\n\"Reduced module load time by ~30% and optimized template parser. See `8ccb2d \"\n\"</commit/8ccb2d>`_, `f72a7c </commit/f72a7c>`_ and `b14b9a \"\n\"</commit/b14b9a>`_ for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:170\nmsgid \"\"\n\"Support for \\\"App Caching\\\" on Google App Engine. See `af93ec \"\n\"</commit/af93ec>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:171\nmsgid \"\"\n\"Some of the rarely used or deprecated features are now plugins that avoid \"\n\"overhead if the feature is not used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:174 ../../changelog.rst:185\nmsgid \"API changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:175\nmsgid \"\"\n\"This release is mostly backward compatible, but some APIs are marked \"\n\"deprecated now and will be removed for the next release. Most noteworthy:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:177\nmsgid \"\"\n\"The ``static`` route parameter is deprecated. You can escape wild-cards with\"\n\" a backslash.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:178\nmsgid \"\"\n\"Type-based output filters are deprecated. They can easily be replaced with \"\n\"plugins.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:182\nmsgid \"Release 0.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:186\nmsgid \"These changes may break compatibility with previous versions.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:188\nmsgid \"\"\n\"The built-in Key/Value database is not available anymore. It is marked \"\n\"deprecated since 0.6.4\"\nmsgstr \"\"\n\n#: ../../changelog.rst:189\nmsgid \"The Route syntax and behaviour changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:191\nmsgid \"\"\n\"Regular expressions must be encapsulated with ``#``. In 0.6 all non-\"\n\"alphanumeric characters not present in the regular expression were allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:192\nmsgid \"\"\n\"Regular expressions not part of a route wildcard are escaped automatically. \"\n\"You don't have to escape dots or other regular control characters anymore. \"\n\"In 0.6 the whole URL was interpreted as a regular expression. You can use \"\n\"anonymous wildcards (``/index:#(\\\\.html)?#``) to achieve a similar \"\n\"behaviour.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:194\nmsgid \"\"\n\"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:195\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine escapes HTML special characters in \"\n\"``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` \"\n\"syntax to get old behaviour (no escaping).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:196\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine returns unicode strings instead of lists \"\n\"of byte strings.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:197\nmsgid \"\"\n\"``bottle.optimize()`` and the automatic route optimization is obsolete.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:198\nmsgid \"Some functions and attributes were renamed:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:200\nmsgid \":attr:`Request._environ` is now :attr:`Request.environ`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:201\nmsgid \":attr:`Response.header` is now :attr:`Response.headers`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:202\nmsgid \":func:`default_app` is obsolete. Use :func:`app` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:204\nmsgid \"The default :func:`redirect` code changed from 307 to 303.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:205\nmsgid \"Removed support for ``@default``. Use ``@error(404)`` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:209\nmsgid \"New features\"\nmsgstr \"\"\n\n#: ../../changelog.rst:210\nmsgid \"This is an incomplete list of new features and improved functionality.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:212\nmsgid \"\"\n\"The :class:`Request` object got new properties: :attr:`Request.body`, \"\n\":attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, \"\n\":attr:`Request.forms`, :attr:`Request.files`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:213\nmsgid \"\"\n\"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are \"\n\"now able to encode and decode python objects. This is called a *secure \"\n\"cookie* because the encoded values are signed and protected from changes on \"\n\"client side. All pickle-able data structures are allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:214\nmsgid \"\"\n\"The new :class:`Router` class drastically improves performance for setups \"\n\"with lots of dynamic routes and supports named routes (named route + dict = \"\n\"URL string).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:215\nmsgid \"\"\n\"It is now possible (and recommended) to return :exc:`HTTPError` and \"\n\":exc:`HTTPResponse` instances or other exception objects instead of raising \"\n\"them.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:216\nmsgid \"\"\n\"The new function :func:`static_file` equals :func:`send_file` but returns a \"\n\":exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. \"\n\":func:`send_file` is deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:217\nmsgid \"\"\n\"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:218\nmsgid \"The :class:`SimpleTemplate` engine got full unicode support.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:219\nmsgid \"Lots of non-critical bugfixes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:225\nmsgid \"Contributors\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:1\nmsgid \"\"\n\"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:3\nmsgid \"\"\n\"Thanks to all the people who found bugs, sent patches, spread the word, \"\n\"helped each other on the mailing-list and made this project possible. I hope\"\n\" the following (alphabetically sorted) list is complete. If you miss your \"\n\"name on that list (or want your name removed) please :doc:`tell me \"\n\"<contact>` or add it yourself.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:5\nmsgid \"acasajus\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:6\nmsgid \"Adam R. Smith\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:7\nmsgid \"Alexey Borzenkov\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:8\nmsgid \"Alexis Daboville\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:9\nmsgid \"Anton I. Sipos\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:10\nmsgid \"Anton Kolechkin\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:11\nmsgid \"apexi200sx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:12\nmsgid \"apheage\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:13\nmsgid \"BillMa\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:14\nmsgid \"Brad Greenlee\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:15\nmsgid \"Brandon Gilmore\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:16\nmsgid \"Branko Vukelic\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:17\nmsgid \"Brian Sierakowski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:18\nmsgid \"Brian Wickman\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:19\nmsgid \"Carl Scharenberg\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:20\nmsgid \"Damien Degois\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:21\nmsgid \"David Buxton\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:22\nmsgid \"Duane Johnson\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:23\nmsgid \"fcamel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:24\nmsgid \"Frank Murphy\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:25\nmsgid \"Frederic Junod\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:26\nmsgid \"goldfaber3012\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:27\nmsgid \"Greg Milby\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:28\nmsgid \"gstein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:29\nmsgid \"Ian Davis\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:30\nmsgid \"Itamar Nabriski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:31\nmsgid \"Iuri de Silvio\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:32\nmsgid \"Jaimie Murdock\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:33\nmsgid \"Jeff Nichols\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:34\nmsgid \"Jeremy Kelley\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:35\nmsgid \"joegester\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:36\nmsgid \"Johannes Krampf\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:37\nmsgid \"Jonas Haag\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:38\nmsgid \"Joshua Roesslein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:39\nmsgid \"Judson Neer\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:40\nmsgid \"Karl\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:41\nmsgid \"Kevin Zuber\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:42\nmsgid \"Kraken\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:43\nmsgid \"Kyle Fritz\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:44\nmsgid \"m35\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:45\nmsgid \"Marcos Neves\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:46\nmsgid \"masklinn\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:47\nmsgid \"Michael Labbe\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:48\nmsgid \"Michael Soulier\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:49\nmsgid \"`reddit <http://reddit.com/r/python>`_\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:50\nmsgid \"Nicolas Vanhoren\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:51\nmsgid \"Oz N Tiram\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:52\nmsgid \"Robert Rollins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:53\nmsgid \"rogererens\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:54\nmsgid \"rwxrwx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:55\nmsgid \"Santiago Gala\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:56\nmsgid \"Sean M. Collins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:57\nmsgid \"Sebastian Wollrath\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:58\nmsgid \"Seth\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:59\nmsgid \"Sigurd Høgsbro\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:60\nmsgid \"Stuart Rackham\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:61\nmsgid \"Sun Ning\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:62\nmsgid \"Tomás A. Schertel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:63\nmsgid \"Tristan Zajonc\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:64\nmsgid \"voltron\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:65\nmsgid \"Wieland Hoffmann\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:66\nmsgid \"zombat\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:67\nmsgid \"Thiago Avelino\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/configuration.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../configuration.rst:3\nmsgid \"Configuration (DRAFT)\"\nmsgstr \"\"\n\n#: ../../configuration.rst:8\nmsgid \"\"\n\"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_\"\n\" what you think.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:10\nmsgid \"\"\n\"Bottle applications can store their configuration in :attr:`Bottle.config`, \"\n\"a dict-like object and central place for application specific settings. This\"\n\" dictionary controls many aspects of the framework, tells (newer) plugins \"\n\"what to do, and can be used to store your own configuration as well.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:13\nmsgid \"Configuration Basics\"\nmsgstr \"\"\n\n#: ../../configuration.rst:15\nmsgid \"\"\n\"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. \"\n\"All the common dict methods work as expected. Let us start with some \"\n\"examples::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:44\nmsgid \"\"\n\"The app object is not always available, but as long as you are within a \"\n\"request context, you can use the `request` object to get the current \"\n\"application and its configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:51\nmsgid \"Naming Convention\"\nmsgstr \"\"\n\n#: ../../configuration.rst:53\nmsgid \"\"\n\"To make life easier, plugins and applications should follow some simple \"\n\"rules when it comes to config parameter names:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:55\nmsgid \"\"\n\"All keys should be lowercase strings and follow the rules for python \"\n\"identifiers (no special characters but the underscore).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:56\nmsgid \"\"\n\"Namespaces are separated by dots (e.g. ``namespace.field`` or \"\n\"``namespace.subnamespace.field``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:57\nmsgid \"\"\n\"Bottle uses the root namespace for its own configuration. Plugins should \"\n\"store all their variables in their own namespace (e.g. ``sqlite.db`` or \"\n\"``werkzeug.use_debugger``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:58\nmsgid \"\"\n\"Your own application should use a separate namespace (e.g. ``myapp.*``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:62\nmsgid \"Loading Configuration from a File\"\nmsgstr \"\"\n\n#: ../../configuration.rst:66\nmsgid \"\"\n\"Configuration files are useful if you want to enable non-programmers to \"\n\"configure your application, or just don't want to hack python module files \"\n\"just to change the database port. A very common syntax for configuration \"\n\"files is shown here:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:78\nmsgid \"\"\n\"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style \"\n\"configuration files from disk and import their values into your existing \"\n\"configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:85\nmsgid \"Loading Configuration from a python module\"\nmsgstr \"\"\n\n#: ../../configuration.rst:89\nmsgid \"\"\n\"Loading configuration from a Python module is a common pattern for Python \"\n\"programs and frameworks. Bottle assumes that configuration keys are all \"\n\"upper case:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:98\nmsgid \"\"\n\"You can load the this Python module with :met:`ConfigDict.load_module`::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:107\nmsgid \"\"\n\"Note the second parameter to disable loading as namespaced items as in \"\n\":meth:`ConfigDict.load_dict`. By default, loading from a Python module will \"\n\"call this method, unless you specifically call this method with `False` as \"\n\"the second argument.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:110\nmsgid \"Loading Configuration from a nested :class:`dict`\"\nmsgstr \"\"\n\n#: ../../configuration.rst:114\nmsgid \"\"\n\"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an \"\n\"entire structure of nested dictionaries and turns it into a flat list of \"\n\"keys and values with namespaced keys::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:135\nmsgid \"Listening to configuration changes\"\nmsgstr \"\"\n\n#: ../../configuration.rst:139\nmsgid \"\"\n\"The ``config`` hook on the application object is triggered each time a value\"\n\" in :attr:`Bottle.config` is changed. This hook can be used to react on \"\n\"configuration changes at runtime, for example reconnect to a new database, \"\n\"change the debug settings on a background service or resize worker thread \"\n\"pools. The hook callback receives two arguments (key, new_value) and is \"\n\"called before the value is actually changed in the dictionary. Raising an \"\n\"exception from a hook callback cancels the change and the old value is \"\n\"preserved.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:148\nmsgid \"\"\n\"The hook callbacks cannot *change* the value that is to be stored to the \"\n\"dictionary. That is what filters are for.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:154\nmsgid \"Filters and other Meta Data\"\nmsgstr \"\"\n\n#: ../../configuration.rst:158\nmsgid \"\"\n\":class:`ConfigDict` allows you to store meta data along with configuration \"\n\"keys. Two meta fields are currently defined:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:162\nmsgid \"help\"\nmsgstr \"\"\n\n#: ../../configuration.rst:161\nmsgid \"\"\n\"A help or description string. May be used by debugging, introspection or \"\n\"admin tools to help the site maintainer configuring their application.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"filter\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"\"\n\"A callable that accepts and returns a single value. If a filter is defined \"\n\"for a key, any new value stored to that key is first passed through the \"\n\"filter callback. The filter can be used to cast the value to a different \"\n\"type, check for invalid values (throw a ValueError) or trigger side effects.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:167\nmsgid \"\"\n\"This feature is most useful for plugins. They can validate their config \"\n\"parameters or trigger side effects using filters and document their \"\n\"configuration via ``help`` fields::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:189\nmsgid \"API Documentation\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:1\nmsgid \"\"\n\"A dict-like configuration storage with additional support for namespaces, \"\n\"validators, meta-data, overlays and more.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:4\nmsgid \"\"\n\"This dict-like class is heavily optimized for read access. All read-only \"\n\"methods as well as item access should be as fast as the built-in dict.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:1\nmsgid \"Load values from a Python module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:3\nmsgid \"Example modue ``config.py``::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:0\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:17\nmsgid \"\"\n\"If true (default), dictionary values are assumed to represent namespaces \"\n\"(see :meth:`load_dict`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:1\nmsgid \"Load values from an ``*.ini`` style config file.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:3\nmsgid \"\"\n\"A configuration file consists of sections, each led by a ``[section]`` \"\n\"header, followed by key/value entries separated by either ``=`` or ``:``. \"\n\"Section names and keys are case-insensitive. Leading and trailing whitespace\"\n\" is removed from keys and values. Values can be omitted, in which case the \"\n\"key/value delimiter may also be left out. Values can also span multiple \"\n\"lines, as long as they are indented deeper than the first line of the value.\"\n\" Commands are prefixed by ``#`` or ``;`` and may only appear on their own on\"\n\" an otherwise empty line.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:13\nmsgid \"\"\n\"Both section and key names may contain dots (``.``) as namespace separators.\"\n\" The actual configuration parameter name is constructed by joining section \"\n\"name and key name together and converting to lower case.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:18\nmsgid \"\"\n\"The special sections ``bottle`` and ``ROOT`` refer to the root namespace and\"\n\" the ``DEFAULT`` section defines default values for all other sections.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:22\nmsgid \"With Python 3, extended string interpolation is enabled.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:24\nmsgid \"The path of a config file, or a list of paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:25\nmsgid \"\"\n\"All keyword parameters are passed to the underlying \"\n\":class:`python:configparser.ConfigParser` constructor call.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_dict:1\nmsgid \"\"\n\"Load values from a dictionary structure. Nesting can be used to represent \"\n\"namespaces.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.update:1\nmsgid \"\"\n\"If the first parameter is a string, all keys are prefixed with this \"\n\"namespace. Apart from that it works just as the usual dict.update().\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:1\nmsgid \"Insert key with a value of default if key is not in the dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:3\nmsgid \"Return the value for key if key is in the dictionary, else default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_get:1\nmsgid \"Return the value of a meta field for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_set:1\nmsgid \"Set the meta field for a key to a new value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_list:1\nmsgid \"Return an iterable of meta field names defined for a key.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/contact.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../contact.rst:3\nmsgid \"Contact\"\nmsgstr \"\"\n\n#: ../../contact.rst:6\nmsgid \"About the Author\"\nmsgstr \"\"\n\n#: ../../contact.rst:7\nmsgid \"\"\n\"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy \"\n\"behind this website. I'm 27 years old and studying computer science at the \"\n\"Georg-August-University in Göttingen, Germany. Python is my favorite \"\n\"language, but I also code in ruby and JavaScript a lot. Watch me on `twitter\"\n\" <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub \"\n\"<http://github.com/defnull>`_ to get in contact. A `mailinglist \"\n\"<http://groups.google.de/group/bottlepy>`_ is open for Bottle related \"\n\"questions, too.\"\nmsgstr \"\"\n\n#: ../../contact.rst:10\nmsgid \"About Bottle\"\nmsgstr \"Sobre o Bottle\"\n\n#: ../../contact.rst:11\nmsgid \"\"\n\"This is my first open source project so far. It started and a small \"\n\"experiment but soon got so much positive feedback I decided to make \"\n\"something real out of it. Here it is.\"\nmsgstr \"\"\n\n#: ../../contact.rst:14\nmsgid \"Impressum und Kontaktdaten\"\nmsgstr \"\"\n\n#: ../../contact.rst:15\nmsgid \"\"\n\"(This is required by `German law \"\n\"<http://bundesrecht.juris.de/tmg/__5.html>`_)\"\nmsgstr \"\"\n\n#: ../../contact.rst:17\nmsgid \"\"\n\"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die \"\n\"Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen \"\n\"vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist \"\n\"ausdrücklich untersagt.\"\nmsgstr \"\"\n\n#: ../../contact.rst:22\nmsgid \"**Betreiber**: Marcel Hellkamp\"\nmsgstr \"\"\n\n#: ../../contact.rst:23\nmsgid \"**Ort**: D - 37075 Göttingen\"\nmsgstr \"\"\n\n#: ../../contact.rst:24\nmsgid \"**Strasse**: Theodor-Heuss Strasse 13\"\nmsgstr \"\"\n\n#: ../../contact.rst:25\nmsgid \"**Telefon**: +49 (0) 551 20005915\"\nmsgstr \"\"\n\n#: ../../contact.rst:26\nmsgid \"**E-Mail**: marc at gsites dot de\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/deployment.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../deployment.rst:27\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../deployment.rst:29\nmsgid \"\"\n\"The bottle :func:`run` function, when called without any parameters, starts \"\n\"a local development server on port 8080. You can access and test your \"\n\"application via http://localhost:8080/ if you are on the same host.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:31\nmsgid \"\"\n\"To get your application available to the outside world, specify the IP the \"\n\"server should listen to (e.g. ``run(host='192.168.0.1')``) or let the server\"\n\" listen to all interfaces at once (e.g. ``run(host='0.0.0.0')``). The \"\n\"listening port can be changed in a similar way, but you need root or admin \"\n\"rights to choose a port below 1024. Port 80 is the standard for HTTP \"\n\"servers::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:37\nmsgid \"Server Options\"\nmsgstr \"\"\n\n#: ../../deployment.rst:39\nmsgid \"\"\n\"The built-in default server is based on `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-\"\n\"wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine \"\n\"for development, but may become a performance bottleneck when server load \"\n\"increases. There are three ways to eliminate this bottleneck:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:41\nmsgid \"\"\n\"Use a different server that is either multi-threaded or supports \"\n\"asynchronous IO.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:42\nmsgid \"\"\n\"Start multiple server processes and spread the load with a load-balancer.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:43\nmsgid \"Do both.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:45\nmsgid \"\"\n\"**Multi-threaded** servers are the 'classic' way to do it. They are very \"\n\"robust, reasonably fast and easy to manage. As a drawback, they can only \"\n\"handle a limited number of connections at the same time and utilize only one\"\n\" CPU core due to the \\\"Global Interpreter Lock\\\" (GIL) of the Python \"\n\"runtime. This does not hurt most applications, they are waiting for network \"\n\"IO most of the time anyway, but may slow down CPU intensive tasks (e.g. \"\n\"image processing).\"\nmsgstr \"\"\n\n#: ../../deployment.rst:47\nmsgid \"\"\n\"**Asynchronous IO** servers are very fast, can handle a virtually unlimited \"\n\"number of concurrent connections and are easy to manage. To take full \"\n\"advantage of their potential, you need to design your application \"\n\"accordingly and understand the concepts of the specific server.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:49\nmsgid \"\"\n\"**Multi-processing** (forking) servers are not limited by the GIL and \"\n\"utilize more than one CPU core, but make communication between server \"\n\"instances more expensive. You need a database or external message query to \"\n\"share state between processes, or design your application so that it does \"\n\"not need any shared state. The setup is also a bit more complicated, but \"\n\"there are good tutorials available.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:52\nmsgid \"Switching the Server Backend\"\nmsgstr \"\"\n\n#: ../../deployment.rst:54\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded default server::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:58\nmsgid \"\"\n\"Bottle ships with a lot of ready-to-use adapters for the most common WSGI \"\n\"servers and automates the setup process. Here is an incomplete list:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Name\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Homepage\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"cgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"Run as CGI script\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"Run as FastCGI process\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"Helper for Google App Engine deployments\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"Single-threaded default server\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"Multi-threaded and very stable\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"Multi-threaded, stable, tried and tested\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"Multi-threaded, poweres Pyramid\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"Pre-forked, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"Asynchronous framework with WSGI support.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72 ../../deployment.rst:73\nmsgid \"Asynchronous (greenlets)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"Asynchronous, powers some parts of Facebook\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"Asynchronous, well tested but... twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"Asynchronous, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"Asynchronous, very fast and written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"auto\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"Automatically selects an available server adapter\"\nmsgstr \"\"\n\n#: ../../deployment.rst:81\nmsgid \"The full list is available through :data:`server_names`.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:83\nmsgid \"\"\n\"If there is no adapter for your favorite server or if you need more control \"\n\"over the server setup, you may want to start the server manually. Refer to \"\n\"the server documentation on how to run WSGI applications. Here is an example\"\n\" for paste_::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:91\nmsgid \"Apache mod_wsgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:93\nmsgid \"\"\n\"Instead of running your own HTTP server from within Bottle, you can attach \"\n\"Bottle applications to an `Apache server <apache>`_ using mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:95\nmsgid \"\"\n\"All you need is an ``app.wsgi`` file that provides an ``application`` \"\n\"object. This object is used by mod_wsgi to start your application and should\"\n\" be a WSGI-compatible Python callable.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:97\nmsgid \"File ``/var/www/yourapp/app.wsgi``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:108\nmsgid \"The Apache configuration may look like this::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:126\nmsgid \"uWSGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:128\nmsgid \"\"\n\"uWSGI_ is a modern alternative to FastCGI and the recommended deployment \"\n\"option on servers like nginx_, lighttpd_, and cherokee_. The uWSGI project \"\n\"provides an application server that runs your application, and defines a \"\n\"protocol that frontend webservers can speak to. Have a look at the excellent\"\n\" `Quickstart for Python/WSGI applications <https://uwsgi-\"\n\"docs.readthedocs.io/en/latest/WSGIquickstart.html>`_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:132\nmsgid \"Google AppEngine\"\nmsgstr \"\"\n\n#: ../../deployment.rst:136\nmsgid \"\"\n\"New App Engine applications using the Python 2.7 runtime environment support\"\n\" any WSGI application and should be configured to use the Bottle application\"\n\" object directly. For example suppose your application's main module is \"\n\"``myapp.py``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:146\nmsgid \"\"\n\"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object \"\n\"like so::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:158\nmsgid \"\"\n\"It is always a good idea to let GAE serve static files directly. Here is \"\n\"example for a working  ``app.yaml`` (using the legacy Python 2.5 runtime \"\n\"environment)::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:175\nmsgid \"Load Balancer (Manual Setup)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:177\nmsgid \"\"\n\"A single Python process can utilize only one CPU at a time, even if there \"\n\"are more CPU cores available. The trick is to balance the load between \"\n\"multiple independent Python processes to utilize all of your CPU cores.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:179\nmsgid \"\"\n\"Instead of a single Bottle application server, you start one instance for \"\n\"each CPU core available using different local port (localhost:8080, 8081, \"\n\"8082, ...). You can choose any server adapter you want, even asynchronous \"\n\"ones. Then a high performance load balancer acts as a reverse proxy and \"\n\"forwards each new requests to a random port, spreading the load between all \"\n\"available back-ends. This way you can use all of your CPU cores and even \"\n\"spread out the load between different physical servers.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:181\nmsgid \"\"\n\"One of the fastest load balancers available is Pound_ but most common web \"\n\"servers have a proxy-module that can do the work just fine.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:183\nmsgid \"Pound example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:201\nmsgid \"Apache example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:209\nmsgid \"Lighttpd example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:221\nmsgid \"Good old CGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:223\nmsgid \"\"\n\"A CGI server starts a new process for each request. This adds a lot of \"\n\"overhead but is sometimes the only option, especially on cheap hosting \"\n\"packages. The `cgi` server adapter does not actually start a CGI server, but\"\n\" transforms your bottle application into a valid CGI application::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/development.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../development.rst:2\nmsgid \"Developer Notes\"\nmsgstr \"\"\n\n#: ../../development.rst:4\nmsgid \"\"\n\"This document is intended for developers and package maintainers interested \"\n\"in the bottle development and release workflow. If you want to contribute, \"\n\"you are just right!\"\nmsgstr \"\"\n\n#: ../../development.rst:8\nmsgid \"Get involved\"\nmsgstr \"\"\n\n#: ../../development.rst:10\nmsgid \"\"\n\"There are several ways to join the community and stay up to date. Here are \"\n\"some of them:\"\nmsgstr \"\"\n\n#: ../../development.rst:12\nmsgid \"\"\n\"**Mailing list**: Join our mailing list by sending an email to \"\n\"`bottlepy+subscribe@googlegroups.com \"\n\"<mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required).\"\nmsgstr \"\"\n\n#: ../../development.rst:13\nmsgid \"\"\n\"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or \"\n\"search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag.\"\nmsgstr \"\"\n\n#: ../../development.rst:14\nmsgid \"\"\n\"**IRC**: Join `#bottlepy on irc.freenode.net \"\n\"<irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:15\nmsgid \"\"\n\"**Google plus**: We sometimes `blog about Bottle, releases and technical \"\n\"stuff \"\n\"<https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_\"\n\" on our Google+ page.\"\nmsgstr \"\"\n\n#: ../../development.rst:19\nmsgid \"Get the Sources\"\nmsgstr \"\"\n\n#: ../../development.rst:21\nmsgid \"\"\n\"The bottle `development repository <https://github.com/bottlepy/bottle>`_ \"\n\"and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are \"\n\"both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan \"\n\"to contribute, it is a good idea to create an account there and fork the \"\n\"main repository. This way your changes and ideas are visible to other \"\n\"developers and can be discussed openly. Even without an account, you can \"\n\"clone the repository or just download the latest development version as a \"\n\"source archive.\"\nmsgstr \"\"\n\n#: ../../development.rst:23\nmsgid \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:24\nmsgid \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:25\nmsgid \"\"\n\"**Download:** Development branch as `tar archive \"\n\"<http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file \"\n\"<http://github.com/bottlepy/bottle/zipball/master>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:26\nmsgid \"\"\n\"**Translations:** `transifex.com/projects/p/bottle \"\n\"<https://www.transifex.com/projects/p/bottle/>`_\"\nmsgstr \"\"\n\n#: ../../development.rst:30\nmsgid \"Releases and Updates\"\nmsgstr \"\"\n\n#: ../../development.rst:32\nmsgid \"\"\n\"Bottle is released at irregular intervals and distributed through `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-\"\n\"revisions of outdated releases are only available from the git repository \"\n\"mentioned above. Some Linux distributions may offer packages for outdated \"\n\"releases, though.\"\nmsgstr \"\"\n\n#: ../../development.rst:34\nmsgid \"\"\n\"The Bottle version number splits into three parts \"\n\"(**major.minor.revision**). These are *not* used to promote new features but\"\n\" to indicate important bug-fixes and/or API changes. Critical bugs are fixed\"\n\" in at least the two latest minor releases and announced in all available \"\n\"channels (mailinglist, twitter, github). Non-critical bugs or features are \"\n\"not guaranteed to be backported. This may change in the future, through.\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"Major Release (x.0)\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"\"\n\"The major release number is increased on important milestones or updates \"\n\"that completely break backward compatibility. You probably have to work over\"\n\" your entire application to use a new release. These releases are very rare,\"\n\" through.\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"Minor Release (x.y)\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"\"\n\"The minor release number is increased on updates that change the API or \"\n\"behaviour in some way. You might get some depreciation warnings any may have\"\n\" to tweak some configuration settings to restore the old behaviour, but in \"\n\"most cases these changes are designed to be backward compatible for at least\"\n\" one minor release. You should update to stay up do date, but don't have to.\"\n\" An exception is 0.8, which *will* break backward compatibility hard. (This \"\n\"is why 0.7 was skipped). Sorry about that.\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"Revision (x.y.z)\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"\"\n\"The revision number is increased on bug-fixes and other patches that do not \"\n\"change the API or behaviour. You can safely update without editing your \"\n\"application code. In fact, you really should as soon as possible, because \"\n\"important security fixes are released this way.\"\nmsgstr \"\"\n\n#: ../../development.rst:47\nmsgid \"Pre-Release Versions\"\nmsgstr \"\"\n\n#: ../../development.rst:46\nmsgid \"\"\n\"Release candidates are marked by an ``rc`` in their revision number. These \"\n\"are API stable most of the time and open for testing, but not officially \"\n\"released yet. You should not use these for production.\"\nmsgstr \"\"\n\n#: ../../development.rst:50\nmsgid \"Repository Structure\"\nmsgstr \"\"\n\n#: ../../development.rst:52\nmsgid \"The source repository is structured as follows:\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"``master`` branch\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"\"\n\"This is the integration, testing and development branch. All changes that \"\n\"are planned to be part of the next release are merged and tested here.\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"``release-x.y`` branches\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"\"\n\"As soon as the master branch is (almost) ready for a new release, it is \"\n\"branched into a new release branch. This \\\"release candidate\\\" is feature-\"\n\"frozen but may receive bug-fixes and last-minute changes until it is \"\n\"considered production ready and officially released. From that point on it \"\n\"is called a \\\"support branch\\\" and still receives bug-fixes, but only \"\n\"important ones. The revision number is increased on each push to these \"\n\"branches, so you can keep up with important changes.\"\nmsgstr \"\"\n\n#: ../../development.rst:62\nmsgid \"Feature branches\"\nmsgstr \"\"\n\n#: ../../development.rst:61\nmsgid \"\"\n\"All other branches are feature branches. These are based on the master \"\n\"branch and only live as long as they are still active and not merged back \"\n\"into ``master``.\"\nmsgstr \"\"\n\n#: ../../development.rst:65\nmsgid \"What does this mean for a developer?\"\nmsgstr \"\"\n\n#: ../../development.rst:66\nmsgid \"\"\n\"If you want to add a feature, create a new branch from ``master``. If you \"\n\"want to fix a bug, branch ``release-x.y`` for each affected release. Please \"\n\"use a separate branch for each feature or bug to make integration as easy as\"\n\" possible. Thats all. There are git workflow examples at the bottom of this \"\n\"page.\"\nmsgstr \"\"\n\n#: ../../development.rst:68\nmsgid \"\"\n\"Oh, and never ever change the release number. We'll do that on integration. \"\n\"You never know in which order we pull pending requests anyway :)\"\nmsgstr \"\"\n\n#: ../../development.rst:72\nmsgid \"What does this mean for a maintainer ?\"\nmsgstr \"\"\n\n#: ../../development.rst:73\nmsgid \"\"\n\"Watch the tags (and the mailing list) for bug-fixes and new releases. If you\"\n\" want to fetch a specific release from the git repository, trust the tags, \"\n\"not the branches. A branch may contain changes that are not released yet, \"\n\"but a tag marks the exact commit which changed the version number.\"\nmsgstr \"\"\n\n#: ../../development.rst:77\nmsgid \"Submitting Patches\"\nmsgstr \"\"\n\n#: ../../development.rst:79\nmsgid \"\"\n\"The best way to get your changes integrated into the main development branch\"\n\" is to fork the main repository at github, create a new feature-branch, \"\n\"apply your changes and send a pull-request. Further down this page is a \"\n\"small collection of git workflow examples that may guide you. Submitting \"\n\"git-compatible patches to the mailing list is fine too. In any case, please \"\n\"follow some basic rules:\"\nmsgstr \"\"\n\n#: ../../development.rst:81\nmsgid \"\"\n\"**Documentation:** Tell us what your patch does. Comment your code. If you \"\n\"introduced a new feature, add to the documentation so others can learn about\"\n\" it.\"\nmsgstr \"\"\n\n#: ../../development.rst:82\nmsgid \"\"\n\"**Test:** Write tests to prove that your code works as expected and does not\"\n\" break anything. If you fixed a bug, write at least one test-case that \"\n\"triggers the bug. Make sure that all tests pass before you submit a patch.\"\nmsgstr \"\"\n\n#: ../../development.rst:83\nmsgid \"\"\n\"**One patch at a time:** Only fix one bug or add one feature at a time. \"\n\"Design your patches so that they can be applyed as a whole. Keep your \"\n\"patches clean, small and focused.\"\nmsgstr \"\"\n\n#: ../../development.rst:84\nmsgid \"\"\n\"**Sync with upstream:** If the ``upstream/master`` branch changed while you \"\n\"were working on your patch, rebase or pull to make sure that your patch \"\n\"still applies without conflicts.\"\nmsgstr \"\"\n\n#: ../../development.rst:88\nmsgid \"Building the Documentation\"\nmsgstr \"\"\n\n#: ../../development.rst:90\nmsgid \"\"\n\"You need a recent version of Sphinx to build the documentation. The \"\n\"recommended way is to install :command:`virtualenv` using your distribution \"\n\"package repository and install sphinx manually to get an up-to-date version.\"\nmsgstr \"\"\n\n#: ../../development.rst:121\nmsgid \"GIT Workflow Examples\"\nmsgstr \"\"\n\n#: ../../development.rst:123\nmsgid \"\"\n\"The following examples assume that you have an (free) `github account \"\n\"<https://github.com>`_. This is not mandatory, but makes things a lot \"\n\"easier.\"\nmsgstr \"\"\n\n#: ../../development.rst:125\nmsgid \"\"\n\"First of all you need to create a fork (a personal clone) of the official \"\n\"repository. To do this, you simply click the \\\"fork\\\" button on the `bottle \"\n\"project page <https://github.com/bottlepy/bottle>`_. When the fork is done, \"\n\"you will be presented with a short introduction to your new repository.\"\nmsgstr \"\"\n\n#: ../../development.rst:127\nmsgid \"\"\n\"The fork you just created is hosted at github and read-able by everyone, but\"\n\" write-able only by you. Now you need to clone the fork locally to actually \"\n\"make changes to it. Make sure you use the private (read-write) URL and *not*\"\n\" the public (read-only) one::\"\nmsgstr \"\"\n\n#: ../../development.rst:131\nmsgid \"\"\n\"Once the clone is complete your repository will have a remote named \"\n\"\\\"origin\\\" that points to your fork on github. Don’t let the name confuse \"\n\"you, this does not point to the original bottle repository, but to your own \"\n\"fork. To keep track of the official repository, add another remote named \"\n\"\\\"upstream\\\"::\"\nmsgstr \"\"\n\n#: ../../development.rst:137\nmsgid \"\"\n\"Note that \\\"upstream\\\" is a public clone URL, which is read-only. You cannot\"\n\" push changes directly to it. Instead, we will pull from your public \"\n\"repository. This is described later.\"\nmsgstr \"\"\n\n#: ../../development.rst:140\nmsgid \"Submit a Feature\"\nmsgstr \"\"\n\n#: ../../development.rst:141\nmsgid \"\"\n\"New features are developed in separate feature-branches to make integration \"\n\"easy. Because they are going to be integrated into the ``master`` branch, \"\n\"they must be based on ``upstream/master``. To create a new feature-branch, \"\n\"type the following::\"\nmsgstr \"\"\n\n#: ../../development.rst:145\nmsgid \"\"\n\"Now implement your feature, write tests, update the documentation, make sure\"\n\" that all tests pass and commit your changes::\"\nmsgstr \"\"\n\n#: ../../development.rst:149\nmsgid \"\"\n\"If the ``upstream/master`` branch changed in the meantime, there may be \"\n\"conflicts with your changes. To solve these, 'rebase' your feature-branch \"\n\"onto the top of the updated ``upstream/master`` branch::\"\nmsgstr \"\"\n\n#: ../../development.rst:154\nmsgid \"\"\n\"This is equivalent to undoing all your changes, updating your branch to the \"\n\"latest version and reapplying all your patches again. If you released your \"\n\"branch already (see next step), this is not an option because it rewrites \"\n\"your history. You can do a normal pull instead. Resolve any conflicts, run \"\n\"the tests again and commit.\"\nmsgstr \"\"\n\n#: ../../development.rst:156\nmsgid \"\"\n\"Now you are almost ready to send a pull request. But first you need to make \"\n\"your feature-branch public by pushing it to your github fork::\"\nmsgstr \"\"\n\n#: ../../development.rst:160\nmsgid \"\"\n\"After you’ve pushed your commit(s) you need to inform us about the new \"\n\"feature. One way is to send a pull-request using github. Another way would \"\n\"be to start a thread in the mailing-list, which is recommended. It allows \"\n\"other developers to see and discuss your patches and you get some feedback \"\n\"for free :)\"\nmsgstr \"\"\n\n#: ../../development.rst:162\nmsgid \"\"\n\"If we accept your patch, we will integrate it into the official development \"\n\"branch and make it part of the next release.\"\nmsgstr \"\"\n\n#: ../../development.rst:165\nmsgid \"Fix a Bug\"\nmsgstr \"\"\n\n#: ../../development.rst:166\nmsgid \"\"\n\"The workflow for bug-fixes is very similar to the one for features, but \"\n\"there are some differences:\"\nmsgstr \"\"\n\n#: ../../development.rst:168\nmsgid \"\"\n\"Branch off of the affected release branches instead of just the development \"\n\"branch.\"\nmsgstr \"\"\n\n#: ../../development.rst:169\nmsgid \"Write at least one test-case that triggers the bug.\"\nmsgstr \"\"\n\n#: ../../development.rst:170\nmsgid \"\"\n\"Do this for each affected branch including ``upstream/master`` if it is \"\n\"affected. ``git cherry-pick`` may help you reducing repetitive work.\"\nmsgstr \"\"\n\n#: ../../development.rst:171\nmsgid \"\"\n\"Name your branch after the release it is based on to avoid confusion. \"\n\"Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/faq.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Claudio Rogerio Carvalho Filho <excriptbrasil@gmail.com>, 2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../faq.rst:10\nmsgid \"Frequently Asked Questions\"\nmsgstr \"Perguntas Frequentes\"\n\n#: ../../faq.rst:13\nmsgid \"About Bottle\"\nmsgstr \"Sobre o Bottle\"\n\n#: ../../faq.rst:16\nmsgid \"Is bottle suitable for complex applications?\"\nmsgstr \"\"\n\n#: ../../faq.rst:18\nmsgid \"\"\n\"Bottle is a *micro* framework designed for prototyping and building small \"\n\"web applications and services. It stays out of your way and allows you to \"\n\"get things done fast, but misses some advanced features and ready-to-use \"\n\"solutions found in other frameworks (MVC, ORM, form validation, scaffolding,\"\n\" XML-RPC). Although it *is* possible to add these features and build complex\"\n\" applications with Bottle, you should consider using a full-stack Web \"\n\"framework like pylons_ or paste_ instead.\"\nmsgstr \"\"\n\n#: ../../faq.rst:22\nmsgid \"Common Problems and Pitfalls\"\nmsgstr \"\"\n\n#: ../../faq.rst:29\nmsgid \"\\\"Template Not Found\\\" in mod_wsgi/mod_python\"\nmsgstr \"\"\n\n#: ../../faq.rst:31\nmsgid \"\"\n\"Bottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ \"\n\"or mod_wsgi_ environment, the working directory (``./``) depends on your \"\n\"Apache settings. You should add an absolute path to the template search \"\n\"path::\"\nmsgstr \"\"\n\n#: ../../faq.rst:35\nmsgid \"so bottle searches the right paths.\"\nmsgstr \"\"\n\n#: ../../faq.rst:38\nmsgid \"Dynamic Routes and Slashes\"\nmsgstr \"\"\n\n#: ../../faq.rst:40\nmsgid \"\"\n\"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder \"\n\"token (``<name>``) matches everything up to the next slash. This equals to \"\n\"``[^/]+`` in regular expression syntax. To accept slashes too, you have to \"\n\"add a custom regular pattern to the placeholder. An example: \"\n\"``/images/<filepath:path>`` would match ``/images/icons/error.png`` but \"\n\"``/images/<filename>`` won't.\"\nmsgstr \"\"\n\n#: ../../faq.rst:43\nmsgid \"Problems with reverse proxies\"\nmsgstr \"\"\n\n#: ../../faq.rst:45\nmsgid \"\"\n\"Redirects and url-building only works if bottle knows the public address and\"\n\" location of your application. If you run bottle locally behind a reverse \"\n\"proxy or load balancer, some information might get lost along the way. For \"\n\"example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect \"\n\"the local request by your proxy, not the real request by the client. Here is\"\n\" a small WSGI middleware snippet that helps to fix these values::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# alephmelo <alephmelo@icloud.com>, 2015\n# Igor P. Leroy <ip.leroy@gmail.com>, 2015\n# Igor P. Leroy <ip.leroy@gmail.com>, 2015\n# Thiago Avelino <t@avelino.xxx>, 2015\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../index.rst:20\nmsgid \"Bottle: Python Web Framework\"\nmsgstr \"Bottle: Python Web Framework\"\n\n#: ../../index.rst:22\nmsgid \"\"\n\"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for \"\n\"Python_. It is distributed as a single file module and has no dependencies \"\n\"other than the `Python Standard Library <http://docs.python.org/library/>`_.\"\nmsgstr \"Bottle é um simples, rápido, e leve WSGI_ micro web-framework para Python_. Ele é distribuído como um único arquivo (módulo) e não tem dependências que além `Biblioteca padrão do Python <http://docs.python.org/library/>`_.\"\n\n#: ../../index.rst:25\nmsgid \"\"\n\"**Routing:** Requests to function-call mapping with support for clean and  \"\n\"dynamic URLs.\"\nmsgstr \"**Rotas:** Solicitações de chamada de função de mapeamento com suporte para URLs limpas e dinâmicos.\"\n\n#: ../../index.rst:26\nmsgid \"\"\n\"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-\"\n\"templates>` and support for mako_, jinja2_ and cheetah_ templates.\"\nmsgstr \"**Templates:**Rápido e pythonico :ref:`mecanismo de templates interno <tutorial-templates>` e suporte para mako_, jinja2_ and cheetah_ templates.\"\n\n#: ../../index.rst:27\nmsgid \"\"\n\"**Utilities:** Convenient access to form data, file uploads, cookies, \"\n\"headers and other HTTP-related metadata.\"\nmsgstr \"**Utilitários:** Conveniente acesso a dados de formulários, upload de arquivos, cookies, cabeçalhos e outros metadados relacionados ao HTTP.\"\n\n#: ../../index.rst:28\nmsgid \"\"\n\"**Server:** Built-in HTTP development server and support for paste_, \"\n\"bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server.\"\nmsgstr \"\"\n\n#: ../../index.rst:31\nmsgid \"Example: \\\"Hello World\\\" in a bottle\"\nmsgstr \"Exemplo: \\\"Olá Mundo\\\" em bottle\"\n\n#: ../../index.rst:42\nmsgid \"\"\n\"Run this script or paste it into a Python console, then point your browser \"\n\"to `<http://localhost:8080/hello/world>`_. That's it.\"\nmsgstr \"Execute este script ou cole em um console de Python, em seguida, acesse em seu navegador o `<http://localhost:8080/hello/world>`_. Feito!\"\n\n#: ../../index.rst:45\nmsgid \"Download and Install\"\nmsgstr \"Download e Instalar\"\n\n#: ../../index.rst:48\nmsgid \"\"\n\"Install the latest stable release with ``pip install bottle`` or download \"\n\"`bottle.py`__ (unstable) into your project directory. There are no hard [1]_\"\n\" dependencies other than the Python standard library. Bottle supports \"\n\"**Python 2.7 and Python 3**.\"\nmsgstr \"\"\n\n#: ../../index.rst:50\nmsgid \"Support for Python 2.5 and 2.6 was dropped with this release.\"\nmsgstr \"\"\n\n#: ../../index.rst:55\nmsgid \"User's Guide\"\nmsgstr \"Guia do usuário\"\n\n#: ../../index.rst:56\nmsgid \"\"\n\"Start here if you want to learn how to use the bottle framework for web \"\n\"development. If you have any questions not answered here, feel free to ask \"\n\"the `mailing list <mailto:bottlepy@googlegroups.com>`_.\"\nmsgstr \"Comece por aqui se você quer aprender como usar o bottle framework para desenvolvimento web. Se você tiver quaisquer perguntas não respondidas aqui, sinta-se livre para pedir ajuda a `lista de discussão <mailto:bottlepy@googlegroups.com>`_.\"\n\n#: ../../index.rst:71\nmsgid \"Knowledge Base\"\nmsgstr \"Base de conhecimento\"\n\n#: ../../index.rst:72\nmsgid \"A collection of articles, guides and HOWTOs.\"\nmsgstr \"Uma coleção de artigos, guias e COMO FAZER.\"\n\n#: ../../index.rst:84\nmsgid \"Development and Contribution\"\nmsgstr \"Desenvolvimento e contribuição\"\n\n#: ../../index.rst:86\nmsgid \"\"\n\"These chapters are intended for developers interested in the bottle \"\n\"development and release workflow.\"\nmsgstr \"Esses capítulos são destinados a desenvolvedores interessados no desenvolvimento do bottle e entender o fluxo de contribuição.\"\n\n#: ../../index.rst:103\nmsgid \"License\"\nmsgstr \"Licença\"\n\n#: ../../index.rst:105\nmsgid \"Code and documentation are available according to the MIT License:\"\nmsgstr \"Código e documentação estão disponíveis sobre a licença MIT:\"\n\n#: ../../index.rst:110\nmsgid \"\"\n\"The Bottle logo however is *NOT* covered by that license. It is allowed to \"\n\"use the logo as a link to the bottle homepage or in direct context with the \"\n\"unmodified library. In all other cases please ask first.\"\nmsgstr \"O logotipo do bottle no entanto *NÃO é* abrangido pela licença (MIT). É permitido usar o logotipo como um link para a home page do bottle ou em contexto direto com a biblioteca não modificado. Nos outros casos, por favor, pergunte primeiro.\"\n\n#: ../../index.rst:115\nmsgid \"Footnotes\"\nmsgstr \"Notas de rodapé\"\n\n#: ../../index.rst:116\nmsgid \"\"\n\"Usage of the template or server adapter classes requires the corresponding \"\n\"template or server modules.\"\nmsgstr \"Uso das classes adaptadoras de templates ou de servidores requerem os módulos do template ou servidor correspondentes.\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/plugindev.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../plugindev.rst:6\nmsgid \"Plugin Development Guide\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:8\nmsgid \"\"\n\"This guide explains the plugin API and how to write custom plugins. I \"\n\"suggest reading :ref:`plugins` first if you have not done that already. You \"\n\"might also want to have a look at the :doc:`/plugins/index` for some \"\n\"practical examples.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:12\nmsgid \"\"\n\"This is a draft. If you see any errors or find that a specific part is not \"\n\"explained clear enough, please tell the `mailing-list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or file a `bug report \"\n\"<https://github.com/bottlepy/bottle/issues>`_.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:16\nmsgid \"How Plugins Work: The Basics\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:18\nmsgid \"\"\n\"The plugin API builds on the concept of `decorators \"\n\"<http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, \"\n\"a plugin is a decorator applied to every single route callback of an \"\n\"application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:20\nmsgid \"\"\n\"This is just a simplification. Plugins can do a lot more than just \"\n\"decorating route callbacks, but it is a good starting point. Lets have a \"\n\"look at some code::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:36\nmsgid \"\"\n\"This plugin measures the execution time for each request and adds an \"\n\"appropriate ``X-Exec-Time`` header to the response. As you can see, the \"\n\"plugin returns a wrapper and the wrapper calls the original callback \"\n\"recursively. This is how decorators usually work.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:38\nmsgid \"\"\n\"The last line tells Bottle to install the plugin to the default application.\"\n\" This causes the plugin to be automatically applied to all routes of that \"\n\"application. In other words, ``stopwatch()`` is called once for each route \"\n\"callback and the return value is used as a replacement for the original \"\n\"callback.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:40\nmsgid \"\"\n\"Plugins are applied on demand, that is, as soon as a route is requested for \"\n\"the first time. For this to work properly in multi-threaded environments, \"\n\"the plugin should be thread-safe. This is not a problem most of the time, \"\n\"but keep it in mind.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:42\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped callback is cached and \"\n\"subsequent requests are handled by the cached version directly. This means \"\n\"that a plugin is usually applied only once to a specific route. That cache, \"\n\"however, is cleared every time the list of installed plugins changes. Your \"\n\"plugin should be able to decorate the same route more than once.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:44\nmsgid \"\"\n\"The decorator API is quite limited, though. You don't know anything about \"\n\"the route being decorated or the associated application object and have no \"\n\"way to efficiently store data that is shared among all routes. But fear not!\"\n\" Plugins are not limited to just decorator functions. Bottle accepts \"\n\"anything as a plugin as long as it is callable or implements an extended \"\n\"API. This API is described below and gives you a lot of control over the \"\n\"whole process.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:48\nmsgid \"Plugin API\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:50\nmsgid \"\"\n\":class:`Plugin` is not a real class (you cannot import it from \"\n\":mod:`bottle`) but an interface that plugins are expected to implement. \"\n\"Bottle accepts any object of any type as a plugin, as long as it conforms to\"\n\" the following API.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:54\nmsgid \"\"\n\"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is \"\n\"defined, it is always preferred over calling the plugin directly. All other \"\n\"methods and attributes are optional.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:58\nmsgid \"\"\n\"Both :meth:`Bottle.uninstall` and the `skip` parameter of \"\n\":meth:`Bottle.route()` accept a name string to refer to a plugin or plugin \"\n\"type. This works only for plugins that have a name attribute.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:62\nmsgid \"\"\n\"The Plugin API is still evolving. This integer attribute tells bottle which \"\n\"version to use. If it is missing, bottle defaults to the first version. The \"\n\"current version is ``2``. See :ref:`plugin-changelog` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:66\nmsgid \"\"\n\"Called as soon as the plugin is installed to an application (see \"\n\":meth:`Bottle.install`). The only parameter is the associated application \"\n\"object.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:70\nmsgid \"\"\n\"As long as :meth:`apply` is not defined, the plugin itself is used as a \"\n\"decorator and applied directly to each route callback. The only parameter is\"\n\" the callback to decorate. Whatever is returned by this method replaces the \"\n\"original callback. If there is no need to wrap or replace a given callback, \"\n\"just return the unmodified callback parameter.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:74\nmsgid \"\"\n\"If defined, this method is used in favor of :meth:`__call__` to decorate \"\n\"route callbacks. The additional `route` parameter is an instance of \"\n\":class:`Route` and provides a lot of meta-information and context for that \"\n\"route. See :ref:`route-context` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:78\nmsgid \"\"\n\"Called immediately before the plugin is uninstalled or the application is \"\n\"closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:81\nmsgid \"\"\n\"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for \"\n\"plugins that are applied directly to a route via the :meth:`Bottle.route()` \"\n\"decorator, but only for plugins installed to an application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:87\nmsgid \"Plugin API changes\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:89\nmsgid \"\"\n\"The Plugin API is still evolving and changed with Bottle 0.10 to address \"\n\"certain issues with the route context dictionary. To ensure backwards \"\n\"compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` \"\n\"attribute to tell bottle which API to use. The API differences are \"\n\"summarized here.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:91\nmsgid \"**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:93\nmsgid \"Original Plugin API as described in the 0.9 docs.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:95\nmsgid \"**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:97\nmsgid \"\"\n\"The `context` parameter of the :meth:`Plugin.apply` method is now an \"\n\"instance of :class:`Route` instead of a context dictionary.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:103\nmsgid \"The Route Context\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:105\nmsgid \"\"\n\"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed\"\n\" informations about the associated route. The most important attributes are \"\n\"summarized here:\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"app\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"The application object this route is installed to.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"rule\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"The rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"method\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"name\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"plugins\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"\"\n\"A list of route-specific plugins. These are applied in addition to \"\n\"application-wide plugins. (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"skiplist\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"\"\n\"A list of plugins to not apply to this route (again, see \"\n\":meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"config\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific configuration and \"\n\"meta-data.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:125\nmsgid \"\"\n\"For your plugin, :attr:`Route.config` is probably the most important \"\n\"attribute. Keep in mind that this dictionary is local to the route, but \"\n\"shared between all plugins. It is always a good idea to add a unique prefix \"\n\"or, if your plugin needs a lot of configuration, store it in a separate \"\n\"namespace within the `config` dictionary. This helps to avoid naming \"\n\"collisions between plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:129\nmsgid \"Changing the :class:`Route` object\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:131\nmsgid \"\"\n\"While some :class:`Route` attributes are mutable, changes may have unwanted \"\n\"effects on other plugins. It is most likely a bad idea to monkey-patch a \"\n\"broken route instead of providing a helpful error message and let the user \"\n\"fix the problem.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:133\nmsgid \"\"\n\"In some rare cases, however, it might be justifiable to break this rule. \"\n\"After you made your changes to the :class:`Route` instance, raise \"\n\":exc:`RouteReset` as an exception. This removes the current route from the \"\n\"cache and causes all plugins to be re-applied. The router is not updated, \"\n\"however. Changes to `rule` or `method` values have no effect on the router, \"\n\"but only on plugins. This may change in the future, though.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:137\nmsgid \"Runtime optimizations\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:139\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped route callback is \"\n\"cached to speed up subsequent requests. If the behavior of your plugin \"\n\"depends on configuration, and you want to be able to change that \"\n\"configuration at runtime, you need to read the configuration on each \"\n\"request. Easy enough.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:141\nmsgid \"\"\n\"For performance reasons, however, it might be worthwhile to choose a \"\n\"different wrapper based on current needs, work with closures, or enable or \"\n\"disable a plugin at runtime. Let's take the built-in HooksPlugin as an \"\n\"example: If no hooks are installed, the plugin removes itself from all \"\n\"affected routes and has virtually no overhead. As soon as you install the \"\n\"first hook, the plugin activates itself and takes effect again.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:143\nmsgid \"\"\n\"To achieve this, you need control over the callback cache: \"\n\":meth:`Route.reset` clears the cache for a single route and \"\n\":meth:`Bottle.reset` clears all caches for all routes of an application at \"\n\"once. On the next request, all plugins are re-applied to the route as if it \"\n\"were requested for the first time.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:145\nmsgid \"\"\n\"Both methods won't affect the current request if called from within a route \"\n\"callback, of cause. To force a restart of the current request, raise \"\n\":exc:`RouteReset` as an exception.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:149\nmsgid \"Plugin Example: SQLitePlugin\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:151\nmsgid \"\"\n\"This plugin provides an sqlite3 database connection handle as an additional \"\n\"keyword argument to wrapped callbacks, but only if the callback expects it. \"\n\"If not, the route is ignored and no overhead is added. The wrapper does not \"\n\"affect the return value, but handles plugin-related exceptions properly. \"\n\":meth:`Plugin.setup` is used to inspect the application and search for \"\n\"conflicting plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:218\nmsgid \"\"\n\"This plugin is actually useful and very similar to the version bundled with \"\n\"Bottle. Not bad for less than 60 lines of code, don't you think? Here is a \"\n\"usage example::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:239\nmsgid \"\"\n\"The first route needs a database connection and tells the plugin to create a\"\n\" handle by requesting a ``db`` keyword argument. The second route does not \"\n\"need a database and is therefore ignored by the plugin. The third route does\"\n\" expect a 'db' keyword argument, but explicitly skips the sqlite plugin. \"\n\"This way the argument is not overruled by the plugin and still contains the \"\n\"value of the same-named url argument.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/plugins/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Igor P. Leroy <ip.leroy@gmail.com>, 2015\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: Igor P. Leroy <ip.leroy@gmail.com>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../plugins/index.rst:5\nmsgid \"List of available Plugins\"\nmsgstr \"Lista de Plugins disponíveis\"\n\n#: ../../plugins/index.rst:7\nmsgid \"\"\n\"This is a list of third-party plugins that add extend Bottles core \"\n\"functionality or integrate other libraries with the Bottle framework.\"\nmsgstr \"Essa é uma lista de plugins terceiros que estendem funcionalidades de core do Bottle ou integra com outras bibliotecas com o framework Bottle.\"\n\n#: ../../plugins/index.rst:9\nmsgid \"\"\n\"Have a look at :ref:`plugins` for general questions about plugins \"\n\"(installation, usage). If you plan to develop a new plugin, the \"\n\":doc:`/plugindev` may help you.\"\nmsgstr \"Dê uma olhada nos :ref:`plugins` para perguntas gerais sobre plugins (instalação, utilização). Se você pretende desenvolver um novo plugin, a página de :doc:`/plugindev` pode ajudá-lo.\"\n\n#: ../../plugins/index.rst:12\nmsgid \"`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_\"\nmsgstr \"`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_\"\n\n#: ../../plugins/index.rst:12\nmsgid \"Beaker to session and caching library with WSGI Middleware\"\nmsgstr \"Beaker para sessões e biblioteca de cache com Middleware WSGI\"\n\n#: ../../plugins/index.rst:15\nmsgid \"`Bottle-Cork <http://cork.firelet.net/>`_\"\nmsgstr \"`Bottle-Cork <http://cork.firelet.net/>`_\"\n\n#: ../../plugins/index.rst:15\nmsgid \"\"\n\"Cork provides a simple set of methods to implement Authentication and \"\n\"Authorization in web applications based on Bottle.\"\nmsgstr \"Cork fornece um simples conjunto de métodos para implementar Autenticação e Autorização em aplicações web baseadas em Bottle.\"\n\n#: ../../plugins/index.rst:18\nmsgid \"`Bottle-Cors-plugin <http://pypi.org/project/bottle-cors-plugin/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"\"\n\"Cors-plugin is the easiest way to implement cors on your bottle web \"\n\"application\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_\"\nmsgstr \"`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_\"\n\n#: ../../plugins/index.rst:21\nmsgid \"Meta package to install the bottle plugin collection.\"\nmsgstr \"Meta pacotes para instalar a coleção de plugins do Bottle.\"\n\n#: ../../plugins/index.rst:24\nmsgid \"`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_\"\nmsgstr \"`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_\"\n\n#: ../../plugins/index.rst:24\nmsgid \"flash plugin for bottle\"\nmsgstr \"plugin flash para bottle\"\n\n#: ../../plugins/index.rst:27\nmsgid \"`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_\"\nmsgstr \"`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_\"\n\n#: ../../plugins/index.rst:27\nmsgid \"FIFO Queue for Bottle built upon redis\"\nmsgstr \"Fila FIFO para Bottle escrita sobre Redis.\"\n\n#: ../../plugins/index.rst:30\nmsgid \"`Macaron <http://nobrin.github.com/macaron/webapp.html>`_\"\nmsgstr \"`Macaron <http://nobrin.github.com/macaron/webapp.html>`_\"\n\n#: ../../plugins/index.rst:30\nmsgid \"Macaron is an object-relational mapper (ORM) for SQLite.\"\nmsgstr \"Macaron é um mapeamento objeto-relacional (ORM) para SQLite.\"\n\n#: ../../plugins/index.rst:33\nmsgid \"`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_\"\nmsgstr \"`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_\"\n\n#: ../../plugins/index.rst:33\nmsgid \"Memcache integration for Bottle.\"\nmsgstr \"Integração com Memcache para Bottle.\"\n\n#: ../../plugins/index.rst:36\nmsgid \"`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_\"\nmsgstr \"`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_\"\n\n#: ../../plugins/index.rst:36\nmsgid \"MongoDB integration for Bottle\"\nmsgstr \"Integração com MongoDB para Bottle\"\n\n#: ../../plugins/index.rst:39\nmsgid \"`Bottle-OAuthlib <http://pypi.python.org/pypi/bottle-oauthlib/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"Adapter for oauthlib - create your own OAuth2.0 implementation\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_\"\nmsgstr \"`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_\"\n\n#: ../../plugins/index.rst:42\nmsgid \"Redis integration for Bottle.\"\nmsgstr \"Integração com Redis para Bottle.\"\n\n#: ../../plugins/index.rst:45\nmsgid \"`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_\"\nmsgstr \"`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_\"\n\n#: ../../plugins/index.rst:45\nmsgid \"Renderer plugin for bottle\"\nmsgstr \"Renderer plugin para bottle\"\n\n#: ../../plugins/index.rst:48\nmsgid \"`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_\"\nmsgstr \"`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_\"\n\n#: ../../plugins/index.rst:48\nmsgid \"A reusable app that serves static files for bottle apps\"\nmsgstr \"App reutilizável que serve arquivos estáticos para aplicações bottle\"\n\n#: ../../plugins/index.rst:51\nmsgid \"`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_\"\nmsgstr \"`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_\"\n\n#: ../../plugins/index.rst:51\nmsgid \"SQLAlchemy integration for Bottle.\"\nmsgstr \"Integração com SQLAlchemy para Bottle.\"\n\n#: ../../plugins/index.rst:54\nmsgid \"`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_\"\nmsgstr \"`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_\"\n\n#: ../../plugins/index.rst:54\nmsgid \"SQLite3 database integration for Bottle.\"\nmsgstr \"Integração com bancos de dados SQLite3 para Bottle.\"\n\n#: ../../plugins/index.rst:57\nmsgid \"`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_\"\nmsgstr \"`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_\"\n\n#: ../../plugins/index.rst:57\nmsgid \"Web2py Dal integration for Bottle.\"\nmsgstr \"Integração com Web2py Dal para Bottle.\"\n\n#: ../../plugins/index.rst:60\nmsgid \"`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_\"\nmsgstr \"`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_\"\n\n#: ../../plugins/index.rst:60\nmsgid \"\"\n\"Integrates the `werkzeug` library (alternative request and response objects,\"\n\" advanced debugging middleware and more).\"\nmsgstr \"Integra a biblioteca `werkzeug` (request alternativo and objetos de response, middleware de debugging avançados e etc).\"\n\n#: ../../plugins/index.rst:63\nmsgid \"\"\n\"`bottle-smart-filters <https://github.com/agile4you/bottle-smart-filters/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"Bottle Querystring smart guessing.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"`bottle-jwt <https://github.com/agile4you/bottle-jwt/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"JSON Web Token authentication plugin for bottle.py\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"`Bottle-jwt <https://github.com/agalera/bottlejwt>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"JWT integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"`canister <https://github.com/dagnelies/canister>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"a bottle wrapper to provide logging, sessions and authentication\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"`bottle-cerberus <https://github.com/agalera/bottle-cerberus>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"Cerberus integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"`Bottle-errorsrest <https://github.com/agalera/bottle-errorsrest>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"All errors generated from bottle are returned in json\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:82\nmsgid \"`Bottle-tools <https://github.com/theSage21/bottle-tools>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:81\nmsgid \"\"\n\"Decorators that auto-supply function arguments using POST/query string data.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:84\nmsgid \"\"\n\"Plugins listed here are not part of Bottle or the Bottle project, but \"\n\"developed and maintained by third parties.\"\nmsgstr \"Plugins listados aqui não são parte do Bottle ou do projeto Bottle, mas desenvolvidos e mantidos por terceiros.\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/recipes.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../recipes.rst:16\nmsgid \"Recipes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:18\nmsgid \"\"\n\"This is a collection of code snippets and examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:21\nmsgid \"Keeping track of Sessions\"\nmsgstr \"\"\n\n#: ../../recipes.rst:23\nmsgid \"\"\n\"There is no built-in support for sessions because there is no *right* way to\"\n\" do it (in a micro framework). Depending on requirements and environment you\"\n\" could use beaker_ middleware with a fitting backend or implement it \"\n\"yourself. Here is an example for beaker sessions with a file-based backend::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:45\nmsgid \"\"\n\"WARNING: Beaker's SessionMiddleware is not thread safe.  If two concurrent \"\n\"requests modify the same session at the same time, one of the updates might \"\n\"get lost. For this reason, sessions should only be populated once and \"\n\"treated as a read-only store after that. If you find yourself updating \"\n\"sessions regularly, and don't want to risk losing any updates, think about \"\n\"using a real database instead or seek alternative session middleware \"\n\"libraries.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:49\nmsgid \"Debugging with Style: Debugging Middleware\"\nmsgstr \"\"\n\n#: ../../recipes.rst:51\nmsgid \"\"\n\"Bottle catches all Exceptions raised in your app code to prevent your WSGI \"\n\"server from crashing. If the built-in :func:`debug` mode is not enough and \"\n\"you need exceptions to propagate to a debugging middleware, you can turn off\"\n\" this behaviour::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:59\nmsgid \"\"\n\"Now, bottle only catches its own exceptions (:exc:`HTTPError`, \"\n\":exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can \"\n\"handle the rest.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:61\nmsgid \"\"\n\"The werkzeug_ and paste_ libraries both ship with very powerful debugging \"\n\"WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for \"\n\"werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for \"\n\"paste_. They both allow you do inspect the stack and even execute python \"\n\"code within the stack context, so **do not use them in production**.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:65\nmsgid \"Unit-Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:67\nmsgid \"\"\n\"Unit-testing is usually performed against methods defined in your web \"\n\"application without running a WSGI environment.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:69\nmsgid \"A simple example using `Nose <http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:80 ../../recipes.rst:97\nmsgid \"Test script::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:87\nmsgid \"\"\n\"In the example the Bottle route() method is never executed - only index() is\"\n\" tested.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:89\nmsgid \"\"\n\"If the code being tested requires access to ``bottle.request`` you can mock \"\n\"it using `Boddle <https://github.com/keredson/boddle>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:108\nmsgid \"Functional Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:110\nmsgid \"\"\n\"Any HTTP-based testing system can be used with a running WSGI server, but \"\n\"some testing frameworks work more intimately with WSGI, and provide the \"\n\"ability the call WSGI applications in a controlled environment, with \"\n\"tracebacks and full use of debugging tools. `Testing tools for WSGI \"\n\"<http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:112\nmsgid \"\"\n\"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose \"\n\"<http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:132\nmsgid \"Embedding other WSGI Apps\"\nmsgstr \"\"\n\n#: ../../recipes.rst:134\nmsgid \"\"\n\"This is not the recommend way (you should use a middleware in front of \"\n\"bottle to do this) but you can call other WSGI applications from within your\"\n\" bottle app and let bottle act as a pseudo-middleware. Here is an example::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:150\nmsgid \"\"\n\"Again, this is not the recommend way to implement subprojects. It is only \"\n\"here because many people asked for this and to show how bottle maps to WSGI.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:154\nmsgid \"Ignore trailing slashes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:156\nmsgid \"\"\n\"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To\"\n\" treat both URLs the same you can add two ``@route`` decorators::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:162\nmsgid \"add a WSGI middleware that strips trailing slashes from all URLs::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:175\nmsgid \"or add a ``before_request`` hook to strip the trailing slashes::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:182\nmsgid \"Footnotes\"\nmsgstr \"Notas de rodapé\"\n\n#: ../../recipes.rst:183\nmsgid \"Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>\"\nmsgstr \"\"\n\n#: ../../recipes.rst:187\nmsgid \"Keep-alive requests\"\nmsgstr \"\"\n\n#: ../../recipes.rst:191\nmsgid \"For a more detailed explanation, see :doc:`async`.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:193\nmsgid \"\"\n\"Several \\\"push\\\" mechanisms like XHR multipart need the ability to write \"\n\"response data without closing the connection in conjunction with the \"\n\"response header \\\"Connection: keep-alive\\\". WSGI does not easily lend itself\"\n\" to this behavior, but it is still possible to do so in Bottle by using the \"\n\"gevent_ async framework. Here is a sample that works with either the gevent_\"\n\" HTTP server or the paste_ HTTP server (it may work with others, but I have \"\n\"not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the\"\n\" paste_ server::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:210\nmsgid \"\"\n\"If you browse to ``http://localhost:8080/stream``, you should see 'START', \"\n\"'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to \"\n\"see them all at once).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:213\nmsgid \"Gzip Compression in Bottle\"\nmsgstr \"\"\n\n#: ../../recipes.rst:216\nmsgid \"For a detailed discussion, see compression_\"\nmsgstr \"\"\n\n#: ../../recipes.rst:218\nmsgid \"\"\n\"A common feature request is for Bottle to support Gzip compression, which \"\n\"speeds up sites by compressing static resources (like CSS and JS files) \"\n\"during a request.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:220\nmsgid \"\"\n\"Supporting Gzip compression is not a straightforward proposition, due to a \"\n\"number of corner cases that crop up frequently. A proper Gzip implementation\"\n\" must:\"\nmsgstr \"\"\n\n#: ../../recipes.rst:222\nmsgid \"Compress on the fly and be fast doing so.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:223\nmsgid \"Do not compress for browsers that don't support it.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:224\nmsgid \"Do not compress files that are compressed already (images, videos).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:225\nmsgid \"Do not compress dynamic files.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:226\nmsgid \"Support two differed compression algorithms (gzip and deflate).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:227\nmsgid \"Cache compressed files that don't change often.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:228\nmsgid \"De-validate the cache if one of the files changed anyway.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:229\nmsgid \"Make sure the cache does not get to big.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:230\nmsgid \"\"\n\"Do not cache small files because a disk seek would take longer than on-the-\"\n\"fly compression.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:232\nmsgid \"\"\n\"Because of these requirements, it is the recommendation of the Bottle \"\n\"project that Gzip compression is best handled by the WSGI server Bottle runs\"\n\" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware \"\n\"that can be used to accomplish this.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:236\nmsgid \"Using the hooks plugin\"\nmsgstr \"\"\n\n#: ../../recipes.rst:238\nmsgid \"\"\n\"For example, if you want to allow Cross-Origin Resource Sharing for the \"\n\"content returned by all of your URL, you can use the hook decorator and \"\n\"setup a callback function::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:256\nmsgid \"\"\n\"You can also use the ``before_request`` to take an action before every \"\n\"function gets called.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:261\nmsgid \"Using Bottle with Heroku\"\nmsgstr \"\"\n\n#: ../../recipes.rst:263\nmsgid \"\"\n\"Heroku_, a popular cloud application platform now provides support for \"\n\"running Python applications on their infastructure.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:266\nmsgid \"\"\n\"This recipe is based upon the `Heroku Quickstart \"\n\"<http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific \"\n\"code replacing the `Write Your App \"\n\"<http://devcenter.heroku.com/articles/python#write_your_app>`_ section of \"\n\"the `Getting Started with Python on Heroku/Cedar \"\n\"<http://devcenter.heroku.com/articles/python>`_ guide::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:282\nmsgid \"\"\n\"Heroku's app stack passes the port that the application needs to listen on \"\n\"for requests, using the `os.environ` dictionary.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/routing.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../routing.rst:3\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../routing.rst:5\nmsgid \"\"\n\"Bottle uses a powerful routing engine to find the right callback for each \"\n\"request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This \"\n\"document covers advanced techniques and rule mechanics in detail.\"\nmsgstr \"\"\n\n#: ../../routing.rst:8\nmsgid \"Rule Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:10\nmsgid \"\"\n\"The :class:`Router` distinguishes between two basic types of routes: \"\n\"**static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. \"\n\"``/hello/<name>``). A route that contains one or more *wildcards* it is \"\n\"considered dynamic. All other routes are static.\"\nmsgstr \"\"\n\n#: ../../routing.rst:14\nmsgid \"\"\n\"The simplest form of a wildcard consists of a name enclosed in angle \"\n\"brackets (e.g. ``<name>``). The name should be unique for a given route and \"\n\"form a valid python identifier (alphanumeric, starting with a letter). This \"\n\"is because wildcards are used as keyword arguments for the request callback \"\n\"later.\"\nmsgstr \"\"\n\n#: ../../routing.rst:16\nmsgid \"\"\n\"Each wildcard matches one or more characters, but stops at the first slash \"\n\"(``/``). This equals a regular expression of ``[^/]+`` and ensures that only\"\n\" one path segment is matched and routes with more than one wildcard stay \"\n\"unambiguous.\"\nmsgstr \"\"\n\n#: ../../routing.rst:18\nmsgid \"The rule ``/<action>/<item>`` matches as follows:\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Path\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Result\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"/save/123\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"``{'action': 'save', 'item': '123'}``\"\nmsgstr \"\"\n\n#: ../../routing.rst:24\nmsgid \"/save/123/\"\nmsgstr \"\"\n\n#: ../../routing.rst:24 ../../routing.rst:25 ../../routing.rst:26\nmsgid \"`No Match`\"\nmsgstr \"\"\n\n#: ../../routing.rst:25\nmsgid \"/save/\"\nmsgstr \"\"\n\n#: ../../routing.rst:26\nmsgid \"//123\"\nmsgstr \"\"\n\n#: ../../routing.rst:29\nmsgid \"\"\n\"Is it possible to escape characters like colon ``:`` with a backslash \"\n\"``\\\\``. This will prevent to trigger the old syntax in case you need to use \"\n\"``:``. For example: the rule ``/<action>/item:<id>`` triggers the old \"\n\"syntax, (see below) but ``/action/item\\\\:<id>`` works as intended with the \"\n\"new syntax.\"\nmsgstr \"\"\n\n#: ../../routing.rst:33\nmsgid \"\"\n\"You can change the exact behaviour in many ways using filters. This is \"\n\"described in the next section.\"\nmsgstr \"\"\n\n#: ../../routing.rst:36\nmsgid \"Wildcard Filters\"\nmsgstr \"\"\n\n#: ../../routing.rst:40\nmsgid \"\"\n\"Filters are used to define more specific wildcards, and/or transform the \"\n\"matched part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../routing.rst:42\nmsgid \"The following standard filters are implemented:\"\nmsgstr \"\"\n\n#: ../../routing.rst:44\nmsgid \"**:int** matches (signed) digits and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../routing.rst:45\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../routing.rst:46\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and may be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../routing.rst:47\nmsgid \"\"\n\"**:re[:exp]** allows you to specify a custom regular expression in the \"\n\"config field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../routing.rst:49\nmsgid \"\"\n\"You can add your own filters to the router. All you need is a function that \"\n\"returns three elements: A regular expression string, a callable to convert \"\n\"the URL fragment to a python value, and a callable that does the opposite. \"\n\"The filter function is called with the configuration string as the only \"\n\"parameter and may parse it as needed::\"\nmsgstr \"\"\n\n#: ../../routing.rst:75\nmsgid \"Legacy Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:79\nmsgid \"\"\n\"The new rule syntax was introduce in **Bottle 0.10** to simplify some common\"\n\" use cases, but the old syntax still works and you can find lot code \"\n\"examples still using it. The differences are best described by example:\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"Old Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"New Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:90\nmsgid \"\"\n\"Try to avoid the old syntax in future projects if you can. It is not \"\n\"currently deprecated, but will be eventually.\"\nmsgstr \"\"\n\n#: ../../routing.rst:95\nmsgid \"Explicit routing configuration\"\nmsgstr \"\"\n\n#: ../../routing.rst:97\nmsgid \"\"\n\"Route decorator can also be directly called as method. This way provides \"\n\"flexibility in complex setups, allowing you to directly control, when and \"\n\"how routing configuration done.\"\nmsgstr \"\"\n\n#: ../../routing.rst:99\nmsgid \"\"\n\"Here is a basic example of explicit routing configuration for default bottle\"\n\" application::\"\nmsgstr \"\"\n\n#: ../../routing.rst:105\nmsgid \"\"\n\"In fact, any :class:`Bottle` instance routing can be configured same way::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/stpl.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../stpl.rst:3\nmsgid \"SimpleTemplate Engine\"\nmsgstr \"\"\n\n#: ../../stpl.rst:7\nmsgid \"\"\n\"Bottle comes with a fast, powerful and easy to learn built-in template \"\n\"engine called *SimpleTemplate* or *stpl* for short. It is the default engine\"\n\" used by the :func:`view` and :func:`template` helpers but can be used as a \"\n\"stand-alone general purpose template engine too. This document explains the \"\n\"template syntax and shows examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:10\nmsgid \"Basic API Usage:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:11\nmsgid \":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:18\nmsgid \"\"\n\"In this document we use the :func:`template` helper in examples for the sake\"\n\" of simplicity::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:24\nmsgid \"\"\n\"You can also pass a dictionary into the template using keyword arguments::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:31\nmsgid \"\"\n\"Just keep in mind that compiling and rendering templates are two different \"\n\"actions, even if the :func:`template` helper hides this fact. Templates are \"\n\"usually compiled only once and cached internally, but rendered many times \"\n\"with different keyword arguments.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:34\nmsgid \":class:`SimpleTemplate` Syntax\"\nmsgstr \"\"\n\n#: ../../stpl.rst:36\nmsgid \"\"\n\"Python is a very powerful language but its whitespace-aware syntax makes it \"\n\"difficult to use as a template language. SimpleTemplate removes some of \"\n\"these restrictions and allows you to write clean, readable and maintainable \"\n\"templates while preserving full access to the features, libraries and speed \"\n\"of the Python language.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:40\nmsgid \"\"\n\"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and \"\n\"is executed on each :meth:`SimpleTemplate.render` call. Do not render \"\n\"untrusted templates! They may contain and execute harmful python code.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:43\nmsgid \"Inline Expressions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:45\nmsgid \"\"\n\"You already learned the use of the ``{{...}}`` syntax from the \\\"Hello \"\n\"World!\\\" example above, but there is more: any python expression is allowed \"\n\"within the curly brackets as long as it evaluates to a string or something \"\n\"that has a string representation::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:54\nmsgid \"\"\n\"The contained python expression is executed at render-time and has access to\"\n\" all keyword arguments passed to the :meth:`SimpleTemplate.render` method. \"\n\"HTML special characters are escaped automatically to prevent `XSS \"\n\"<http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start\"\n\" the expression with an exclamation mark to disable escaping for that \"\n\"expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:62\nmsgid \"Embedded python code\"\nmsgstr \"\"\n\n#: ../../stpl.rst:66\nmsgid \"\"\n\"The template engine allows you to embed lines or blocks of python code \"\n\"within your template. Code lines start with ``%`` and code blocks are \"\n\"surrounded by ``<%`` and ``%>`` tokens::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:76\nmsgid \"\"\n\"Embedded python code follows regular python syntax, but with two additional \"\n\"syntax rules:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:78\nmsgid \"\"\n\"**Indentation is ignored.** You can put as much whitespace in front of \"\n\"statements as you want. This allows you to align your code with the \"\n\"surrounding markup and can greatly improve readability.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:79\nmsgid \"\"\n\"Blocks that are normally indented now have to be closed explicitly with an \"\n\"``end`` keyword.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:89\nmsgid \"\"\n\"Both the ``%`` and the ``<%`` tokens are only recognized if they are the \"\n\"first non-whitespace characters in a line. You don't have to escape them if \"\n\"they appear mid-text in your template markup. Only if a line of text starts \"\n\"with one of these tokens, you have to escape it with a backslash. In the \"\n\"rare case where the backslash + token combination appears in your markup at \"\n\"the beginning of a line, you can always help yourself with a string literal \"\n\"in an inline expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:96\nmsgid \"\"\n\"If you find yourself needing to escape a lot, consider using :ref:`custom \"\n\"tokens <stpl-custom-tokens>`.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:98\nmsgid \"\"\n\"Note that ``%`` and ``<% %>`` work in *exactly* the same way. The latter is \"\n\"only a convenient way to type less and avoid clutter for longer code \"\n\"segments. This means that in ``<% %>`` blocks, all indented code must be \"\n\"terminated with an ``end``, as in the following example::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:114\nmsgid \"Whitespace Control\"\nmsgstr \"\"\n\n#: ../../stpl.rst:116\nmsgid \"\"\n\"Code blocks and code lines always span the whole line. Whitespace in front \"\n\"of after a code segment is stripped away. You won't see empty lines or \"\n\"dangling whitespace in your template because of embedded code::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:124\nmsgid \"This snippet renders to clean and compact html::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:130\nmsgid \"\"\n\"But embedding code still requires you to start a new line, which may not \"\n\"what you want to see in your rendered template. To skip the newline in front\"\n\" of a code segment, end the text line with a double-backslash::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:138\nmsgid \"This time the rendered template looks like this::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:142\nmsgid \"\"\n\"This only works directly in front of code segments. In all other places you \"\n\"can control the whitespace yourself and don't need any special syntax.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:145\nmsgid \"Template Functions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:147\nmsgid \"\"\n\"Each template is preloaded with a bunch of functions that help with the most\"\n\" common use cases. These functions are always available. You don't have to \"\n\"import or provide them yourself. For everything not covered here there are \"\n\"probably good python libraries available. Remember that you can ``import`` \"\n\"anything you want within your templates. They are python programs after all.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:151\nmsgid \"\"\n\"Prior to this release, :func:`include` and :func:`rebase` were syntax \"\n\"keywords, not functions.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:156\nmsgid \"\"\n\"Render a sub-template with the specified variables and insert the resulting \"\n\"text into the current template. The function returns a dictionary containing\"\n\" the local variables passed to or defined within the sub-template::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:164\nmsgid \"\"\n\"Mark the current template to be later included into a different template. \"\n\"After the current template is rendered, its resulting text is stored in a \"\n\"variable named ``base`` and passed to the base-template, which is then \"\n\"rendered. This can be used to `wrap` a template with surrounding text, or \"\n\"simulate the inheritance feature found in other template engines::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:169\nmsgid \"This can be combined with the following ``base.tpl``::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:181\nmsgid \"\"\n\"Accessing undefined variables in a template raises :exc:`NameError` and \"\n\"stops rendering immediately. This is standard python behavior and nothing \"\n\"new, but vanilla python lacks an easy way to check the availability of a \"\n\"variable. This quickly gets annoying if you want to support flexible inputs \"\n\"or use the same template in different situations. These functions may help:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:189\nmsgid \"\"\n\"Return True if the variable is defined in the current template namespace, \"\n\"False otherwise.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:194\nmsgid \"Return the variable, or a default value.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:198\nmsgid \"\"\n\"If the variable is not defined, create it with the given default value. \"\n\"Return the variable.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:201\nmsgid \"\"\n\"Here is an example that uses all three functions to implement optional \"\n\"template variables in different ways::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:215\nmsgid \":class:`SimpleTemplate` API\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.render:1\nmsgid \"Render the template using keyword arguments as local variables.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/tutorial.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# alephmelo <alephmelo@icloud.com>, 2015\n# Igor P. Leroy <ip.leroy@gmail.com>, 2015\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../tutorial.rst:24\nmsgid \"Tutorial\"\nmsgstr \"Tutorial\"\n\n#: ../../tutorial.rst:26\nmsgid \"\"\n\"This tutorial introduces you to the concepts and features of the Bottle web \"\n\"framework and covers basic and advanced topics alike. You can read it from \"\n\"start to end, or use it as a reference later on. The automatically generated\"\n\" :doc:`api` may be interesting for you, too. It covers more details, but \"\n\"explains less than this tutorial. Solutions for the most common questions \"\n\"can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If \"\n\"you need any help, join our `mailing list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"Este tutorial apresenta os conceitos e funcionalidades do framework web Bottle e aborda tópicos básicos e avançados semelhantes. Você pode lê-lo do início ao fim, ou usá-lo como uma referência mais tarde. A :doc:`api` gerada automaticamente também pode ser interessante pra você. Abrange mais detalhes, mas explica menos que este tutorial. Soluções para as perguntas mais comuns podem ser encontradas em nossa coleção de :doc:`recipes` ou na página de :doc:`faq`. Se você precisar de alguma ajuda, se junte à nossa `lista de discussão <mailto:bottlepy@googlegroups.com>`_ ou visite-nos em nosso `canal no IRC <http://webchat.freenode.net/?channels=bottlepy>`_.\"\n\n#: ../../tutorial.rst:31\nmsgid \"Installation\"\nmsgstr \"Instalação\"\n\n#: ../../tutorial.rst:33\nmsgid \"\"\n\"Bottle does not depend on any external libraries. You can just download \"\n\"`bottle.py </bottle.py>`_ into your project directory and start coding:\"\nmsgstr \"Bottle não depende de nenhuma biblioteca externa. Você pode apenas baixar `bottle.py </bottle.py>`_ em seu diretório do projeto e começar a programar:\"\n\n#: ../../tutorial.rst:39\nmsgid \"\"\n\"This will get you the latest development snapshot that includes all the new \"\n\"features. If you prefer a more stable environment, you should stick with the\"\n\" stable releases. These are available on `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_ and can be installed via \"\n\":command:`pip` (recommended), :command:`easy_install` or your package \"\n\"manager:\"\nmsgstr \"Isso vai te dar o último snapshot de desenvolvimento que inclui todos os novos recursos. Se você prefere um ambiente mais estável, você deve ficar com as versões estáveis. Estas informações estão disponíveis no `PyPI <http://pypi.python.org/pypi/bottle>`_ e pode ser instalado via :command:`pip` (recomendado), :command:`easy_install` ou seu gerenciador de pacotes:\"\n\n#: ../../tutorial.rst:47\nmsgid \"\"\n\"Either way, you'll need Python 2.7 or newer (including 3.4+) to run bottle \"\n\"applications. If you do not have permissions to install packages system-wide\"\n\" or simply don't want to, create a `virtualenv \"\n\"<http://pypi.python.org/pypi/virtualenv>`_ first:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:55\nmsgid \"Or, if virtualenv is not installed on your system:\"\nmsgstr \"Ou, se virtualenv não estiver instalado no seu sistema:\"\n\n#: ../../tutorial.rst:67\nmsgid \"Quickstart: \\\"Hello World\\\"\"\nmsgstr \"Início rápido: \\\"Olá Mundo\\\"\"\n\n#: ../../tutorial.rst:69\nmsgid \"\"\n\"This tutorial assumes you have Bottle either :ref:`installed <installation>`\"\n\" or copied into your project directory. Let's start with a very basic \"\n\"\\\"Hello World\\\" example::\"\nmsgstr \"Esse tutorial assume que você tem o Bottle :ref:`instalado <installation>` ou copiado para o diretório do projeto. Vamos começar com um exemplo muito básico \\\"Olá Mundo\\\"::\"\n\n#: ../../tutorial.rst:79\nmsgid \"\"\n\"This is it. Run this script, visit http://localhost:8080/hello and you will \"\n\"see \\\"Hello World!\\\" in your browser. Here is how it works:\"\nmsgstr \"É isso. Execute este script, visite http://localhost:8080/hello e você vai ver \\\"Olá mundo!\\\" no seu browser. Aqui vemos como funciona:\"\n\n#: ../../tutorial.rst:81\nmsgid \"\"\n\"The :func:`route` decorator binds a piece of code to an URL path. In this \"\n\"case, we link the ``/hello`` path to the ``hello()`` function. This is \"\n\"called a `route` (hence the decorator name) and is the most important \"\n\"concept of this framework. You can define as many routes as you want. \"\n\"Whenever a browser requests a URL, the associated function is called and the\"\n\" return value is sent back to the browser. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:83\nmsgid \"\"\n\"The :func:`run` call in the last line starts a built-in development server. \"\n\"It runs on ``localhost`` port ``8080`` and serves requests until you hit \"\n\":kbd:`Control-c`. You can switch the server backend later, but for now a \"\n\"development server is all we need. It requires no setup at all and is an \"\n\"incredibly painless way to get your application up and running for local \"\n\"tests.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:85\nmsgid \"\"\n\"The :ref:`tutorial-debugging` is very helpful during early development, but \"\n\"should be switched off for public applications. Keep that in mind.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:87\nmsgid \"\"\n\"This is just a demonstration of the basic concept of how applications are \"\n\"built with Bottle. Continue reading and you'll see what else is possible.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:92\nmsgid \"The Default Application\"\nmsgstr \"A Aplicação Padrão\"\n\n#: ../../tutorial.rst:94\nmsgid \"\"\n\"For the sake of simplicity, most examples in this tutorial use a module-\"\n\"level :func:`route` decorator to define routes. This adds routes to a global\"\n\" \\\"default application\\\", an instance of :class:`Bottle` that is \"\n\"automatically created the first time you call :func:`route`. Several other \"\n\"module-level decorators and functions relate to this default application, \"\n\"but if you prefer a more object oriented approach and don't mind the extra \"\n\"typing, you can create a separate application object and use that instead of\"\n\" the global one::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:106\nmsgid \"\"\n\"The object-oriented approach is further described in the :ref:`default-app` \"\n\"section. Just keep in mind that you have a choice.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:114\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:116\nmsgid \"\"\n\"In the last chapter we built a very simple web application with only a \"\n\"single route. Here is the routing part of the \\\"Hello World\\\" example \"\n\"again::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:122\nmsgid \"\"\n\"The :func:`route` decorator links an URL path to a callback function, and \"\n\"adds a new route to the :ref:`default application <tutorial-default>`. An \"\n\"application with just one route is kind of boring, though. Let's add some \"\n\"more (don't forget ``from bottle import template``)::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:129\nmsgid \"\"\n\"This example demonstrates two things: You can bind more than one route to a \"\n\"single callback, and you can add wildcards to URLs and access them via \"\n\"keyword arguments.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:136\nmsgid \"Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:138\nmsgid \"\"\n\"Routes that contain wildcards are called `dynamic routes` (as opposed to \"\n\"`static routes`) and match more than one URL at the same time. A simple \"\n\"wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and\"\n\" accepts one or more characters up to the next slash (``/``). For example, \"\n\"the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as\"\n\" ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:140\nmsgid \"\"\n\"Each wildcard passes the covered part of the URL as a keyword argument to \"\n\"the request callback. You can use them right away and implement RESTful, \"\n\"nice-looking and meaningful URLs with ease. Here are some other examples \"\n\"along with the URLs they'd match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:150\nmsgid \"\"\n\"Filters can be used to define more specific wildcards, and/or transform the \"\n\"covered part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:152\nmsgid \"\"\n\"The following filters are implemented by default and more may be added:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:154\nmsgid \"\"\n\"**:int** matches (signed) digits only and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:155\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:156\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and can be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:157\nmsgid \"\"\n\"**:re** allows you to specify a custom regular expression in the config \"\n\"field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:159\nmsgid \"Let's have a look at some practical examples::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:173\nmsgid \"You can add your own filters as well. See :doc:`routing` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:177\nmsgid \"HTTP Request Methods\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:181\nmsgid \"\"\n\"The HTTP protocol defines several `request methods`__ (sometimes referred to\"\n\" as \\\"verbs\\\") for different tasks. GET is the default for all routes with \"\n\"no other method specified. These routes will match GET requests only. To \"\n\"handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` \"\n\"keyword argument to the :func:`route` decorator or use one of the five \"\n\"alternative decorators: :func:`get`, :func:`post`, :func:`put`, \"\n\":func:`delete` or :func:`patch`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:183\nmsgid \"\"\n\"The POST method is commonly used for HTML form submission. This example \"\n\"shows how to handle a login form using POST::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:206\nmsgid \"\"\n\"In this example the ``/login`` URL is linked to two distinct callbacks, one \"\n\"for GET requests and another for POST requests. The first one displays a \"\n\"HTML form to the user. The second callback is invoked on a form submission \"\n\"and checks the login credentials the user entered into the form. The use of \"\n\":attr:`Request.forms` is further described in the :ref:`tutorial-request` \"\n\"section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:209\nmsgid \"Special Methods: HEAD and ANY\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:210\nmsgid \"\"\n\"The HEAD method is used to ask for the response identical to the one that \"\n\"would correspond to a GET request, but without the response body. This is \"\n\"useful for retrieving meta-information about a resource without having to \"\n\"download the entire document. Bottle handles these requests automatically by\"\n\" falling back to the corresponding GET route and cutting off the request \"\n\"body, if present. You don't have to specify any HEAD routes yourself.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:212\nmsgid \"\"\n\"Additionally, the non-standard ANY method works as a low priority fallback: \"\n\"Routes that listen to ANY will match requests regardless of their HTTP \"\n\"method but only if no other more specific route is defined. This is helpful \"\n\"for *proxy-routes* that redirect requests to more specific sub-applications.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:214\nmsgid \"\"\n\"To sum it up: HEAD requests fall back to GET routes and all requests fall \"\n\"back to ANY routes, but only if there is no matching route for the original \"\n\"request method. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:219\nmsgid \"Routing Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:221\nmsgid \"\"\n\"Static files such as images or CSS files are not served automatically. You \"\n\"have to add a route and a callback to control which files get served and \"\n\"where to find them::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:228\nmsgid \"\"\n\"The :func:`static_file` function is a helper to serve files in a safe and \"\n\"convenient way (see :ref:`tutorial-static-files`). This example is limited \"\n\"to files directly within the ``/path/to/your/static/files`` directory \"\n\"because the ``<filename>`` wildcard won't match a path with a slash in it. \"\n\"To serve files in subdirectories, change the wildcard to use the `path` \"\n\"filter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:234\nmsgid \"\"\n\"Be careful when specifying a relative root-path such as \"\n\"``root='./static/files'``. The working directory (``./``) and the project \"\n\"directory are not always the same.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:242\nmsgid \"Error Pages\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:244\nmsgid \"\"\n\"If anything goes wrong, Bottle displays an informative but fairly plain \"\n\"error page. You can override the default for a specific HTTP status code \"\n\"with the :func:`error` decorator::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:251\nmsgid \"\"\n\"From now on, `404 File not Found` errors will display a custom error page to\"\n\" the user. The only parameter passed to the error-handler is an instance of \"\n\":exc:`HTTPError`. Apart from that, an error-handler is quite similar to a \"\n\"regular request callback. You can read from :data:`request`, write to \"\n\":data:`response` and return any supported data-type except for \"\n\":exc:`HTTPError` instances.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:253\nmsgid \"\"\n\"Error handlers are used only if your application returns or raises an \"\n\":exc:`HTTPError` exception (:func:`abort` does just that). Changing \"\n\":attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the \"\n\"error handler.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:263\nmsgid \"Generating content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:265\nmsgid \"\"\n\"In pure WSGI, the range of types you may return from your application is \"\n\"very limited. Applications must return an iterable yielding byte strings. \"\n\"You may return a string (because strings are iterable) but this causes most \"\n\"servers to transmit your content char by char. Unicode strings are not \"\n\"allowed at all. This is not very practical.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:267\nmsgid \"\"\n\"Bottle is much more flexible and supports a wide range of types. It even \"\n\"adds a ``Content-Length`` header if possible and encodes unicode \"\n\"automatically, so you don't have to. What follows is a list of data types \"\n\"you may return from your application callbacks and a short description of \"\n\"how these are handled by the framework:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"Dictionaries\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"\"\n\"As mentioned above, Python dictionaries (or subclasses thereof) are \"\n\"automatically transformed into JSON strings and returned to the browser with\"\n\" the ``Content-Type`` header set to ``application/json``. This makes it easy\"\n\" to implement json-based APIs. Data formats other than json are supported \"\n\"too. See the :ref:`tutorial-output-filter` to learn more.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"Empty Strings, ``False``, ``None`` or other non-true values:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"\"\n\"These produce an empty output with the ``Content-Length`` header set to 0.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"Unicode strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"\"\n\"Unicode strings (or iterables yielding unicode strings) are automatically \"\n\"encoded with the codec specified in the ``Content-Type`` header (utf8 by \"\n\"default) and then treated as normal byte strings (see below).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"Byte strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"\"\n\"Bottle returns strings as a whole (instead of iterating over each char) and \"\n\"adds a ``Content-Length`` header based on the string length. Lists of byte \"\n\"strings are joined first. Other iterables yielding byte strings are not \"\n\"joined because they may grow too big to fit into memory. The ``Content-\"\n\"Length`` header is not set in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"Instances of :exc:`HTTPError` or :exc:`HTTPResponse`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"\"\n\"Returning these has the same effect as when raising them as an exception. In\"\n\" case of an :exc:`HTTPError`, the error handler is applied. See :ref\"\n\":`tutorial-errorhandling` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"File objects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"\"\n\"Everything that has a ``.read()`` method is treated as a file or file-like \"\n\"object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI \"\n\"server framework. Some WSGI server implementations can make use of optimized\"\n\" system calls (sendfile) to transmit files more efficiently. In other cases \"\n\"this just iterates over chunks that fit into memory. Optional headers such \"\n\"as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use \"\n\":func:`send_file` if possible. See :ref:`tutorial-static-files` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"Iterables and generators\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"\"\n\"You are allowed to use ``yield`` within your callbacks or return an \"\n\"iterable, as long as the iterable yields byte strings, unicode strings, \"\n\":exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not \"\n\"supported, sorry. Please note that the HTTP status code and the headers are \"\n\"sent to the browser as soon as the iterable yields its first non-empty \"\n\"value. Changing these later has no effect.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:290\nmsgid \"\"\n\"The ordering of this list is significant. You may for example return a \"\n\"subclass of :class:`str` with a ``read()`` method. It is still treated as a \"\n\"string instead of a file, because strings are handled first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:293\nmsgid \"Changing the Default Encoding\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:294\nmsgid \"\"\n\"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide\"\n\" how to encode unicode strings. This header defaults to ``text/html; \"\n\"charset=UTF8`` and can be changed using the :attr:`Response.content_type` \"\n\"attribute or by setting the :attr:`Response.charset` attribute directly. \"\n\"(The :class:`Response` object is described in the section :ref:`tutorial-\"\n\"response`.)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:309\nmsgid \"\"\n\"In some rare cases the Python encoding names differ from the names supported\"\n\" by the HTTP specification. Then, you have to do both: first set the \"\n\":attr:`Response.content_type` header (which is sent to the client unchanged)\"\n\" and then set the :attr:`Response.charset` attribute (which is used to \"\n\"encode unicode).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:314\nmsgid \"Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:316\nmsgid \"\"\n\"You can directly return file objects, but :func:`static_file` is the \"\n\"recommended way to serve static files. It automatically guesses a mime-type,\"\n\" adds a ``Last-Modified`` header, restricts paths to a ``root`` directory \"\n\"for security reasons and generates appropriate error responses (403 on \"\n\"permission errors, 404 on missing files). It even supports the ``If-\"\n\"Modified-Since`` header and eventually generates a ``304 Not Modified`` \"\n\"response. You can pass a custom MIME type to disable guessing.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:329\nmsgid \"\"\n\"You can raise the return value of :func:`static_file` as an exception if you\"\n\" really need to.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:332\nmsgid \"Forced Download\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:333\nmsgid \"\"\n\"Most browsers try to open downloaded files if the MIME type is known and \"\n\"assigned to an application (e.g. PDF files). If this is not what you want, \"\n\"you can force a download dialog and even suggest a filename to the user::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:339\nmsgid \"\"\n\"If the ``download`` parameter is just ``True``, the original filename is \"\n\"used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:344\nmsgid \"HTTP Errors and Redirects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:346\nmsgid \"\"\n\"The :func:`abort` function is a shortcut for generating HTTP error pages.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:355\nmsgid \"\"\n\"To redirect a client to a different URL, you can send a ``303 See Other`` \"\n\"response with the ``Location`` header set to the new URL. :func:`redirect` \"\n\"does that for you::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:362\nmsgid \"You may provide a different HTTP status code as a second parameter.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:365\nmsgid \"\"\n\"Both functions will interrupt your callback code by raising an \"\n\":exc:`HTTPResponse` exception.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:368\nmsgid \"Other Exceptions\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:369\nmsgid \"\"\n\"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will \"\n\"result in a ``500 Internal Server Error`` response, so they won't crash your\"\n\" WSGI server. You can turn off this behavior to handle exceptions in your \"\n\"middleware by setting ``bottle.app().catchall`` to ``False``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:375\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:377\nmsgid \"\"\n\"Response metadata such as the HTTP status code, response headers and cookies\"\n\" are stored in an object called :data:`response` up to the point where they \"\n\"are transmitted to the browser. You can manipulate these metadata directly \"\n\"or use the predefined helper methods to do so. The full API and feature list\"\n\" is described in the API section (see :class:`Response`), but the most \"\n\"common use cases and features are covered here, too.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:380\nmsgid \"Status Code\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:381\nmsgid \"\"\n\"The `HTTP status code <http_code>`_ controls the behavior of the browser and\"\n\" defaults to ``200 OK``. In most scenarios you won't need to set the \"\n\":attr:`Response.status` attribute manually, but use the :func:`abort` helper\"\n\" or return an :exc:`HTTPResponse` instance with the appropriate status code.\"\n\" Any integer is allowed, but codes other than the ones defined by the `HTTP \"\n\"specification <http_code>`_ will only confuse the browser and break \"\n\"standards.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:384\nmsgid \"Response Header\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:385\nmsgid \"\"\n\"Response headers such as ``Cache-Control`` or ``Location`` are defined via \"\n\":meth:`Response.set_header`. This method takes two parameters, a header name\"\n\" and a value. The name part is case-insensitive::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:392\nmsgid \"\"\n\"Most headers are unique, meaning that only one header per name is send to \"\n\"the client. Some special headers however are allowed to appear more than \"\n\"once in a response. To add an additional header, use \"\n\":meth:`Response.add_header` instead of :meth:`Response.set_header`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:397\nmsgid \"\"\n\"Please note that this is just an example. If you want to work with cookies, \"\n\"read :ref:`ahead <tutorial-cookies>`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:403 ../../tutorial.rst:533\nmsgid \"Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:405\nmsgid \"\"\n\"A cookie is a named piece of text stored in the user's browser profile. You \"\n\"can access previously defined cookies via :meth:`Request.get_cookie` and set\"\n\" new cookies with :meth:`Response.set_cookie`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:415\nmsgid \"\"\n\"The :meth:`Response.set_cookie` method accepts a number of additional \"\n\"keyword arguments that control the cookies lifetime and behavior. Some of \"\n\"the most common settings are described here:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:417\nmsgid \"**max_age:**    Maximum age in seconds. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:418\nmsgid \"\"\n\"**expires:**    A datetime object or UNIX timestamp. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:419\nmsgid \"\"\n\"**domain:**     The domain that is allowed to read the cookie. (default: \"\n\"current domain)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:420\nmsgid \"**path:**       Limit the cookie to a given path (default: ``/``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:421\nmsgid \"**secure:**     Limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:422\nmsgid \"\"\n\"**httponly:**   Prevent client-side javascript to read this cookie (default:\"\n\" off, requires Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:423\nmsgid \"\"\n\"**same_site:**  Disables third-party use for a cookie. Allowed attributes: \"\n\"`lax` and `strict`. In strict mode the cookie will never be sent. In lax \"\n\"mode the cookie is only sent with a top-level GET request.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:425\nmsgid \"\"\n\"If neither `expires` nor `max_age` is set, the cookie expires at the end of \"\n\"the browser session or as soon as the browser window is closed. There are \"\n\"some other gotchas you should consider when using cookies:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:427\nmsgid \"Cookies are limited to 4 KB of text in most browsers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:428\nmsgid \"\"\n\"Some users configure their browsers to not accept cookies at all. Most \"\n\"search engines ignore cookies too. Make sure that your application still \"\n\"works without cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:429\nmsgid \"\"\n\"Cookies are stored at client side and are not encrypted in any way. Whatever\"\n\" you store in a cookie, the user can read it. Worse than that, an attacker \"\n\"might be able to steal a user's cookies through `XSS \"\n\"<http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_\"\n\" vulnerabilities on your side. Some viruses are known to read the browser \"\n\"cookies, too. Thus, never store confidential information in cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:430\nmsgid \"Cookies are easily forged by malicious clients. Do not trust cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:435\nmsgid \"Signed Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:436\nmsgid \"\"\n\"As mentioned above, cookies are easily forged by malicious clients. Bottle \"\n\"can cryptographically sign your cookies to prevent this kind of \"\n\"manipulation. All you have to do is to provide a signature key via the \"\n\"`secret` keyword argument whenever you read or set a cookie and keep that \"\n\"key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` \"\n\"if the cookie is not signed or the signature keys don't match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:456\nmsgid \"\"\n\"In addition, Bottle automatically pickles and unpickles any data stored to \"\n\"signed cookies. This allows you to store any pickle-able object (not only \"\n\"strings) to cookies, as long as the pickled data does not exceed the 4 KB \"\n\"limit.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:458\nmsgid \"\"\n\"Signed cookies are not encrypted (the client can still see the content) and \"\n\"not copy-protected (the client can restore an old cookie). The main \"\n\"intention is to make pickling and unpickling safe and prevent manipulation, \"\n\"not to store secret information at client side.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:471\nmsgid \"Request Data\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:473\nmsgid \"\"\n\"Cookies, HTTP header, HTML ``<form>`` fields and other request data is \"\n\"available through the global :data:`request` object. This special object \"\n\"always refers to the *current* request, even in multi-threaded environments \"\n\"where multiple client connections are handled at the same time::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:482\nmsgid \"\"\n\"The :data:`request` object is a subclass of :class:`BaseRequest` and has a \"\n\"very rich API to access data. We only cover the most commonly used features \"\n\"here, but it should be enough to get started.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:487\nmsgid \"Introducing :class:`FormsDict`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:489\nmsgid \"\"\n\"Bottle uses a special type of dictionary to store form data and cookies. \"\n\":class:`FormsDict` behaves like a normal dictionary, but has some additional\"\n\" features to make your life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:491\nmsgid \"\"\n\"**Attribute access**: All values in the dictionary are also accessible as \"\n\"attributes. These virtual attributes return unicode strings, even if the \"\n\"value is missing or unicode decoding fails. In that case, the string is \"\n\"empty, but still present::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:506\nmsgid \"\"\n\"**Multiple values per key:** :class:`FormsDict` is a subclass of \"\n\":class:`MultiDict` and can store more than one value per key. The standard \"\n\"dictionary access methods will only return a single value, but the \"\n\":meth:`~MultiDict.getall` method returns a (possibly empty) list of all \"\n\"values for a specific key::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:511\nmsgid \"\"\n\"**WTForms support:** Some libraries (e.g. `WTForms \"\n\"<http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input.\"\n\" :meth:`FormsDict.decode` does that for you. It decodes all values and \"\n\"returns a copy of itself, while preserving multiple values per key and all \"\n\"the other features.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:515\nmsgid \"\"\n\"In **Python 2** all keys and values are byte-strings. If you need unicode, \"\n\"you can call :meth:`FormsDict.getunicode` or fetch values via attribute \"\n\"access. Both methods try to decode the string (default: utf8) and return an \"\n\"empty string if that fails. No need to catch :exc:`UnicodeError`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:522\nmsgid \"\"\n\"In **Python 3** all strings are unicode, but HTTP is a byte-based wire \"\n\"protocol. The server has to decode the byte strings somehow before they are \"\n\"passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 \"\n\"(aka latin1), a reversible single-byte codec that can be re-encoded with a \"\n\"different encoding later. Bottle does that for :meth:`FormsDict.getunicode` \"\n\"and attribute access, but not for the dict-access methods. These return the \"\n\"unchanged values as provided by the server implementation, which is probably\"\n\" not what you want.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:529\nmsgid \"\"\n\"If you need the whole dictionary with correctly decoded values (e.g. for \"\n\"WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:535\nmsgid \"\"\n\"Cookies are small pieces of text stored in the clients browser and sent back\"\n\" to the server with each request. They are useful to keep some state around \"\n\"for more than one request (HTTP itself is stateless), but should not be used\"\n\" for security related stuff. They can be easily forged by the client.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:537\nmsgid \"\"\n\"All cookies sent by the client are available through \"\n\":attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a \"\n\"simple cookie-based view counter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:547\nmsgid \"\"\n\"The :meth:`BaseRequest.get_cookie` method is a different way do access \"\n\"cookies. It supports decoding :ref:`signed cookies <tutorial-signed-\"\n\"cookies>` as described in a separate section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:550\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:552\nmsgid \"\"\n\"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or \"\n\"``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible \"\n\"through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict`\"\n\" is basically a dictionary with case-insensitive keys::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:564\nmsgid \"Query Variables\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:566\nmsgid \"\"\n\"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit\"\n\" a small number of key/value pairs to the server. You can use the \"\n\":attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these \"\n\"values and the :attr:`BaseRequest.query_string` attribute to get the whole \"\n\"string.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:579\nmsgid \"HTML `<form>` Handling\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:581\nmsgid \"\"\n\"Let us start from the beginning. In HTML, a typical ``<form>`` looks \"\n\"something like this:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:591\nmsgid \"\"\n\"The ``action`` attribute specifies the URL that will receive the form data. \"\n\"``method`` defines the HTTP method to use (``GET`` or ``POST``). With \"\n\"``method=\\\"get\\\"`` the form values are appended to the URL and available \"\n\"through :attr:`BaseRequest.query` as described above. This is considered \"\n\"insecure and has other limitations, so we use ``method=\\\"post\\\"`` here. If \"\n\"in doubt, use ``POST`` forms.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:593\nmsgid \"\"\n\"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms`\"\n\" as a :class:`FormsDict`. The server side code may look like this::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:616\nmsgid \"\"\n\"There are several other attributes used to access form data. Some of them \"\n\"combine values from different sources for easier access. The following table\"\n\" should give you a decent overview.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"GET Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"POST Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"File Uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621\nmsgid \":attr:`BaseRequest.query`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:622 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:624 ../../tutorial.rst:625\n#: ../../tutorial.rst:626 ../../tutorial.rst:626\nmsgid \"yes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:621 ../../tutorial.rst:622\n#: ../../tutorial.rst:622 ../../tutorial.rst:623 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:625 ../../tutorial.rst:625\n#: ../../tutorial.rst:626\nmsgid \"no\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:622\nmsgid \":attr:`BaseRequest.forms`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:623\nmsgid \":attr:`BaseRequest.files`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:624\nmsgid \":attr:`BaseRequest.params`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:625\nmsgid \":attr:`BaseRequest.GET`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:626\nmsgid \":attr:`BaseRequest.POST`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:631\nmsgid \"File uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:633\nmsgid \"\"\n\"To support file uploads, we have to change the ``<form>`` tag a bit. First, \"\n\"we tell the browser to encode the form data in a different way by adding an \"\n\"``enctype=\\\"multipart/form-data\\\"`` attribute to the ``<form>`` tag. Then, \"\n\"we add ``<input type=\\\"file\\\" />`` tags to allow the user to select a file. \"\n\"Here is an example:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:643\nmsgid \"\"\n\"Bottle stores file uploads in :attr:`BaseRequest.files` as \"\n\":class:`FileUpload` instances, along with some metadata about the upload. \"\n\"Let us assume you just want to save the file to disk::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:657\nmsgid \"\"\n\":attr:`FileUpload.filename` contains the name of the file on the clients \"\n\"file system, but is cleaned up and normalized to prevent bugs caused by \"\n\"unsupported characters or path segments in the filename. If you need the \"\n\"unmodified name as sent by the client, have a look at \"\n\":attr:`FileUpload.raw_filename`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:659\nmsgid \"\"\n\"The :attr:`FileUpload.save` method is highly recommended if you want to \"\n\"store the file to disk. It prevents some common errors (e.g. it does not \"\n\"overwrite existing files unless you tell it to) and stores the file in a \"\n\"memory efficient way. You can access the file object directly via \"\n\":attr:`FileUpload.file`. Just be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:663\nmsgid \"JSON Content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:665\nmsgid \"\"\n\"Some JavaScript or REST clients send ``application/json`` content to the \"\n\"server. The :attr:`BaseRequest.json` attribute contains the parsed data \"\n\"structure, if available.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:669\nmsgid \"The raw request body\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:671\nmsgid \"\"\n\"You can access the raw body data as a file-like object via \"\n\":attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary \"\n\"file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` \"\n\"setting. In both cases the body is completely buffered before you can access\"\n\" the attribute. If you expect huge amounts of data and want to get direct \"\n\"unbuffered access to the stream, have a look at ``request['wsgi.input']``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:676\nmsgid \"WSGI Environment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:678\nmsgid \"\"\n\"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The \"\n\"original is stored in :attr:`BaseRequest.environ`, but the request object \"\n\"itself behaves like a dictionary, too. Most of the interesting data is \"\n\"exposed through special methods or attributes, but if you want to access \"\n\"`WSGI environ variables <WSGI_Specification>`_ directly, you can do so::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:696\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:698\nmsgid \"\"\n\"Bottle comes with a fast and powerful built-in template engine called \"\n\":doc:`stpl`. To render a template you can use the :func:`template` function \"\n\"or the :func:`view` decorator. All you have to do is to provide the name of \"\n\"the template and the variables you want to pass to the template as keyword \"\n\"arguments. Here’s a simple example of how to render a template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:705\nmsgid \"\"\n\"This will load the template file ``hello_template.tpl`` and render it with \"\n\"the ``name`` variable set. Bottle will look for templates in the \"\n\"``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` \"\n\"list.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:707\nmsgid \"\"\n\"The :func:`view` decorator allows you to return a dictionary with the \"\n\"template variables instead of calling :func:`template`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:716\nmsgid \"Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:719\nmsgid \"\"\n\"The template syntax is a very thin layer around the Python language. Its \"\n\"main purpose is to ensure correct indentation of blocks, so you can format \"\n\"your template without worrying about indentation. Follow the link for a full\"\n\" syntax description: :doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:721\nmsgid \"Here is an example template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:732\nmsgid \"Caching\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:733\nmsgid \"\"\n\"Templates are cached in memory after compilation. Modifications made to the \"\n\"template files will have no affect until you clear the template cache. Call \"\n\"``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:743\nmsgid \"Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:747\nmsgid \"\"\n\"Bottle's core features cover most common use-cases, but as a micro-framework\"\n\" it has its limits. This is where \\\"Plugins\\\" come into play. Plugins add \"\n\"missing functionality to the framework, integrate third party libraries, or \"\n\"just automate some repetitive work.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:749\nmsgid \"\"\n\"We have a growing :doc:`/plugins/index` and most plugins are designed to be \"\n\"portable and re-usable across applications. The chances are high that your \"\n\"problem has already been solved and a ready-to-use plugin exists. If not, \"\n\"the :doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:751\nmsgid \"\"\n\"The effects and APIs of plugins are manifold and depend on the specific \"\n\"plugin. The ``SQLitePlugin`` plugin for example detects callbacks that \"\n\"require a ``db`` keyword argument and creates a fresh database connection \"\n\"object every time the callback is called. This makes it very convenient to \"\n\"use a database::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:771\nmsgid \"\"\n\"Other plugin may populate the thread-safe :data:`local` object, change \"\n\"details of the :data:`request` object, filter the data returned by the \"\n\"callback or bypass the callback completely. An \\\"auth\\\" plugin for example \"\n\"could check for a valid session and return a login page instead of calling \"\n\"the original callback. What happens exactly depends on the plugin.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:775\nmsgid \"Application-wide Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:777\nmsgid \"\"\n\"Plugins can be installed application-wide or just to some specific routes \"\n\"that need additional functionality. Most plugins can safely be installed to \"\n\"all routes and are smart enough to not add overhead to callbacks that do not\"\n\" need their functionality.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:779\nmsgid \"\"\n\"Let us take the ``SQLitePlugin`` plugin for example. It only affects route \"\n\"callbacks that need a database connection. Other routes are left alone. \"\n\"Because of this, we can install the plugin application-wide with no \"\n\"additional overhead.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:781\nmsgid \"\"\n\"To install a plugin, just call :func:`install` with the plugin as first \"\n\"argument::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:786\nmsgid \"\"\n\"The plugin is not applied to the route callbacks yet. This is delayed to \"\n\"make sure no routes are missed. You can install plugins first and add routes\"\n\" later, if you want to. The order of installed plugins is significant, \"\n\"though. If a plugin requires a database connection, you need to install the \"\n\"database plugin first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:790\nmsgid \"Uninstall Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:791\nmsgid \"\"\n\"You can use a name, class or instance to :func:`uninstall` a previously \"\n\"installed plugin::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:801\nmsgid \"\"\n\"Plugins can be installed and removed at any time, even at runtime while \"\n\"serving requests. This enables some neat tricks (installing slow debugging \"\n\"or profiling plugins only when needed) but should not be overused. Each time\"\n\" the list of plugins changes, the route cache is flushed and all plugins are\"\n\" re-applied.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:804\nmsgid \"\"\n\"The module-level :func:`install` and :func:`uninstall` functions affect the \"\n\":ref:`default-app`. To manage plugins for a specific application, use the \"\n\"corresponding methods on the :class:`Bottle` application object.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:808\nmsgid \"Route-specific Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:810\nmsgid \"\"\n\"The ``apply`` parameter of the :func:`route` decorator comes in handy if you\"\n\" want to install plugins to only a small number of routes::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:820\nmsgid \"Blacklisting Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:822\nmsgid \"\"\n\"You may want to explicitly disable a plugin for a number of routes. The \"\n\":func:`route` decorator has a ``skip`` parameter for this purpose::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:844\nmsgid \"\"\n\"The ``skip`` parameter accepts a single value or a list of values. You can \"\n\"use a name, class or instance to identify the plugin that is to be skipped. \"\n\"Set ``skip=True`` to skip all plugins at once.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:847\nmsgid \"Plugins and Sub-Applications\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:849\nmsgid \"\"\n\"Most plugins are specific to the application they were installed to. \"\n\"Consequently, they should not affect sub-applications mounted with \"\n\":meth:`Bottle.mount`. Here is an example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:860\nmsgid \"\"\n\"Whenever you mount an application, Bottle creates a proxy-route on the main-\"\n\"application that forwards all requests to the sub-application. Plugins are \"\n\"disabled for this kind of proxy-route by default. As a result, our \"\n\"(fictional) `WTForms` plugin affects the ``/contact`` route, but does not \"\n\"affect the routes of the ``/blog`` sub-application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:862\nmsgid \"\"\n\"This behavior is intended as a sane default, but can be overridden. The \"\n\"following example re-activates all plugins for a specific proxy-route::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:866\nmsgid \"\"\n\"But there is a snag: The plugin sees the whole sub-application as a single \"\n\"route, namely the proxy-route mentioned above. In order to affect each \"\n\"individual route of the sub-application, you have to install the plugin to \"\n\"the mounted application explicitly.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:871\nmsgid \"Development\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:873\nmsgid \"\"\n\"So you have learned the basics and want to write your own application? Here \"\n\"are some tips that might help you being more productive.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:879\nmsgid \"Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:881\nmsgid \"\"\n\"Bottle maintains a global stack of :class:`Bottle` instances and uses the \"\n\"top of the stack as a default for some of the module-level functions and \"\n\"decorators. The :func:`route` decorator, for example, is a shortcut for \"\n\"calling :meth:`Bottle.route` on the default application::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:889\nmsgid \"\"\n\"This is very convenient for small applications and saves you some typing, \"\n\"but also means that, as soon as your module is imported, routes are \"\n\"installed to the global default application. To avoid this kind of import \"\n\"side-effects, Bottle offers a second, more explicit way to build \"\n\"applications::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:899\nmsgid \"\"\n\"Separating the application object improves re-usability a lot, too. Other \"\n\"developers can safely import the ``app`` object from your module and use \"\n\":meth:`Bottle.mount` to merge applications together.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:904\nmsgid \"\"\n\"Starting with bottle-0.13 you can use :class:`Bottle` instances as context \"\n\"managers::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:929\nmsgid \"Debug Mode\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:931\nmsgid \"During early development, the debug mode can be very helpful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:939\nmsgid \"\"\n\"In this mode, Bottle is much more verbose and provides helpful debugging \"\n\"information whenever an error occurs. It also disables some optimisations \"\n\"that might get in your way and adds some checks that warn you about possible\"\n\" misconfiguration.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:941\nmsgid \"Here is an incomplete list of things that change in debug mode:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:943\nmsgid \"The default error page shows a traceback.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:944\nmsgid \"Templates are not cached.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:945\nmsgid \"Plugins are applied immediately.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:947\nmsgid \"Just make sure not to use the debug mode on a production server.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:950\nmsgid \"Auto Reloading\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:952\nmsgid \"\"\n\"During development, you have to restart the server a lot to test your recent\"\n\" changes. The auto reloader can do this for you. Every time you edit a \"\n\"module file, the reloader restarts the server process and loads the newest \"\n\"version of your code.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:962\nmsgid \"\"\n\"How it works: the main process will not start a server, but spawn a new \"\n\"child process using the same command line arguments used to start the main \"\n\"process. All module-level code is executed at least twice! Be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:967\nmsgid \"\"\n\"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` \"\n\"and start as a normal non-reloading app server. As soon as any of the loaded\"\n\" modules changes, the child process is terminated and re-spawned by the main\"\n\" process. Changes in template files will not trigger a reload. Please use \"\n\"debug mode to deactivate template caching.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:973\nmsgid \"\"\n\"The reloading depends on the ability to stop the child process. If you are \"\n\"running on Windows or any other operating system not supporting \"\n\"``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), \"\n\"``signal.SIGTERM`` is used to kill the child. Note that exit handlers and \"\n\"finally clauses, etc., are not executed after a ``SIGTERM``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:981\nmsgid \"Command Line Interface\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:985\nmsgid \"Starting with version 0.10 you can use bottle as a command-line tool:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1009\nmsgid \"\"\n\"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to \"\n\"``localhost:8080``. The other parameters should be self-explanatory.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1011\nmsgid \"\"\n\"Both plugins and applications are specified via import expressions. These \"\n\"consist of an import path (e.g. ``package.module``) and an expression to be \"\n\"evaluated in the namespace of that module, separated by a colon. See \"\n\":func:`load` for details. Here are some examples:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1032\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1034\nmsgid \"\"\n\"Bottle runs on the built-in `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_\"\n\"  by default. This non-threading HTTP server is perfectly fine for \"\n\"development, but may become a performance bottleneck when server load \"\n\"increases.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1036\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded server::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1040\nmsgid \"\"\n\"This, and many other deployment options are described in a separate article:\"\n\" :doc:`deployment`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1048\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1051\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1053\nmsgid \"\"\n\"Programmer code that is to be called when some external action happens. In \"\n\"the context of web frameworks, the mapping between URL paths and application\"\n\" code is often achieved by specifying a callback function for each URL.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1057\nmsgid \"decorator\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1059\nmsgid \"\"\n\"A function returning another function, usually applied as a function \"\n\"transformation using the ``@decorator`` syntax. See `python documentation \"\n\"for function definition  \"\n\"<http://docs.python.org/reference/compound_stmts.html#function>`_ for more \"\n\"about decorators.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1060\nmsgid \"environ\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1062\nmsgid \"\"\n\"A structure where information about all documents under the root is saved, \"\n\"and used for cross-referencing.  The environment is pickled after the \"\n\"parsing stage, so that successive runs only need to read and parse new and \"\n\"changed documents.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1066\nmsgid \"handler function\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1068\nmsgid \"\"\n\"A function to handle some specific event or situation. In a web framework, \"\n\"the application is developed by attaching a handler function as callback for\"\n\" each specific URL comprising the application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1071\nmsgid \"source directory\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1073\nmsgid \"\"\n\"The directory which, including its subdirectories, contains all source files\"\n\" for one Sphinx project.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/pt_BR/LC_MESSAGES/tutorial_app.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Portuguese (Brazil) (http://www.transifex.com/bottle/bottle/language/pt_BR/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: pt_BR\\n\"\n\"Plural-Forms: nplurals=2; plural=(n > 1);\\n\"\n\n#: ../../tutorial_app.rst:19\nmsgid \"Tutorial: Todo-List Application\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:23\nmsgid \"\"\n\"This tutorial is a work in progress and written by `noisefloor \"\n\"<http://github.com/noisefloor>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:26\nmsgid \"\"\n\"This tutorial should give a brief introduction to the Bottle_ WSGI \"\n\"Framework. The main goal is to be able, after reading through this tutorial,\"\n\" to create a project using Bottle. Within this document, not all abilities \"\n\"will be shown, but at least the main and important ones like routing, \"\n\"utilizing the Bottle template abilities to format output and handling GET / \"\n\"POST parameters.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:28\nmsgid \"\"\n\"To understand the content here, it is not necessary to have a basic \"\n\"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. \"\n\"You should have a fair understanding of the Python_ programming language. \"\n\"Furthermore, the example used in the tutorial retrieves and stores data in a\"\n\" SQL database, so a basic idea about SQL helps, but is not a must to \"\n\"understand the concepts of Bottle. Right here, SQLite_ is used. The output \"\n\"of Bottle sent to the browser is formatted in some examples by the help of \"\n\"HTML. Thus, a basic idea about the common HTML tags does help as well.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:30\nmsgid \"\"\n\"For the sake of introducing Bottle, the Python code \\\"in between\\\" is kept \"\n\"short, in order to keep the focus. Also all code within the tutorial is \"\n\"working fine, but you may not necessarily use it \\\"in the wild\\\", e.g. on a \"\n\"public web server. In order to do so, you may add e.g. more error handling, \"\n\"protect the database with a password, test and escape the input etc.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:32\nmsgid \"Table of Contents\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:35\nmsgid \"Goals\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:37\nmsgid \"\"\n\"At the end of this tutorial, we will have a simple, web-based ToDo list. The\"\n\" list contains a text (with max 100 characters) and a status (0 for closed, \"\n\"1 for open) for each item. Through the web-based user interface, open items \"\n\"can be view and edited and new items can be added.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:39\nmsgid \"\"\n\"During development, all pages will be available on ``localhost`` only, but \"\n\"later on it will be shown how to adapt the application for a \\\"real\\\" \"\n\"server, including how to use with Apache's mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:41\nmsgid \"\"\n\"Bottle will do the routing and format the output, with the help of \"\n\"templates. The items of the list will be stored inside a SQLite database. \"\n\"Reading and  writing the database will be done by Python code.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:43\nmsgid \"\"\n\"We will end up with an application with the following pages and \"\n\"functionality:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:45\nmsgid \"start page ``http://localhost:8080/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:46\nmsgid \"adding new items to the list: ``http://localhost:8080/new``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:47\nmsgid \"page for editing items: ``http://localhost:8080/edit/<no:int>``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:48\nmsgid \"catching errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:51\nmsgid \"Before We Start...\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:55\nmsgid \"Install Bottle\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:56\nmsgid \"\"\n\"Assuming that you have a fairly new installation of Python (version 2.5 or \"\n\"higher), you only need to install Bottle in addition to that. Bottle has no \"\n\"other dependencies than Python itself.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:58\nmsgid \"\"\n\"You can either manually install Bottle or use Python's easy_install: \"\n\"``easy_install bottle``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:62\nmsgid \"Further Software Necessities\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:63\nmsgid \"\"\n\"As we use SQLite3 as a database, make sure it is installed. On Linux \"\n\"systems, most distributions have SQLite3 installed by default. SQLite is \"\n\"available for Windows and MacOS X as well and the `sqlite3` module is part \"\n\"of the python standard library.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:66\nmsgid \"Create An SQL Database\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:67\nmsgid \"\"\n\"First, we need to create the database we use later on. To do so, save the \"\n\"following script in your project directory and run it with python. You can \"\n\"use the interactive interpreter too::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:78\nmsgid \"\"\n\"This generates a database-file `todo.db` with tables called ``todo`` and \"\n\"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for \"\n\"each row, which is used later on to reference the rows. The column ``task`` \"\n\"holds the text which describes the task, it can be max 100 characters long. \"\n\"Finally, the column ``status`` is used to mark a task as open (value 1) or \"\n\"closed (value 0).\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:81\nmsgid \"Using Bottle for a Web-Based ToDo List\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:83\nmsgid \"\"\n\"Now it is time to introduce Bottle in order to create a web-based \"\n\"application. But first, we need to look into a basic concept of Bottle: \"\n\"routes.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:87\nmsgid \"Understanding routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:88\nmsgid \"\"\n\"Basically, each page visible in the browser is dynamically generated when \"\n\"the page address is called. Thus, there is no static content. That is \"\n\"exactly what is called a \\\"route\\\" within Bottle: a certain address on the \"\n\"server. So, for example, when the page ``http://localhost:8080/todo`` is \"\n\"called from the browser, Bottle \\\"grabs\\\" the call and checks if there is \"\n\"any (Python) function defined for the route \\\"todo\\\". If so, Bottle will \"\n\"execute the corresponding Python code and return its result.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:92\nmsgid \"First Step - Showing All Open Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:93\nmsgid \"\"\n\"So, after understanding the concept of routes, let's create the first one. \"\n\"The goal is to see all open items from the ToDo list::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:108\nmsgid \"\"\n\"Save the code a ``todo.py``, preferably in the same directory as the file \"\n\"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the \"\n\"``sqlite3.connect()`` statement.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:110\nmsgid \"\"\n\"Let's have a look what we just did: We imported the necessary module \"\n\"``sqlite3`` to access to SQLite database and from Bottle we imported \"\n\"``route`` and ``run``. The ``run()`` statement simply starts the web server \"\n\"included in Bottle. By default, the web server serves the pages on localhost\"\n\" and port 8080. Furthermore, we imported ``route``, which is the function \"\n\"responsible for Bottle's routing. As you can see, we defined one function, \"\n\"``todo_list()``, with a few lines of code reading from the database. The \"\n\"important point is the `decorator statement`_ ``@route('/todo')`` right \"\n\"before the ``def todo_list()`` statement. By doing this, we bind this \"\n\"function to the route ``/todo``, so every time the browsers calls \"\n\"``http://localhost:8080/todo``, Bottle returns the result of the function \"\n\"``todo_list()``. That is how routing within bottle works.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:112\nmsgid \"\"\n\"Actually you can bind more than one route to a function. So the following \"\n\"code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:119\nmsgid \"\"\n\"will work fine, too. What will not work is to bind one route to more than \"\n\"one function.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:121\nmsgid \"\"\n\"What you will see in the browser is what is returned, thus the value given \"\n\"by the ``return`` statement. In this example, we need to convert ``result`` \"\n\"in to a string by ``str()``, as Bottle expects a string or a list of strings\"\n\" from the return statement. But here, the result of the database query is a \"\n\"list of tuples, which is the standard defined by the `Python DB API`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:123\nmsgid \"\"\n\"Now, after understanding the little script above, it is time to execute it \"\n\"and watch the result yourself. Remember that on Linux- / Unix-based systems \"\n\"the file ``todo.py`` needs to be executable first. Then, just run ``python \"\n\"todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. \"\n\"In case you made no mistake writing the script, the output should look like \"\n\"this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:127\nmsgid \"\"\n\"If so - congratulations! You are now a successful user of Bottle. In case it\"\n\" did not work and you need to make some changes to the script, remember to \"\n\"stop Bottle serving the page, otherwise the revised version will not be \"\n\"loaded.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:129\nmsgid \"\"\n\"Actually, the output is not really exciting nor nice to read. It is the raw \"\n\"result returned from the SQL query.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:131\nmsgid \"\"\n\"So, in the next step we format the output in a nicer way. But before we do \"\n\"that, we make our life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:135\nmsgid \"Debugging and Auto-Reload\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:136\nmsgid \"\"\n\"Maybe you already noticed that Bottle sends a short error message to the \"\n\"browser in case something within the script is wrong, e.g. the connection to\"\n\" the database is not working. For debugging purposes it is quite helpful to \"\n\"get more details. This can be easily achieved by adding the following \"\n\"statement to the script::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:144\nmsgid \"\"\n\"By enabling \\\"debug\\\", you will get a full stacktrace of the Python \"\n\"interpreter, which usually contains useful information for finding bugs. \"\n\"Furthermore, templates (see below) are not cached, thus changes to templates\"\n\" will take effect without stopping the server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:148\nmsgid \"\"\n\"That ``debug(True)`` is supposed to be used for development only, it should \"\n\"*not* be used in production environments.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:152\nmsgid \"\"\n\"Another quite nice feature is auto-reloading, which is enabled by modifying \"\n\"the ``run()`` statement to\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:158\nmsgid \"\"\n\"This will automatically detect changes to the script and reload the new \"\n\"version once it is called again, without the need to stop and start the \"\n\"server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:160\nmsgid \"\"\n\"Again, the feature is mainly supposed to be used while developing, not on \"\n\"production systems.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:164\nmsgid \"Bottle Template To Format The Output\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:165\nmsgid \"\"\n\"Now let's have a look at casting the output of the script into a proper \"\n\"format.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:167\nmsgid \"\"\n\"Actually Bottle expects to receive a string or a list of strings from a \"\n\"function and returns them by the help of the built-in server to the browser.\"\n\" Bottle does not bother about the content of the string itself, so it can be\"\n\" text formatted with HTML markup, too.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:169\nmsgid \"\"\n\"Bottle brings its own easy-to-use template engine with it. Templates are \"\n\"stored as separate files having a ``.tpl`` extension. The template can be \"\n\"called then from within a function. Templates can contain any type of text \"\n\"(which will be most likely HTML-markup mixed with Python statements). \"\n\"Furthermore, templates can take arguments, e.g. the result set of a database\"\n\" query, which will be then formatted nicely within the template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:171\nmsgid \"\"\n\"Right here, we are going to cast the result of our query showing the open \"\n\"ToDo items into a simple table with two columns: the first column will \"\n\"contain the ID of the item, the second column the text. The result set is, \"\n\"as seen above, a list of tuples, each tuple contains one set of results.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:173\nmsgid \"To include the template in our example, just add the following lines::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:183\nmsgid \"\"\n\"So we do here two things: first, we import ``template`` from Bottle in order\"\n\" to be able to use templates. Second, we assign the output of the template \"\n\"``make_table`` to the variable ``output``, which is then returned. In \"\n\"addition to calling the template, we assign ``result``, which we received \"\n\"from the database query, to the variable ``rows``, which is later on used \"\n\"within the template. If necessary, you can assign more than one variable / \"\n\"value to a template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:185\nmsgid \"\"\n\"Templates always return a list of strings, thus there is no need to convert \"\n\"anything. We can save one line of code by writing ``return \"\n\"template('make_table', rows=result)``, which gives exactly the same result \"\n\"as above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:187\nmsgid \"\"\n\"Now it is time to write the corresponding template, which looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:201\nmsgid \"\"\n\"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` \"\n\"is stored.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:203\nmsgid \"\"\n\"Let's have a look at the code: every line starting with % is interpreted as \"\n\"Python code. Because it is effectively Python, only valid Python statements \"\n\"are allowed. The template will raise exceptions, just as any other Python \"\n\"code would. The other lines are plain HTML markup.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:205\nmsgid \"\"\n\"As you can see, we use Python's ``for`` statement two times, in order to go \"\n\"through ``rows``. As seen above, ``rows`` is a variable which holds the \"\n\"result of the database query, so it is a list of tuples. The first ``for`` \"\n\"statement accesses the tuples within the list, the second one the items \"\n\"within the tuple, which are put each into a cell of the table. It is \"\n\"important that you close all ``for``, ``if``, ``while`` etc. statements with\"\n\" ``%end``, otherwise the output may not be what you expect.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:207\nmsgid \"\"\n\"If you need to access a variable within a non-Python code line inside the \"\n\"template, you need to put it into double curly braces. This tells the \"\n\"template to insert the actual value of the variable right in place.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:209\nmsgid \"\"\n\"Run the script again and look at the output. Still not really nice, but at \"\n\"least more readable than the list of tuples. You can spice-up the very \"\n\"simple HTML markup above, e.g. by using in-line styles to get a better \"\n\"looking output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:213\nmsgid \"Using GET and POST Values\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:214\nmsgid \"\"\n\"As we can review all open items properly, we move to the next step, which is\"\n\" adding new items to the ToDo list. The new item should be received from a \"\n\"regular HTML-based form, which sends its data by the GET method.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:216\nmsgid \"\"\n\"To do so, we first add a new route to our script and tell the route that it \"\n\"should get GET data::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:239\nmsgid \"\"\n\"To access GET (or POST) data, we need to import ``request`` from Bottle. To \"\n\"assign the actual data to a variable, we use the statement \"\n\"``request.GET.task.strip()`` statement, where ``task`` is the name of the \"\n\"GET data we want to access. That's all. If your GET data has more than one \"\n\"variable, multiple ``request.GET.get()`` statements can be used and assigned\"\n\" to other variables.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:241\nmsgid \"\"\n\"The rest of this piece of code is just processing of the gained data: \"\n\"writing to the database, retrieve the corresponding id from the database and\"\n\" generate the output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:243\nmsgid \"\"\n\"But where do we get the GET data from? Well, we can use a static HTML page \"\n\"holding the form. Or, what we do right now, is to use a template which is \"\n\"output when the route ``/new`` is called without GET data.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:245\nmsgid \"The code needs to be extended to::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:268\nmsgid \"``new_task.tpl`` looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:276\nmsgid \"That's all. As you can see, the template is plain HTML this time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:278\nmsgid \"Now we are able to extend our to do list.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:280\nmsgid \"\"\n\"By the way, if you prefer to use POST data: this works exactly the same way,\"\n\" just use ``request.POST.get()`` instead.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:284\nmsgid \"Editing Existing Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:285\nmsgid \"The last point to do is to enable editing of existing items.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:287\nmsgid \"\"\n\"By using only the routes we know so far it is possible, but may be quite \"\n\"tricky. But Bottle knows something called \\\"dynamic routes\\\", which makes \"\n\"this task quite easy.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:289\nmsgid \"The basic statement for a dynamic route looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:293\nmsgid \"\"\n\"This tells Bottle to accept for ``<something>`` any string up to the next \"\n\"slash. Furthermore, the value of ``something`` will be passed to the \"\n\"function assigned to that route, so the data can be processed within the \"\n\"function, like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:321\nmsgid \"\"\n\"It is basically pretty much the same what we already did above when adding \"\n\"new items, like using ``GET`` data etc. The main addition here is using the \"\n\"dynamic route ``<no:int>``, which here passes the number to the \"\n\"corresponding function. As you can see, ``no`` is integer ID and used within\"\n\" the function to access the right row of data within the database.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:324\nmsgid \"\"\n\"The template ``edit_task.tpl`` called within the function looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:339\nmsgid \"\"\n\"Again, this template is a mix of Python statements and HTML, as already \"\n\"explained above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:341\nmsgid \"\"\n\"A last word on dynamic routes: you can even use a regular expression for a \"\n\"dynamic route, as demonstrated later.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:345\nmsgid \"Validating Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:346\nmsgid \"\"\n\"Using dynamic routes is fine, but for many cases it makes sense to validate \"\n\"the dynamic part of the route. For example, we expect an integer number in \"\n\"our route for editing above. But if a float, characters or so are received, \"\n\"the Python interpreter throws an exception, which is not what we want.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:348\nmsgid \"\"\n\"For those cases, Bottle offers the ``<name:int>`` wildcard filter, which \"\n\"matches (signed) digits and converts the value to integer. In order to apply\"\n\" the wildcard filter, extend the code as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:356\nmsgid \"\"\n\"Save the code and call the page again using incorrect value for \"\n\"``<no:int>``, e.g. a float. You will receive not an exception, but a \\\"404 \"\n\"Not Found\\\" error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:360\nmsgid \"Dynamic Routes Using Regular Expressions\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:361\nmsgid \"\"\n\"Bottle can also handle dynamic routes, where the \\\"dynamic part\\\" of the \"\n\"route can be a regular expression.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:363\nmsgid \"\"\n\"So, just to demonstrate that, let's assume that all single items in our ToDo\"\n\" list should be accessible by their plain number, by a term like e.g. \"\n\"\\\"item1\\\". For obvious reasons, you do not want to create a route for every \"\n\"item. Furthermore, the simple dynamic routes do not work either, as part of \"\n\"the route, the term \\\"item\\\" is static.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:365\nmsgid \"As said above, the solution is a regular expression::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:380\nmsgid \"\"\n\"The line ``@route(/item<item:re:[0-9]+>)`` starts like a normal route, but \"\n\"the third part of the wildcard is interpreted as a regular expression, which\"\n\" is the dynamic part of the route. So in this case, we want to match any \"\n\"digit between 0 and 9. The following function \\\"show_item\\\" just checks \"\n\"whether the given item is present in the database or not. In case it is \"\n\"present, the corresponding text of the task is returned. As you can see, \"\n\"only the regular expression part of the route is passed forward. \"\n\"Furthermore, it is always forwarded as a string, even if it is a plain \"\n\"integer number, like in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:384\nmsgid \"Returning Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:385\nmsgid \"\"\n\"Sometimes it may become necessary to associate a route not to a Python \"\n\"function, but just return a static file. So if you have for example a help \"\n\"page for your application, you may want to return this page as plain HTML. \"\n\"This works as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:393\nmsgid \"\"\n\"At first, we need to import the ``static_file`` function from Bottle. As you\"\n\" can see, the ``return static_file`` statement replaces the ``return`` \"\n\"statement. It takes at least two arguments: the name of the file to be \"\n\"returned and the path to the file. Even if the file is in the same directory\"\n\" as your application, the path needs to be stated. But in this case, you can\"\n\" use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file \"\n\"automatically, but in case you like to state it explicitly, add a third \"\n\"argument to ``static_file``, which would be here ``mimetype='text/html'``. \"\n\"``static_file`` works with any type of route, including the dynamic ones.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:397\nmsgid \"Returning JSON Data\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:398\nmsgid \"\"\n\"There may be cases where you do not want your application to generate the \"\n\"output directly, but return data to be processed further on, e.g. by \"\n\"JavaScript. For those cases, Bottle offers the possibility to return JSON \"\n\"objects, which is sort of standard for exchanging data between web \"\n\"applications. Furthermore, JSON can be processed by many programming \"\n\"languages, including Python\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:400\nmsgid \"\"\n\"So, let's assume we want to return the data generated in the regular \"\n\"expression route example as a JSON object. The code looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:415\nmsgid \"\"\n\"As you can, that is fairly simple: just return a regular Python dictionary \"\n\"and Bottle will convert it automatically into a JSON object prior to \"\n\"sending. So if you e.g. call \\\"http://localhost/json1\\\" Bottle should in \"\n\"this case return the JSON object ``{\\\"task\\\": [\\\"Read A-byte-of-python to \"\n\"get a good introduction into Python\\\"]}``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:420\nmsgid \"Catching Errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:421\nmsgid \"\"\n\"The next step may is to catch the error with Bottle itself, to keep away any\"\n\" type of error message from the user of your application. To do that, Bottle\"\n\" has an \\\"error-route\\\", which can be a assigned to a HTML-error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:423\nmsgid \"In our case, we want to catch a 403 error. The code is as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:431\nmsgid \"\"\n\"So, at first we need to import ``error`` from Bottle and define a route by \"\n\"``error(403)``, which catches all \\\"403 forbidden\\\" errors. The function \"\n\"\\\"mistake\\\" is assigned to that. Please note that ``error()`` always passes \"\n\"the error-code to the function - even if you do not need it. Thus, the \"\n\"function always needs to accept one argument, otherwise it will not work.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:433\nmsgid \"\"\n\"Again, you can assign more than one error-route to a function, or catch \"\n\"various errors with one function each. So this code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:440\nmsgid \"works fine, the following one as well::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:452\nmsgid \"Summary\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:453\nmsgid \"\"\n\"After going through all the sections above, you should have a brief \"\n\"understanding how the Bottle WSGI framework works. Furthermore you have all \"\n\"the knowledge necessary to use Bottle for your applications.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:455\nmsgid \"\"\n\"The following chapter give a short introduction how to adapt Bottle for \"\n\"larger projects. Furthermore, we will show how to operate Bottle with web \"\n\"servers which perform better on a higher load / more web traffic than the \"\n\"one we used so far.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:458\nmsgid \"Server Setup\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:460\nmsgid \"\"\n\"So far, we used the standard server used by Bottle, which is the `WSGI \"\n\"reference Server`_ shipped along with Python. Although this server is \"\n\"perfectly suitable for development purposes, it is not really suitable for \"\n\"larger applications. But before we have a look at the alternatives, let's \"\n\"have a look how to tweak the settings of the standard server first.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:464\nmsgid \"Running Bottle on a different port and IP\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:465\nmsgid \"\"\n\"As standard, Bottle serves the pages on the IP address 127.0.0.1, also known\"\n\" as ``localhost``, and on port ``8080``. To modify the setting is pretty \"\n\"simple, as additional parameters can be passed to Bottle's ``run()`` \"\n\"function to change the port and the address.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:467\nmsgid \"\"\n\"To change the port, just add ``port=portnumber`` to the run command. So, for\"\n\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:471\nmsgid \"would make Bottle listen to port 80.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:473\nmsgid \"To change the IP address where Bottle is listening::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:477\nmsgid \"If needed, both parameters can be combined, like::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:481\nmsgid \"\"\n\"The ``port`` and ``host`` parameter can also be applied when Bottle is \"\n\"running with a different server, as shown in the following section.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:485\nmsgid \"Running Bottle with a different server\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:486\nmsgid \"\"\n\"As said above, the standard server is perfectly suitable for development, \"\n\"personal use or a small group of people only using your application based on\"\n\" Bottle. For larger tasks, the standard server may become a bottleneck, as \"\n\"it is single-threaded, thus it can only serve one request at a time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:488\nmsgid \"\"\n\"But Bottle has already various adapters to multi-threaded servers on board, \"\n\"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and \"\n\"Paste_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:490\nmsgid \"\"\n\"If you want to run for example Bottle with the Paste server, use the \"\n\"following code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:496\nmsgid \"\"\n\"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and \"\n\"``FapwsServer``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:500\nmsgid \"Running Bottle on Apache with mod_wsgi\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:501\nmsgid \"\"\n\"Maybe you already have an Apache_ or you want to run a Bottle-based \"\n\"application large scale - then it is time to think about Apache with \"\n\"mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:503\nmsgid \"\"\n\"We assume that your Apache server is up and running and mod_wsgi is working \"\n\"fine as well. On a lot of Linux distributions, mod_wsgi can be easily \"\n\"installed via whatever package management system is in use.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:505\nmsgid \"\"\n\"Bottle brings an adapter for mod_wsgi with it, so serving your application \"\n\"is an easy task.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:507\nmsgid \"\"\n\"In the following example, we assume that you want to make your application \"\n\"\\\"ToDo list\\\" accessible through ``http://www.mypage.com/todo`` and your \"\n\"code, templates and SQLite database are stored in the path \"\n\"``/var/www/todo``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:509\nmsgid \"\"\n\"When you run your application via mod_wsgi, it is imperative to remove the \"\n\"``run()`` statement from your code, otherwise it won't work here.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:511\nmsgid \"\"\n\"After that, create a file called ``adapter.wsgi`` with the following \"\n\"content::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:522\nmsgid \"\"\n\"and save it in the same path, ``/var/www/todo``. Actually the name of the \"\n\"file can be anything, as long as the extension is ``.wsgi``. The name is \"\n\"only used to reference the file from your virtual host.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:524\nmsgid \"\"\n\"Finally, we need to add a virtual host to the Apache configuration, which \"\n\"looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:540\nmsgid \"\"\n\"After restarting the server, your ToDo list should be accessible at \"\n\"``http://www.mypage.com/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:543\nmsgid \"Final Words\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:545\nmsgid \"\"\n\"Now we are at the end of this introduction and tutorial to Bottle. We \"\n\"learned about the basic concepts of Bottle and wrote a first application \"\n\"using the Bottle framework. In addition to that, we saw how to adapt Bottle \"\n\"for large tasks and serve Bottle through an Apache web server with mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:547\nmsgid \"\"\n\"As said in the introduction, this tutorial is not showing all shades and \"\n\"possibilities of Bottle. What we skipped here is e.g. receiving file objects\"\n\" and streams and how to handle authentication data. Furthermore, we did not \"\n\"show how templates can be called from within another template. For an \"\n\"introduction into those points, please refer to the full `Bottle \"\n\"documentation`_ .\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:550\nmsgid \"Complete Example Listing\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:552\nmsgid \"\"\n\"As the ToDo list example was developed piece by piece, here is the complete \"\n\"listing:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:554\nmsgid \"Main code for the application ``todo.py``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:675\nmsgid \"Template ``make_table.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:689\nmsgid \"Template ``edit_task.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:704\nmsgid \"Template ``new_task.tpl``::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/requirements.txt",
    "content": "sphinx\nsphinx-intl\ntransifex-client\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/api.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../api.rst:3\nmsgid \"API Reference\"\nmsgstr \"\"\n\n#: ../../api.rst:10\nmsgid \"\"\n\"This is a mostly auto-generated API. If you are new to bottle, you might \"\n\"find the narrative :doc:`tutorial` more helpful.\"\nmsgstr \"\"\n\n#: ../../api.rst:17\nmsgid \"Module Contents\"\nmsgstr \"\"\n\n#: ../../api.rst:19\nmsgid \"The module defines several functions, constants, and an exception.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.debug:1\nmsgid \"\"\n\"Change the debug level. There is only one debug level supported at the \"\n\"moment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:1\nmsgid \"\"\n\"Start a server instance. This method blocks until the server terminates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:0 ../../../bottle.pydocstring of\n#: bottle.path_shift:0 ../../../bottle.pydocstring of bottle.MultiDict.get:0\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:0\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:0\n#: ../../../bottle.pydocstring of bottle.Bottle:0 ../../../bottle.pydocstring\n#: of bottle.Bottle.mount:0 ../../../bottle.pydocstring of\n#: bottle.Bottle.route:0 ../../../bottle.pydocstring of\n#: bottle.BaseRequest.path_shift:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:3\nmsgid \"\"\n\"WSGI application or target string supported by :func:`load_app`. (default: \"\n\":func:`default_app`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:5\nmsgid \"\"\n\"Server adapter to use. See :data:`server_names` keys for valid names or pass\"\n\" a :class:`ServerAdapter` subclass. (default: `wsgiref`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:8\nmsgid \"\"\n\"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces \"\n\"including the external one. (default: 127.0.0.1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:10\nmsgid \"\"\n\"Server port to bind to. Values below 1024 require root privileges. (default:\"\n\" 8080)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:12\nmsgid \"Start auto-reloading server? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:13\nmsgid \"Auto-reloader interval in seconds (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:14\nmsgid \"Suppress output to stdout and stderr? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:15\nmsgid \"Options passed to the server adapter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:1\nmsgid \"Import a module or fetch an object from a module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:3\nmsgid \"``package.module`` returns `module` as a module object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:4\nmsgid \"``pack.mod:name`` returns the module variable `name` from `pack.mod`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:5\nmsgid \"``pack.mod:func()`` calls `pack.mod.func()` and returns the result.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:7\nmsgid \"\"\n\"The last form accepts not only function calls, but any type of expression. \"\n\"Keyword arguments passed to this function are available as local variables. \"\n\"Example: ``import_string('re:compile(x)', x='[a-z]')``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load_app:1\nmsgid \"\"\n\"Load a bottle application from a module and make sure that the import does \"\n\"not affect the current default application, but returns a separate \"\n\"application object. See :func:`load` for the target parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.request:1 ../../../bottle.pydocstring\n#: of bottle.request:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalRequest`. If accessed from within a \"\n\"request callback, this instance always refers to the *current* request (even\"\n\" on a multi-threaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.response:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalResponse`. It is used to change the \"\n\"HTTP response for the *current* request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HTTP_CODES:1\nmsgid \"\"\n\"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')\"\nmsgstr \"\"\n\n#: ../../api.rst:38\nmsgid \"\"\n\"Return the current :ref:`default-app`. Actually, these are callable \"\n\"instances of :class:`AppStack` and implement a stack-like API.\"\nmsgstr \"\"\n\n#: ../../api.rst:42\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../api.rst:44\nmsgid \"\"\n\"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and \"\n\":class:`AppStack`) and uses the top of the stack as a *default application* \"\n\"for some of the module-level functions and decorators.\"\nmsgstr \"\"\n\n#: ../../api.rst:54\nmsgid \"\"\n\"Decorator to install a route to the current default application. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:59\nmsgid \"\"\n\"Decorator to install an error handler to the current default application. \"\n\"See :meth:`Bottle.error` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:63\nmsgid \"WSGI and HTTP Utilities\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_date:1\nmsgid \"Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_auth:1\nmsgid \"\"\n\"Parse rfc2617 HTTP authentication header string (basic) and return \"\n\"(user,pass) tuple or None\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_encode:1\nmsgid \"Encode and sign a pickle-able object. Return a (byte) string\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_decode:1\nmsgid \"Verify and decode an encoded string. Return an object or None.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_is_encoded:1\nmsgid \"Return True if the argument looks like a encoded cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.yieldroutes:1\nmsgid \"\"\n\"Return a generator for routes that match the signature (name, args) of the \"\n\"func parameter. This may yield more than one route if the function takes \"\n\"optional keyword arguments. The output is best described by example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:1\nmsgid \"Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:0\nmsgid \"Returns\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:3\nmsgid \"The modified paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:4\nmsgid \"The SCRIPT_NAME path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:5\nmsgid \"The PATH_INFO path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:6\nmsgid \"\"\n\"The number of path fragments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../api.rst:81\nmsgid \"Data Structures\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict:1\nmsgid \"\"\n\"This dict stores multiple values per key, but behaves exactly like a normal \"\n\"dict in that it returns only the newest value for any given key. There are \"\n\"special methods available to access the full list of values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.keys:1\nmsgid \"D.keys() -> a set-like object providing a view on D's keys\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.values:1\nmsgid \"D.values() -> an object providing a view on D's values\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.items:1\nmsgid \"D.items() -> a set-like object providing a view on D's items\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:1\nmsgid \"Return the most recent value for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:3\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:3\nmsgid \"\"\n\"The default value to be returned if the key is not present or the type \"\n\"conversion fails.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:5\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:5\nmsgid \"An index for the list of available values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:6\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:6\nmsgid \"\"\n\"If defined, this callable is used to cast the value into a specific type. \"\n\"Exception are suppressed and result in the default value to be returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.append:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.append:1\nmsgid \"Add a new value to the list of values for this key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.replace:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.replace:1\nmsgid \"Replace the list of values with a single value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.getall:1\nmsgid \"Return a (possibly empty) list of values for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\nmsgid \"Aliases for WTForms to mimic other multi-dict APIs (Django)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HeaderDict:1\nmsgid \"\"\n\"A case-insensitive version of :class:`MultiDict` that defaults to replace \"\n\"the old value instead of appending it.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict:1\nmsgid \"\"\n\"This :class:`MultiDict` subclass is used to store request form data. \"\n\"Additionally to the normal dict-like item access methods (which return \"\n\"unmodified data as native strings), this container also supports attribute-\"\n\"like access to its values. Attributes are automatically de- or recoded to \"\n\"match :attr:`input_encoding` (default: 'utf8'). Missing attributes default \"\n\"to an empty string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.input_encoding:1\nmsgid \"Encoding used for attribute values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.recode_unicode:1\nmsgid \"\"\n\"If true (default), unicode strings are first encoded with `latin1` and then \"\n\"decoded to match :attr:`input_encoding`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.decode:1\nmsgid \"\"\n\"Returns a copy with all keys and values de- or recoded to match \"\n\":attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode \"\n\"dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.getunicode:1\nmsgid \"Return the value as a unicode string, or the default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:1\nmsgid \"\"\n\"This dict-like class wraps a WSGI environ dict and provides convenient \"\n\"access to HTTP_* fields. Keys and values are native strings (2.x bytes or \"\n\"3.x unicode) and keys are case-insensitive. If the WSGI environment contains\"\n\" non-native string values, these are de- or encoded using a lossless \"\n\"'latin1' character set.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:7\nmsgid \"\"\n\"The API will remain stable even on changes to the relevant PEPs. Currently \"\n\"PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-\"\n\"native strings.)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.cgikeys:1\nmsgid \"List of keys that do not have a ``HTTP_`` prefix.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.raw:1\nmsgid \"Return the header value as is (may be bytes or unicode).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack:1\nmsgid \"A stack-like list. Calling it returns the head of the stack.\"\nmsgstr \"\"\n\n#: ../../api.rst:100\nmsgid \"Return the current default application and remove it from the stack.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\nmsgid \"Add a new :class:`Bottle` instance to the stack\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:1\nmsgid \"\"\n\"This class manages a list of search paths and helps to find and open \"\n\"application-bound resources (files).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:4\nmsgid \"default value for :meth:`add_path` calls.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:5\nmsgid \"callable used to open resources.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:6\nmsgid \"controls which lookups are cached. One of 'all', 'found' or 'none'.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.path:1\nmsgid \"A list of search paths. See :meth:`add_path` for details.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.cache:1\nmsgid \"A cache for resolved paths. ``res.cache.clear()`` clears the cache.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:1\nmsgid \"\"\n\"Add a new path to the list of search paths. Return False if the path does \"\n\"not exist.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:4\nmsgid \"\"\n\"The new search path. Relative paths are turned into an absolute and \"\n\"normalized form. If the path looks like a file (not ending in `/`), the \"\n\"filename is stripped off.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:7\nmsgid \"\"\n\"Path used to absolutize relative search paths. Defaults to :attr:`base` \"\n\"which defaults to ``os.getcwd()``.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:9\nmsgid \"\"\n\"Position within the list of search paths. Defaults to last index (appends to\"\n\" the list).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:12\nmsgid \"\"\n\"The `base` parameter makes it easy to reference files installed along with a\"\n\" python module or package::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:1\nmsgid \"Search for a resource and return an absolute file path, or `None`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:3\nmsgid \"\"\n\"The :attr:`path` list is searched in order. The first match is returned. \"\n\"Symlinks are followed. The result is cached to speed up future lookups.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.open:1\nmsgid \"Find a resource and return a file object, or raise IOError.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.file:1\nmsgid \"Open file(-like) object (BytesIO buffer or temporary file)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.name:1\nmsgid \"Name of the upload form field\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.raw_filename:1\nmsgid \"Raw filename as sent by the client (may contain unsafe characters)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.headers:1\nmsgid \"A :class:`HeaderDict` with additional headers (e.g. content-type)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_type:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_type:1\nmsgid \"Current value of the 'Content-Type' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_length:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_length:1\nmsgid \"Current value of the 'Content-Length' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.get_header:1\nmsgid \"Return the value of a header within the mulripart part.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:1\nmsgid \"\"\n\"Name of the file on the client file system, but normalized to ensure file \"\n\"system compatibility. An empty filename is returned as 'empty'.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:4\nmsgid \"\"\n\"Only ASCII letters, digits, dashes, underscores and dots are allowed in the \"\n\"final filename. Accents are removed, if possible. Whitespace is replaced by \"\n\"a single dash. Leading or tailing dots or dashes are removed. The filename \"\n\"is limited to 255 characters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:1\nmsgid \"\"\n\"Save file to disk or copy its content to an open file(-like) object. If \"\n\"*destination* is a directory, :attr:`filename` is added to the path. \"\n\"Existing files are not overwritten by default (IOError).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:5\nmsgid \"File path, directory or file(-like) object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:6\nmsgid \"If True, replace existing files. (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:7\nmsgid \"Bytes to read at a time. (default: 64kb)\"\nmsgstr \"\"\n\n#: ../../api.rst:109\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BottleException:1\nmsgid \"A base class for exceptions used by bottle.\"\nmsgstr \"\"\n\n#: ../../api.rst:117\nmsgid \"The :class:`Bottle` Class\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:1\nmsgid \"\"\n\"Each Bottle object represents a single, distinct web application and \"\n\"consists of routes, callbacks, plugins, resources and configuration. \"\n\"Instances are callable WSGI applications.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:5\nmsgid \"\"\n\"If true (default), handle all exceptions. Turn off to let debugging \"\n\"middleware handle exceptions.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.config:1\nmsgid \"A :class:`ConfigDict` for app specific configuration.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.resources:1\nmsgid \"A :class:`ResourceManager` for application files\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.catchall:1\nmsgid \"If true, most exceptions are caught and returned as :exc:`HTTPError`\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:1\nmsgid \"Attach a callback to a hook. Three hooks are currently implemented:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"before_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"\"\n\"Executed once before each request. The request context is available, but no \"\n\"routing has happened yet.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:6\nmsgid \"after_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:7\nmsgid \"Executed once after each request regardless of its outcome.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:8\nmsgid \"app_reset\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:9\nmsgid \"Called whenever :meth:`Bottle.reset` is called.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.remove_hook:1\nmsgid \"Remove a callback from a hook.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.trigger_hook:1\nmsgid \"Trigger a hook and return a list of results.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.hook:1\nmsgid \"\"\n\"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` \"\n\"for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:1\nmsgid \"\"\n\"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL \"\n\"prefix. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:6\nmsgid \"path prefix or `mount-point`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:7\nmsgid \"an instance of :class:`Bottle` or a WSGI application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:9\nmsgid \"\"\n\"Plugins from the parent application are not applied to the routes of the \"\n\"mounted child application. If you need plugins in the child application, \"\n\"install them separately.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:13\nmsgid \"\"\n\"While it is possible to use path wildcards within the prefix path \"\n\"(:class:`Bottle` childs only), it is highly discouraged.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:16\nmsgid \"\"\n\"The prefix path must end with a slash. If you want to access the root of the\"\n\" child application via `/prefix` in addition to `/prefix/`, consider adding \"\n\"a route with a 307 redirect to the parent application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.merge:1\nmsgid \"\"\n\"Merge the routes of another :class:`Bottle` application or a list of \"\n\":class:`Route` objects into this application. The routes keep their 'owner',\"\n\" meaning that the :data:`Route.app` attribute is not changed.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.install:1\nmsgid \"\"\n\"Add a plugin to the list of plugins and prepare it for being applied to all \"\n\"routes of this application. A plugin may be a simple decorator or an object \"\n\"that implements the :class:`Plugin` API.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.uninstall:1\nmsgid \"\"\n\"Uninstall plugins. Pass an instance to remove a specific plugin, a type \"\n\"object to remove all plugins that match that type, a string to remove all \"\n\"plugins with a matching ``name`` attribute or ``True`` to remove all \"\n\"plugins. Return the list of removed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.reset:1\nmsgid \"\"\n\"Reset all routes (force plugins to be re-applied) and clear all caches. If \"\n\"an ID or route object is given, only that specific route is affected.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.close:1\nmsgid \"Close the application and all installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.run:1\nmsgid \"Calls :func:`run` with the same parameters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.match:1\nmsgid \"\"\n\"Search for a matching route and return a (:class:`Route`, urlargs) tuple. \"\n\"The second value is a dictionary with parameters extracted from the URL. \"\n\"Raise :exc:`HTTPError` (404/405) on a non-match.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get_url:1\nmsgid \"Return a string that matches a named route\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_route:1\nmsgid \"Add a route object, but do not change the :data:`Route.app` attribute.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:1\nmsgid \"A decorator to bind a function to a request URL. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:7\nmsgid \"\"\n\"The ``<name>`` part is a wildcard. See :class:`Router` for syntax details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:10\nmsgid \"\"\n\"Request path or a list of paths to listen to. If no path is specified, it is\"\n\" automatically generated from the signature of the function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:13\nmsgid \"\"\n\"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. \"\n\"(default: `GET`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:15\nmsgid \"\"\n\"An optional shortcut to avoid the decorator syntax. ``route(..., \"\n\"callback=func)`` equals ``route(...)(func)``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:17\nmsgid \"The name for this route. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:18\nmsgid \"\"\n\"A decorator or plugin or a list of plugins. These are applied to the route \"\n\"callback in addition to installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:20\nmsgid \"\"\n\"A list of plugins, plugin classes or names. Matching plugins are not \"\n\"installed to this route. ``True`` skips all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:23\nmsgid \"\"\n\"Any additional keyword arguments are stored as route-specific configuration \"\n\"and passed to plugins (see :meth:`Plugin.apply`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get:1\nmsgid \"Equals :meth:`route`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.post:1\nmsgid \"Equals :meth:`route` with a ``POST`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.put:1\nmsgid \"Equals :meth:`route` with a ``PUT`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.delete:1\nmsgid \"Equals :meth:`route` with a ``DELETE`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.patch:1\nmsgid \"Equals :meth:`route` with a ``PATCH`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.error:1\nmsgid \"\"\n\"Register an output handler for a HTTP error code. Can be used as a decorator\"\n\" or called directly ::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.wsgi:1\nmsgid \"The bottle WSGI-interface.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route:1\nmsgid \"\"\n\"This class wraps a route callback along with route specific metadata and \"\n\"configuration and applies Plugins on demand. It is also responsible for \"\n\"turning an URL path rule into a regular expression usable by the Router.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.app:1\nmsgid \"The application this route is installed to.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.rule:1\nmsgid \"The path-rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.method:1\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.callback:1\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.name:1\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.plugins:1\nmsgid \"A list of route-specific plugins (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.skiplist:1\nmsgid \"\"\n\"A list of plugins to not apply to this route (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.config:1\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific plugin configuration \"\n\"and meta-data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.call:1\nmsgid \"\"\n\"The route callback with all plugins applied. This property is created on \"\n\"demand and then cached to speed up subsequent requests.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.reset:1\nmsgid \"\"\n\"Forget any cached values. The next time :attr:`call` is accessed, all \"\n\"plugins are re-applied.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.prepare:1\nmsgid \"Do all on-demand work immediately (useful for debugging).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.all_plugins:1\nmsgid \"Yield all Plugins affecting this route.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_undecorated_callback:1\nmsgid \"\"\n\"Return the callback. If the callback is a decorated function, try to recover\"\n\" the original function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_callback_args:1\nmsgid \"\"\n\"Return a list of argument names the callback (most likely) accepts as \"\n\"keyword arguments. If the callback is a decorated function, try to recover \"\n\"the original function before inspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_config:1\nmsgid \"\"\n\"Lookup a config field and return its value, first checking the route.config,\"\n\" then route.app.config.\"\nmsgstr \"\"\n\n#: ../../api.rst:127\nmsgid \"The :class:`Request` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:129\nmsgid \"\"\n\"The :class:`Request` class wraps a WSGI environment and provides helpful \"\n\"methods to parse and access form data, cookies, file uploads and other \"\n\"metadata. Most of the attributes are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:1\nmsgid \"\"\n\"A wrapper for WSGI environment dictionaries that adds a lot of convenient \"\n\"access methods and properties. Most of them are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:4\nmsgid \"\"\n\"Adding new attributes to a request actually adds them to the environ \"\n\"dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to \"\n\"store and access request-specific data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.MEMFILE_MAX:1\nmsgid \"Maximum size of memory buffer for :attr:`body` in bytes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.environ:1\nmsgid \"\"\n\"The wrapped WSGI environ dictionary. This is the only real attribute. All \"\n\"other attributes actually are read-only properties.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.app:1\nmsgid \"Bottle application handling this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.route:1\nmsgid \"The bottle :class:`Route` object that matches this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url_args:1\nmsgid \"The arguments extracted from the URL.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path:1\nmsgid \"\"\n\"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken \"\n\"clients and avoid the \\\"empty path\\\" edge case).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.method:1\nmsgid \"The ``REQUEST_METHOD`` value as an uppercase string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.headers:1\nmsgid \"\"\n\"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP \"\n\"request headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_header:1\nmsgid \"Return the value of a request header, or a given default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.cookies:1\nmsgid \"\"\n\"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. \"\n\"Use :meth:`get_cookie` if you expect signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_cookie:1\nmsgid \"\"\n\"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must\"\n\" match the one used to create the cookie (see \"\n\":meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or \"\n\"wrong signature), return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"\"\n\"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are \"\n\"sometimes called \\\"URL arguments\\\" or \\\"GET parameters\\\", but not to be \"\n\"confused with \\\"URL wildcards\\\" as they are provided by the :class:`Router`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.forms:1\nmsgid \"\"\n\"Form values parsed from an `url-encoded` or `multipart/form-data` encoded \"\n\"POST or PUT request body. The result is returned as a :class:`FormsDict`. \"\n\"All keys and values are strings. File uploads are stored separately in \"\n\":attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.params:1\nmsgid \"\"\n\"A :class:`FormsDict` with the combined values of :attr:`query` and \"\n\":attr:`forms`. File uploads are stored in :attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.files:1\nmsgid \"\"\n\"File uploads parsed from `multipart/form-data` encoded POST or PUT request \"\n\"body. The values are instances of :class:`FileUpload`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.json:1\nmsgid \"\"\n\"If the ``Content-Type`` header is ``application/json`` or ``application\"\n\"/json-rpc``, this property holds the parsed content of the request body. \"\n\"Only requests smaller than :attr:`MEMFILE_MAX` are processed to avoid memory\"\n\" exhaustion. Invalid JSON raises a 400 error response.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.body:1\nmsgid \"\"\n\"The HTTP request body as a seek-able file-like object. Depending on \"\n\":attr:`MEMFILE_MAX`, this is either a temporary file or a \"\n\":class:`io.BytesIO` instance. Accessing this property for the first time \"\n\"reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses \"\n\"just do a `seek(0)` on the file object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.chunked:1\nmsgid \"True if Chunked transfer encoding was.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"An alias for :attr:`query`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.POST:1\nmsgid \"\"\n\"The values of :attr:`forms` and :attr:`files` combined into a single \"\n\":class:`FormsDict`. Values are either strings (form values) or instances of \"\n\":class:`cgi.FieldStorage` (file uploads).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url:1\nmsgid \"\"\n\"The full request URI including hostname and scheme. If your app lives behind\"\n\" a reverse proxy or load balancer and you get confusing results, make sure \"\n\"that the ``X-Forwarded-Host`` header is set correctly.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.urlparts:1\nmsgid \"\"\n\"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple \"\n\"contains (scheme, host, path, query_string and fragment), but the fragment \"\n\"is always empty because it is not visible to the server.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.fullpath:1\nmsgid \"Request path including :attr:`script_name` (if present).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query_string:1\nmsgid \"\"\n\"The raw :attr:`query` part of the URL (everything in between ``?`` and \"\n\"``#``) as a string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.script_name:1\nmsgid \"\"\n\"The initial portion of the URL's `path` that was removed by a higher level \"\n\"(server or routing middleware) before the application was called. This \"\n\"script path is returned with leading and tailing slashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"Shift path segments from :attr:`path` to :attr:`script_name` and\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:4\nmsgid \"\"\n\"The number of path segments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_length:1\nmsgid \"\"\n\"The request body length as an integer. The client is responsible to set this\"\n\" header. Otherwise, the real length of the body is unknown and -1 is \"\n\"returned. In this case, :attr:`body` will be empty.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_type:1\nmsgid \"The Content-Type header as a lowercase-string (default: empty).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_xhr:1\nmsgid \"\"\n\"True if the request was triggered by a XMLHttpRequest. This only works with \"\n\"JavaScript libraries that support the `X-Requested-With` header (most of the\"\n\" popular libraries do).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_ajax:1\nmsgid \"Alias for :attr:`is_xhr`. \\\"Ajax\\\" is not the right term.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.auth:1\nmsgid \"\"\n\"HTTP authentication data as a (user, password) tuple. This implementation \"\n\"currently supports basic (not digest) authentication only. If the \"\n\"authentication happened at a higher level (e.g. in the front web-server or a\"\n\" middleware), the password field is None, but the user field is looked up \"\n\"from the ``REMOTE_USER`` environ variable. On any errors, None is returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_route:1\nmsgid \"\"\n\"A list of all IPs that were involved in this request, starting with the \"\n\"client IP and followed by zero or more proxies. This does only work if all \"\n\"proxies support the ```X-Forwarded-For`` header. Note that this information \"\n\"can be forged by malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_addr:1\nmsgid \"\"\n\"The client IP as a string. Note that this information can be forged by \"\n\"malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.copy:1\nmsgid \"Return a new :class:`Request` with a shallow :attr:`environ` copy.\"\nmsgstr \"\"\n\n#: ../../api.rst:137\nmsgid \"\"\n\"The module-level :data:`bottle.request` is a proxy object (implemented in \"\n\":class:`LocalRequest`) and always refers to the `current` request, or in \"\n\"other words, the request that is currently processed by the request handler \"\n\"in the current thread. This `thread locality` ensures that you can safely \"\n\"use a global instance in a multi-threaded environment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseRequest` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`request`). If accessed during a request/response cycle, \"\n\"this instance always refers to the *current* request (even on a \"\n\"multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.__init__:1\nmsgid \"Wrap a WSGI environ dictionary.\"\nmsgstr \"\"\n\n#: ../../api.rst:146\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:148\nmsgid \"\"\n\"The :class:`Response` class stores the HTTP status code as well as headers \"\n\"and cookies that are to be sent to the client. Similar to \"\n\":data:`bottle.request` there is a thread-local :data:`bottle.response` \"\n\"instance that can be used to adjust the `current` response. Moreover, you \"\n\"can instantiate :class:`Response` and return it from your request handler. \"\n\"In this case, the custom instance overrules the headers and cookies defined \"\n\"in the global one.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:1\nmsgid \"Storage class for a response body as well as headers and cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:3\nmsgid \"\"\n\"This class does support dict-like case-insensitive item-access to headers, \"\n\"but is NOT a dict. Most notably, iterating over a response yields parts of \"\n\"the body and not the headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:7\nmsgid \"The response body as one of the supported types.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:8\nmsgid \"\"\n\"Either an HTTP status code (e.g. 200) or a status line including the reason \"\n\"phrase (e.g. '200 OK').\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:10\nmsgid \"A dictionary or a list of name-value pairs.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:12\nmsgid \"\"\n\"Additional keyword arguments are added to the list of headers. Underscores \"\n\"in the header name are replaced with dashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.copy:1\nmsgid \"Returns a copy of self.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_line:1\nmsgid \"The HTTP status line as a string (e.g. ``404 Not Found``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_code:1\nmsgid \"The HTTP status code as an integer (e.g. 404).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status:1\nmsgid \"\"\n\"A writeable property to change the HTTP response status. It accepts either a\"\n\" numeric code (100-999) or a string with a custom reason phrase (e.g. \\\"404 \"\n\"Brain not found\\\"). Both :data:`status_line` and :data:`status_code` are \"\n\"updated accordingly. The return value is always a status string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headers:1\nmsgid \"\"\n\"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the\"\n\" response headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.get_header:1\nmsgid \"\"\n\"Return the value of a previously defined header. If there is no header with \"\n\"that name, return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_header:1\nmsgid \"\"\n\"Create a new response header, replacing any previously defined headers with \"\n\"the same name.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.add_header:1\nmsgid \"Add an additional response header, not removing duplicates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.iter_headers:1\nmsgid \"\"\n\"Yield (header, value) tuples, skipping headers that are not allowed with the\"\n\" current response status code.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headerlist:1\nmsgid \"WSGI conform list of (header, value) tuples.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.expires:1\nmsgid \"Current value of the 'Expires' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.charset:1\nmsgid \"\"\n\"Return the charset specified in the content-type header (default: utf8).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:1\nmsgid \"\"\n\"Create a new cookie or replace an old one. If the `secret` parameter is set,\"\n\" create a `Signed Cookie` (described below).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:4\nmsgid \"the name of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:5\nmsgid \"the value of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:6\nmsgid \"a signature key required for signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:8\nmsgid \"\"\n\"Additionally, this method accepts all RFC 2109 attributes that are supported\"\n\" by :class:`cookie.Morsel`, including:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:11\nmsgid \"maximum age in seconds. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:12\nmsgid \"a datetime object or UNIX timestamp. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:13\nmsgid \"\"\n\"the domain that is allowed to read the cookie. (default: current domain)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:15\nmsgid \"limits the cookie to a given path (default: current path)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:16\nmsgid \"limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:17\nmsgid \"\"\n\"prevents client-side javascript to read this cookie (default: off, requires \"\n\"Python 2.6 or newer).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:19\nmsgid \"\"\n\"Control or disable third-party use for this cookie. Possible values: `lax`, \"\n\"`strict` or `none` (default).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:22\nmsgid \"\"\n\"If neither `expires` nor `maxage` is set (default), the cookie will expire \"\n\"at the end of the browser session (as soon as the browser window is closed).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:26\nmsgid \"\"\n\"Signed cookies may store any pickle-able object and are cryptographically \"\n\"signed to prevent manipulation. Keep in mind that cookies are limited to 4kb\"\n\" in most browsers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:30\nmsgid \"\"\n\"Warning: Pickle is a potentially dangerous format. If an attacker gains \"\n\"access to the secret key, he could forge cookies that execute code on server\"\n\" side if unpickled. Using pickle is discouraged and support for it will be \"\n\"removed in later versions of bottle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:35\nmsgid \"\"\n\"Warning: Signed cookies are not encrypted (the client can still see the \"\n\"content) and not copy-protected (the client can restore an old cookie). The \"\n\"main intention is to make pickling and unpickling save, not to store secret \"\n\"information at client side.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.delete_cookie:1\nmsgid \"\"\n\"Delete a cookie. Be sure to use the same `domain` and `path` settings as \"\n\"used to create the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseResponse` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`response`). Its attributes are used to build the HTTP \"\n\"response at the end of the request/response cycle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.__init__:1\nmsgid \"Initialize self.  See help(type(self)) for accurate signature.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse.body:1\nmsgid \"Thread-local property\"\nmsgstr \"\"\n\n#: ../../api.rst:160\nmsgid \"\"\n\"The following two classes can be raised as an exception. The most noticeable\"\n\" difference is that bottle invokes error handlers for :class:`HTTPError`, \"\n\"but not for :class:`HTTPResponse` or other response types.\"\nmsgstr \"\"\n\n#: ../../api.rst:172\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../api.rst:174\nmsgid \"\"\n\"All template engines supported by :mod:`bottle` implement the \"\n\":class:`BaseTemplate` API. This way it is possible to switch and mix \"\n\"template engines without changing the application code at all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate:1\nmsgid \"Base class and minimal API for template adapters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.__init__:1\nmsgid \"\"\n\"Create a new template. If the source parameter (str or buffer) is missing, \"\n\"the name argument is used to guess a template filename. Subclasses can \"\n\"assume that self.source and/or self.filename are set. Both are strings. The \"\n\"lookup, encoding and settings parameters are stored as instance variables. \"\n\"The lookup parameter stores a list containing directory paths. The encoding \"\n\"parameter should be used to decode byte strings or files. The settings \"\n\"parameter contains a dict for engine-specific settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.search:1\nmsgid \"\"\n\"Search name in all directories specified in lookup. First without, then with\"\n\" common extensions. Return first hit.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.global_config:1\nmsgid \"This reads or sets the global settings stored in class.settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.render:1\nmsgid \"\"\n\"Render the template with the specified local variables and return a single \"\n\"byte or unicode string. If it is a byte string, the encoding must match \"\n\"self.encoding. This method must be thread-safe! Local variables may be \"\n\"provided in dictionaries (args) or directly, as keywords (kwargs).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:1\nmsgid \"\"\n\"Decorator: renders a template for a handler. The handler can control its \"\n\"behavior like that:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:4\nmsgid \"return a dict of template vars to fill out the template\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:5\nmsgid \"\"\n\"return something other than a dict and the view decorator will not process \"\n\"the template, but return the handler result as is. This includes returning a\"\n\" HTTPResponse(dict) to get, for instance, JSON with autojson or other \"\n\"castfilters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.template:1\nmsgid \"\"\n\"Get a rendered template as a string iterator. You can use a name, a filename\"\n\" or a template string as first parameter. Template rendering arguments can \"\n\"be passed as dictionaries or directly (as keyword arguments).\"\nmsgstr \"\"\n\n#: ../../api.rst:185\nmsgid \"\"\n\"You can write your own adapter for your favourite template engine or use one\"\n\" of the predefined adapters. Currently there are four fully supported \"\n\"template engines:\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Class\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"URL\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Decorator\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Render function\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":class:`SimpleTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`view`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`template`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":class:`MakoTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \"http://www.makotemplates.org\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":class:`CheetahTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \"http://www.cheetahtemplate.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":class:`Jinja2Template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \"http://jinja.pocoo.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:196\nmsgid \"\"\n\"To use :class:`MakoTemplate` as your default template engine, just import \"\n\"its specialised decorator and render function::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/async.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2017-08-03 11:49+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../async.rst:2\nmsgid \"Primer to Asynchronous Applications\"\nmsgstr \"\"\n\n#: ../../async.rst:4\nmsgid \"\"\n\"Asynchronous design patterns don't mix well with the synchronous nature of \"\n\"`WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most \"\n\"asynchronous frameworks (tornado, twisted, ...) implement a specialized API \"\n\"to expose their asynchronous features. Bottle is a WSGI framework and shares\"\n\" the synchronous nature of WSGI, but thanks to the awesome `gevent project \"\n\"<http://www.gevent.org/>`_, it is still possible to write asynchronous \"\n\"applications with bottle. This article documents the usage of Bottle with \"\n\"Asynchronous WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:7\nmsgid \"The Limits of Synchronous WSGI\"\nmsgstr \"\"\n\n#: ../../async.rst:9\nmsgid \"\"\n\"Briefly worded, the `WSGI specification (pep 3333) \"\n\"<http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response \"\n\"circle as follows: The application callable is invoked once for each request\"\n\" and must return a body iterator. The server then iterates over the body and\"\n\" writes each chunk to the socket. As soon as the body iterator is exhausted,\"\n\" the client connection is closed.\"\nmsgstr \"\"\n\n#: ../../async.rst:11\nmsgid \"\"\n\"Simple enough, but there is a snag: All this happens synchronously. If your \"\n\"application needs to wait for data (IO, sockets, databases, ...), it must \"\n\"either yield empty strings (busy wait) or block the current thread. Both \"\n\"solutions occupy the handling thread and prevent it from answering new \"\n\"requests. There is consequently only one ongoing request per thread.\"\nmsgstr \"\"\n\n#: ../../async.rst:13\nmsgid \"\"\n\"Most servers limit the number of threads to avoid their relatively high \"\n\"overhead. Pools of 20 or less threads are common. As soon as all threads are\"\n\" occupied, any new connection is stalled. The server is effectively dead for\"\n\" everyone else. If you want to implement a chat that uses long-polling ajax \"\n\"requests to get real-time updates, you'd reach the limited at 20 concurrent \"\n\"connections. That's a pretty small chat.\"\nmsgstr \"\"\n\n#: ../../async.rst:16\nmsgid \"Greenlets to the rescue\"\nmsgstr \"\"\n\n#: ../../async.rst:18\nmsgid \"\"\n\"Most servers limit the size of their worker pools to a relatively low number\"\n\" of concurrent threads, due to the high overhead involved in switching \"\n\"between and creating new threads. While threads are cheap compared to \"\n\"processes (forks), they are still expensive to create for each new \"\n\"connection.\"\nmsgstr \"\"\n\n#: ../../async.rst:20\nmsgid \"\"\n\"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. \"\n\"Greenlets behave similar to traditional threads, but are very cheap to \"\n\"create. A gevent-based server can spawn thousands of greenlets (one for each\"\n\" connection) with almost no overhead. Blocking individual greenlets has no \"\n\"impact on the servers ability to accept new requests. The number of \"\n\"concurrent connections is virtually unlimited.\"\nmsgstr \"\"\n\n#: ../../async.rst:22\nmsgid \"\"\n\"This makes creating asynchronous applications incredibly easy, because they \"\n\"look and feel like synchronous applications. A gevent-based server is \"\n\"actually not asynchronous, but massively multi-threaded. Here is an \"\n\"example::\"\nmsgstr \"\"\n\n#: ../../async.rst:39\nmsgid \"\"\n\"The first line is important. It causes gevent to monkey-patch most of \"\n\"Python's blocking APIs to not block the current thread, but pass the CPU to \"\n\"the next greenlet instead. It actually replaces Python's threading with \"\n\"gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` \"\n\"which would normally block the whole thread. If you don't feel comfortable \"\n\"with monkey-patching python built-ins, you can use the corresponding gevent \"\n\"functions (``gevent.sleep()`` in this case).\"\nmsgstr \"\"\n\n#: ../../async.rst:41\nmsgid \"\"\n\"If you run this script and point your browser to \"\n\"``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and \"\n\"`END` show up one by one (rather than waiting 8 seconds to see them all at \"\n\"once). It works exactly as with normal threads, but now your server can \"\n\"handle thousands of concurrent requests without any problems.\"\nmsgstr \"\"\n\n#: ../../async.rst:45\nmsgid \"\"\n\"Some browsers buffer a certain amount of data before they start rendering a \"\n\"page. You might need to yield more than a few bytes to see an effect in \"\n\"these browsers. Additionally, many browsers have a limit of one concurrent \"\n\"connection per URL. If this is the case, you can use a second browser or a \"\n\"benchmark tool (e.g. `ab` or `httperf`) to measure performance.\"\nmsgstr \"\"\n\n#: ../../async.rst:52\nmsgid \"Event Callbacks\"\nmsgstr \"\"\n\n#: ../../async.rst:54\nmsgid \"\"\n\"A very common design pattern in asynchronous frameworks (including tornado, \"\n\"twisted, node.js and friends) is to use non-blocking APIs and bind callbacks\"\n\" to asynchronous events. The socket object is kept open until it is closed \"\n\"explicitly to allow callbacks to write to the socket at a later point. Here \"\n\"is an example based on the `tornado library \"\n\"<http://www.tornadoweb.org/documentation#non-blocking-asynchronous-\"\n\"requests>`_::\"\nmsgstr \"\"\n\n#: ../../async.rst:63\nmsgid \"\"\n\"The main benefit is that the request handler terminates early. The handling \"\n\"thread can move on and accept new requests while the callbacks continue to \"\n\"write to sockets of previous requests. This is how these frameworks manage \"\n\"to process a lot of concurrent requests with only a small number of OS \"\n\"threads.\"\nmsgstr \"\"\n\n#: ../../async.rst:65\nmsgid \"\"\n\"With Gevent+WSGI, things are different: First, terminating early has no \"\n\"benefit because we have an unlimited pool of (pseudo)threads to accept new \"\n\"connections. Second, we cannot terminate early because that would close the \"\n\"socket (as required by WSGI). Third, we must return an iterable to conform \"\n\"to WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:67\nmsgid \"\"\n\"In order to conform to the WSGI standard, all we have to do is to return a \"\n\"body iterable that we can write to asynchronously. With the help of \"\n\"`gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate*\"\n\" a detached socket and rewrite the previous example as follows::\"\nmsgstr \"\"\n\n#: ../../async.rst:78\nmsgid \"\"\n\"From the server perspective, the queue object is iterable. It blocks if \"\n\"empty and stops as soon as it reaches ``StopIteration``. This conforms to \"\n\"WSGI. On the application side, the queue object behaves like a non-blocking \"\n\"socket. You can write to it at any time, pass it around and even start a new\"\n\" (pseudo)thread that writes to it asynchronously. This is how long-polling \"\n\"is implemented most of the time.\"\nmsgstr \"\"\n\n#: ../../async.rst:82\nmsgid \"Finally: WebSockets\"\nmsgstr \"\"\n\n#: ../../async.rst:84\nmsgid \"\"\n\"Lets forget about the low-level details for a while and speak about \"\n\"WebSockets. Since you are reading this article, you probably know what \"\n\"WebSockets are: A bidirectional communication channel between a browser \"\n\"(client) and a web application (server).\"\nmsgstr \"\"\n\n#: ../../async.rst:86\nmsgid \"\"\n\"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-\"\n\"websocket/>`_ package does all the hard work for us. Here is a simple \"\n\"WebSocket endpoint that receives messages and just sends them back to the \"\n\"client::\"\nmsgstr \"\"\n\n#: ../../async.rst:111\nmsgid \"\"\n\"The while-loop runs until the client closes the connection. You get the idea\"\n\" :)\"\nmsgstr \"\"\n\n#: ../../async.rst:113\nmsgid \"The client-site JavaScript API is really straight forward, too::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/changelog.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../changelog.rst:6\nmsgid \"Release Notes and Changelog\"\nmsgstr \"\"\n\n#: ../../changelog.rst:9\nmsgid \"Release 0.13\"\nmsgstr \"\"\n\n#: ../../changelog.rst:11\nmsgid \"Not released yet.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:14\nmsgid \"Dropped support for Python versions that reached their end-of-life.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:15\nmsgid \"\"\n\"Keeping up support for ancient Python versions hinders adaptation of new \"\n\"features and serves no real purpose. If you need support for older Python \"\n\"versions, you can stay on bottle-0.12. The updated list of tested and \"\n\"supported python releases is as follows:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:20\nmsgid \"Python 2.7 (>= 2.7.3)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:21\nmsgid \"Python 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:22\nmsgid \"Python 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:23\nmsgid \"Python 3.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:24\nmsgid \"Python 3.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:25\nmsgid \"PyPy 2.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:26\nmsgid \"PyPy 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:27\nmsgid \"PyPy 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:29\nmsgid \"\"\n\"Support for Python 2.5 was marked as deprecated since 0.12. We decided to go\"\n\" a step further and also remove support for 2.6 and 3.1 to 3.5 even if it \"\n\"was never deprecated explicitly in bottle. This means that this release is \"\n\"*not* backwards compatible in Python <2.7.3 or <3.6 environments. \"\n\"Maintainers for distributions or systems that still use these old python \"\n\"versions should not update to Bottle 0.13 and stick with 0.12 instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:35\nmsgid \"Stabilized APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:36\nmsgid \"\"\n\"The documented API of the :class:`ConfigDict` class is now considered stable\"\n\" and ready to use.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:38\nmsgid \"Deprecated APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:39\nmsgid \"\"\n\"The old route syntax (``/hello/:name``) is deprecated in favor of the more \"\n\"readable and flexible ``/hello/<name>`` syntax.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:40\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes Bottle instance and will warn about \"\n\"parameters that are not compatible with the new mounting behavior. The old \"\n\"behavior (mount applications as WSGI callable) still works and is used as a \"\n\"fallback automatically.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:41\nmsgid \"The undocumented :func:`local_property` helper is now deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:42\nmsgid \"\"\n\"The server adapter for google app engine is not useful anymore and marked as\"\n\" deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:43\nmsgid \"\"\n\"Bottle uses pickle to store arbitrary objects into signed cookies. This is \"\n\"safe, as long as the signature key remains a secret. Unfortunately, people \"\n\"tend to push code with signature keys to github all the time, so we decided \"\n\"to remove pickle-support from bottle. Signed cookies will now issue a \"\n\"deprecation warning if the value is not a string, and support for non-string\"\n\" values will be removed in 0.14. The global :func:`cookie_encode`, \"\n\":func:`cookie_decode` and :func:`is_cookie_encoded` are now also deprecated.\"\n\" If you are using this feature, think about using json to serialize your \"\n\"objects before storing them into cookies, or switch to a session system that\"\n\" stores data server-side instead of client-side.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:45\nmsgid \"Removed APIs (deprecated since 0.12)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:46\nmsgid \"\"\n\"Plugins with the old API (``api=1`` or no api attribute) will no longer \"\n\"work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:47\nmsgid \"\"\n\"Parameter order of :meth:`Bottle.mount` changed in 0.10. The old order will \"\n\"now result in an error instead of a warning.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:48\nmsgid \"\"\n\"The :class:`ConfigDict` class was introduced in 0.11 and changed during \"\n\"0.12. These changes are now final.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:50\nmsgid \"\"\n\"Attribute access and assignment was removed due to high overhead and limited\"\n\" usability.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:51\nmsgid \"\"\n\"Namespaced sub-instance creation was removed. ``config[\\\"a\\\"][\\\"b\\\"]`` has a\"\n\" high overhead and little benefit over ``config[\\\"a.b\\\"]``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:52\nmsgid \"\"\n\":class:`ConfigDict` instances are no longer callable. This was a shortcut \"\n\"for :meth:`ConfigDict.update`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:53\nmsgid \"\"\n\":class:`ConfigDict` constructor no longer accepts any parameters. Use the \"\n\"`load_*` methods instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:55\nmsgid \"\"\n\"Bottle 0.12 changed some aspects of the Simple Template Engine. These \"\n\"changes are now final and the old syntax will now longer work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:57\nmsgid \"\"\n\"The magic ``{{rebase()}}`` call was replaced by a ``base`` variable. \"\n\"Example: ``{{base}}``\"\nmsgstr \"\"\n\n#: ../../changelog.rst:58\nmsgid \"\"\n\"In STPL Templates, the 'rebase' and 'include' keywords were replaced with \"\n\"functions in 0.12.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:59\nmsgid \"\"\n\"PEP-263 encoding strings are no longer recognized. Templates are always \"\n\"utf-8.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:61\nmsgid \"\"\n\"The 'geventSocketIO' server adapter was removed without notice. It did not \"\n\"work anyway.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:63\nmsgid \"Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:64\nmsgid \"These changes might require special care when updating.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:66\nmsgid \"\"\n\"Signed cookies now use a stronger HMAC algorithm by default. This will \"\n\"result in old cookies to appear invalid after the update. Pass an explicit \"\n\"``digestmod=hashlib.md5`` to :meth:`Request.get_cookie` and \"\n\":meth:`Response.set_cookie` to get the old behavior.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:68\nmsgid \"Other Improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:69\nmsgid \"\"\n\"Bottle() instances are now context managers. If used in a with-statement, \"\n\"the default application changes to the specific instance and the shortcuts \"\n\"for many instance methods can be used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:70\nmsgid \"\"\n\"Added support for ``PATCH`` requests and the :meth:`Bottle.patch` decorator.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:71\nmsgid \"\"\n\"Added `aiohttp <http://aiohttp.readthedocs.io/en/stable/>`_ and `uvloop \"\n\"<https://github.com/MagicStack/uvloop>`_ server adapters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:72\nmsgid \"Added command-line arguments for config from json or ini files.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:73\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes instances of :class:`Bottle` and mounts \"\n\"them with significantly less overhead than other WSGI applications.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:74\nmsgid \"\"\n\"The :attr:`Request.json` property now accepts ``application/json-rpc`` \"\n\"requests.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:75\nmsgid \"\"\n\":func:`static_file` gained support for ``ETag`` headers. It will generate \"\n\"ETags and recognizes ``If-None-Match`` headers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:76\nmsgid \"Jinja2 templates will produce better error messages than before.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:82\nmsgid \"Release 0.12\"\nmsgstr \"\"\n\n#: ../../changelog.rst:84\nmsgid \"New SimpleTemplate parser implementation\"\nmsgstr \"\"\n\n#: ../../changelog.rst:86\nmsgid \"Support for multi-line code blocks (`<% ... %>`).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:87\nmsgid \"\"\n\"The keywords `include` and `rebase` are functions now and can accept \"\n\"variable template names.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:89\nmsgid \"\"\n\"The new :attr:`BaseRequest.route` property returns the :class:`Route` that \"\n\"originally matched the request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:90\nmsgid \"\"\n\"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in \"\n\"CPythons dict() implementation was fixed over a year ago. If you are still \"\n\"using Python 2.5 in production, consider upgrading or at least make sure \"\n\"that you get security fixed from your distributor.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:91\nmsgid \"New :class:`ConfigDict` API (see :doc:`configuration`)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:93\nmsgid \"\"\n\"More information can be found in this `development blog post \"\n\"<http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:97\nmsgid \"Release 0.11\"\nmsgstr \"\"\n\n#: ../../changelog.rst:99\nmsgid \"\"\n\"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:100\nmsgid \"\"\n\"Support for partial downloads (``Range`` header) in :func:`static_file`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:101\nmsgid \"\"\n\"The new :class:`ResourceManager` interface helps locating files bundled with\"\n\" an application.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:102\nmsgid \"\"\n\"Added a server adapter for `waitress \"\n\"<http://docs.pylonsproject.org/projects/waitress/en/latest/>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:103\nmsgid \"\"\n\"New :meth:`Bottle.merge` method to install all routes from one application \"\n\"into another.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:104\nmsgid \"\"\n\"New :attr:`BaseRequest.app` property to get the application object that \"\n\"handles a request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:105\nmsgid \"\"\n\"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by \"\n\"WTForms).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:106\nmsgid \":class:`MultiDict` and subclasses are now pickle-able.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:109\nmsgid \"API Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:110\nmsgid \"\"\n\":attr:`Response.status` is a read-write property that can be assigned either\"\n\" a numeric status code or a status string with a reason phrase (``200 OK``).\"\n\" The return value is now a string to better match existing APIs (WebOb, \"\n\"werkzeug). To be absolutely clear, you can use the read-only properties \"\n\":attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:113\nmsgid \"API Deprecations\"\nmsgstr \"\"\n\n#: ../../changelog.rst:114\nmsgid \"\"\n\":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:117\nmsgid \"Release 0.10\"\nmsgstr \"\"\n\n#: ../../changelog.rst:119\nmsgid \"Plugin API v2\"\nmsgstr \"\"\n\n#: ../../changelog.rst:121\nmsgid \"To use the new API, set :attr:`Plugin.api` to ``2``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:122\nmsgid \"\"\n\":meth:`Plugin.apply` receives a :class:`Route` object instead of a context \"\n\"dictionary as second parameter. The new object offers some additional \"\n\"information and may be extended in the future.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:123\nmsgid \"\"\n\"Plugin names are considered unique now. The topmost plugin with a given name\"\n\" on a given route is installed, all other plugins with the same name are \"\n\"silently ignored.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:125\nmsgid \"The Request/Response Objects\"\nmsgstr \"\"\n\n#: ../../changelog.rst:127\nmsgid \"\"\n\"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, \"\n\":attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and \"\n\":attr:`BaseRequest.script_name`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:128\nmsgid \"\"\n\"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` \"\n\"attributes. In future releases, :attr:`BaseResponse.status` will return a \"\n\"string (e.g. ``200 OK``) instead of an integer to match the API of other \"\n\"common frameworks. To make the transition as smooth as possible, you should \"\n\"use the verbose attributes from now on.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:129\nmsgid \"\"\n\"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many \"\n\"places. The new dict implementation allows attribute access and handles \"\n\"unicode form values transparently.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:131\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../changelog.rst:133\nmsgid \"\"\n\"Added three new functions to the SimpleTemplate default namespace that \"\n\"handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and \"\n\":func:`stpl.setdefault`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:134\nmsgid \"\"\n\"The default escape function for SimpleTemplate now additionally escapes \"\n\"single and double quotes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:136\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../changelog.rst:138\nmsgid \"\"\n\"A new route syntax (e.g. ``/object/<id:int>``) and support for route \"\n\"wildcard filters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:139\nmsgid \"Four new wildcard filters: `int`, `float`, `path` and `re`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:141\nmsgid \"Other changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:143\nmsgid \"Added command line interface to load applications and start servers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:144\nmsgid \"\"\n\"Introduced a :class:`ConfigDict` that makes accessing configuration a lot \"\n\"easier (attribute access and auto-expanding namespaces).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:145\nmsgid \"Added support for raw WSGI applications to :meth:`Bottle.mount`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:146\nmsgid \":meth:`Bottle.mount` parameter order changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:147\nmsgid \"\"\n\":meth:`Bottle.route` now accpets an import string for the ``callback`` \"\n\"parameter.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:148\nmsgid \"Dropped Gunicorn 0.8 support. Current supported version is 0.13.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:149\nmsgid \"Added custom options to Gunicorn server.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:150\nmsgid \"\"\n\"Finally dropped support for type filters. Replace with a custom plugin of \"\n\"needed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:154\nmsgid \"Release 0.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:157\nmsgid \"Whats new?\"\nmsgstr \"\"\n\n#: ../../changelog.rst:158\nmsgid \"\"\n\"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:159\nmsgid \"\"\n\"The :func:`route` decorator got a lot of new features. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:160\nmsgid \"\"\n\"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld \"\n\"<http://meinheld.org/>`_ and `bjoern \"\n\"<https://github.com/jonashaag/bjoern>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:161\nmsgid \"Support for SimpleTAL templates.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:162\nmsgid \"Better runtime exception handling for mako templates in debug mode.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:163\nmsgid \"Lots of documentation, fixes and small improvements.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:164\nmsgid \"A new :data:`Request.urlparts` property.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:167\nmsgid \"Performance improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:168\nmsgid \"\"\n\"The :class:`Router` now special-cases ``wsgi.run_once`` environments to \"\n\"speed up CGI.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:169\nmsgid \"\"\n\"Reduced module load time by ~30% and optimized template parser. See `8ccb2d \"\n\"</commit/8ccb2d>`_, `f72a7c </commit/f72a7c>`_ and `b14b9a \"\n\"</commit/b14b9a>`_ for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:170\nmsgid \"\"\n\"Support for \\\"App Caching\\\" on Google App Engine. See `af93ec \"\n\"</commit/af93ec>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:171\nmsgid \"\"\n\"Some of the rarely used or deprecated features are now plugins that avoid \"\n\"overhead if the feature is not used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:174 ../../changelog.rst:185\nmsgid \"API changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:175\nmsgid \"\"\n\"This release is mostly backward compatible, but some APIs are marked \"\n\"deprecated now and will be removed for the next release. Most noteworthy:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:177\nmsgid \"\"\n\"The ``static`` route parameter is deprecated. You can escape wild-cards with\"\n\" a backslash.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:178\nmsgid \"\"\n\"Type-based output filters are deprecated. They can easily be replaced with \"\n\"plugins.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:182\nmsgid \"Release 0.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:186\nmsgid \"These changes may break compatibility with previous versions.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:188\nmsgid \"\"\n\"The built-in Key/Value database is not available anymore. It is marked \"\n\"deprecated since 0.6.4\"\nmsgstr \"\"\n\n#: ../../changelog.rst:189\nmsgid \"The Route syntax and behaviour changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:191\nmsgid \"\"\n\"Regular expressions must be encapsulated with ``#``. In 0.6 all non-\"\n\"alphanumeric characters not present in the regular expression were allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:192\nmsgid \"\"\n\"Regular expressions not part of a route wildcard are escaped automatically. \"\n\"You don't have to escape dots or other regular control characters anymore. \"\n\"In 0.6 the whole URL was interpreted as a regular expression. You can use \"\n\"anonymous wildcards (``/index:#(\\\\.html)?#``) to achieve a similar \"\n\"behaviour.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:194\nmsgid \"\"\n\"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:195\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine escapes HTML special characters in \"\n\"``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` \"\n\"syntax to get old behaviour (no escaping).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:196\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine returns unicode strings instead of lists \"\n\"of byte strings.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:197\nmsgid \"\"\n\"``bottle.optimize()`` and the automatic route optimization is obsolete.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:198\nmsgid \"Some functions and attributes were renamed:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:200\nmsgid \":attr:`Request._environ` is now :attr:`Request.environ`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:201\nmsgid \":attr:`Response.header` is now :attr:`Response.headers`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:202\nmsgid \":func:`default_app` is obsolete. Use :func:`app` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:204\nmsgid \"The default :func:`redirect` code changed from 307 to 303.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:205\nmsgid \"Removed support for ``@default``. Use ``@error(404)`` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:209\nmsgid \"New features\"\nmsgstr \"\"\n\n#: ../../changelog.rst:210\nmsgid \"This is an incomplete list of new features and improved functionality.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:212\nmsgid \"\"\n\"The :class:`Request` object got new properties: :attr:`Request.body`, \"\n\":attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, \"\n\":attr:`Request.forms`, :attr:`Request.files`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:213\nmsgid \"\"\n\"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are \"\n\"now able to encode and decode python objects. This is called a *secure \"\n\"cookie* because the encoded values are signed and protected from changes on \"\n\"client side. All pickle-able data structures are allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:214\nmsgid \"\"\n\"The new :class:`Router` class drastically improves performance for setups \"\n\"with lots of dynamic routes and supports named routes (named route + dict = \"\n\"URL string).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:215\nmsgid \"\"\n\"It is now possible (and recommended) to return :exc:`HTTPError` and \"\n\":exc:`HTTPResponse` instances or other exception objects instead of raising \"\n\"them.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:216\nmsgid \"\"\n\"The new function :func:`static_file` equals :func:`send_file` but returns a \"\n\":exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. \"\n\":func:`send_file` is deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:217\nmsgid \"\"\n\"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:218\nmsgid \"The :class:`SimpleTemplate` engine got full unicode support.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:219\nmsgid \"Lots of non-critical bugfixes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:225\nmsgid \"Contributors\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:1\nmsgid \"\"\n\"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:3\nmsgid \"\"\n\"Thanks to all the people who found bugs, sent patches, spread the word, \"\n\"helped each other on the mailing-list and made this project possible. I hope\"\n\" the following (alphabetically sorted) list is complete. If you miss your \"\n\"name on that list (or want your name removed) please :doc:`tell me \"\n\"<contact>` or add it yourself.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:5\nmsgid \"acasajus\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:6\nmsgid \"Adam R. Smith\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:7\nmsgid \"Alexey Borzenkov\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:8\nmsgid \"Alexis Daboville\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:9\nmsgid \"Anton I. Sipos\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:10\nmsgid \"Anton Kolechkin\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:11\nmsgid \"apexi200sx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:12\nmsgid \"apheage\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:13\nmsgid \"BillMa\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:14\nmsgid \"Brad Greenlee\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:15\nmsgid \"Brandon Gilmore\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:16\nmsgid \"Branko Vukelic\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:17\nmsgid \"Brian Sierakowski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:18\nmsgid \"Brian Wickman\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:19\nmsgid \"Carl Scharenberg\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:20\nmsgid \"Damien Degois\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:21\nmsgid \"David Buxton\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:22\nmsgid \"Duane Johnson\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:23\nmsgid \"fcamel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:24\nmsgid \"Frank Murphy\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:25\nmsgid \"Frederic Junod\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:26\nmsgid \"goldfaber3012\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:27\nmsgid \"Greg Milby\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:28\nmsgid \"gstein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:29\nmsgid \"Ian Davis\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:30\nmsgid \"Itamar Nabriski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:31\nmsgid \"Iuri de Silvio\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:32\nmsgid \"Jaimie Murdock\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:33\nmsgid \"Jeff Nichols\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:34\nmsgid \"Jeremy Kelley\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:35\nmsgid \"joegester\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:36\nmsgid \"Johannes Krampf\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:37\nmsgid \"Jonas Haag\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:38\nmsgid \"Joshua Roesslein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:39\nmsgid \"Judson Neer\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:40\nmsgid \"Karl\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:41\nmsgid \"Kevin Zuber\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:42\nmsgid \"Kraken\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:43\nmsgid \"Kyle Fritz\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:44\nmsgid \"m35\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:45\nmsgid \"Marcos Neves\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:46\nmsgid \"masklinn\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:47\nmsgid \"Michael Labbe\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:48\nmsgid \"Michael Soulier\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:49\nmsgid \"`reddit <http://reddit.com/r/python>`_\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:50\nmsgid \"Nicolas Vanhoren\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:51\nmsgid \"Oz N Tiram\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:52\nmsgid \"Robert Rollins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:53\nmsgid \"rogererens\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:54\nmsgid \"rwxrwx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:55\nmsgid \"Santiago Gala\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:56\nmsgid \"Sean M. Collins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:57\nmsgid \"Sebastian Wollrath\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:58\nmsgid \"Seth\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:59\nmsgid \"Sigurd Høgsbro\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:60\nmsgid \"Stuart Rackham\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:61\nmsgid \"Sun Ning\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:62\nmsgid \"Tomás A. Schertel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:63\nmsgid \"Tristan Zajonc\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:64\nmsgid \"voltron\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:65\nmsgid \"Wieland Hoffmann\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:66\nmsgid \"zombat\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:67\nmsgid \"Thiago Avelino\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/configuration.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../configuration.rst:3\nmsgid \"Configuration (DRAFT)\"\nmsgstr \"\"\n\n#: ../../configuration.rst:8\nmsgid \"\"\n\"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_\"\n\" what you think.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:10\nmsgid \"\"\n\"Bottle applications can store their configuration in :attr:`Bottle.config`, \"\n\"a dict-like object and central place for application specific settings. This\"\n\" dictionary controls many aspects of the framework, tells (newer) plugins \"\n\"what to do, and can be used to store your own configuration as well.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:13\nmsgid \"Configuration Basics\"\nmsgstr \"\"\n\n#: ../../configuration.rst:15\nmsgid \"\"\n\"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. \"\n\"All the common dict methods work as expected. Let us start with some \"\n\"examples::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:44\nmsgid \"\"\n\"The app object is not always available, but as long as you are within a \"\n\"request context, you can use the `request` object to get the current \"\n\"application and its configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:51\nmsgid \"Naming Convention\"\nmsgstr \"\"\n\n#: ../../configuration.rst:53\nmsgid \"\"\n\"To make life easier, plugins and applications should follow some simple \"\n\"rules when it comes to config parameter names:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:55\nmsgid \"\"\n\"All keys should be lowercase strings and follow the rules for python \"\n\"identifiers (no special characters but the underscore).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:56\nmsgid \"\"\n\"Namespaces are separated by dots (e.g. ``namespace.field`` or \"\n\"``namespace.subnamespace.field``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:57\nmsgid \"\"\n\"Bottle uses the root namespace for its own configuration. Plugins should \"\n\"store all their variables in their own namespace (e.g. ``sqlite.db`` or \"\n\"``werkzeug.use_debugger``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:58\nmsgid \"\"\n\"Your own application should use a separate namespace (e.g. ``myapp.*``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:62\nmsgid \"Loading Configuration from a File\"\nmsgstr \"\"\n\n#: ../../configuration.rst:66\nmsgid \"\"\n\"Configuration files are useful if you want to enable non-programmers to \"\n\"configure your application, or just don't want to hack python module files \"\n\"just to change the database port. A very common syntax for configuration \"\n\"files is shown here:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:78\nmsgid \"\"\n\"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style \"\n\"configuration files from disk and import their values into your existing \"\n\"configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:85\nmsgid \"Loading Configuration from a python module\"\nmsgstr \"\"\n\n#: ../../configuration.rst:89\nmsgid \"\"\n\"Loading configuration from a Python module is a common pattern for Python \"\n\"programs and frameworks. Bottle assumes that configuration keys are all \"\n\"upper case:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:98\nmsgid \"\"\n\"You can load the this Python module with :met:`ConfigDict.load_module`::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:107\nmsgid \"\"\n\"Note the second parameter to disable loading as namespaced items as in \"\n\":meth:`ConfigDict.load_dict`. By default, loading from a Python module will \"\n\"call this method, unless you specifically call this method with `False` as \"\n\"the second argument.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:110\nmsgid \"Loading Configuration from a nested :class:`dict`\"\nmsgstr \"\"\n\n#: ../../configuration.rst:114\nmsgid \"\"\n\"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an \"\n\"entire structure of nested dictionaries and turns it into a flat list of \"\n\"keys and values with namespaced keys::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:135\nmsgid \"Listening to configuration changes\"\nmsgstr \"\"\n\n#: ../../configuration.rst:139\nmsgid \"\"\n\"The ``config`` hook on the application object is triggered each time a value\"\n\" in :attr:`Bottle.config` is changed. This hook can be used to react on \"\n\"configuration changes at runtime, for example reconnect to a new database, \"\n\"change the debug settings on a background service or resize worker thread \"\n\"pools. The hook callback receives two arguments (key, new_value) and is \"\n\"called before the value is actually changed in the dictionary. Raising an \"\n\"exception from a hook callback cancels the change and the old value is \"\n\"preserved.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:148\nmsgid \"\"\n\"The hook callbacks cannot *change* the value that is to be stored to the \"\n\"dictionary. That is what filters are for.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:154\nmsgid \"Filters and other Meta Data\"\nmsgstr \"\"\n\n#: ../../configuration.rst:158\nmsgid \"\"\n\":class:`ConfigDict` allows you to store meta data along with configuration \"\n\"keys. Two meta fields are currently defined:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:162\nmsgid \"help\"\nmsgstr \"\"\n\n#: ../../configuration.rst:161\nmsgid \"\"\n\"A help or description string. May be used by debugging, introspection or \"\n\"admin tools to help the site maintainer configuring their application.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"filter\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"\"\n\"A callable that accepts and returns a single value. If a filter is defined \"\n\"for a key, any new value stored to that key is first passed through the \"\n\"filter callback. The filter can be used to cast the value to a different \"\n\"type, check for invalid values (throw a ValueError) or trigger side effects.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:167\nmsgid \"\"\n\"This feature is most useful for plugins. They can validate their config \"\n\"parameters or trigger side effects using filters and document their \"\n\"configuration via ``help`` fields::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:189\nmsgid \"API Documentation\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:1\nmsgid \"\"\n\"A dict-like configuration storage with additional support for namespaces, \"\n\"validators, meta-data, overlays and more.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:4\nmsgid \"\"\n\"This dict-like class is heavily optimized for read access. All read-only \"\n\"methods as well as item access should be as fast as the built-in dict.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:1\nmsgid \"Load values from a Python module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:3\nmsgid \"Example modue ``config.py``::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:0\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:17\nmsgid \"\"\n\"If true (default), dictionary values are assumed to represent namespaces \"\n\"(see :meth:`load_dict`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:1\nmsgid \"Load values from an ``*.ini`` style config file.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:3\nmsgid \"\"\n\"A configuration file consists of sections, each led by a ``[section]`` \"\n\"header, followed by key/value entries separated by either ``=`` or ``:``. \"\n\"Section names and keys are case-insensitive. Leading and trailing whitespace\"\n\" is removed from keys and values. Values can be omitted, in which case the \"\n\"key/value delimiter may also be left out. Values can also span multiple \"\n\"lines, as long as they are indented deeper than the first line of the value.\"\n\" Commands are prefixed by ``#`` or ``;`` and may only appear on their own on\"\n\" an otherwise empty line.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:13\nmsgid \"\"\n\"Both section and key names may contain dots (``.``) as namespace separators.\"\n\" The actual configuration parameter name is constructed by joining section \"\n\"name and key name together and converting to lower case.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:18\nmsgid \"\"\n\"The special sections ``bottle`` and ``ROOT`` refer to the root namespace and\"\n\" the ``DEFAULT`` section defines default values for all other sections.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:22\nmsgid \"With Python 3, extended string interpolation is enabled.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:24\nmsgid \"The path of a config file, or a list of paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:25\nmsgid \"\"\n\"All keyword parameters are passed to the underlying \"\n\":class:`python:configparser.ConfigParser` constructor call.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_dict:1\nmsgid \"\"\n\"Load values from a dictionary structure. Nesting can be used to represent \"\n\"namespaces.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.update:1\nmsgid \"\"\n\"If the first parameter is a string, all keys are prefixed with this \"\n\"namespace. Apart from that it works just as the usual dict.update().\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:1\nmsgid \"Insert key with a value of default if key is not in the dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:3\nmsgid \"Return the value for key if key is in the dictionary, else default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_get:1\nmsgid \"Return the value of a meta field for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_set:1\nmsgid \"Set the meta field for a key to a new value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_list:1\nmsgid \"Return an iterable of meta field names defined for a key.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/contact.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../contact.rst:3\nmsgid \"Contact\"\nmsgstr \"\"\n\n#: ../../contact.rst:6\nmsgid \"About the Author\"\nmsgstr \"\"\n\n#: ../../contact.rst:7\nmsgid \"\"\n\"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy \"\n\"behind this website. I'm 27 years old and studying computer science at the \"\n\"Georg-August-University in Göttingen, Germany. Python is my favorite \"\n\"language, but I also code in ruby and JavaScript a lot. Watch me on `twitter\"\n\" <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub \"\n\"<http://github.com/defnull>`_ to get in contact. A `mailinglist \"\n\"<http://groups.google.de/group/bottlepy>`_ is open for Bottle related \"\n\"questions, too.\"\nmsgstr \"\"\n\n#: ../../contact.rst:10\nmsgid \"About Bottle\"\nmsgstr \"\"\n\n#: ../../contact.rst:11\nmsgid \"\"\n\"This is my first open source project so far. It started and a small \"\n\"experiment but soon got so much positive feedback I decided to make \"\n\"something real out of it. Here it is.\"\nmsgstr \"\"\n\n#: ../../contact.rst:14\nmsgid \"Impressum und Kontaktdaten\"\nmsgstr \"\"\n\n#: ../../contact.rst:15\nmsgid \"\"\n\"(This is required by `German law \"\n\"<http://bundesrecht.juris.de/tmg/__5.html>`_)\"\nmsgstr \"\"\n\n#: ../../contact.rst:17\nmsgid \"\"\n\"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die \"\n\"Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen \"\n\"vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist \"\n\"ausdrücklich untersagt.\"\nmsgstr \"\"\n\n#: ../../contact.rst:22\nmsgid \"**Betreiber**: Marcel Hellkamp\"\nmsgstr \"\"\n\n#: ../../contact.rst:23\nmsgid \"**Ort**: D - 37075 Göttingen\"\nmsgstr \"\"\n\n#: ../../contact.rst:24\nmsgid \"**Strasse**: Theodor-Heuss Strasse 13\"\nmsgstr \"\"\n\n#: ../../contact.rst:25\nmsgid \"**Telefon**: +49 (0) 551 20005915\"\nmsgstr \"\"\n\n#: ../../contact.rst:26\nmsgid \"**E-Mail**: marc at gsites dot de\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/deployment.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../deployment.rst:27\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../deployment.rst:29\nmsgid \"\"\n\"The bottle :func:`run` function, when called without any parameters, starts \"\n\"a local development server on port 8080. You can access and test your \"\n\"application via http://localhost:8080/ if you are on the same host.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:31\nmsgid \"\"\n\"To get your application available to the outside world, specify the IP the \"\n\"server should listen to (e.g. ``run(host='192.168.0.1')``) or let the server\"\n\" listen to all interfaces at once (e.g. ``run(host='0.0.0.0')``). The \"\n\"listening port can be changed in a similar way, but you need root or admin \"\n\"rights to choose a port below 1024. Port 80 is the standard for HTTP \"\n\"servers::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:37\nmsgid \"Server Options\"\nmsgstr \"\"\n\n#: ../../deployment.rst:39\nmsgid \"\"\n\"The built-in default server is based on `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-\"\n\"wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine \"\n\"for development, but may become a performance bottleneck when server load \"\n\"increases. There are three ways to eliminate this bottleneck:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:41\nmsgid \"\"\n\"Use a different server that is either multi-threaded or supports \"\n\"asynchronous IO.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:42\nmsgid \"\"\n\"Start multiple server processes and spread the load with a load-balancer.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:43\nmsgid \"Do both.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:45\nmsgid \"\"\n\"**Multi-threaded** servers are the 'classic' way to do it. They are very \"\n\"robust, reasonably fast and easy to manage. As a drawback, they can only \"\n\"handle a limited number of connections at the same time and utilize only one\"\n\" CPU core due to the \\\"Global Interpreter Lock\\\" (GIL) of the Python \"\n\"runtime. This does not hurt most applications, they are waiting for network \"\n\"IO most of the time anyway, but may slow down CPU intensive tasks (e.g. \"\n\"image processing).\"\nmsgstr \"\"\n\n#: ../../deployment.rst:47\nmsgid \"\"\n\"**Asynchronous IO** servers are very fast, can handle a virtually unlimited \"\n\"number of concurrent connections and are easy to manage. To take full \"\n\"advantage of their potential, you need to design your application \"\n\"accordingly and understand the concepts of the specific server.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:49\nmsgid \"\"\n\"**Multi-processing** (forking) servers are not limited by the GIL and \"\n\"utilize more than one CPU core, but make communication between server \"\n\"instances more expensive. You need a database or external message query to \"\n\"share state between processes, or design your application so that it does \"\n\"not need any shared state. The setup is also a bit more complicated, but \"\n\"there are good tutorials available.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:52\nmsgid \"Switching the Server Backend\"\nmsgstr \"\"\n\n#: ../../deployment.rst:54\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded default server::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:58\nmsgid \"\"\n\"Bottle ships with a lot of ready-to-use adapters for the most common WSGI \"\n\"servers and automates the setup process. Here is an incomplete list:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Name\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Homepage\"\nmsgstr \"\"\n\n#: ../../deployment.rst:61\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"cgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"Run as CGI script\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"Run as FastCGI process\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"Helper for Google App Engine deployments\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"Single-threaded default server\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"Multi-threaded and very stable\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"Multi-threaded, stable, tried and tested\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"Multi-threaded, poweres Pyramid\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"Pre-forked, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"Asynchronous framework with WSGI support.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72 ../../deployment.rst:73\nmsgid \"Asynchronous (greenlets)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"Asynchronous, powers some parts of Facebook\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"Asynchronous, well tested but... twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"Asynchronous, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"Asynchronous, very fast and written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"auto\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"Automatically selects an available server adapter\"\nmsgstr \"\"\n\n#: ../../deployment.rst:81\nmsgid \"The full list is available through :data:`server_names`.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:83\nmsgid \"\"\n\"If there is no adapter for your favorite server or if you need more control \"\n\"over the server setup, you may want to start the server manually. Refer to \"\n\"the server documentation on how to run WSGI applications. Here is an example\"\n\" for paste_::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:91\nmsgid \"Apache mod_wsgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:93\nmsgid \"\"\n\"Instead of running your own HTTP server from within Bottle, you can attach \"\n\"Bottle applications to an `Apache server <apache>`_ using mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:95\nmsgid \"\"\n\"All you need is an ``app.wsgi`` file that provides an ``application`` \"\n\"object. This object is used by mod_wsgi to start your application and should\"\n\" be a WSGI-compatible Python callable.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:97\nmsgid \"File ``/var/www/yourapp/app.wsgi``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:108\nmsgid \"The Apache configuration may look like this::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:126\nmsgid \"uWSGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:128\nmsgid \"\"\n\"uWSGI_ is a modern alternative to FastCGI and the recommended deployment \"\n\"option on servers like nginx_, lighttpd_, and cherokee_. The uWSGI project \"\n\"provides an application server that runs your application, and defines a \"\n\"protocol that frontend webservers can speak to. Have a look at the excellent\"\n\" `Quickstart for Python/WSGI applications <https://uwsgi-\"\n\"docs.readthedocs.io/en/latest/WSGIquickstart.html>`_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:132\nmsgid \"Google AppEngine\"\nmsgstr \"\"\n\n#: ../../deployment.rst:136\nmsgid \"\"\n\"New App Engine applications using the Python 2.7 runtime environment support\"\n\" any WSGI application and should be configured to use the Bottle application\"\n\" object directly. For example suppose your application's main module is \"\n\"``myapp.py``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:146\nmsgid \"\"\n\"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object \"\n\"like so::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:158\nmsgid \"\"\n\"It is always a good idea to let GAE serve static files directly. Here is \"\n\"example for a working  ``app.yaml`` (using the legacy Python 2.5 runtime \"\n\"environment)::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:175\nmsgid \"Load Balancer (Manual Setup)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:177\nmsgid \"\"\n\"A single Python process can utilize only one CPU at a time, even if there \"\n\"are more CPU cores available. The trick is to balance the load between \"\n\"multiple independent Python processes to utilize all of your CPU cores.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:179\nmsgid \"\"\n\"Instead of a single Bottle application server, you start one instance for \"\n\"each CPU core available using different local port (localhost:8080, 8081, \"\n\"8082, ...). You can choose any server adapter you want, even asynchronous \"\n\"ones. Then a high performance load balancer acts as a reverse proxy and \"\n\"forwards each new requests to a random port, spreading the load between all \"\n\"available back-ends. This way you can use all of your CPU cores and even \"\n\"spread out the load between different physical servers.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:181\nmsgid \"\"\n\"One of the fastest load balancers available is Pound_ but most common web \"\n\"servers have a proxy-module that can do the work just fine.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:183\nmsgid \"Pound example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:201\nmsgid \"Apache example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:209\nmsgid \"Lighttpd example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:221\nmsgid \"Good old CGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:223\nmsgid \"\"\n\"A CGI server starts a new process for each request. This adds a lot of \"\n\"overhead but is sometimes the only option, especially on cheap hosting \"\n\"packages. The `cgi` server adapter does not actually start a CGI server, but\"\n\" transforms your bottle application into a valid CGI application::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/development.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../development.rst:2\nmsgid \"Developer Notes\"\nmsgstr \"\"\n\n#: ../../development.rst:4\nmsgid \"\"\n\"This document is intended for developers and package maintainers interested \"\n\"in the bottle development and release workflow. If you want to contribute, \"\n\"you are just right!\"\nmsgstr \"\"\n\n#: ../../development.rst:8\nmsgid \"Get involved\"\nmsgstr \"\"\n\n#: ../../development.rst:10\nmsgid \"\"\n\"There are several ways to join the community and stay up to date. Here are \"\n\"some of them:\"\nmsgstr \"\"\n\n#: ../../development.rst:12\nmsgid \"\"\n\"**Mailing list**: Join our mailing list by sending an email to \"\n\"`bottlepy+subscribe@googlegroups.com \"\n\"<mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required).\"\nmsgstr \"\"\n\n#: ../../development.rst:13\nmsgid \"\"\n\"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or \"\n\"search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag.\"\nmsgstr \"\"\n\n#: ../../development.rst:14\nmsgid \"\"\n\"**IRC**: Join `#bottlepy on irc.freenode.net \"\n\"<irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:15\nmsgid \"\"\n\"**Google plus**: We sometimes `blog about Bottle, releases and technical \"\n\"stuff \"\n\"<https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_\"\n\" on our Google+ page.\"\nmsgstr \"\"\n\n#: ../../development.rst:19\nmsgid \"Get the Sources\"\nmsgstr \"\"\n\n#: ../../development.rst:21\nmsgid \"\"\n\"The bottle `development repository <https://github.com/bottlepy/bottle>`_ \"\n\"and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are \"\n\"both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan \"\n\"to contribute, it is a good idea to create an account there and fork the \"\n\"main repository. This way your changes and ideas are visible to other \"\n\"developers and can be discussed openly. Even without an account, you can \"\n\"clone the repository or just download the latest development version as a \"\n\"source archive.\"\nmsgstr \"\"\n\n#: ../../development.rst:23\nmsgid \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:24\nmsgid \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:25\nmsgid \"\"\n\"**Download:** Development branch as `tar archive \"\n\"<http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file \"\n\"<http://github.com/bottlepy/bottle/zipball/master>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:26\nmsgid \"\"\n\"**Translations:** `transifex.com/projects/p/bottle \"\n\"<https://www.transifex.com/projects/p/bottle/>`_\"\nmsgstr \"\"\n\n#: ../../development.rst:30\nmsgid \"Releases and Updates\"\nmsgstr \"\"\n\n#: ../../development.rst:32\nmsgid \"\"\n\"Bottle is released at irregular intervals and distributed through `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-\"\n\"revisions of outdated releases are only available from the git repository \"\n\"mentioned above. Some Linux distributions may offer packages for outdated \"\n\"releases, though.\"\nmsgstr \"\"\n\n#: ../../development.rst:34\nmsgid \"\"\n\"The Bottle version number splits into three parts \"\n\"(**major.minor.revision**). These are *not* used to promote new features but\"\n\" to indicate important bug-fixes and/or API changes. Critical bugs are fixed\"\n\" in at least the two latest minor releases and announced in all available \"\n\"channels (mailinglist, twitter, github). Non-critical bugs or features are \"\n\"not guaranteed to be backported. This may change in the future, through.\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"Major Release (x.0)\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"\"\n\"The major release number is increased on important milestones or updates \"\n\"that completely break backward compatibility. You probably have to work over\"\n\" your entire application to use a new release. These releases are very rare,\"\n\" through.\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"Minor Release (x.y)\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"\"\n\"The minor release number is increased on updates that change the API or \"\n\"behaviour in some way. You might get some depreciation warnings any may have\"\n\" to tweak some configuration settings to restore the old behaviour, but in \"\n\"most cases these changes are designed to be backward compatible for at least\"\n\" one minor release. You should update to stay up do date, but don't have to.\"\n\" An exception is 0.8, which *will* break backward compatibility hard. (This \"\n\"is why 0.7 was skipped). Sorry about that.\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"Revision (x.y.z)\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"\"\n\"The revision number is increased on bug-fixes and other patches that do not \"\n\"change the API or behaviour. You can safely update without editing your \"\n\"application code. In fact, you really should as soon as possible, because \"\n\"important security fixes are released this way.\"\nmsgstr \"\"\n\n#: ../../development.rst:47\nmsgid \"Pre-Release Versions\"\nmsgstr \"\"\n\n#: ../../development.rst:46\nmsgid \"\"\n\"Release candidates are marked by an ``rc`` in their revision number. These \"\n\"are API stable most of the time and open for testing, but not officially \"\n\"released yet. You should not use these for production.\"\nmsgstr \"\"\n\n#: ../../development.rst:50\nmsgid \"Repository Structure\"\nmsgstr \"\"\n\n#: ../../development.rst:52\nmsgid \"The source repository is structured as follows:\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"``master`` branch\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"\"\n\"This is the integration, testing and development branch. All changes that \"\n\"are planned to be part of the next release are merged and tested here.\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"``release-x.y`` branches\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"\"\n\"As soon as the master branch is (almost) ready for a new release, it is \"\n\"branched into a new release branch. This \\\"release candidate\\\" is feature-\"\n\"frozen but may receive bug-fixes and last-minute changes until it is \"\n\"considered production ready and officially released. From that point on it \"\n\"is called a \\\"support branch\\\" and still receives bug-fixes, but only \"\n\"important ones. The revision number is increased on each push to these \"\n\"branches, so you can keep up with important changes.\"\nmsgstr \"\"\n\n#: ../../development.rst:62\nmsgid \"Feature branches\"\nmsgstr \"\"\n\n#: ../../development.rst:61\nmsgid \"\"\n\"All other branches are feature branches. These are based on the master \"\n\"branch and only live as long as they are still active and not merged back \"\n\"into ``master``.\"\nmsgstr \"\"\n\n#: ../../development.rst:65\nmsgid \"What does this mean for a developer?\"\nmsgstr \"\"\n\n#: ../../development.rst:66\nmsgid \"\"\n\"If you want to add a feature, create a new branch from ``master``. If you \"\n\"want to fix a bug, branch ``release-x.y`` for each affected release. Please \"\n\"use a separate branch for each feature or bug to make integration as easy as\"\n\" possible. Thats all. There are git workflow examples at the bottom of this \"\n\"page.\"\nmsgstr \"\"\n\n#: ../../development.rst:68\nmsgid \"\"\n\"Oh, and never ever change the release number. We'll do that on integration. \"\n\"You never know in which order we pull pending requests anyway :)\"\nmsgstr \"\"\n\n#: ../../development.rst:72\nmsgid \"What does this mean for a maintainer ?\"\nmsgstr \"\"\n\n#: ../../development.rst:73\nmsgid \"\"\n\"Watch the tags (and the mailing list) for bug-fixes and new releases. If you\"\n\" want to fetch a specific release from the git repository, trust the tags, \"\n\"not the branches. A branch may contain changes that are not released yet, \"\n\"but a tag marks the exact commit which changed the version number.\"\nmsgstr \"\"\n\n#: ../../development.rst:77\nmsgid \"Submitting Patches\"\nmsgstr \"\"\n\n#: ../../development.rst:79\nmsgid \"\"\n\"The best way to get your changes integrated into the main development branch\"\n\" is to fork the main repository at github, create a new feature-branch, \"\n\"apply your changes and send a pull-request. Further down this page is a \"\n\"small collection of git workflow examples that may guide you. Submitting \"\n\"git-compatible patches to the mailing list is fine too. In any case, please \"\n\"follow some basic rules:\"\nmsgstr \"\"\n\n#: ../../development.rst:81\nmsgid \"\"\n\"**Documentation:** Tell us what your patch does. Comment your code. If you \"\n\"introduced a new feature, add to the documentation so others can learn about\"\n\" it.\"\nmsgstr \"\"\n\n#: ../../development.rst:82\nmsgid \"\"\n\"**Test:** Write tests to prove that your code works as expected and does not\"\n\" break anything. If you fixed a bug, write at least one test-case that \"\n\"triggers the bug. Make sure that all tests pass before you submit a patch.\"\nmsgstr \"\"\n\n#: ../../development.rst:83\nmsgid \"\"\n\"**One patch at a time:** Only fix one bug or add one feature at a time. \"\n\"Design your patches so that they can be applyed as a whole. Keep your \"\n\"patches clean, small and focused.\"\nmsgstr \"\"\n\n#: ../../development.rst:84\nmsgid \"\"\n\"**Sync with upstream:** If the ``upstream/master`` branch changed while you \"\n\"were working on your patch, rebase or pull to make sure that your patch \"\n\"still applies without conflicts.\"\nmsgstr \"\"\n\n#: ../../development.rst:88\nmsgid \"Building the Documentation\"\nmsgstr \"\"\n\n#: ../../development.rst:90\nmsgid \"\"\n\"You need a recent version of Sphinx to build the documentation. The \"\n\"recommended way is to install :command:`virtualenv` using your distribution \"\n\"package repository and install sphinx manually to get an up-to-date version.\"\nmsgstr \"\"\n\n#: ../../development.rst:121\nmsgid \"GIT Workflow Examples\"\nmsgstr \"\"\n\n#: ../../development.rst:123\nmsgid \"\"\n\"The following examples assume that you have an (free) `github account \"\n\"<https://github.com>`_. This is not mandatory, but makes things a lot \"\n\"easier.\"\nmsgstr \"\"\n\n#: ../../development.rst:125\nmsgid \"\"\n\"First of all you need to create a fork (a personal clone) of the official \"\n\"repository. To do this, you simply click the \\\"fork\\\" button on the `bottle \"\n\"project page <https://github.com/bottlepy/bottle>`_. When the fork is done, \"\n\"you will be presented with a short introduction to your new repository.\"\nmsgstr \"\"\n\n#: ../../development.rst:127\nmsgid \"\"\n\"The fork you just created is hosted at github and read-able by everyone, but\"\n\" write-able only by you. Now you need to clone the fork locally to actually \"\n\"make changes to it. Make sure you use the private (read-write) URL and *not*\"\n\" the public (read-only) one::\"\nmsgstr \"\"\n\n#: ../../development.rst:131\nmsgid \"\"\n\"Once the clone is complete your repository will have a remote named \"\n\"\\\"origin\\\" that points to your fork on github. Don’t let the name confuse \"\n\"you, this does not point to the original bottle repository, but to your own \"\n\"fork. To keep track of the official repository, add another remote named \"\n\"\\\"upstream\\\"::\"\nmsgstr \"\"\n\n#: ../../development.rst:137\nmsgid \"\"\n\"Note that \\\"upstream\\\" is a public clone URL, which is read-only. You cannot\"\n\" push changes directly to it. Instead, we will pull from your public \"\n\"repository. This is described later.\"\nmsgstr \"\"\n\n#: ../../development.rst:140\nmsgid \"Submit a Feature\"\nmsgstr \"\"\n\n#: ../../development.rst:141\nmsgid \"\"\n\"New features are developed in separate feature-branches to make integration \"\n\"easy. Because they are going to be integrated into the ``master`` branch, \"\n\"they must be based on ``upstream/master``. To create a new feature-branch, \"\n\"type the following::\"\nmsgstr \"\"\n\n#: ../../development.rst:145\nmsgid \"\"\n\"Now implement your feature, write tests, update the documentation, make sure\"\n\" that all tests pass and commit your changes::\"\nmsgstr \"\"\n\n#: ../../development.rst:149\nmsgid \"\"\n\"If the ``upstream/master`` branch changed in the meantime, there may be \"\n\"conflicts with your changes. To solve these, 'rebase' your feature-branch \"\n\"onto the top of the updated ``upstream/master`` branch::\"\nmsgstr \"\"\n\n#: ../../development.rst:154\nmsgid \"\"\n\"This is equivalent to undoing all your changes, updating your branch to the \"\n\"latest version and reapplying all your patches again. If you released your \"\n\"branch already (see next step), this is not an option because it rewrites \"\n\"your history. You can do a normal pull instead. Resolve any conflicts, run \"\n\"the tests again and commit.\"\nmsgstr \"\"\n\n#: ../../development.rst:156\nmsgid \"\"\n\"Now you are almost ready to send a pull request. But first you need to make \"\n\"your feature-branch public by pushing it to your github fork::\"\nmsgstr \"\"\n\n#: ../../development.rst:160\nmsgid \"\"\n\"After you’ve pushed your commit(s) you need to inform us about the new \"\n\"feature. One way is to send a pull-request using github. Another way would \"\n\"be to start a thread in the mailing-list, which is recommended. It allows \"\n\"other developers to see and discuss your patches and you get some feedback \"\n\"for free :)\"\nmsgstr \"\"\n\n#: ../../development.rst:162\nmsgid \"\"\n\"If we accept your patch, we will integrate it into the official development \"\n\"branch and make it part of the next release.\"\nmsgstr \"\"\n\n#: ../../development.rst:165\nmsgid \"Fix a Bug\"\nmsgstr \"\"\n\n#: ../../development.rst:166\nmsgid \"\"\n\"The workflow for bug-fixes is very similar to the one for features, but \"\n\"there are some differences:\"\nmsgstr \"\"\n\n#: ../../development.rst:168\nmsgid \"\"\n\"Branch off of the affected release branches instead of just the development \"\n\"branch.\"\nmsgstr \"\"\n\n#: ../../development.rst:169\nmsgid \"Write at least one test-case that triggers the bug.\"\nmsgstr \"\"\n\n#: ../../development.rst:170\nmsgid \"\"\n\"Do this for each affected branch including ``upstream/master`` if it is \"\n\"affected. ``git cherry-pick`` may help you reducing repetitive work.\"\nmsgstr \"\"\n\n#: ../../development.rst:171\nmsgid \"\"\n\"Name your branch after the release it is based on to avoid confusion. \"\n\"Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/faq.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../faq.rst:10\nmsgid \"Frequently Asked Questions\"\nmsgstr \"\"\n\n#: ../../faq.rst:13\nmsgid \"About Bottle\"\nmsgstr \"\"\n\n#: ../../faq.rst:16\nmsgid \"Is bottle suitable for complex applications?\"\nmsgstr \"\"\n\n#: ../../faq.rst:18\nmsgid \"\"\n\"Bottle is a *micro* framework designed for prototyping and building small \"\n\"web applications and services. It stays out of your way and allows you to \"\n\"get things done fast, but misses some advanced features and ready-to-use \"\n\"solutions found in other frameworks (MVC, ORM, form validation, scaffolding,\"\n\" XML-RPC). Although it *is* possible to add these features and build complex\"\n\" applications with Bottle, you should consider using a full-stack Web \"\n\"framework like pylons_ or paste_ instead.\"\nmsgstr \"\"\n\n#: ../../faq.rst:22\nmsgid \"Common Problems and Pitfalls\"\nmsgstr \"\"\n\n#: ../../faq.rst:29\nmsgid \"\\\"Template Not Found\\\" in mod_wsgi/mod_python\"\nmsgstr \"\"\n\n#: ../../faq.rst:31\nmsgid \"\"\n\"Bottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ \"\n\"or mod_wsgi_ environment, the working directory (``./``) depends on your \"\n\"Apache settings. You should add an absolute path to the template search \"\n\"path::\"\nmsgstr \"\"\n\n#: ../../faq.rst:35\nmsgid \"so bottle searches the right paths.\"\nmsgstr \"\"\n\n#: ../../faq.rst:38\nmsgid \"Dynamic Routes and Slashes\"\nmsgstr \"\"\n\n#: ../../faq.rst:40\nmsgid \"\"\n\"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder \"\n\"token (``<name>``) matches everything up to the next slash. This equals to \"\n\"``[^/]+`` in regular expression syntax. To accept slashes too, you have to \"\n\"add a custom regular pattern to the placeholder. An example: \"\n\"``/images/<filepath:path>`` would match ``/images/icons/error.png`` but \"\n\"``/images/<filename>`` won't.\"\nmsgstr \"\"\n\n#: ../../faq.rst:43\nmsgid \"Problems with reverse proxies\"\nmsgstr \"\"\n\n#: ../../faq.rst:45\nmsgid \"\"\n\"Redirects and url-building only works if bottle knows the public address and\"\n\" location of your application. If you run bottle locally behind a reverse \"\n\"proxy or load balancer, some information might get lost along the way. For \"\n\"example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect \"\n\"the local request by your proxy, not the real request by the client. Here is\"\n\" a small WSGI middleware snippet that helps to fix these values::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../index.rst:20\nmsgid \"Bottle: Python Web Framework\"\nmsgstr \"\"\n\n#: ../../index.rst:22\nmsgid \"\"\n\"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for \"\n\"Python_. It is distributed as a single file module and has no dependencies \"\n\"other than the `Python Standard Library <http://docs.python.org/library/>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:25\nmsgid \"\"\n\"**Routing:** Requests to function-call mapping with support for clean and  \"\n\"dynamic URLs.\"\nmsgstr \"\"\n\n#: ../../index.rst:26\nmsgid \"\"\n\"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-\"\n\"templates>` and support for mako_, jinja2_ and cheetah_ templates.\"\nmsgstr \"\"\n\n#: ../../index.rst:27\nmsgid \"\"\n\"**Utilities:** Convenient access to form data, file uploads, cookies, \"\n\"headers and other HTTP-related metadata.\"\nmsgstr \"\"\n\n#: ../../index.rst:28\nmsgid \"\"\n\"**Server:** Built-in HTTP development server and support for paste_, \"\n\"bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server.\"\nmsgstr \"\"\n\n#: ../../index.rst:31\nmsgid \"Example: \\\"Hello World\\\" in a bottle\"\nmsgstr \"\"\n\n#: ../../index.rst:42\nmsgid \"\"\n\"Run this script or paste it into a Python console, then point your browser \"\n\"to `<http://localhost:8080/hello/world>`_. That's it.\"\nmsgstr \"\"\n\n#: ../../index.rst:45\nmsgid \"Download and Install\"\nmsgstr \"\"\n\n#: ../../index.rst:48\nmsgid \"\"\n\"Install the latest stable release with ``pip install bottle`` or download \"\n\"`bottle.py`__ (unstable) into your project directory. There are no hard [1]_\"\n\" dependencies other than the Python standard library. Bottle supports \"\n\"**Python 2.7 and Python 3**.\"\nmsgstr \"\"\n\n#: ../../index.rst:50\nmsgid \"Support for Python 2.5 and 2.6 was dropped with this release.\"\nmsgstr \"\"\n\n#: ../../index.rst:55\nmsgid \"User's Guide\"\nmsgstr \"\"\n\n#: ../../index.rst:56\nmsgid \"\"\n\"Start here if you want to learn how to use the bottle framework for web \"\n\"development. If you have any questions not answered here, feel free to ask \"\n\"the `mailing list <mailto:bottlepy@googlegroups.com>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:71\nmsgid \"Knowledge Base\"\nmsgstr \"\"\n\n#: ../../index.rst:72\nmsgid \"A collection of articles, guides and HOWTOs.\"\nmsgstr \"\"\n\n#: ../../index.rst:84\nmsgid \"Development and Contribution\"\nmsgstr \"\"\n\n#: ../../index.rst:86\nmsgid \"\"\n\"These chapters are intended for developers interested in the bottle \"\n\"development and release workflow.\"\nmsgstr \"\"\n\n#: ../../index.rst:103\nmsgid \"License\"\nmsgstr \"\"\n\n#: ../../index.rst:105\nmsgid \"Code and documentation are available according to the MIT License:\"\nmsgstr \"\"\n\n#: ../../index.rst:110\nmsgid \"\"\n\"The Bottle logo however is *NOT* covered by that license. It is allowed to \"\n\"use the logo as a link to the bottle homepage or in direct context with the \"\n\"unmodified library. In all other cases please ask first.\"\nmsgstr \"\"\n\n#: ../../index.rst:115\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../index.rst:116\nmsgid \"\"\n\"Usage of the template or server adapter classes requires the corresponding \"\n\"template or server modules.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/plugindev.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../plugindev.rst:6\nmsgid \"Plugin Development Guide\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:8\nmsgid \"\"\n\"This guide explains the plugin API and how to write custom plugins. I \"\n\"suggest reading :ref:`plugins` first if you have not done that already. You \"\n\"might also want to have a look at the :doc:`/plugins/index` for some \"\n\"practical examples.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:12\nmsgid \"\"\n\"This is a draft. If you see any errors or find that a specific part is not \"\n\"explained clear enough, please tell the `mailing-list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or file a `bug report \"\n\"<https://github.com/bottlepy/bottle/issues>`_.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:16\nmsgid \"How Plugins Work: The Basics\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:18\nmsgid \"\"\n\"The plugin API builds on the concept of `decorators \"\n\"<http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, \"\n\"a plugin is a decorator applied to every single route callback of an \"\n\"application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:20\nmsgid \"\"\n\"This is just a simplification. Plugins can do a lot more than just \"\n\"decorating route callbacks, but it is a good starting point. Lets have a \"\n\"look at some code::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:36\nmsgid \"\"\n\"This plugin measures the execution time for each request and adds an \"\n\"appropriate ``X-Exec-Time`` header to the response. As you can see, the \"\n\"plugin returns a wrapper and the wrapper calls the original callback \"\n\"recursively. This is how decorators usually work.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:38\nmsgid \"\"\n\"The last line tells Bottle to install the plugin to the default application.\"\n\" This causes the plugin to be automatically applied to all routes of that \"\n\"application. In other words, ``stopwatch()`` is called once for each route \"\n\"callback and the return value is used as a replacement for the original \"\n\"callback.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:40\nmsgid \"\"\n\"Plugins are applied on demand, that is, as soon as a route is requested for \"\n\"the first time. For this to work properly in multi-threaded environments, \"\n\"the plugin should be thread-safe. This is not a problem most of the time, \"\n\"but keep it in mind.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:42\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped callback is cached and \"\n\"subsequent requests are handled by the cached version directly. This means \"\n\"that a plugin is usually applied only once to a specific route. That cache, \"\n\"however, is cleared every time the list of installed plugins changes. Your \"\n\"plugin should be able to decorate the same route more than once.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:44\nmsgid \"\"\n\"The decorator API is quite limited, though. You don't know anything about \"\n\"the route being decorated or the associated application object and have no \"\n\"way to efficiently store data that is shared among all routes. But fear not!\"\n\" Plugins are not limited to just decorator functions. Bottle accepts \"\n\"anything as a plugin as long as it is callable or implements an extended \"\n\"API. This API is described below and gives you a lot of control over the \"\n\"whole process.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:48\nmsgid \"Plugin API\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:50\nmsgid \"\"\n\":class:`Plugin` is not a real class (you cannot import it from \"\n\":mod:`bottle`) but an interface that plugins are expected to implement. \"\n\"Bottle accepts any object of any type as a plugin, as long as it conforms to\"\n\" the following API.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:54\nmsgid \"\"\n\"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is \"\n\"defined, it is always preferred over calling the plugin directly. All other \"\n\"methods and attributes are optional.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:58\nmsgid \"\"\n\"Both :meth:`Bottle.uninstall` and the `skip` parameter of \"\n\":meth:`Bottle.route()` accept a name string to refer to a plugin or plugin \"\n\"type. This works only for plugins that have a name attribute.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:62\nmsgid \"\"\n\"The Plugin API is still evolving. This integer attribute tells bottle which \"\n\"version to use. If it is missing, bottle defaults to the first version. The \"\n\"current version is ``2``. See :ref:`plugin-changelog` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:66\nmsgid \"\"\n\"Called as soon as the plugin is installed to an application (see \"\n\":meth:`Bottle.install`). The only parameter is the associated application \"\n\"object.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:70\nmsgid \"\"\n\"As long as :meth:`apply` is not defined, the plugin itself is used as a \"\n\"decorator and applied directly to each route callback. The only parameter is\"\n\" the callback to decorate. Whatever is returned by this method replaces the \"\n\"original callback. If there is no need to wrap or replace a given callback, \"\n\"just return the unmodified callback parameter.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:74\nmsgid \"\"\n\"If defined, this method is used in favor of :meth:`__call__` to decorate \"\n\"route callbacks. The additional `route` parameter is an instance of \"\n\":class:`Route` and provides a lot of meta-information and context for that \"\n\"route. See :ref:`route-context` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:78\nmsgid \"\"\n\"Called immediately before the plugin is uninstalled or the application is \"\n\"closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:81\nmsgid \"\"\n\"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for \"\n\"plugins that are applied directly to a route via the :meth:`Bottle.route()` \"\n\"decorator, but only for plugins installed to an application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:87\nmsgid \"Plugin API changes\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:89\nmsgid \"\"\n\"The Plugin API is still evolving and changed with Bottle 0.10 to address \"\n\"certain issues with the route context dictionary. To ensure backwards \"\n\"compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` \"\n\"attribute to tell bottle which API to use. The API differences are \"\n\"summarized here.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:91\nmsgid \"**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:93\nmsgid \"Original Plugin API as described in the 0.9 docs.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:95\nmsgid \"**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:97\nmsgid \"\"\n\"The `context` parameter of the :meth:`Plugin.apply` method is now an \"\n\"instance of :class:`Route` instead of a context dictionary.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:103\nmsgid \"The Route Context\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:105\nmsgid \"\"\n\"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed\"\n\" informations about the associated route. The most important attributes are \"\n\"summarized here:\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"app\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"The application object this route is installed to.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"rule\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"The rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"method\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"name\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"plugins\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"\"\n\"A list of route-specific plugins. These are applied in addition to \"\n\"application-wide plugins. (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"skiplist\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"\"\n\"A list of plugins to not apply to this route (again, see \"\n\":meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"config\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific configuration and \"\n\"meta-data.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:125\nmsgid \"\"\n\"For your plugin, :attr:`Route.config` is probably the most important \"\n\"attribute. Keep in mind that this dictionary is local to the route, but \"\n\"shared between all plugins. It is always a good idea to add a unique prefix \"\n\"or, if your plugin needs a lot of configuration, store it in a separate \"\n\"namespace within the `config` dictionary. This helps to avoid naming \"\n\"collisions between plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:129\nmsgid \"Changing the :class:`Route` object\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:131\nmsgid \"\"\n\"While some :class:`Route` attributes are mutable, changes may have unwanted \"\n\"effects on other plugins. It is most likely a bad idea to monkey-patch a \"\n\"broken route instead of providing a helpful error message and let the user \"\n\"fix the problem.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:133\nmsgid \"\"\n\"In some rare cases, however, it might be justifiable to break this rule. \"\n\"After you made your changes to the :class:`Route` instance, raise \"\n\":exc:`RouteReset` as an exception. This removes the current route from the \"\n\"cache and causes all plugins to be re-applied. The router is not updated, \"\n\"however. Changes to `rule` or `method` values have no effect on the router, \"\n\"but only on plugins. This may change in the future, though.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:137\nmsgid \"Runtime optimizations\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:139\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped route callback is \"\n\"cached to speed up subsequent requests. If the behavior of your plugin \"\n\"depends on configuration, and you want to be able to change that \"\n\"configuration at runtime, you need to read the configuration on each \"\n\"request. Easy enough.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:141\nmsgid \"\"\n\"For performance reasons, however, it might be worthwhile to choose a \"\n\"different wrapper based on current needs, work with closures, or enable or \"\n\"disable a plugin at runtime. Let's take the built-in HooksPlugin as an \"\n\"example: If no hooks are installed, the plugin removes itself from all \"\n\"affected routes and has virtually no overhead. As soon as you install the \"\n\"first hook, the plugin activates itself and takes effect again.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:143\nmsgid \"\"\n\"To achieve this, you need control over the callback cache: \"\n\":meth:`Route.reset` clears the cache for a single route and \"\n\":meth:`Bottle.reset` clears all caches for all routes of an application at \"\n\"once. On the next request, all plugins are re-applied to the route as if it \"\n\"were requested for the first time.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:145\nmsgid \"\"\n\"Both methods won't affect the current request if called from within a route \"\n\"callback, of cause. To force a restart of the current request, raise \"\n\":exc:`RouteReset` as an exception.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:149\nmsgid \"Plugin Example: SQLitePlugin\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:151\nmsgid \"\"\n\"This plugin provides an sqlite3 database connection handle as an additional \"\n\"keyword argument to wrapped callbacks, but only if the callback expects it. \"\n\"If not, the route is ignored and no overhead is added. The wrapper does not \"\n\"affect the return value, but handles plugin-related exceptions properly. \"\n\":meth:`Plugin.setup` is used to inspect the application and search for \"\n\"conflicting plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:218\nmsgid \"\"\n\"This plugin is actually useful and very similar to the version bundled with \"\n\"Bottle. Not bad for less than 60 lines of code, don't you think? Here is a \"\n\"usage example::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:239\nmsgid \"\"\n\"The first route needs a database connection and tells the plugin to create a\"\n\" handle by requesting a ``db`` keyword argument. The second route does not \"\n\"need a database and is therefore ignored by the plugin. The third route does\"\n\" expect a 'db' keyword argument, but explicitly skips the sqlite plugin. \"\n\"This way the argument is not overruled by the plugin and still contains the \"\n\"value of the same-named url argument.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/plugins/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../plugins/index.rst:5\nmsgid \"List of available Plugins\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:7\nmsgid \"\"\n\"This is a list of third-party plugins that add extend Bottles core \"\n\"functionality or integrate other libraries with the Bottle framework.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:9\nmsgid \"\"\n\"Have a look at :ref:`plugins` for general questions about plugins \"\n\"(installation, usage). If you plan to develop a new plugin, the \"\n\":doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"Beaker to session and caching library with WSGI Middleware\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"`Bottle-Cork <http://cork.firelet.net/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"\"\n\"Cork provides a simple set of methods to implement Authentication and \"\n\"Authorization in web applications based on Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"`Bottle-Cors-plugin <http://pypi.org/project/bottle-cors-plugin/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"\"\n\"Cors-plugin is the easiest way to implement cors on your bottle web \"\n\"application\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"Meta package to install the bottle plugin collection.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"flash plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"FIFO Queue for Bottle built upon redis\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"`Macaron <http://nobrin.github.com/macaron/webapp.html>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"Macaron is an object-relational mapper (ORM) for SQLite.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"Memcache integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"MongoDB integration for Bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"`Bottle-OAuthlib <http://pypi.python.org/pypi/bottle-oauthlib/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"Adapter for oauthlib - create your own OAuth2.0 implementation\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"Redis integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"Renderer plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"A reusable app that serves static files for bottle apps\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"SQLAlchemy integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"SQLite3 database integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"Web2py Dal integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"\"\n\"Integrates the `werkzeug` library (alternative request and response objects,\"\n\" advanced debugging middleware and more).\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"\"\n\"`bottle-smart-filters <https://github.com/agile4you/bottle-smart-filters/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"Bottle Querystring smart guessing.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"`bottle-jwt <https://github.com/agile4you/bottle-jwt/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"JSON Web Token authentication plugin for bottle.py\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"`Bottle-jwt <https://github.com/agalera/bottlejwt>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"JWT integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"`canister <https://github.com/dagnelies/canister>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"a bottle wrapper to provide logging, sessions and authentication\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"`bottle-cerberus <https://github.com/agalera/bottle-cerberus>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"Cerberus integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"`Bottle-errorsrest <https://github.com/agalera/bottle-errorsrest>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"All errors generated from bottle are returned in json\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:82\nmsgid \"`Bottle-tools <https://github.com/theSage21/bottle-tools>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:81\nmsgid \"\"\n\"Decorators that auto-supply function arguments using POST/query string data.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:84\nmsgid \"\"\n\"Plugins listed here are not part of Bottle or the Bottle project, but \"\n\"developed and maintained by third parties.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/recipes.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../recipes.rst:16\nmsgid \"Recipes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:18\nmsgid \"\"\n\"This is a collection of code snippets and examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:21\nmsgid \"Keeping track of Sessions\"\nmsgstr \"\"\n\n#: ../../recipes.rst:23\nmsgid \"\"\n\"There is no built-in support for sessions because there is no *right* way to\"\n\" do it (in a micro framework). Depending on requirements and environment you\"\n\" could use beaker_ middleware with a fitting backend or implement it \"\n\"yourself. Here is an example for beaker sessions with a file-based backend::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:45\nmsgid \"\"\n\"WARNING: Beaker's SessionMiddleware is not thread safe.  If two concurrent \"\n\"requests modify the same session at the same time, one of the updates might \"\n\"get lost. For this reason, sessions should only be populated once and \"\n\"treated as a read-only store after that. If you find yourself updating \"\n\"sessions regularly, and don't want to risk losing any updates, think about \"\n\"using a real database instead or seek alternative session middleware \"\n\"libraries.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:49\nmsgid \"Debugging with Style: Debugging Middleware\"\nmsgstr \"\"\n\n#: ../../recipes.rst:51\nmsgid \"\"\n\"Bottle catches all Exceptions raised in your app code to prevent your WSGI \"\n\"server from crashing. If the built-in :func:`debug` mode is not enough and \"\n\"you need exceptions to propagate to a debugging middleware, you can turn off\"\n\" this behaviour::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:59\nmsgid \"\"\n\"Now, bottle only catches its own exceptions (:exc:`HTTPError`, \"\n\":exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can \"\n\"handle the rest.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:61\nmsgid \"\"\n\"The werkzeug_ and paste_ libraries both ship with very powerful debugging \"\n\"WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for \"\n\"werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for \"\n\"paste_. They both allow you do inspect the stack and even execute python \"\n\"code within the stack context, so **do not use them in production**.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:65\nmsgid \"Unit-Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:67\nmsgid \"\"\n\"Unit-testing is usually performed against methods defined in your web \"\n\"application without running a WSGI environment.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:69\nmsgid \"A simple example using `Nose <http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:80 ../../recipes.rst:97\nmsgid \"Test script::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:87\nmsgid \"\"\n\"In the example the Bottle route() method is never executed - only index() is\"\n\" tested.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:89\nmsgid \"\"\n\"If the code being tested requires access to ``bottle.request`` you can mock \"\n\"it using `Boddle <https://github.com/keredson/boddle>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:108\nmsgid \"Functional Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:110\nmsgid \"\"\n\"Any HTTP-based testing system can be used with a running WSGI server, but \"\n\"some testing frameworks work more intimately with WSGI, and provide the \"\n\"ability the call WSGI applications in a controlled environment, with \"\n\"tracebacks and full use of debugging tools. `Testing tools for WSGI \"\n\"<http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:112\nmsgid \"\"\n\"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose \"\n\"<http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:132\nmsgid \"Embedding other WSGI Apps\"\nmsgstr \"\"\n\n#: ../../recipes.rst:134\nmsgid \"\"\n\"This is not the recommend way (you should use a middleware in front of \"\n\"bottle to do this) but you can call other WSGI applications from within your\"\n\" bottle app and let bottle act as a pseudo-middleware. Here is an example::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:150\nmsgid \"\"\n\"Again, this is not the recommend way to implement subprojects. It is only \"\n\"here because many people asked for this and to show how bottle maps to WSGI.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:154\nmsgid \"Ignore trailing slashes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:156\nmsgid \"\"\n\"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To\"\n\" treat both URLs the same you can add two ``@route`` decorators::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:162\nmsgid \"add a WSGI middleware that strips trailing slashes from all URLs::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:175\nmsgid \"or add a ``before_request`` hook to strip the trailing slashes::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:182\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:183\nmsgid \"Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>\"\nmsgstr \"\"\n\n#: ../../recipes.rst:187\nmsgid \"Keep-alive requests\"\nmsgstr \"\"\n\n#: ../../recipes.rst:191\nmsgid \"For a more detailed explanation, see :doc:`async`.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:193\nmsgid \"\"\n\"Several \\\"push\\\" mechanisms like XHR multipart need the ability to write \"\n\"response data without closing the connection in conjunction with the \"\n\"response header \\\"Connection: keep-alive\\\". WSGI does not easily lend itself\"\n\" to this behavior, but it is still possible to do so in Bottle by using the \"\n\"gevent_ async framework. Here is a sample that works with either the gevent_\"\n\" HTTP server or the paste_ HTTP server (it may work with others, but I have \"\n\"not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the\"\n\" paste_ server::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:210\nmsgid \"\"\n\"If you browse to ``http://localhost:8080/stream``, you should see 'START', \"\n\"'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to \"\n\"see them all at once).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:213\nmsgid \"Gzip Compression in Bottle\"\nmsgstr \"\"\n\n#: ../../recipes.rst:216\nmsgid \"For a detailed discussion, see compression_\"\nmsgstr \"\"\n\n#: ../../recipes.rst:218\nmsgid \"\"\n\"A common feature request is for Bottle to support Gzip compression, which \"\n\"speeds up sites by compressing static resources (like CSS and JS files) \"\n\"during a request.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:220\nmsgid \"\"\n\"Supporting Gzip compression is not a straightforward proposition, due to a \"\n\"number of corner cases that crop up frequently. A proper Gzip implementation\"\n\" must:\"\nmsgstr \"\"\n\n#: ../../recipes.rst:222\nmsgid \"Compress on the fly and be fast doing so.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:223\nmsgid \"Do not compress for browsers that don't support it.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:224\nmsgid \"Do not compress files that are compressed already (images, videos).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:225\nmsgid \"Do not compress dynamic files.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:226\nmsgid \"Support two differed compression algorithms (gzip and deflate).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:227\nmsgid \"Cache compressed files that don't change often.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:228\nmsgid \"De-validate the cache if one of the files changed anyway.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:229\nmsgid \"Make sure the cache does not get to big.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:230\nmsgid \"\"\n\"Do not cache small files because a disk seek would take longer than on-the-\"\n\"fly compression.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:232\nmsgid \"\"\n\"Because of these requirements, it is the recommendation of the Bottle \"\n\"project that Gzip compression is best handled by the WSGI server Bottle runs\"\n\" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware \"\n\"that can be used to accomplish this.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:236\nmsgid \"Using the hooks plugin\"\nmsgstr \"\"\n\n#: ../../recipes.rst:238\nmsgid \"\"\n\"For example, if you want to allow Cross-Origin Resource Sharing for the \"\n\"content returned by all of your URL, you can use the hook decorator and \"\n\"setup a callback function::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:256\nmsgid \"\"\n\"You can also use the ``before_request`` to take an action before every \"\n\"function gets called.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:261\nmsgid \"Using Bottle with Heroku\"\nmsgstr \"\"\n\n#: ../../recipes.rst:263\nmsgid \"\"\n\"Heroku_, a popular cloud application platform now provides support for \"\n\"running Python applications on their infastructure.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:266\nmsgid \"\"\n\"This recipe is based upon the `Heroku Quickstart \"\n\"<http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific \"\n\"code replacing the `Write Your App \"\n\"<http://devcenter.heroku.com/articles/python#write_your_app>`_ section of \"\n\"the `Getting Started with Python on Heroku/Cedar \"\n\"<http://devcenter.heroku.com/articles/python>`_ guide::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:282\nmsgid \"\"\n\"Heroku's app stack passes the port that the application needs to listen on \"\n\"for requests, using the `os.environ` dictionary.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/routing.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../routing.rst:3\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../routing.rst:5\nmsgid \"\"\n\"Bottle uses a powerful routing engine to find the right callback for each \"\n\"request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This \"\n\"document covers advanced techniques and rule mechanics in detail.\"\nmsgstr \"\"\n\n#: ../../routing.rst:8\nmsgid \"Rule Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:10\nmsgid \"\"\n\"The :class:`Router` distinguishes between two basic types of routes: \"\n\"**static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. \"\n\"``/hello/<name>``). A route that contains one or more *wildcards* it is \"\n\"considered dynamic. All other routes are static.\"\nmsgstr \"\"\n\n#: ../../routing.rst:14\nmsgid \"\"\n\"The simplest form of a wildcard consists of a name enclosed in angle \"\n\"brackets (e.g. ``<name>``). The name should be unique for a given route and \"\n\"form a valid python identifier (alphanumeric, starting with a letter). This \"\n\"is because wildcards are used as keyword arguments for the request callback \"\n\"later.\"\nmsgstr \"\"\n\n#: ../../routing.rst:16\nmsgid \"\"\n\"Each wildcard matches one or more characters, but stops at the first slash \"\n\"(``/``). This equals a regular expression of ``[^/]+`` and ensures that only\"\n\" one path segment is matched and routes with more than one wildcard stay \"\n\"unambiguous.\"\nmsgstr \"\"\n\n#: ../../routing.rst:18\nmsgid \"The rule ``/<action>/<item>`` matches as follows:\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Path\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Result\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"/save/123\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"``{'action': 'save', 'item': '123'}``\"\nmsgstr \"\"\n\n#: ../../routing.rst:24\nmsgid \"/save/123/\"\nmsgstr \"\"\n\n#: ../../routing.rst:24 ../../routing.rst:25 ../../routing.rst:26\nmsgid \"`No Match`\"\nmsgstr \"\"\n\n#: ../../routing.rst:25\nmsgid \"/save/\"\nmsgstr \"\"\n\n#: ../../routing.rst:26\nmsgid \"//123\"\nmsgstr \"\"\n\n#: ../../routing.rst:29\nmsgid \"\"\n\"Is it possible to escape characters like colon ``:`` with a backslash \"\n\"``\\\\``. This will prevent to trigger the old syntax in case you need to use \"\n\"``:``. For example: the rule ``/<action>/item:<id>`` triggers the old \"\n\"syntax, (see below) but ``/action/item\\\\:<id>`` works as intended with the \"\n\"new syntax.\"\nmsgstr \"\"\n\n#: ../../routing.rst:33\nmsgid \"\"\n\"You can change the exact behaviour in many ways using filters. This is \"\n\"described in the next section.\"\nmsgstr \"\"\n\n#: ../../routing.rst:36\nmsgid \"Wildcard Filters\"\nmsgstr \"\"\n\n#: ../../routing.rst:40\nmsgid \"\"\n\"Filters are used to define more specific wildcards, and/or transform the \"\n\"matched part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../routing.rst:42\nmsgid \"The following standard filters are implemented:\"\nmsgstr \"\"\n\n#: ../../routing.rst:44\nmsgid \"**:int** matches (signed) digits and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../routing.rst:45\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../routing.rst:46\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and may be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../routing.rst:47\nmsgid \"\"\n\"**:re[:exp]** allows you to specify a custom regular expression in the \"\n\"config field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../routing.rst:49\nmsgid \"\"\n\"You can add your own filters to the router. All you need is a function that \"\n\"returns three elements: A regular expression string, a callable to convert \"\n\"the URL fragment to a python value, and a callable that does the opposite. \"\n\"The filter function is called with the configuration string as the only \"\n\"parameter and may parse it as needed::\"\nmsgstr \"\"\n\n#: ../../routing.rst:75\nmsgid \"Legacy Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:79\nmsgid \"\"\n\"The new rule syntax was introduce in **Bottle 0.10** to simplify some common\"\n\" use cases, but the old syntax still works and you can find lot code \"\n\"examples still using it. The differences are best described by example:\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"Old Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"New Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:90\nmsgid \"\"\n\"Try to avoid the old syntax in future projects if you can. It is not \"\n\"currently deprecated, but will be eventually.\"\nmsgstr \"\"\n\n#: ../../routing.rst:95\nmsgid \"Explicit routing configuration\"\nmsgstr \"\"\n\n#: ../../routing.rst:97\nmsgid \"\"\n\"Route decorator can also be directly called as method. This way provides \"\n\"flexibility in complex setups, allowing you to directly control, when and \"\n\"how routing configuration done.\"\nmsgstr \"\"\n\n#: ../../routing.rst:99\nmsgid \"\"\n\"Here is a basic example of explicit routing configuration for default bottle\"\n\" application::\"\nmsgstr \"\"\n\n#: ../../routing.rst:105\nmsgid \"\"\n\"In fact, any :class:`Bottle` instance routing can be configured same way::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/stpl.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../stpl.rst:3\nmsgid \"SimpleTemplate Engine\"\nmsgstr \"\"\n\n#: ../../stpl.rst:7\nmsgid \"\"\n\"Bottle comes with a fast, powerful and easy to learn built-in template \"\n\"engine called *SimpleTemplate* or *stpl* for short. It is the default engine\"\n\" used by the :func:`view` and :func:`template` helpers but can be used as a \"\n\"stand-alone general purpose template engine too. This document explains the \"\n\"template syntax and shows examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:10\nmsgid \"Basic API Usage:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:11\nmsgid \":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:18\nmsgid \"\"\n\"In this document we use the :func:`template` helper in examples for the sake\"\n\" of simplicity::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:24\nmsgid \"\"\n\"You can also pass a dictionary into the template using keyword arguments::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:31\nmsgid \"\"\n\"Just keep in mind that compiling and rendering templates are two different \"\n\"actions, even if the :func:`template` helper hides this fact. Templates are \"\n\"usually compiled only once and cached internally, but rendered many times \"\n\"with different keyword arguments.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:34\nmsgid \":class:`SimpleTemplate` Syntax\"\nmsgstr \"\"\n\n#: ../../stpl.rst:36\nmsgid \"\"\n\"Python is a very powerful language but its whitespace-aware syntax makes it \"\n\"difficult to use as a template language. SimpleTemplate removes some of \"\n\"these restrictions and allows you to write clean, readable and maintainable \"\n\"templates while preserving full access to the features, libraries and speed \"\n\"of the Python language.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:40\nmsgid \"\"\n\"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and \"\n\"is executed on each :meth:`SimpleTemplate.render` call. Do not render \"\n\"untrusted templates! They may contain and execute harmful python code.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:43\nmsgid \"Inline Expressions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:45\nmsgid \"\"\n\"You already learned the use of the ``{{...}}`` syntax from the \\\"Hello \"\n\"World!\\\" example above, but there is more: any python expression is allowed \"\n\"within the curly brackets as long as it evaluates to a string or something \"\n\"that has a string representation::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:54\nmsgid \"\"\n\"The contained python expression is executed at render-time and has access to\"\n\" all keyword arguments passed to the :meth:`SimpleTemplate.render` method. \"\n\"HTML special characters are escaped automatically to prevent `XSS \"\n\"<http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start\"\n\" the expression with an exclamation mark to disable escaping for that \"\n\"expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:62\nmsgid \"Embedded python code\"\nmsgstr \"\"\n\n#: ../../stpl.rst:66\nmsgid \"\"\n\"The template engine allows you to embed lines or blocks of python code \"\n\"within your template. Code lines start with ``%`` and code blocks are \"\n\"surrounded by ``<%`` and ``%>`` tokens::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:76\nmsgid \"\"\n\"Embedded python code follows regular python syntax, but with two additional \"\n\"syntax rules:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:78\nmsgid \"\"\n\"**Indentation is ignored.** You can put as much whitespace in front of \"\n\"statements as you want. This allows you to align your code with the \"\n\"surrounding markup and can greatly improve readability.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:79\nmsgid \"\"\n\"Blocks that are normally indented now have to be closed explicitly with an \"\n\"``end`` keyword.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:89\nmsgid \"\"\n\"Both the ``%`` and the ``<%`` tokens are only recognized if they are the \"\n\"first non-whitespace characters in a line. You don't have to escape them if \"\n\"they appear mid-text in your template markup. Only if a line of text starts \"\n\"with one of these tokens, you have to escape it with a backslash. In the \"\n\"rare case where the backslash + token combination appears in your markup at \"\n\"the beginning of a line, you can always help yourself with a string literal \"\n\"in an inline expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:96\nmsgid \"\"\n\"If you find yourself needing to escape a lot, consider using :ref:`custom \"\n\"tokens <stpl-custom-tokens>`.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:98\nmsgid \"\"\n\"Note that ``%`` and ``<% %>`` work in *exactly* the same way. The latter is \"\n\"only a convenient way to type less and avoid clutter for longer code \"\n\"segments. This means that in ``<% %>`` blocks, all indented code must be \"\n\"terminated with an ``end``, as in the following example::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:114\nmsgid \"Whitespace Control\"\nmsgstr \"\"\n\n#: ../../stpl.rst:116\nmsgid \"\"\n\"Code blocks and code lines always span the whole line. Whitespace in front \"\n\"of after a code segment is stripped away. You won't see empty lines or \"\n\"dangling whitespace in your template because of embedded code::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:124\nmsgid \"This snippet renders to clean and compact html::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:130\nmsgid \"\"\n\"But embedding code still requires you to start a new line, which may not \"\n\"what you want to see in your rendered template. To skip the newline in front\"\n\" of a code segment, end the text line with a double-backslash::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:138\nmsgid \"This time the rendered template looks like this::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:142\nmsgid \"\"\n\"This only works directly in front of code segments. In all other places you \"\n\"can control the whitespace yourself and don't need any special syntax.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:145\nmsgid \"Template Functions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:147\nmsgid \"\"\n\"Each template is preloaded with a bunch of functions that help with the most\"\n\" common use cases. These functions are always available. You don't have to \"\n\"import or provide them yourself. For everything not covered here there are \"\n\"probably good python libraries available. Remember that you can ``import`` \"\n\"anything you want within your templates. They are python programs after all.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:151\nmsgid \"\"\n\"Prior to this release, :func:`include` and :func:`rebase` were syntax \"\n\"keywords, not functions.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:156\nmsgid \"\"\n\"Render a sub-template with the specified variables and insert the resulting \"\n\"text into the current template. The function returns a dictionary containing\"\n\" the local variables passed to or defined within the sub-template::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:164\nmsgid \"\"\n\"Mark the current template to be later included into a different template. \"\n\"After the current template is rendered, its resulting text is stored in a \"\n\"variable named ``base`` and passed to the base-template, which is then \"\n\"rendered. This can be used to `wrap` a template with surrounding text, or \"\n\"simulate the inheritance feature found in other template engines::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:169\nmsgid \"This can be combined with the following ``base.tpl``::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:181\nmsgid \"\"\n\"Accessing undefined variables in a template raises :exc:`NameError` and \"\n\"stops rendering immediately. This is standard python behavior and nothing \"\n\"new, but vanilla python lacks an easy way to check the availability of a \"\n\"variable. This quickly gets annoying if you want to support flexible inputs \"\n\"or use the same template in different situations. These functions may help:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:189\nmsgid \"\"\n\"Return True if the variable is defined in the current template namespace, \"\n\"False otherwise.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:194\nmsgid \"Return the variable, or a default value.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:198\nmsgid \"\"\n\"If the variable is not defined, create it with the given default value. \"\n\"Return the variable.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:201\nmsgid \"\"\n\"Here is an example that uses all three functions to implement optional \"\n\"template variables in different ways::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:215\nmsgid \":class:`SimpleTemplate` API\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.render:1\nmsgid \"Render the template using keyword arguments as local variables.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/tutorial.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Aleksandra Ikonnikova, 2019\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../tutorial.rst:24\nmsgid \"Tutorial\"\nmsgstr \"Руководство\"\n\n#: ../../tutorial.rst:26\nmsgid \"\"\n\"This tutorial introduces you to the concepts and features of the Bottle web \"\n\"framework and covers basic and advanced topics alike. You can read it from \"\n\"start to end, or use it as a reference later on. The automatically generated\"\n\" :doc:`api` may be interesting for you, too. It covers more details, but \"\n\"explains less than this tutorial. Solutions for the most common questions \"\n\"can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If \"\n\"you need any help, join our `mailing list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"Данное руководство являет собой описание принципов и функций веб-фреймворка Bottle и рассматривает как общие, так и более углубленные темы. Руководство можно читать сразу целиком либо использовать как справочный материал по мере надобности. Интерес может также представить автоматически герерируемый :doc:`api`, в котором включено больше технических подробностей, но меньше объяснений, чем в данном руководстве. Решения на наиболее часто задаваемые вопросы можно найти в нашей подборке :doc:`recipes` либо на странице :doc:`faq`. Если вам требуется какая-либо помощь или поддержка, подписывайтесь на нашу рассылку `mailing list <mailto:bottlepy@googlegroups.com>`_ либо заходите на наш канал `IRC channel <http://webchat.freenode.net/?channels=bottlepy>`_.\"\n\n#: ../../tutorial.rst:31\nmsgid \"Installation\"\nmsgstr \"Установка\"\n\n#: ../../tutorial.rst:33\nmsgid \"\"\n\"Bottle does not depend on any external libraries. You can just download \"\n\"`bottle.py </bottle.py>`_ into your project directory and start coding:\"\nmsgstr \"Bottle не зависит от внешних библиотек. `bottle.py </bottle.py>`_ можно скачать в ваш каталог с проектом и начать писать код:\"\n\n#: ../../tutorial.rst:39\nmsgid \"\"\n\"This will get you the latest development snapshot that includes all the new \"\n\"features. If you prefer a more stable environment, you should stick with the\"\n\" stable releases. These are available on `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_ and can be installed via \"\n\":command:`pip` (recommended), :command:`easy_install` or your package \"\n\"manager:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:47\nmsgid \"\"\n\"Either way, you'll need Python 2.7 or newer (including 3.4+) to run bottle \"\n\"applications. If you do not have permissions to install packages system-wide\"\n\" or simply don't want to, create a `virtualenv \"\n\"<http://pypi.python.org/pypi/virtualenv>`_ first:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:55\nmsgid \"Or, if virtualenv is not installed on your system:\"\nmsgstr \"Или, если virtualenv не установлено на вашей системе:\"\n\n#: ../../tutorial.rst:67\nmsgid \"Quickstart: \\\"Hello World\\\"\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:69\nmsgid \"\"\n\"This tutorial assumes you have Bottle either :ref:`installed <installation>`\"\n\" or copied into your project directory. Let's start with a very basic \"\n\"\\\"Hello World\\\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:79\nmsgid \"\"\n\"This is it. Run this script, visit http://localhost:8080/hello and you will \"\n\"see \\\"Hello World!\\\" in your browser. Here is how it works:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:81\nmsgid \"\"\n\"The :func:`route` decorator binds a piece of code to an URL path. In this \"\n\"case, we link the ``/hello`` path to the ``hello()`` function. This is \"\n\"called a `route` (hence the decorator name) and is the most important \"\n\"concept of this framework. You can define as many routes as you want. \"\n\"Whenever a browser requests a URL, the associated function is called and the\"\n\" return value is sent back to the browser. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:83\nmsgid \"\"\n\"The :func:`run` call in the last line starts a built-in development server. \"\n\"It runs on ``localhost`` port ``8080`` and serves requests until you hit \"\n\":kbd:`Control-c`. You can switch the server backend later, but for now a \"\n\"development server is all we need. It requires no setup at all and is an \"\n\"incredibly painless way to get your application up and running for local \"\n\"tests.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:85\nmsgid \"\"\n\"The :ref:`tutorial-debugging` is very helpful during early development, but \"\n\"should be switched off for public applications. Keep that in mind.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:87\nmsgid \"\"\n\"This is just a demonstration of the basic concept of how applications are \"\n\"built with Bottle. Continue reading and you'll see what else is possible.\"\nmsgstr \"Это - всего лишь пример основных принципов, по которым с помощью Bottle строятся приложения. Читайте дальше, чтобы узнать больше о возможностях Bottle.\"\n\n#: ../../tutorial.rst:92\nmsgid \"The Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:94\nmsgid \"\"\n\"For the sake of simplicity, most examples in this tutorial use a module-\"\n\"level :func:`route` decorator to define routes. This adds routes to a global\"\n\" \\\"default application\\\", an instance of :class:`Bottle` that is \"\n\"automatically created the first time you call :func:`route`. Several other \"\n\"module-level decorators and functions relate to this default application, \"\n\"but if you prefer a more object oriented approach and don't mind the extra \"\n\"typing, you can create a separate application object and use that instead of\"\n\" the global one::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:106\nmsgid \"\"\n\"The object-oriented approach is further described in the :ref:`default-app` \"\n\"section. Just keep in mind that you have a choice.\"\nmsgstr \"Объектно-ориентированный подход описывается более подробно в разделе :ref:`default-app`. Помните, что выбор за вами.\"\n\n#: ../../tutorial.rst:114\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:116\nmsgid \"\"\n\"In the last chapter we built a very simple web application with only a \"\n\"single route. Here is the routing part of the \\\"Hello World\\\" example \"\n\"again::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:122\nmsgid \"\"\n\"The :func:`route` decorator links an URL path to a callback function, and \"\n\"adds a new route to the :ref:`default application <tutorial-default>`. An \"\n\"application with just one route is kind of boring, though. Let's add some \"\n\"more (don't forget ``from bottle import template``)::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:129\nmsgid \"\"\n\"This example demonstrates two things: You can bind more than one route to a \"\n\"single callback, and you can add wildcards to URLs and access them via \"\n\"keyword arguments.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:136\nmsgid \"Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:138\nmsgid \"\"\n\"Routes that contain wildcards are called `dynamic routes` (as opposed to \"\n\"`static routes`) and match more than one URL at the same time. A simple \"\n\"wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and\"\n\" accepts one or more characters up to the next slash (``/``). For example, \"\n\"the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as\"\n\" ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:140\nmsgid \"\"\n\"Each wildcard passes the covered part of the URL as a keyword argument to \"\n\"the request callback. You can use them right away and implement RESTful, \"\n\"nice-looking and meaningful URLs with ease. Here are some other examples \"\n\"along with the URLs they'd match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:150\nmsgid \"\"\n\"Filters can be used to define more specific wildcards, and/or transform the \"\n\"covered part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:152\nmsgid \"\"\n\"The following filters are implemented by default and more may be added:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:154\nmsgid \"\"\n\"**:int** matches (signed) digits only and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:155\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:156\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and can be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:157\nmsgid \"\"\n\"**:re** allows you to specify a custom regular expression in the config \"\n\"field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:159\nmsgid \"Let's have a look at some practical examples::\"\nmsgstr \"Рассмотрим некоторые практические примеры::\"\n\n#: ../../tutorial.rst:173\nmsgid \"You can add your own filters as well. See :doc:`routing` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:177\nmsgid \"HTTP Request Methods\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:181\nmsgid \"\"\n\"The HTTP protocol defines several `request methods`__ (sometimes referred to\"\n\" as \\\"verbs\\\") for different tasks. GET is the default for all routes with \"\n\"no other method specified. These routes will match GET requests only. To \"\n\"handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` \"\n\"keyword argument to the :func:`route` decorator or use one of the five \"\n\"alternative decorators: :func:`get`, :func:`post`, :func:`put`, \"\n\":func:`delete` or :func:`patch`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:183\nmsgid \"\"\n\"The POST method is commonly used for HTML form submission. This example \"\n\"shows how to handle a login form using POST::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:206\nmsgid \"\"\n\"In this example the ``/login`` URL is linked to two distinct callbacks, one \"\n\"for GET requests and another for POST requests. The first one displays a \"\n\"HTML form to the user. The second callback is invoked on a form submission \"\n\"and checks the login credentials the user entered into the form. The use of \"\n\":attr:`Request.forms` is further described in the :ref:`tutorial-request` \"\n\"section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:209\nmsgid \"Special Methods: HEAD and ANY\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:210\nmsgid \"\"\n\"The HEAD method is used to ask for the response identical to the one that \"\n\"would correspond to a GET request, but without the response body. This is \"\n\"useful for retrieving meta-information about a resource without having to \"\n\"download the entire document. Bottle handles these requests automatically by\"\n\" falling back to the corresponding GET route and cutting off the request \"\n\"body, if present. You don't have to specify any HEAD routes yourself.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:212\nmsgid \"\"\n\"Additionally, the non-standard ANY method works as a low priority fallback: \"\n\"Routes that listen to ANY will match requests regardless of their HTTP \"\n\"method but only if no other more specific route is defined. This is helpful \"\n\"for *proxy-routes* that redirect requests to more specific sub-applications.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:214\nmsgid \"\"\n\"To sum it up: HEAD requests fall back to GET routes and all requests fall \"\n\"back to ANY routes, but only if there is no matching route for the original \"\n\"request method. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:219\nmsgid \"Routing Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:221\nmsgid \"\"\n\"Static files such as images or CSS files are not served automatically. You \"\n\"have to add a route and a callback to control which files get served and \"\n\"where to find them::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:228\nmsgid \"\"\n\"The :func:`static_file` function is a helper to serve files in a safe and \"\n\"convenient way (see :ref:`tutorial-static-files`). This example is limited \"\n\"to files directly within the ``/path/to/your/static/files`` directory \"\n\"because the ``<filename>`` wildcard won't match a path with a slash in it. \"\n\"To serve files in subdirectories, change the wildcard to use the `path` \"\n\"filter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:234\nmsgid \"\"\n\"Be careful when specifying a relative root-path such as \"\n\"``root='./static/files'``. The working directory (``./``) and the project \"\n\"directory are not always the same.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:242\nmsgid \"Error Pages\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:244\nmsgid \"\"\n\"If anything goes wrong, Bottle displays an informative but fairly plain \"\n\"error page. You can override the default for a specific HTTP status code \"\n\"with the :func:`error` decorator::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:251\nmsgid \"\"\n\"From now on, `404 File not Found` errors will display a custom error page to\"\n\" the user. The only parameter passed to the error-handler is an instance of \"\n\":exc:`HTTPError`. Apart from that, an error-handler is quite similar to a \"\n\"regular request callback. You can read from :data:`request`, write to \"\n\":data:`response` and return any supported data-type except for \"\n\":exc:`HTTPError` instances.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:253\nmsgid \"\"\n\"Error handlers are used only if your application returns or raises an \"\n\":exc:`HTTPError` exception (:func:`abort` does just that). Changing \"\n\":attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the \"\n\"error handler.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:263\nmsgid \"Generating content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:265\nmsgid \"\"\n\"In pure WSGI, the range of types you may return from your application is \"\n\"very limited. Applications must return an iterable yielding byte strings. \"\n\"You may return a string (because strings are iterable) but this causes most \"\n\"servers to transmit your content char by char. Unicode strings are not \"\n\"allowed at all. This is not very practical.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:267\nmsgid \"\"\n\"Bottle is much more flexible and supports a wide range of types. It even \"\n\"adds a ``Content-Length`` header if possible and encodes unicode \"\n\"automatically, so you don't have to. What follows is a list of data types \"\n\"you may return from your application callbacks and a short description of \"\n\"how these are handled by the framework:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"Dictionaries\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"\"\n\"As mentioned above, Python dictionaries (or subclasses thereof) are \"\n\"automatically transformed into JSON strings and returned to the browser with\"\n\" the ``Content-Type`` header set to ``application/json``. This makes it easy\"\n\" to implement json-based APIs. Data formats other than json are supported \"\n\"too. See the :ref:`tutorial-output-filter` to learn more.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"Empty Strings, ``False``, ``None`` or other non-true values:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"\"\n\"These produce an empty output with the ``Content-Length`` header set to 0.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"Unicode strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:276\nmsgid \"\"\n\"Unicode strings (or iterables yielding unicode strings) are automatically \"\n\"encoded with the codec specified in the ``Content-Type`` header (utf8 by \"\n\"default) and then treated as normal byte strings (see below).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"Byte strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"\"\n\"Bottle returns strings as a whole (instead of iterating over each char) and \"\n\"adds a ``Content-Length`` header based on the string length. Lists of byte \"\n\"strings are joined first. Other iterables yielding byte strings are not \"\n\"joined because they may grow too big to fit into memory. The ``Content-\"\n\"Length`` header is not set in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"Instances of :exc:`HTTPError` or :exc:`HTTPResponse`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"\"\n\"Returning these has the same effect as when raising them as an exception. In\"\n\" case of an :exc:`HTTPError`, the error handler is applied. See :ref\"\n\":`tutorial-errorhandling` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"File objects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"\"\n\"Everything that has a ``.read()`` method is treated as a file or file-like \"\n\"object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI \"\n\"server framework. Some WSGI server implementations can make use of optimized\"\n\" system calls (sendfile) to transmit files more efficiently. In other cases \"\n\"this just iterates over chunks that fit into memory. Optional headers such \"\n\"as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use \"\n\":func:`send_file` if possible. See :ref:`tutorial-static-files` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"Iterables and generators\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"\"\n\"You are allowed to use ``yield`` within your callbacks or return an \"\n\"iterable, as long as the iterable yields byte strings, unicode strings, \"\n\":exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not \"\n\"supported, sorry. Please note that the HTTP status code and the headers are \"\n\"sent to the browser as soon as the iterable yields its first non-empty \"\n\"value. Changing these later has no effect.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:290\nmsgid \"\"\n\"The ordering of this list is significant. You may for example return a \"\n\"subclass of :class:`str` with a ``read()`` method. It is still treated as a \"\n\"string instead of a file, because strings are handled first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:293\nmsgid \"Changing the Default Encoding\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:294\nmsgid \"\"\n\"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide\"\n\" how to encode unicode strings. This header defaults to ``text/html; \"\n\"charset=UTF8`` and can be changed using the :attr:`Response.content_type` \"\n\"attribute or by setting the :attr:`Response.charset` attribute directly. \"\n\"(The :class:`Response` object is described in the section :ref:`tutorial-\"\n\"response`.)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:309\nmsgid \"\"\n\"In some rare cases the Python encoding names differ from the names supported\"\n\" by the HTTP specification. Then, you have to do both: first set the \"\n\":attr:`Response.content_type` header (which is sent to the client unchanged)\"\n\" and then set the :attr:`Response.charset` attribute (which is used to \"\n\"encode unicode).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:314\nmsgid \"Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:316\nmsgid \"\"\n\"You can directly return file objects, but :func:`static_file` is the \"\n\"recommended way to serve static files. It automatically guesses a mime-type,\"\n\" adds a ``Last-Modified`` header, restricts paths to a ``root`` directory \"\n\"for security reasons and generates appropriate error responses (403 on \"\n\"permission errors, 404 on missing files). It even supports the ``If-\"\n\"Modified-Since`` header and eventually generates a ``304 Not Modified`` \"\n\"response. You can pass a custom MIME type to disable guessing.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:329\nmsgid \"\"\n\"You can raise the return value of :func:`static_file` as an exception if you\"\n\" really need to.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:332\nmsgid \"Forced Download\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:333\nmsgid \"\"\n\"Most browsers try to open downloaded files if the MIME type is known and \"\n\"assigned to an application (e.g. PDF files). If this is not what you want, \"\n\"you can force a download dialog and even suggest a filename to the user::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:339\nmsgid \"\"\n\"If the ``download`` parameter is just ``True``, the original filename is \"\n\"used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:344\nmsgid \"HTTP Errors and Redirects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:346\nmsgid \"\"\n\"The :func:`abort` function is a shortcut for generating HTTP error pages.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:355\nmsgid \"\"\n\"To redirect a client to a different URL, you can send a ``303 See Other`` \"\n\"response with the ``Location`` header set to the new URL. :func:`redirect` \"\n\"does that for you::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:362\nmsgid \"You may provide a different HTTP status code as a second parameter.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:365\nmsgid \"\"\n\"Both functions will interrupt your callback code by raising an \"\n\":exc:`HTTPResponse` exception.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:368\nmsgid \"Other Exceptions\"\nmsgstr \"Прочие исключения\"\n\n#: ../../tutorial.rst:369\nmsgid \"\"\n\"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will \"\n\"result in a ``500 Internal Server Error`` response, so they won't crash your\"\n\" WSGI server. You can turn off this behavior to handle exceptions in your \"\n\"middleware by setting ``bottle.app().catchall`` to ``False``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:375\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:377\nmsgid \"\"\n\"Response metadata such as the HTTP status code, response headers and cookies\"\n\" are stored in an object called :data:`response` up to the point where they \"\n\"are transmitted to the browser. You can manipulate these metadata directly \"\n\"or use the predefined helper methods to do so. The full API and feature list\"\n\" is described in the API section (see :class:`Response`), but the most \"\n\"common use cases and features are covered here, too.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:380\nmsgid \"Status Code\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:381\nmsgid \"\"\n\"The `HTTP status code <http_code>`_ controls the behavior of the browser and\"\n\" defaults to ``200 OK``. In most scenarios you won't need to set the \"\n\":attr:`Response.status` attribute manually, but use the :func:`abort` helper\"\n\" or return an :exc:`HTTPResponse` instance with the appropriate status code.\"\n\" Any integer is allowed, but codes other than the ones defined by the `HTTP \"\n\"specification <http_code>`_ will only confuse the browser and break \"\n\"standards.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:384\nmsgid \"Response Header\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:385\nmsgid \"\"\n\"Response headers such as ``Cache-Control`` or ``Location`` are defined via \"\n\":meth:`Response.set_header`. This method takes two parameters, a header name\"\n\" and a value. The name part is case-insensitive::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:392\nmsgid \"\"\n\"Most headers are unique, meaning that only one header per name is send to \"\n\"the client. Some special headers however are allowed to appear more than \"\n\"once in a response. To add an additional header, use \"\n\":meth:`Response.add_header` instead of :meth:`Response.set_header`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:397\nmsgid \"\"\n\"Please note that this is just an example. If you want to work with cookies, \"\n\"read :ref:`ahead <tutorial-cookies>`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:403 ../../tutorial.rst:533\nmsgid \"Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:405\nmsgid \"\"\n\"A cookie is a named piece of text stored in the user's browser profile. You \"\n\"can access previously defined cookies via :meth:`Request.get_cookie` and set\"\n\" new cookies with :meth:`Response.set_cookie`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:415\nmsgid \"\"\n\"The :meth:`Response.set_cookie` method accepts a number of additional \"\n\"keyword arguments that control the cookies lifetime and behavior. Some of \"\n\"the most common settings are described here:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:417\nmsgid \"**max_age:**    Maximum age in seconds. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:418\nmsgid \"\"\n\"**expires:**    A datetime object or UNIX timestamp. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:419\nmsgid \"\"\n\"**domain:**     The domain that is allowed to read the cookie. (default: \"\n\"current domain)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:420\nmsgid \"**path:**       Limit the cookie to a given path (default: ``/``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:421\nmsgid \"**secure:**     Limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:422\nmsgid \"\"\n\"**httponly:**   Prevent client-side javascript to read this cookie (default:\"\n\" off, requires Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:423\nmsgid \"\"\n\"**same_site:**  Disables third-party use for a cookie. Allowed attributes: \"\n\"`lax` and `strict`. In strict mode the cookie will never be sent. In lax \"\n\"mode the cookie is only sent with a top-level GET request.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:425\nmsgid \"\"\n\"If neither `expires` nor `max_age` is set, the cookie expires at the end of \"\n\"the browser session or as soon as the browser window is closed. There are \"\n\"some other gotchas you should consider when using cookies:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:427\nmsgid \"Cookies are limited to 4 KB of text in most browsers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:428\nmsgid \"\"\n\"Some users configure their browsers to not accept cookies at all. Most \"\n\"search engines ignore cookies too. Make sure that your application still \"\n\"works without cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:429\nmsgid \"\"\n\"Cookies are stored at client side and are not encrypted in any way. Whatever\"\n\" you store in a cookie, the user can read it. Worse than that, an attacker \"\n\"might be able to steal a user's cookies through `XSS \"\n\"<http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_\"\n\" vulnerabilities on your side. Some viruses are known to read the browser \"\n\"cookies, too. Thus, never store confidential information in cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:430\nmsgid \"Cookies are easily forged by malicious clients. Do not trust cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:435\nmsgid \"Signed Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:436\nmsgid \"\"\n\"As mentioned above, cookies are easily forged by malicious clients. Bottle \"\n\"can cryptographically sign your cookies to prevent this kind of \"\n\"manipulation. All you have to do is to provide a signature key via the \"\n\"`secret` keyword argument whenever you read or set a cookie and keep that \"\n\"key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` \"\n\"if the cookie is not signed or the signature keys don't match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:456\nmsgid \"\"\n\"In addition, Bottle automatically pickles and unpickles any data stored to \"\n\"signed cookies. This allows you to store any pickle-able object (not only \"\n\"strings) to cookies, as long as the pickled data does not exceed the 4 KB \"\n\"limit.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:458\nmsgid \"\"\n\"Signed cookies are not encrypted (the client can still see the content) and \"\n\"not copy-protected (the client can restore an old cookie). The main \"\n\"intention is to make pickling and unpickling safe and prevent manipulation, \"\n\"not to store secret information at client side.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:471\nmsgid \"Request Data\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:473\nmsgid \"\"\n\"Cookies, HTTP header, HTML ``<form>`` fields and other request data is \"\n\"available through the global :data:`request` object. This special object \"\n\"always refers to the *current* request, even in multi-threaded environments \"\n\"where multiple client connections are handled at the same time::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:482\nmsgid \"\"\n\"The :data:`request` object is a subclass of :class:`BaseRequest` and has a \"\n\"very rich API to access data. We only cover the most commonly used features \"\n\"here, but it should be enough to get started.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:487\nmsgid \"Introducing :class:`FormsDict`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:489\nmsgid \"\"\n\"Bottle uses a special type of dictionary to store form data and cookies. \"\n\":class:`FormsDict` behaves like a normal dictionary, but has some additional\"\n\" features to make your life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:491\nmsgid \"\"\n\"**Attribute access**: All values in the dictionary are also accessible as \"\n\"attributes. These virtual attributes return unicode strings, even if the \"\n\"value is missing or unicode decoding fails. In that case, the string is \"\n\"empty, but still present::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:506\nmsgid \"\"\n\"**Multiple values per key:** :class:`FormsDict` is a subclass of \"\n\":class:`MultiDict` and can store more than one value per key. The standard \"\n\"dictionary access methods will only return a single value, but the \"\n\":meth:`~MultiDict.getall` method returns a (possibly empty) list of all \"\n\"values for a specific key::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:511\nmsgid \"\"\n\"**WTForms support:** Some libraries (e.g. `WTForms \"\n\"<http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input.\"\n\" :meth:`FormsDict.decode` does that for you. It decodes all values and \"\n\"returns a copy of itself, while preserving multiple values per key and all \"\n\"the other features.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:515\nmsgid \"\"\n\"In **Python 2** all keys and values are byte-strings. If you need unicode, \"\n\"you can call :meth:`FormsDict.getunicode` or fetch values via attribute \"\n\"access. Both methods try to decode the string (default: utf8) and return an \"\n\"empty string if that fails. No need to catch :exc:`UnicodeError`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:522\nmsgid \"\"\n\"In **Python 3** all strings are unicode, but HTTP is a byte-based wire \"\n\"protocol. The server has to decode the byte strings somehow before they are \"\n\"passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 \"\n\"(aka latin1), a reversible single-byte codec that can be re-encoded with a \"\n\"different encoding later. Bottle does that for :meth:`FormsDict.getunicode` \"\n\"and attribute access, but not for the dict-access methods. These return the \"\n\"unchanged values as provided by the server implementation, which is probably\"\n\" not what you want.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:529\nmsgid \"\"\n\"If you need the whole dictionary with correctly decoded values (e.g. for \"\n\"WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:535\nmsgid \"\"\n\"Cookies are small pieces of text stored in the clients browser and sent back\"\n\" to the server with each request. They are useful to keep some state around \"\n\"for more than one request (HTTP itself is stateless), but should not be used\"\n\" for security related stuff. They can be easily forged by the client.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:537\nmsgid \"\"\n\"All cookies sent by the client are available through \"\n\":attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a \"\n\"simple cookie-based view counter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:547\nmsgid \"\"\n\"The :meth:`BaseRequest.get_cookie` method is a different way do access \"\n\"cookies. It supports decoding :ref:`signed cookies <tutorial-signed-\"\n\"cookies>` as described in a separate section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:550\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:552\nmsgid \"\"\n\"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or \"\n\"``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible \"\n\"through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict`\"\n\" is basically a dictionary with case-insensitive keys::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:564\nmsgid \"Query Variables\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:566\nmsgid \"\"\n\"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit\"\n\" a small number of key/value pairs to the server. You can use the \"\n\":attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these \"\n\"values and the :attr:`BaseRequest.query_string` attribute to get the whole \"\n\"string.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:579\nmsgid \"HTML `<form>` Handling\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:581\nmsgid \"\"\n\"Let us start from the beginning. In HTML, a typical ``<form>`` looks \"\n\"something like this:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:591\nmsgid \"\"\n\"The ``action`` attribute specifies the URL that will receive the form data. \"\n\"``method`` defines the HTTP method to use (``GET`` or ``POST``). With \"\n\"``method=\\\"get\\\"`` the form values are appended to the URL and available \"\n\"through :attr:`BaseRequest.query` as described above. This is considered \"\n\"insecure and has other limitations, so we use ``method=\\\"post\\\"`` here. If \"\n\"in doubt, use ``POST`` forms.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:593\nmsgid \"\"\n\"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms`\"\n\" as a :class:`FormsDict`. The server side code may look like this::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:616\nmsgid \"\"\n\"There are several other attributes used to access form data. Some of them \"\n\"combine values from different sources for easier access. The following table\"\n\" should give you a decent overview.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"GET Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"POST Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"File Uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621\nmsgid \":attr:`BaseRequest.query`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:622 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:624 ../../tutorial.rst:625\n#: ../../tutorial.rst:626 ../../tutorial.rst:626\nmsgid \"yes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:621 ../../tutorial.rst:622\n#: ../../tutorial.rst:622 ../../tutorial.rst:623 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:625 ../../tutorial.rst:625\n#: ../../tutorial.rst:626\nmsgid \"no\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:622\nmsgid \":attr:`BaseRequest.forms`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:623\nmsgid \":attr:`BaseRequest.files`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:624\nmsgid \":attr:`BaseRequest.params`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:625\nmsgid \":attr:`BaseRequest.GET`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:626\nmsgid \":attr:`BaseRequest.POST`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:631\nmsgid \"File uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:633\nmsgid \"\"\n\"To support file uploads, we have to change the ``<form>`` tag a bit. First, \"\n\"we tell the browser to encode the form data in a different way by adding an \"\n\"``enctype=\\\"multipart/form-data\\\"`` attribute to the ``<form>`` tag. Then, \"\n\"we add ``<input type=\\\"file\\\" />`` tags to allow the user to select a file. \"\n\"Here is an example:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:643\nmsgid \"\"\n\"Bottle stores file uploads in :attr:`BaseRequest.files` as \"\n\":class:`FileUpload` instances, along with some metadata about the upload. \"\n\"Let us assume you just want to save the file to disk::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:657\nmsgid \"\"\n\":attr:`FileUpload.filename` contains the name of the file on the clients \"\n\"file system, but is cleaned up and normalized to prevent bugs caused by \"\n\"unsupported characters or path segments in the filename. If you need the \"\n\"unmodified name as sent by the client, have a look at \"\n\":attr:`FileUpload.raw_filename`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:659\nmsgid \"\"\n\"The :attr:`FileUpload.save` method is highly recommended if you want to \"\n\"store the file to disk. It prevents some common errors (e.g. it does not \"\n\"overwrite existing files unless you tell it to) and stores the file in a \"\n\"memory efficient way. You can access the file object directly via \"\n\":attr:`FileUpload.file`. Just be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:663\nmsgid \"JSON Content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:665\nmsgid \"\"\n\"Some JavaScript or REST clients send ``application/json`` content to the \"\n\"server. The :attr:`BaseRequest.json` attribute contains the parsed data \"\n\"structure, if available.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:669\nmsgid \"The raw request body\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:671\nmsgid \"\"\n\"You can access the raw body data as a file-like object via \"\n\":attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary \"\n\"file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` \"\n\"setting. In both cases the body is completely buffered before you can access\"\n\" the attribute. If you expect huge amounts of data and want to get direct \"\n\"unbuffered access to the stream, have a look at ``request['wsgi.input']``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:676\nmsgid \"WSGI Environment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:678\nmsgid \"\"\n\"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The \"\n\"original is stored in :attr:`BaseRequest.environ`, but the request object \"\n\"itself behaves like a dictionary, too. Most of the interesting data is \"\n\"exposed through special methods or attributes, but if you want to access \"\n\"`WSGI environ variables <WSGI_Specification>`_ directly, you can do so::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:696\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:698\nmsgid \"\"\n\"Bottle comes with a fast and powerful built-in template engine called \"\n\":doc:`stpl`. To render a template you can use the :func:`template` function \"\n\"or the :func:`view` decorator. All you have to do is to provide the name of \"\n\"the template and the variables you want to pass to the template as keyword \"\n\"arguments. Here’s a simple example of how to render a template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:705\nmsgid \"\"\n\"This will load the template file ``hello_template.tpl`` and render it with \"\n\"the ``name`` variable set. Bottle will look for templates in the \"\n\"``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` \"\n\"list.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:707\nmsgid \"\"\n\"The :func:`view` decorator allows you to return a dictionary with the \"\n\"template variables instead of calling :func:`template`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:716\nmsgid \"Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:719\nmsgid \"\"\n\"The template syntax is a very thin layer around the Python language. Its \"\n\"main purpose is to ensure correct indentation of blocks, so you can format \"\n\"your template without worrying about indentation. Follow the link for a full\"\n\" syntax description: :doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:721\nmsgid \"Here is an example template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:732\nmsgid \"Caching\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:733\nmsgid \"\"\n\"Templates are cached in memory after compilation. Modifications made to the \"\n\"template files will have no affect until you clear the template cache. Call \"\n\"``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:743\nmsgid \"Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:747\nmsgid \"\"\n\"Bottle's core features cover most common use-cases, but as a micro-framework\"\n\" it has its limits. This is where \\\"Plugins\\\" come into play. Plugins add \"\n\"missing functionality to the framework, integrate third party libraries, or \"\n\"just automate some repetitive work.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:749\nmsgid \"\"\n\"We have a growing :doc:`/plugins/index` and most plugins are designed to be \"\n\"portable and re-usable across applications. The chances are high that your \"\n\"problem has already been solved and a ready-to-use plugin exists. If not, \"\n\"the :doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:751\nmsgid \"\"\n\"The effects and APIs of plugins are manifold and depend on the specific \"\n\"plugin. The ``SQLitePlugin`` plugin for example detects callbacks that \"\n\"require a ``db`` keyword argument and creates a fresh database connection \"\n\"object every time the callback is called. This makes it very convenient to \"\n\"use a database::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:771\nmsgid \"\"\n\"Other plugin may populate the thread-safe :data:`local` object, change \"\n\"details of the :data:`request` object, filter the data returned by the \"\n\"callback or bypass the callback completely. An \\\"auth\\\" plugin for example \"\n\"could check for a valid session and return a login page instead of calling \"\n\"the original callback. What happens exactly depends on the plugin.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:775\nmsgid \"Application-wide Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:777\nmsgid \"\"\n\"Plugins can be installed application-wide or just to some specific routes \"\n\"that need additional functionality. Most plugins can safely be installed to \"\n\"all routes and are smart enough to not add overhead to callbacks that do not\"\n\" need their functionality.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:779\nmsgid \"\"\n\"Let us take the ``SQLitePlugin`` plugin for example. It only affects route \"\n\"callbacks that need a database connection. Other routes are left alone. \"\n\"Because of this, we can install the plugin application-wide with no \"\n\"additional overhead.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:781\nmsgid \"\"\n\"To install a plugin, just call :func:`install` with the plugin as first \"\n\"argument::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:786\nmsgid \"\"\n\"The plugin is not applied to the route callbacks yet. This is delayed to \"\n\"make sure no routes are missed. You can install plugins first and add routes\"\n\" later, if you want to. The order of installed plugins is significant, \"\n\"though. If a plugin requires a database connection, you need to install the \"\n\"database plugin first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:790\nmsgid \"Uninstall Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:791\nmsgid \"\"\n\"You can use a name, class or instance to :func:`uninstall` a previously \"\n\"installed plugin::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:801\nmsgid \"\"\n\"Plugins can be installed and removed at any time, even at runtime while \"\n\"serving requests. This enables some neat tricks (installing slow debugging \"\n\"or profiling plugins only when needed) but should not be overused. Each time\"\n\" the list of plugins changes, the route cache is flushed and all plugins are\"\n\" re-applied.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:804\nmsgid \"\"\n\"The module-level :func:`install` and :func:`uninstall` functions affect the \"\n\":ref:`default-app`. To manage plugins for a specific application, use the \"\n\"corresponding methods on the :class:`Bottle` application object.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:808\nmsgid \"Route-specific Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:810\nmsgid \"\"\n\"The ``apply`` parameter of the :func:`route` decorator comes in handy if you\"\n\" want to install plugins to only a small number of routes::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:820\nmsgid \"Blacklisting Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:822\nmsgid \"\"\n\"You may want to explicitly disable a plugin for a number of routes. The \"\n\":func:`route` decorator has a ``skip`` parameter for this purpose::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:844\nmsgid \"\"\n\"The ``skip`` parameter accepts a single value or a list of values. You can \"\n\"use a name, class or instance to identify the plugin that is to be skipped. \"\n\"Set ``skip=True`` to skip all plugins at once.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:847\nmsgid \"Plugins and Sub-Applications\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:849\nmsgid \"\"\n\"Most plugins are specific to the application they were installed to. \"\n\"Consequently, they should not affect sub-applications mounted with \"\n\":meth:`Bottle.mount`. Here is an example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:860\nmsgid \"\"\n\"Whenever you mount an application, Bottle creates a proxy-route on the main-\"\n\"application that forwards all requests to the sub-application. Plugins are \"\n\"disabled for this kind of proxy-route by default. As a result, our \"\n\"(fictional) `WTForms` plugin affects the ``/contact`` route, but does not \"\n\"affect the routes of the ``/blog`` sub-application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:862\nmsgid \"\"\n\"This behavior is intended as a sane default, but can be overridden. The \"\n\"following example re-activates all plugins for a specific proxy-route::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:866\nmsgid \"\"\n\"But there is a snag: The plugin sees the whole sub-application as a single \"\n\"route, namely the proxy-route mentioned above. In order to affect each \"\n\"individual route of the sub-application, you have to install the plugin to \"\n\"the mounted application explicitly.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:871\nmsgid \"Development\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:873\nmsgid \"\"\n\"So you have learned the basics and want to write your own application? Here \"\n\"are some tips that might help you being more productive.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:879\nmsgid \"Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:881\nmsgid \"\"\n\"Bottle maintains a global stack of :class:`Bottle` instances and uses the \"\n\"top of the stack as a default for some of the module-level functions and \"\n\"decorators. The :func:`route` decorator, for example, is a shortcut for \"\n\"calling :meth:`Bottle.route` on the default application::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:889\nmsgid \"\"\n\"This is very convenient for small applications and saves you some typing, \"\n\"but also means that, as soon as your module is imported, routes are \"\n\"installed to the global default application. To avoid this kind of import \"\n\"side-effects, Bottle offers a second, more explicit way to build \"\n\"applications::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:899\nmsgid \"\"\n\"Separating the application object improves re-usability a lot, too. Other \"\n\"developers can safely import the ``app`` object from your module and use \"\n\":meth:`Bottle.mount` to merge applications together.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:904\nmsgid \"\"\n\"Starting with bottle-0.13 you can use :class:`Bottle` instances as context \"\n\"managers::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:929\nmsgid \"Debug Mode\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:931\nmsgid \"During early development, the debug mode can be very helpful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:939\nmsgid \"\"\n\"In this mode, Bottle is much more verbose and provides helpful debugging \"\n\"information whenever an error occurs. It also disables some optimisations \"\n\"that might get in your way and adds some checks that warn you about possible\"\n\" misconfiguration.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:941\nmsgid \"Here is an incomplete list of things that change in debug mode:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:943\nmsgid \"The default error page shows a traceback.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:944\nmsgid \"Templates are not cached.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:945\nmsgid \"Plugins are applied immediately.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:947\nmsgid \"Just make sure not to use the debug mode on a production server.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:950\nmsgid \"Auto Reloading\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:952\nmsgid \"\"\n\"During development, you have to restart the server a lot to test your recent\"\n\" changes. The auto reloader can do this for you. Every time you edit a \"\n\"module file, the reloader restarts the server process and loads the newest \"\n\"version of your code.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:962\nmsgid \"\"\n\"How it works: the main process will not start a server, but spawn a new \"\n\"child process using the same command line arguments used to start the main \"\n\"process. All module-level code is executed at least twice! Be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:967\nmsgid \"\"\n\"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` \"\n\"and start as a normal non-reloading app server. As soon as any of the loaded\"\n\" modules changes, the child process is terminated and re-spawned by the main\"\n\" process. Changes in template files will not trigger a reload. Please use \"\n\"debug mode to deactivate template caching.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:973\nmsgid \"\"\n\"The reloading depends on the ability to stop the child process. If you are \"\n\"running on Windows or any other operating system not supporting \"\n\"``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), \"\n\"``signal.SIGTERM`` is used to kill the child. Note that exit handlers and \"\n\"finally clauses, etc., are not executed after a ``SIGTERM``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:981\nmsgid \"Command Line Interface\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:985\nmsgid \"Starting with version 0.10 you can use bottle as a command-line tool:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1009\nmsgid \"\"\n\"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to \"\n\"``localhost:8080``. The other parameters should be self-explanatory.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1011\nmsgid \"\"\n\"Both plugins and applications are specified via import expressions. These \"\n\"consist of an import path (e.g. ``package.module``) and an expression to be \"\n\"evaluated in the namespace of that module, separated by a colon. See \"\n\":func:`load` for details. Here are some examples:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1032\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1034\nmsgid \"\"\n\"Bottle runs on the built-in `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_\"\n\"  by default. This non-threading HTTP server is perfectly fine for \"\n\"development, but may become a performance bottleneck when server load \"\n\"increases.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1036\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded server::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1040\nmsgid \"\"\n\"This, and many other deployment options are described in a separate article:\"\n\" :doc:`deployment`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1048\nmsgid \"Glossary\"\nmsgstr \"Глоссарий\"\n\n#: ../../tutorial.rst:1051\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1053\nmsgid \"\"\n\"Programmer code that is to be called when some external action happens. In \"\n\"the context of web frameworks, the mapping between URL paths and application\"\n\" code is often achieved by specifying a callback function for each URL.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1057\nmsgid \"decorator\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1059\nmsgid \"\"\n\"A function returning another function, usually applied as a function \"\n\"transformation using the ``@decorator`` syntax. See `python documentation \"\n\"for function definition  \"\n\"<http://docs.python.org/reference/compound_stmts.html#function>`_ for more \"\n\"about decorators.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1060\nmsgid \"environ\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1062\nmsgid \"\"\n\"A structure where information about all documents under the root is saved, \"\n\"and used for cross-referencing.  The environment is pickled after the \"\n\"parsing stage, so that successive runs only need to read and parse new and \"\n\"changed documents.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1066\nmsgid \"handler function\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1068\nmsgid \"\"\n\"A function to handle some specific event or situation. In a web framework, \"\n\"the application is developed by attaching a handler function as callback for\"\n\" each specific URL comprising the application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1071\nmsgid \"source directory\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1073\nmsgid \"\"\n\"The directory which, including its subdirectories, contains all source files\"\n\" for one Sphinx project.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/ru_RU/LC_MESSAGES/tutorial_app.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: ru_RU\\n\"\n\"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\\n\"\n\n#: ../../tutorial_app.rst:19\nmsgid \"Tutorial: Todo-List Application\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:23\nmsgid \"\"\n\"This tutorial is a work in progress and written by `noisefloor \"\n\"<http://github.com/noisefloor>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:26\nmsgid \"\"\n\"This tutorial should give a brief introduction to the Bottle_ WSGI \"\n\"Framework. The main goal is to be able, after reading through this tutorial,\"\n\" to create a project using Bottle. Within this document, not all abilities \"\n\"will be shown, but at least the main and important ones like routing, \"\n\"utilizing the Bottle template abilities to format output and handling GET / \"\n\"POST parameters.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:28\nmsgid \"\"\n\"To understand the content here, it is not necessary to have a basic \"\n\"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. \"\n\"You should have a fair understanding of the Python_ programming language. \"\n\"Furthermore, the example used in the tutorial retrieves and stores data in a\"\n\" SQL database, so a basic idea about SQL helps, but is not a must to \"\n\"understand the concepts of Bottle. Right here, SQLite_ is used. The output \"\n\"of Bottle sent to the browser is formatted in some examples by the help of \"\n\"HTML. Thus, a basic idea about the common HTML tags does help as well.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:30\nmsgid \"\"\n\"For the sake of introducing Bottle, the Python code \\\"in between\\\" is kept \"\n\"short, in order to keep the focus. Also all code within the tutorial is \"\n\"working fine, but you may not necessarily use it \\\"in the wild\\\", e.g. on a \"\n\"public web server. In order to do so, you may add e.g. more error handling, \"\n\"protect the database with a password, test and escape the input etc.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:32\nmsgid \"Table of Contents\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:35\nmsgid \"Goals\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:37\nmsgid \"\"\n\"At the end of this tutorial, we will have a simple, web-based ToDo list. The\"\n\" list contains a text (with max 100 characters) and a status (0 for closed, \"\n\"1 for open) for each item. Through the web-based user interface, open items \"\n\"can be view and edited and new items can be added.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:39\nmsgid \"\"\n\"During development, all pages will be available on ``localhost`` only, but \"\n\"later on it will be shown how to adapt the application for a \\\"real\\\" \"\n\"server, including how to use with Apache's mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:41\nmsgid \"\"\n\"Bottle will do the routing and format the output, with the help of \"\n\"templates. The items of the list will be stored inside a SQLite database. \"\n\"Reading and  writing the database will be done by Python code.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:43\nmsgid \"\"\n\"We will end up with an application with the following pages and \"\n\"functionality:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:45\nmsgid \"start page ``http://localhost:8080/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:46\nmsgid \"adding new items to the list: ``http://localhost:8080/new``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:47\nmsgid \"page for editing items: ``http://localhost:8080/edit/<no:int>``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:48\nmsgid \"catching errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:51\nmsgid \"Before We Start...\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:55\nmsgid \"Install Bottle\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:56\nmsgid \"\"\n\"Assuming that you have a fairly new installation of Python (version 2.5 or \"\n\"higher), you only need to install Bottle in addition to that. Bottle has no \"\n\"other dependencies than Python itself.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:58\nmsgid \"\"\n\"You can either manually install Bottle or use Python's easy_install: \"\n\"``easy_install bottle``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:62\nmsgid \"Further Software Necessities\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:63\nmsgid \"\"\n\"As we use SQLite3 as a database, make sure it is installed. On Linux \"\n\"systems, most distributions have SQLite3 installed by default. SQLite is \"\n\"available for Windows and MacOS X as well and the `sqlite3` module is part \"\n\"of the python standard library.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:66\nmsgid \"Create An SQL Database\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:67\nmsgid \"\"\n\"First, we need to create the database we use later on. To do so, save the \"\n\"following script in your project directory and run it with python. You can \"\n\"use the interactive interpreter too::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:78\nmsgid \"\"\n\"This generates a database-file `todo.db` with tables called ``todo`` and \"\n\"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for \"\n\"each row, which is used later on to reference the rows. The column ``task`` \"\n\"holds the text which describes the task, it can be max 100 characters long. \"\n\"Finally, the column ``status`` is used to mark a task as open (value 1) or \"\n\"closed (value 0).\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:81\nmsgid \"Using Bottle for a Web-Based ToDo List\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:83\nmsgid \"\"\n\"Now it is time to introduce Bottle in order to create a web-based \"\n\"application. But first, we need to look into a basic concept of Bottle: \"\n\"routes.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:87\nmsgid \"Understanding routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:88\nmsgid \"\"\n\"Basically, each page visible in the browser is dynamically generated when \"\n\"the page address is called. Thus, there is no static content. That is \"\n\"exactly what is called a \\\"route\\\" within Bottle: a certain address on the \"\n\"server. So, for example, when the page ``http://localhost:8080/todo`` is \"\n\"called from the browser, Bottle \\\"grabs\\\" the call and checks if there is \"\n\"any (Python) function defined for the route \\\"todo\\\". If so, Bottle will \"\n\"execute the corresponding Python code and return its result.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:92\nmsgid \"First Step - Showing All Open Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:93\nmsgid \"\"\n\"So, after understanding the concept of routes, let's create the first one. \"\n\"The goal is to see all open items from the ToDo list::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:108\nmsgid \"\"\n\"Save the code a ``todo.py``, preferably in the same directory as the file \"\n\"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the \"\n\"``sqlite3.connect()`` statement.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:110\nmsgid \"\"\n\"Let's have a look what we just did: We imported the necessary module \"\n\"``sqlite3`` to access to SQLite database and from Bottle we imported \"\n\"``route`` and ``run``. The ``run()`` statement simply starts the web server \"\n\"included in Bottle. By default, the web server serves the pages on localhost\"\n\" and port 8080. Furthermore, we imported ``route``, which is the function \"\n\"responsible for Bottle's routing. As you can see, we defined one function, \"\n\"``todo_list()``, with a few lines of code reading from the database. The \"\n\"important point is the `decorator statement`_ ``@route('/todo')`` right \"\n\"before the ``def todo_list()`` statement. By doing this, we bind this \"\n\"function to the route ``/todo``, so every time the browsers calls \"\n\"``http://localhost:8080/todo``, Bottle returns the result of the function \"\n\"``todo_list()``. That is how routing within bottle works.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:112\nmsgid \"\"\n\"Actually you can bind more than one route to a function. So the following \"\n\"code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:119\nmsgid \"\"\n\"will work fine, too. What will not work is to bind one route to more than \"\n\"one function.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:121\nmsgid \"\"\n\"What you will see in the browser is what is returned, thus the value given \"\n\"by the ``return`` statement. In this example, we need to convert ``result`` \"\n\"in to a string by ``str()``, as Bottle expects a string or a list of strings\"\n\" from the return statement. But here, the result of the database query is a \"\n\"list of tuples, which is the standard defined by the `Python DB API`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:123\nmsgid \"\"\n\"Now, after understanding the little script above, it is time to execute it \"\n\"and watch the result yourself. Remember that on Linux- / Unix-based systems \"\n\"the file ``todo.py`` needs to be executable first. Then, just run ``python \"\n\"todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. \"\n\"In case you made no mistake writing the script, the output should look like \"\n\"this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:127\nmsgid \"\"\n\"If so - congratulations! You are now a successful user of Bottle. In case it\"\n\" did not work and you need to make some changes to the script, remember to \"\n\"stop Bottle serving the page, otherwise the revised version will not be \"\n\"loaded.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:129\nmsgid \"\"\n\"Actually, the output is not really exciting nor nice to read. It is the raw \"\n\"result returned from the SQL query.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:131\nmsgid \"\"\n\"So, in the next step we format the output in a nicer way. But before we do \"\n\"that, we make our life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:135\nmsgid \"Debugging and Auto-Reload\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:136\nmsgid \"\"\n\"Maybe you already noticed that Bottle sends a short error message to the \"\n\"browser in case something within the script is wrong, e.g. the connection to\"\n\" the database is not working. For debugging purposes it is quite helpful to \"\n\"get more details. This can be easily achieved by adding the following \"\n\"statement to the script::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:144\nmsgid \"\"\n\"By enabling \\\"debug\\\", you will get a full stacktrace of the Python \"\n\"interpreter, which usually contains useful information for finding bugs. \"\n\"Furthermore, templates (see below) are not cached, thus changes to templates\"\n\" will take effect without stopping the server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:148\nmsgid \"\"\n\"That ``debug(True)`` is supposed to be used for development only, it should \"\n\"*not* be used in production environments.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:152\nmsgid \"\"\n\"Another quite nice feature is auto-reloading, which is enabled by modifying \"\n\"the ``run()`` statement to\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:158\nmsgid \"\"\n\"This will automatically detect changes to the script and reload the new \"\n\"version once it is called again, without the need to stop and start the \"\n\"server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:160\nmsgid \"\"\n\"Again, the feature is mainly supposed to be used while developing, not on \"\n\"production systems.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:164\nmsgid \"Bottle Template To Format The Output\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:165\nmsgid \"\"\n\"Now let's have a look at casting the output of the script into a proper \"\n\"format.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:167\nmsgid \"\"\n\"Actually Bottle expects to receive a string or a list of strings from a \"\n\"function and returns them by the help of the built-in server to the browser.\"\n\" Bottle does not bother about the content of the string itself, so it can be\"\n\" text formatted with HTML markup, too.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:169\nmsgid \"\"\n\"Bottle brings its own easy-to-use template engine with it. Templates are \"\n\"stored as separate files having a ``.tpl`` extension. The template can be \"\n\"called then from within a function. Templates can contain any type of text \"\n\"(which will be most likely HTML-markup mixed with Python statements). \"\n\"Furthermore, templates can take arguments, e.g. the result set of a database\"\n\" query, which will be then formatted nicely within the template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:171\nmsgid \"\"\n\"Right here, we are going to cast the result of our query showing the open \"\n\"ToDo items into a simple table with two columns: the first column will \"\n\"contain the ID of the item, the second column the text. The result set is, \"\n\"as seen above, a list of tuples, each tuple contains one set of results.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:173\nmsgid \"To include the template in our example, just add the following lines::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:183\nmsgid \"\"\n\"So we do here two things: first, we import ``template`` from Bottle in order\"\n\" to be able to use templates. Second, we assign the output of the template \"\n\"``make_table`` to the variable ``output``, which is then returned. In \"\n\"addition to calling the template, we assign ``result``, which we received \"\n\"from the database query, to the variable ``rows``, which is later on used \"\n\"within the template. If necessary, you can assign more than one variable / \"\n\"value to a template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:185\nmsgid \"\"\n\"Templates always return a list of strings, thus there is no need to convert \"\n\"anything. We can save one line of code by writing ``return \"\n\"template('make_table', rows=result)``, which gives exactly the same result \"\n\"as above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:187\nmsgid \"\"\n\"Now it is time to write the corresponding template, which looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:201\nmsgid \"\"\n\"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` \"\n\"is stored.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:203\nmsgid \"\"\n\"Let's have a look at the code: every line starting with % is interpreted as \"\n\"Python code. Because it is effectively Python, only valid Python statements \"\n\"are allowed. The template will raise exceptions, just as any other Python \"\n\"code would. The other lines are plain HTML markup.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:205\nmsgid \"\"\n\"As you can see, we use Python's ``for`` statement two times, in order to go \"\n\"through ``rows``. As seen above, ``rows`` is a variable which holds the \"\n\"result of the database query, so it is a list of tuples. The first ``for`` \"\n\"statement accesses the tuples within the list, the second one the items \"\n\"within the tuple, which are put each into a cell of the table. It is \"\n\"important that you close all ``for``, ``if``, ``while`` etc. statements with\"\n\" ``%end``, otherwise the output may not be what you expect.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:207\nmsgid \"\"\n\"If you need to access a variable within a non-Python code line inside the \"\n\"template, you need to put it into double curly braces. This tells the \"\n\"template to insert the actual value of the variable right in place.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:209\nmsgid \"\"\n\"Run the script again and look at the output. Still not really nice, but at \"\n\"least more readable than the list of tuples. You can spice-up the very \"\n\"simple HTML markup above, e.g. by using in-line styles to get a better \"\n\"looking output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:213\nmsgid \"Using GET and POST Values\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:214\nmsgid \"\"\n\"As we can review all open items properly, we move to the next step, which is\"\n\" adding new items to the ToDo list. The new item should be received from a \"\n\"regular HTML-based form, which sends its data by the GET method.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:216\nmsgid \"\"\n\"To do so, we first add a new route to our script and tell the route that it \"\n\"should get GET data::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:239\nmsgid \"\"\n\"To access GET (or POST) data, we need to import ``request`` from Bottle. To \"\n\"assign the actual data to a variable, we use the statement \"\n\"``request.GET.task.strip()`` statement, where ``task`` is the name of the \"\n\"GET data we want to access. That's all. If your GET data has more than one \"\n\"variable, multiple ``request.GET.get()`` statements can be used and assigned\"\n\" to other variables.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:241\nmsgid \"\"\n\"The rest of this piece of code is just processing of the gained data: \"\n\"writing to the database, retrieve the corresponding id from the database and\"\n\" generate the output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:243\nmsgid \"\"\n\"But where do we get the GET data from? Well, we can use a static HTML page \"\n\"holding the form. Or, what we do right now, is to use a template which is \"\n\"output when the route ``/new`` is called without GET data.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:245\nmsgid \"The code needs to be extended to::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:268\nmsgid \"``new_task.tpl`` looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:276\nmsgid \"That's all. As you can see, the template is plain HTML this time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:278\nmsgid \"Now we are able to extend our to do list.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:280\nmsgid \"\"\n\"By the way, if you prefer to use POST data: this works exactly the same way,\"\n\" just use ``request.POST.get()`` instead.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:284\nmsgid \"Editing Existing Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:285\nmsgid \"The last point to do is to enable editing of existing items.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:287\nmsgid \"\"\n\"By using only the routes we know so far it is possible, but may be quite \"\n\"tricky. But Bottle knows something called \\\"dynamic routes\\\", which makes \"\n\"this task quite easy.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:289\nmsgid \"The basic statement for a dynamic route looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:293\nmsgid \"\"\n\"This tells Bottle to accept for ``<something>`` any string up to the next \"\n\"slash. Furthermore, the value of ``something`` will be passed to the \"\n\"function assigned to that route, so the data can be processed within the \"\n\"function, like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:321\nmsgid \"\"\n\"It is basically pretty much the same what we already did above when adding \"\n\"new items, like using ``GET`` data etc. The main addition here is using the \"\n\"dynamic route ``<no:int>``, which here passes the number to the \"\n\"corresponding function. As you can see, ``no`` is integer ID and used within\"\n\" the function to access the right row of data within the database.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:324\nmsgid \"\"\n\"The template ``edit_task.tpl`` called within the function looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:339\nmsgid \"\"\n\"Again, this template is a mix of Python statements and HTML, as already \"\n\"explained above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:341\nmsgid \"\"\n\"A last word on dynamic routes: you can even use a regular expression for a \"\n\"dynamic route, as demonstrated later.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:345\nmsgid \"Validating Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:346\nmsgid \"\"\n\"Using dynamic routes is fine, but for many cases it makes sense to validate \"\n\"the dynamic part of the route. For example, we expect an integer number in \"\n\"our route for editing above. But if a float, characters or so are received, \"\n\"the Python interpreter throws an exception, which is not what we want.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:348\nmsgid \"\"\n\"For those cases, Bottle offers the ``<name:int>`` wildcard filter, which \"\n\"matches (signed) digits and converts the value to integer. In order to apply\"\n\" the wildcard filter, extend the code as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:356\nmsgid \"\"\n\"Save the code and call the page again using incorrect value for \"\n\"``<no:int>``, e.g. a float. You will receive not an exception, but a \\\"404 \"\n\"Not Found\\\" error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:360\nmsgid \"Dynamic Routes Using Regular Expressions\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:361\nmsgid \"\"\n\"Bottle can also handle dynamic routes, where the \\\"dynamic part\\\" of the \"\n\"route can be a regular expression.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:363\nmsgid \"\"\n\"So, just to demonstrate that, let's assume that all single items in our ToDo\"\n\" list should be accessible by their plain number, by a term like e.g. \"\n\"\\\"item1\\\". For obvious reasons, you do not want to create a route for every \"\n\"item. Furthermore, the simple dynamic routes do not work either, as part of \"\n\"the route, the term \\\"item\\\" is static.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:365\nmsgid \"As said above, the solution is a regular expression::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:380\nmsgid \"\"\n\"The line ``@route(/item<item:re:[0-9]+>)`` starts like a normal route, but \"\n\"the third part of the wildcard is interpreted as a regular expression, which\"\n\" is the dynamic part of the route. So in this case, we want to match any \"\n\"digit between 0 and 9. The following function \\\"show_item\\\" just checks \"\n\"whether the given item is present in the database or not. In case it is \"\n\"present, the corresponding text of the task is returned. As you can see, \"\n\"only the regular expression part of the route is passed forward. \"\n\"Furthermore, it is always forwarded as a string, even if it is a plain \"\n\"integer number, like in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:384\nmsgid \"Returning Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:385\nmsgid \"\"\n\"Sometimes it may become necessary to associate a route not to a Python \"\n\"function, but just return a static file. So if you have for example a help \"\n\"page for your application, you may want to return this page as plain HTML. \"\n\"This works as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:393\nmsgid \"\"\n\"At first, we need to import the ``static_file`` function from Bottle. As you\"\n\" can see, the ``return static_file`` statement replaces the ``return`` \"\n\"statement. It takes at least two arguments: the name of the file to be \"\n\"returned and the path to the file. Even if the file is in the same directory\"\n\" as your application, the path needs to be stated. But in this case, you can\"\n\" use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file \"\n\"automatically, but in case you like to state it explicitly, add a third \"\n\"argument to ``static_file``, which would be here ``mimetype='text/html'``. \"\n\"``static_file`` works with any type of route, including the dynamic ones.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:397\nmsgid \"Returning JSON Data\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:398\nmsgid \"\"\n\"There may be cases where you do not want your application to generate the \"\n\"output directly, but return data to be processed further on, e.g. by \"\n\"JavaScript. For those cases, Bottle offers the possibility to return JSON \"\n\"objects, which is sort of standard for exchanging data between web \"\n\"applications. Furthermore, JSON can be processed by many programming \"\n\"languages, including Python\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:400\nmsgid \"\"\n\"So, let's assume we want to return the data generated in the regular \"\n\"expression route example as a JSON object. The code looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:415\nmsgid \"\"\n\"As you can, that is fairly simple: just return a regular Python dictionary \"\n\"and Bottle will convert it automatically into a JSON object prior to \"\n\"sending. So if you e.g. call \\\"http://localhost/json1\\\" Bottle should in \"\n\"this case return the JSON object ``{\\\"task\\\": [\\\"Read A-byte-of-python to \"\n\"get a good introduction into Python\\\"]}``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:420\nmsgid \"Catching Errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:421\nmsgid \"\"\n\"The next step may is to catch the error with Bottle itself, to keep away any\"\n\" type of error message from the user of your application. To do that, Bottle\"\n\" has an \\\"error-route\\\", which can be a assigned to a HTML-error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:423\nmsgid \"In our case, we want to catch a 403 error. The code is as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:431\nmsgid \"\"\n\"So, at first we need to import ``error`` from Bottle and define a route by \"\n\"``error(403)``, which catches all \\\"403 forbidden\\\" errors. The function \"\n\"\\\"mistake\\\" is assigned to that. Please note that ``error()`` always passes \"\n\"the error-code to the function - even if you do not need it. Thus, the \"\n\"function always needs to accept one argument, otherwise it will not work.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:433\nmsgid \"\"\n\"Again, you can assign more than one error-route to a function, or catch \"\n\"various errors with one function each. So this code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:440\nmsgid \"works fine, the following one as well::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:452\nmsgid \"Summary\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:453\nmsgid \"\"\n\"After going through all the sections above, you should have a brief \"\n\"understanding how the Bottle WSGI framework works. Furthermore you have all \"\n\"the knowledge necessary to use Bottle for your applications.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:455\nmsgid \"\"\n\"The following chapter give a short introduction how to adapt Bottle for \"\n\"larger projects. Furthermore, we will show how to operate Bottle with web \"\n\"servers which perform better on a higher load / more web traffic than the \"\n\"one we used so far.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:458\nmsgid \"Server Setup\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:460\nmsgid \"\"\n\"So far, we used the standard server used by Bottle, which is the `WSGI \"\n\"reference Server`_ shipped along with Python. Although this server is \"\n\"perfectly suitable for development purposes, it is not really suitable for \"\n\"larger applications. But before we have a look at the alternatives, let's \"\n\"have a look how to tweak the settings of the standard server first.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:464\nmsgid \"Running Bottle on a different port and IP\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:465\nmsgid \"\"\n\"As standard, Bottle serves the pages on the IP address 127.0.0.1, also known\"\n\" as ``localhost``, and on port ``8080``. To modify the setting is pretty \"\n\"simple, as additional parameters can be passed to Bottle's ``run()`` \"\n\"function to change the port and the address.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:467\nmsgid \"\"\n\"To change the port, just add ``port=portnumber`` to the run command. So, for\"\n\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:471\nmsgid \"would make Bottle listen to port 80.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:473\nmsgid \"To change the IP address where Bottle is listening::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:477\nmsgid \"If needed, both parameters can be combined, like::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:481\nmsgid \"\"\n\"The ``port`` and ``host`` parameter can also be applied when Bottle is \"\n\"running with a different server, as shown in the following section.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:485\nmsgid \"Running Bottle with a different server\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:486\nmsgid \"\"\n\"As said above, the standard server is perfectly suitable for development, \"\n\"personal use or a small group of people only using your application based on\"\n\" Bottle. For larger tasks, the standard server may become a bottleneck, as \"\n\"it is single-threaded, thus it can only serve one request at a time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:488\nmsgid \"\"\n\"But Bottle has already various adapters to multi-threaded servers on board, \"\n\"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and \"\n\"Paste_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:490\nmsgid \"\"\n\"If you want to run for example Bottle with the Paste server, use the \"\n\"following code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:496\nmsgid \"\"\n\"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and \"\n\"``FapwsServer``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:500\nmsgid \"Running Bottle on Apache with mod_wsgi\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:501\nmsgid \"\"\n\"Maybe you already have an Apache_ or you want to run a Bottle-based \"\n\"application large scale - then it is time to think about Apache with \"\n\"mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:503\nmsgid \"\"\n\"We assume that your Apache server is up and running and mod_wsgi is working \"\n\"fine as well. On a lot of Linux distributions, mod_wsgi can be easily \"\n\"installed via whatever package management system is in use.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:505\nmsgid \"\"\n\"Bottle brings an adapter for mod_wsgi with it, so serving your application \"\n\"is an easy task.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:507\nmsgid \"\"\n\"In the following example, we assume that you want to make your application \"\n\"\\\"ToDo list\\\" accessible through ``http://www.mypage.com/todo`` and your \"\n\"code, templates and SQLite database are stored in the path \"\n\"``/var/www/todo``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:509\nmsgid \"\"\n\"When you run your application via mod_wsgi, it is imperative to remove the \"\n\"``run()`` statement from your code, otherwise it won't work here.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:511\nmsgid \"\"\n\"After that, create a file called ``adapter.wsgi`` with the following \"\n\"content::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:522\nmsgid \"\"\n\"and save it in the same path, ``/var/www/todo``. Actually the name of the \"\n\"file can be anything, as long as the extension is ``.wsgi``. The name is \"\n\"only used to reference the file from your virtual host.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:524\nmsgid \"\"\n\"Finally, we need to add a virtual host to the Apache configuration, which \"\n\"looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:540\nmsgid \"\"\n\"After restarting the server, your ToDo list should be accessible at \"\n\"``http://www.mypage.com/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:543\nmsgid \"Final Words\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:545\nmsgid \"\"\n\"Now we are at the end of this introduction and tutorial to Bottle. We \"\n\"learned about the basic concepts of Bottle and wrote a first application \"\n\"using the Bottle framework. In addition to that, we saw how to adapt Bottle \"\n\"for large tasks and serve Bottle through an Apache web server with mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:547\nmsgid \"\"\n\"As said in the introduction, this tutorial is not showing all shades and \"\n\"possibilities of Bottle. What we skipped here is e.g. receiving file objects\"\n\" and streams and how to handle authentication data. Furthermore, we did not \"\n\"show how templates can be called from within another template. For an \"\n\"introduction into those points, please refer to the full `Bottle \"\n\"documentation`_ .\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:550\nmsgid \"Complete Example Listing\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:552\nmsgid \"\"\n\"As the ToDo list example was developed piece by piece, here is the complete \"\n\"listing:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:554\nmsgid \"Main code for the application ``todo.py``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:675\nmsgid \"Template ``make_table.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:689\nmsgid \"Template ``edit_task.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:704\nmsgid \"Template ``new_task.tpl``::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/api.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../api.rst:3\nmsgid \"API Reference\"\nmsgstr \"\"\n\n#: ../../api.rst:10\nmsgid \"\"\n\"This is a mostly auto-generated API. If you are new to bottle, you might \"\n\"find the narrative :doc:`tutorial` more helpful.\"\nmsgstr \"\"\n\n#: ../../api.rst:17\nmsgid \"Module Contents\"\nmsgstr \"\"\n\n#: ../../api.rst:19\nmsgid \"The module defines several functions, constants, and an exception.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.debug:1\nmsgid \"\"\n\"Change the debug level. There is only one debug level supported at the \"\n\"moment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:1\nmsgid \"\"\n\"Start a server instance. This method blocks until the server terminates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:3\nmsgid \"\"\n\"WSGI application or target string supported by :func:`load_app`. (default: \"\n\":func:`default_app`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:5\nmsgid \"\"\n\"Server adapter to use. See :data:`server_names` keys for valid names or pass\"\n\" a :class:`ServerAdapter` subclass. (default: `wsgiref`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:8\nmsgid \"\"\n\"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces \"\n\"including the external one. (default: 127.0.0.1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:10\nmsgid \"\"\n\"Server port to bind to. Values below 1024 require root privileges. (default:\"\n\" 8080)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:12\nmsgid \"Start auto-reloading server? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:13\nmsgid \"Auto-reloader interval in seconds (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:14\nmsgid \"Suppress output to stdout and stderr? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:15\nmsgid \"Options passed to the server adapter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:1\nmsgid \"Import a module or fetch an object from a module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:3\nmsgid \"``package.module`` returns `module` as a module object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:4\nmsgid \"``pack.mod:name`` returns the module variable `name` from `pack.mod`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:5\nmsgid \"``pack.mod:func()`` calls `pack.mod.func()` and returns the result.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:7\nmsgid \"\"\n\"The last form accepts not only function calls, but any type of expression. \"\n\"Keyword arguments passed to this function are available as local variables. \"\n\"Example: ``import_string('re:compile(x)', x='[a-z]')``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load_app:1\nmsgid \"\"\n\"Load a bottle application from a module and make sure that the import does \"\n\"not affect the current default application, but returns a separate \"\n\"application object. See :func:`load` for the target parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.request:1 ../../../bottle.pydocstring\n#: of bottle.request:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalRequest`. If accessed from within a \"\n\"request callback, this instance always refers to the *current* request (even\"\n\" on a multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.response:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalResponse`. It is used to change the \"\n\"HTTP response for the *current* request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HTTP_CODES:1\nmsgid \"\"\n\"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')\"\nmsgstr \"\"\n\n#: ../../api.rst:38\nmsgid \"\"\n\"Return the current :ref:`default-app`. Actually, these are callable \"\n\"instances of :class:`AppStack` and implement a stack-like API.\"\nmsgstr \"\"\n\n#: ../../api.rst:42\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../api.rst:44\nmsgid \"\"\n\"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and \"\n\":class:`AppStack`) and uses the top of the stack as a *default application* \"\n\"for some of the module-level functions and decorators.\"\nmsgstr \"\"\n\n#: ../../api.rst:54\nmsgid \"\"\n\"Decorator to install a route to the current default application. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:59\nmsgid \"\"\n\"Decorator to install an error handler to the current default application. \"\n\"See :meth:`Bottle.error` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:63\nmsgid \"WSGI and HTTP Utilities\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_date:1\nmsgid \"Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_auth:1\nmsgid \"\"\n\"Parse rfc2617 HTTP authentication header string (basic) and return \"\n\"(user,pass) tuple or None\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_encode:1\nmsgid \"Encode and sign a pickle-able object. Return a (byte) string\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_decode:1\nmsgid \"Verify and decode an encoded string. Return an object or None.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_is_encoded:1\nmsgid \"Return True if the argument looks like a encoded cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.yieldroutes:1\nmsgid \"\"\n\"Return a generator for routes that match the signature (name, args) of the \"\n\"func parameter. This may yield more than one route if the function takes \"\n\"optional keyword arguments. The output is best described by example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:1\nmsgid \"Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:3\nmsgid \"The modified paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:4\nmsgid \"The SCRIPT_NAME path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:5\nmsgid \"The PATH_INFO path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:6\nmsgid \"\"\n\"The number of path fragments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../api.rst:81\nmsgid \"Data Structures\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict:1\nmsgid \"\"\n\"This dict stores multiple values per key, but behaves exactly like a normal \"\n\"dict in that it returns only the newest value for any given key. There are \"\n\"special methods available to access the full list of values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\nmsgid \"Return the most recent value for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:3\nmsgid \"\"\n\"The default value to be returned if the key is not present or the type \"\n\"conversion fails.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:5\nmsgid \"An index for the list of available values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:6\nmsgid \"\"\n\"If defined, this callable is used to cast the value into a specific type. \"\n\"Exception are suppressed and result in the default value to be returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.append:1\nmsgid \"Add a new value to the list of values for this key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.replace:1\nmsgid \"Replace the list of values with a single value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.MultiDict.getlist:1\nmsgid \"Return a (possibly empty) list of values for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.getone:1\nmsgid \"Aliases for WTForms to mimic other multi-dict APIs (Django)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HeaderDict:1\nmsgid \"\"\n\"A case-insensitive version of :class:`MultiDict` that defaults to replace \"\n\"the old value instead of appending it.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict:1\nmsgid \"\"\n\"This :class:`MultiDict` subclass is used to store request form data. \"\n\"Additionally to the normal dict-like item access methods (which return \"\n\"unmodified data as native strings), this container also supports attribute-\"\n\"like access to its values. Attributes are automatically de- or recoded to \"\n\"match :attr:`input_encoding` (default: 'utf8'). Missing attributes default \"\n\"to an empty string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.input_encoding:1\nmsgid \"Encoding used for attribute values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.recode_unicode:1\nmsgid \"\"\n\"If true (default), unicode strings are first encoded with `latin1` and then \"\n\"decoded to match :attr:`input_encoding`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.decode:1\nmsgid \"\"\n\"Returns a copy with all keys and values de- or recoded to match \"\n\":attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode \"\n\"dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.getunicode:1\nmsgid \"Return the value as a unicode string, or the default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:1\nmsgid \"\"\n\"This dict-like class wraps a WSGI environ dict and provides convenient \"\n\"access to HTTP_* fields. Keys and values are native strings (2.x bytes or \"\n\"3.x unicode) and keys are case-insensitive. If the WSGI environment contains\"\n\" non-native string values, these are de- or encoded using a lossless \"\n\"'latin1' character set.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:7\nmsgid \"\"\n\"The API will remain stable even on changes to the relevant PEPs. Currently \"\n\"PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-\"\n\"native strings.)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.cgikeys:1\nmsgid \"List of keys that do not have a ``HTTP_`` prefix.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.raw:1\nmsgid \"Return the header value as is (may be bytes or unicode).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack:1\nmsgid \"A stack-like list. Calling it returns the head of the stack.\"\nmsgstr \"\"\n\n#: ../../api.rst:100\nmsgid \"Return the current default application and remove it from the stack.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\nmsgid \"Add a new :class:`Bottle` instance to the stack\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:1\nmsgid \"\"\n\"This class manages a list of search paths and helps to find and open \"\n\"application-bound resources (files).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:4\nmsgid \"default value for :meth:`add_path` calls.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:5\nmsgid \"callable used to open resources.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:6\nmsgid \"controls which lookups are cached. One of 'all', 'found' or 'none'.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.path:1\nmsgid \"A list of search paths. See :meth:`add_path` for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.cache:1\nmsgid \"A cache for resolved paths. ``res.cache.clear()`` clears the cache.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:1\nmsgid \"\"\n\"Add a new path to the list of search paths. Return False if the path does \"\n\"not exist.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:4\nmsgid \"\"\n\"The new search path. Relative paths are turned into an absolute and \"\n\"normalized form. If the path looks like a file (not ending in `/`), the \"\n\"filename is stripped off.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:7\nmsgid \"\"\n\"Path used to absolutize relative search paths. Defaults to :attr:`base` \"\n\"which defaults to ``os.getcwd()``.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:9\nmsgid \"\"\n\"Position within the list of search paths. Defaults to last index (appends to\"\n\" the list).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:12\nmsgid \"\"\n\"The `base` parameter makes it easy to reference files installed along with a\"\n\" python module or package::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:1\nmsgid \"Search for a resource and return an absolute file path, or `None`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:3\nmsgid \"\"\n\"The :attr:`path` list is searched in order. The first match is returend. \"\n\"Symlinks are followed. The result is cached to speed up future lookups.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.open:1\nmsgid \"Find a resource and return a file object, or raise IOError.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.file:1\nmsgid \"Open file(-like) object (BytesIO buffer or temporary file)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.name:1\nmsgid \"Name of the upload form field\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.raw_filename:1\nmsgid \"Raw filename as sent by the client (may contain unsafe characters)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.headers:1\nmsgid \"A :class:`HeaderDict` with additional headers (e.g. content-type)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_type:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_type:1\nmsgid \"Current value of the 'Content-Type' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_length:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_length:1\nmsgid \"Current value of the 'Content-Length' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:1\nmsgid \"\"\n\"Name of the file on the client file system, but normalized to ensure file \"\n\"system compatibility. An empty filename is returned as 'empty'.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:4\nmsgid \"\"\n\"Only ASCII letters, digits, dashes, underscores and dots are allowed in the \"\n\"final filename. Accents are removed, if possible. Whitespace is replaced by \"\n\"a single dash. Leading or tailing dots or dashes are removed. The filename \"\n\"is limited to 255 characters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:1\nmsgid \"\"\n\"Save file to disk or copy its content to an open file(-like) object. If \"\n\"*destination* is a directory, :attr:`filename` is added to the path. \"\n\"Existing files are not overwritten by default (IOError).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:5\nmsgid \"File path, directory or file(-like) object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:6\nmsgid \"If True, replace existing files. (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:7\nmsgid \"Bytes to read at a time. (default: 64kb)\"\nmsgstr \"\"\n\n#: ../../api.rst:109\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BottleException:1\nmsgid \"A base class for exceptions used by bottle.\"\nmsgstr \"\"\n\n#: ../../api.rst:117\nmsgid \"The :class:`Bottle` Class\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:1\nmsgid \"\"\n\"Each Bottle object represents a single, distinct web application and \"\n\"consists of routes, callbacks, plugins, resources and configuration. \"\n\"Instances are callable WSGI applications.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:5\nmsgid \"\"\n\"If true (default), handle all exceptions. Turn off to let debugging \"\n\"middleware handle exceptions.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.config:1\nmsgid \"A :class:`ConfigDict` for app specific configuration.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.resources:1\nmsgid \"A :class:`ResourceManager` for application files\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.catchall:1\nmsgid \"If true, most exceptions are caught and returned as :exc:`HTTPError`\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:1\nmsgid \"Attach a callback to a hook. Three hooks are currently implemented:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"before_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"\"\n\"Executed once before each request. The request context is available, but no \"\n\"routing has happened yet.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:6\nmsgid \"after_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:7\nmsgid \"Executed once after each request regardless of its outcome.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:8\nmsgid \"app_reset\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:9\nmsgid \"Called whenever :meth:`Bottle.reset` is called.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.remove_hook:1\nmsgid \"Remove a callback from a hook.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.trigger_hook:1\nmsgid \"Trigger a hook and return a list of results.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.hook:1\nmsgid \"\"\n\"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` \"\n\"for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:1\nmsgid \"\"\n\"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL \"\n\"prefix. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:6\nmsgid \"\"\n\"path prefix or `mount-point`. If it ends in a slash, that slash is \"\n\"mandatory.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:8\nmsgid \"an instance of :class:`Bottle` or a WSGI application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:10\nmsgid \"All other parameters are passed to the underlying :meth:`route` call.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.merge:1\nmsgid \"\"\n\"Merge the routes of another :class:`Bottle` application or a list of \"\n\":class:`Route` objects into this application. The routes keep their 'owner',\"\n\" meaning that the :data:`Route.app` attribute is not changed.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.install:1\nmsgid \"\"\n\"Add a plugin to the list of plugins and prepare it for being applied to all \"\n\"routes of this application. A plugin may be a simple decorator or an object \"\n\"that implements the :class:`Plugin` API.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.uninstall:1\nmsgid \"\"\n\"Uninstall plugins. Pass an instance to remove a specific plugin, a type \"\n\"object to remove all plugins that match that type, a string to remove all \"\n\"plugins with a matching ``name`` attribute or ``True`` to remove all \"\n\"plugins. Return the list of removed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.reset:1\nmsgid \"\"\n\"Reset all routes (force plugins to be re-applied) and clear all caches. If \"\n\"an ID or route object is given, only that specific route is affected.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.close:1\nmsgid \"Close the application and all installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.run:1\nmsgid \"Calls :func:`run` with the same parameters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.match:1\nmsgid \"\"\n\"Search for a matching route and return a (:class:`Route` , urlargs) tuple. \"\n\"The second value is a dictionary with parameters extracted from the URL. \"\n\"Raise :exc:`HTTPError` (404/405) on a non-match.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get_url:1\nmsgid \"Return a string that matches a named route\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_route:1\nmsgid \"Add a route object, but do not change the :data:`Route.app` attribute.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:1\nmsgid \"A decorator to bind a function to a request URL. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:7\nmsgid \"\"\n\"The ``:name`` part is a wildcard. See :class:`Router` for syntax details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:10\nmsgid \"\"\n\"Request path or a list of paths to listen to. If no path is specified, it is\"\n\" automatically generated from the signature of the function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:13\nmsgid \"\"\n\"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. \"\n\"(default: `GET`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:15\nmsgid \"\"\n\"An optional shortcut to avoid the decorator syntax. ``route(..., \"\n\"callback=func)`` equals ``route(...)(func)``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:17\nmsgid \"The name for this route. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:18\nmsgid \"\"\n\"A decorator or plugin or a list of plugins. These are applied to the route \"\n\"callback in addition to installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:20\nmsgid \"\"\n\"A list of plugins, plugin classes or names. Matching plugins are not \"\n\"installed to this route. ``True`` skips all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:23\nmsgid \"\"\n\"Any additional keyword arguments are stored as route-specific configuration \"\n\"and passed to plugins (see :meth:`Plugin.apply`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get:1\nmsgid \"Equals :meth:`route`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.post:1\nmsgid \"Equals :meth:`route` with a ``POST`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.put:1\nmsgid \"Equals :meth:`route` with a ``PUT`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.delete:1\nmsgid \"Equals :meth:`route` with a ``DELETE`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.patch:1\nmsgid \"Equals :meth:`route` with a ``PATCH`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.error:1\nmsgid \"Decorator: Register an output handler for a HTTP error code\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.wsgi:1\nmsgid \"The bottle WSGI-interface.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route:1\nmsgid \"\"\n\"This class wraps a route callback along with route specific metadata and \"\n\"configuration and applies Plugins on demand. It is also responsible for \"\n\"turing an URL path rule into a regular expression usable by the Router.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.app:1\nmsgid \"The application this route is installed to.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.rule:1\nmsgid \"The path-rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.method:1\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.callback:1\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.name:1\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.plugins:1\nmsgid \"A list of route-specific plugins (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.skiplist:1\nmsgid \"\"\n\"A list of plugins to not apply to this route (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.config:1\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific plugin configuration \"\n\"and meta-data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.call:1\nmsgid \"\"\n\"The route callback with all plugins applied. This property is created on \"\n\"demand and then cached to speed up subsequent requests.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.reset:1\nmsgid \"\"\n\"Forget any cached values. The next time :attr:`call` is accessed, all \"\n\"plugins are re-applied.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.prepare:1\nmsgid \"Do all on-demand work immediately (useful for debugging).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.all_plugins:1\nmsgid \"Yield all Plugins affecting this route.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_undecorated_callback:1\nmsgid \"\"\n\"Return the callback. If the callback is a decorated function, try to recover\"\n\" the original function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_callback_args:1\nmsgid \"\"\n\"Return a list of argument names the callback (most likely) accepts as \"\n\"keyword arguments. If the callback is a decorated function, try to recover \"\n\"the original function before inspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_config:1\nmsgid \"\"\n\"Lookup a config field and return its value, first checking the route.config,\"\n\" then route.app.config.\"\nmsgstr \"\"\n\n#: ../../api.rst:127\nmsgid \"The :class:`Request` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:129\nmsgid \"\"\n\"The :class:`Request` class wraps a WSGI environment and provides helpful \"\n\"methods to parse and access form data, cookies, file uploads and other \"\n\"metadata. Most of the attributes are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:1\nmsgid \"\"\n\"A wrapper for WSGI environment dictionaries that adds a lot of convenient \"\n\"access methods and properties. Most of them are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:4\nmsgid \"\"\n\"Adding new attributes to a request actually adds them to the environ \"\n\"dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to \"\n\"store and access request-specific data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.MEMFILE_MAX:1\nmsgid \"Maximum size of memory buffer for :attr:`body` in bytes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.environ:1\nmsgid \"\"\n\"The wrapped WSGI environ dictionary. This is the only real attribute. All \"\n\"other attributes actually are read-only properties.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.app:1\nmsgid \"Bottle application handling this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.route:1\nmsgid \"The bottle :class:`Route` object that matches this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url_args:1\nmsgid \"The arguments extracted from the URL.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path:1\nmsgid \"\"\n\"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken \"\n\"clients and avoid the \\\"empty path\\\" edge case).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.method:1\nmsgid \"The ``REQUEST_METHOD`` value as an uppercase string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.headers:1\nmsgid \"\"\n\"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP \"\n\"request headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_header:1\nmsgid \"Return the value of a request header, or a given default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.cookies:1\nmsgid \"\"\n\"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. \"\n\"Use :meth:`get_cookie` if you expect signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_cookie:1\nmsgid \"\"\n\"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must\"\n\" match the one used to create the cookie (see \"\n\":meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or \"\n\"wrong signature), return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"\"\n\"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are \"\n\"sometimes called \\\"URL arguments\\\" or \\\"GET parameters\\\", but not to be \"\n\"confused with \\\"URL wildcards\\\" as they are provided by the :class:`Router`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.forms:1\nmsgid \"\"\n\"Form values parsed from an `url-encoded` or `multipart/form-data` encoded \"\n\"POST or PUT request body. The result is returned as a :class:`FormsDict`. \"\n\"All keys and values are strings. File uploads are stored separately in \"\n\":attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.params:1\nmsgid \"\"\n\"A :class:`FormsDict` with the combined values of :attr:`query` and \"\n\":attr:`forms`. File uploads are stored in :attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.files:1\nmsgid \"\"\n\"File uploads parsed from `multipart/form-data` encoded POST or PUT request \"\n\"body. The values are instances of :class:`FileUpload`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.json:1\nmsgid \"\"\n\"If the ``Content-Type`` header is ``application/json``, this property holds \"\n\"the parsed content of the request body. Only requests smaller than \"\n\":attr:`MEMFILE_MAX` are processed to avoid memory exhaustion.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.body:1\nmsgid \"\"\n\"The HTTP request body as a seek-able file-like object. Depending on \"\n\":attr:`MEMFILE_MAX`, this is either a temporary file or a \"\n\":class:`io.BytesIO` instance. Accessing this property for the first time \"\n\"reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses \"\n\"just do a `seek(0)` on the file object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.chunked:1\nmsgid \"True if Chunked transfer encoding was.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.GET:1\nmsgid \"An alias for :attr:`query`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.POST:1\nmsgid \"\"\n\"The values of :attr:`forms` and :attr:`files` combined into a single \"\n\":class:`FormsDict`. Values are either strings (form values) or instances of \"\n\":class:`cgi.FieldStorage` (file uploads).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url:1\nmsgid \"\"\n\"The full request URI including hostname and scheme. If your app lives behind\"\n\" a reverse proxy or load balancer and you get confusing results, make sure \"\n\"that the ``X-Forwarded-Host`` header is set correctly.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.urlparts:1\nmsgid \"\"\n\"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple \"\n\"contains (scheme, host, path, query_string and fragment), but the fragment \"\n\"is always empty because it is not visible to the server.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.fullpath:1\nmsgid \"Request path including :attr:`script_name` (if present).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query_string:1\nmsgid \"\"\n\"The raw :attr:`query` part of the URL (everything in between ``?`` and \"\n\"``#``) as a string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.script_name:1\nmsgid \"\"\n\"The initial portion of the URL's `path` that was removed by a higher level \"\n\"(server or routing middleware) before the application was called. This \"\n\"script path is returned with leading and tailing slashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"Shift path segments from :attr:`path` to :attr:`script_name` and\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:4\nmsgid \"\"\n\"The number of path segments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_length:1\nmsgid \"\"\n\"The request body length as an integer. The client is responsible to set this\"\n\" header. Otherwise, the real length of the body is unknown and -1 is \"\n\"returned. In this case, :attr:`body` will be empty.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_type:1\nmsgid \"The Content-Type header as a lowercase-string (default: empty).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_xhr:1\nmsgid \"\"\n\"True if the request was triggered by a XMLHttpRequest. This only works with \"\n\"JavaScript libraries that support the `X-Requested-With` header (most of the\"\n\" popular libraries do).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_ajax:1\nmsgid \"Alias for :attr:`is_xhr`. \\\"Ajax\\\" is not the right term.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.auth:1\nmsgid \"\"\n\"HTTP authentication data as a (user, password) tuple. This implementation \"\n\"currently supports basic (not digest) authentication only. If the \"\n\"authentication happened at a higher level (e.g. in the front web-server or a\"\n\" middleware), the password field is None, but the user field is looked up \"\n\"from the ``REMOTE_USER`` environ variable. On any errors, None is returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_route:1\nmsgid \"\"\n\"A list of all IPs that were involved in this request, starting with the \"\n\"client IP and followed by zero or more proxies. This does only work if all \"\n\"proxies support the ```X-Forwarded-For`` header. Note that this information \"\n\"can be forged by malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_addr:1\nmsgid \"\"\n\"The client IP as a string. Note that this information can be forged by \"\n\"malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.copy:1\nmsgid \"Return a new :class:`Request` with a shallow :attr:`environ` copy.\"\nmsgstr \"\"\n\n#: ../../api.rst:137\nmsgid \"\"\n\"The module-level :data:`bottle.request` is a proxy object (implemented in \"\n\":class:`LocalRequest`) and always refers to the `current` request, or in \"\n\"other words, the request that is currently processed by the request handler \"\n\"in the current thread. This `thread locality` ensures that you can safely \"\n\"use a global instance in a multi-threaded environment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseRequest` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`request`). If accessed during a request/response cycle, \"\n\"this instance always refers to the *current* request (even on a \"\n\"multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest.bind:1\nmsgid \"Wrap a WSGI environ dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest.environ:1\n#: ../../../bottle.pydocstring of bottle.LocalResponse.body:1\nmsgid \"Thread-local property\"\nmsgstr \"\"\n\n#: ../../api.rst:146\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:148\nmsgid \"\"\n\"The :class:`Response` class stores the HTTP status code as well as headers \"\n\"and cookies that are to be sent to the client. Similar to \"\n\":data:`bottle.request` there is a thread-local :data:`bottle.response` \"\n\"instance that can be used to adjust the `current` response. Moreover, you \"\n\"can instantiate :class:`Response` and return it from your request handler. \"\n\"In this case, the custom instance overrules the headers and cookies defined \"\n\"in the global one.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:1\nmsgid \"Storage class for a response body as well as headers and cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:3\nmsgid \"\"\n\"This class does support dict-like case-insensitive item-access to headers, \"\n\"but is NOT a dict. Most notably, iterating over a response yields parts of \"\n\"the body and not the headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:7\nmsgid \"The response body as one of the supported types.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:8\nmsgid \"\"\n\"Either an HTTP status code (e.g. 200) or a status line including the reason \"\n\"phrase (e.g. '200 OK').\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:10\nmsgid \"A dictionary or a list of name-value pairs.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:12\nmsgid \"\"\n\"Additional keyword arguments are added to the list of headers. Underscores \"\n\"in the header name are replaced with dashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.copy:1\nmsgid \"Returns a copy of self.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_line:1\nmsgid \"The HTTP status line as a string (e.g. ``404 Not Found``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_code:1\nmsgid \"The HTTP status code as an integer (e.g. 404).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status:1\nmsgid \"\"\n\"A writeable property to change the HTTP response status. It accepts either a\"\n\" numeric code (100-999) or a string with a custom reason phrase (e.g. \\\"404 \"\n\"Brain not found\\\"). Both :data:`status_line` and :data:`status_code` are \"\n\"updated accordingly. The return value is always a status string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headers:1\nmsgid \"\"\n\"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the\"\n\" response headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.get_header:1\nmsgid \"\"\n\"Return the value of a previously defined header. If there is no header with \"\n\"that name, return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_header:1\nmsgid \"\"\n\"Create a new response header, replacing any previously defined headers with \"\n\"the same name.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.add_header:1\nmsgid \"Add an additional response header, not removing duplicates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.iter_headers:1\nmsgid \"\"\n\"Yield (header, value) tuples, skipping headers that are not allowed with the\"\n\" current response status code.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headerlist:1\nmsgid \"WSGI conform list of (header, value) tuples.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.expires:1\nmsgid \"Current value of the 'Expires' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.charset:1\nmsgid \"\"\n\"Return the charset specified in the content-type header (default: utf8).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:1\nmsgid \"\"\n\"Create a new cookie or replace an old one. If the `secret` parameter is set,\"\n\" create a `Signed Cookie` (described below).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:4\nmsgid \"the name of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:5\nmsgid \"the value of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:6\nmsgid \"a signature key required for signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:8\nmsgid \"\"\n\"Additionally, this method accepts all RFC 2109 attributes that are supported\"\n\" by :class:`cookie.Morsel`, including:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:11\nmsgid \"maximum age in seconds. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:12\nmsgid \"a datetime object or UNIX timestamp. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:13\nmsgid \"\"\n\"the domain that is allowed to read the cookie. (default: current domain)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:15\nmsgid \"limits the cookie to a given path (default: current path)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:16\nmsgid \"limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:17\nmsgid \"\"\n\"prevents client-side javascript to read this cookie (default: off, requires \"\n\"Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:20\nmsgid \"\"\n\"If neither `expires` nor `max_age` is set (default), the cookie will expire \"\n\"at the end of the browser session (as soon as the browser window is closed).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:24\nmsgid \"\"\n\"Signed cookies may store any pickle-able object and are cryptographically \"\n\"signed to prevent manipulation. Keep in mind that cookies are limited to 4kb\"\n\" in most browsers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:28\nmsgid \"\"\n\"Warning: Signed cookies are not encrypted (the client can still see the \"\n\"content) and not copy-protected (the client can restore an old cookie). The \"\n\"main intention is to make pickling and unpickling save, not to store secret \"\n\"information at client side.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.delete_cookie:1\nmsgid \"\"\n\"Delete a cookie. Be sure to use the same `domain` and `path` settings as \"\n\"used to create the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseResponse` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`response`). Its attributes are used to build the HTTP \"\n\"response at the end of the request/response cycle.\"\nmsgstr \"\"\n\n#: ../../api.rst:160\nmsgid \"\"\n\"The following two classes can be raised as an exception. The most noticeable\"\n\" difference is that bottle invokes error handlers for :class:`HTTPError`, \"\n\"but not for :class:`HTTPResponse` or other response types.\"\nmsgstr \"\"\n\n#: ../../api.rst:172\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../api.rst:174\nmsgid \"\"\n\"All template engines supported by :mod:`bottle` implement the \"\n\":class:`BaseTemplate` API. This way it is possible to switch and mix \"\n\"template engines without changing the application code at all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate:1\nmsgid \"Base class and minimal API for template adapters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.__init__:1\nmsgid \"\"\n\"Create a new template. If the source parameter (str or buffer) is missing, \"\n\"the name argument is used to guess a template filename. Subclasses can \"\n\"assume that self.source and/or self.filename are set. Both are strings. The \"\n\"lookup, encoding and settings parameters are stored as instance variables. \"\n\"The lookup parameter stores a list containing directory paths. The encoding \"\n\"parameter should be used to decode byte strings or files. The settings \"\n\"parameter contains a dict for engine-specific settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.search:1\nmsgid \"\"\n\"Search name in all directories specified in lookup. First without, then with\"\n\" common extensions. Return first hit.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.global_config:1\nmsgid \"This reads or sets the global settings stored in class.settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.render:1\nmsgid \"\"\n\"Render the template with the specified local variables and return a single \"\n\"byte or unicode string. If it is a byte string, the encoding must match \"\n\"self.encoding. This method must be thread-safe! Local variables may be \"\n\"provided in dictionaries (args) or directly, as keywords (kwargs).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:1\nmsgid \"\"\n\"Decorator: renders a template for a handler. The handler can control its \"\n\"behavior like that:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:4\nmsgid \"return a dict of template vars to fill out the template\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:5\nmsgid \"\"\n\"return something other than a dict and the view decorator will not process \"\n\"the template, but return the handler result as is. This includes returning a\"\n\" HTTPResponse(dict) to get, for instance, JSON with autojson or other \"\n\"castfilters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.template:1\nmsgid \"\"\n\"Get a rendered template as a string iterator. You can use a name, a filename\"\n\" or a template string as first parameter. Template rendering arguments can \"\n\"be passed as dictionaries or directly (as keyword arguments).\"\nmsgstr \"\"\n\n#: ../../api.rst:185\nmsgid \"\"\n\"You can write your own adapter for your favourite template engine or use one\"\n\" of the predefined adapters. Currently there are four fully supported \"\n\"template engines:\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Class\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"URL\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Decorator\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Render function\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":class:`SimpleTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`view`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`template`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":class:`MakoTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \"http://www.makotemplates.org\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":class:`CheetahTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \"http://www.cheetahtemplate.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":class:`Jinja2Template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \"http://jinja.pocoo.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:196\nmsgid \"\"\n\"To use :class:`MakoTemplate` as your default template engine, just import \"\n\"its specialised decorator and render function::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/async.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../async.rst:2\nmsgid \"Primer to Asynchronous Applications\"\nmsgstr \"\"\n\n#: ../../async.rst:4\nmsgid \"\"\n\"Asynchronous design patterns don't mix well with the synchronous nature of \"\n\"`WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most \"\n\"asynchronous frameworks (tornado, twisted, ...) implement a specialized API \"\n\"to expose their asynchronous features. Bottle is a WSGI framework and shares\"\n\" the synchronous nature of WSGI, but thanks to the awesome `gevent project \"\n\"<http://www.gevent.org/>`_, it is still possible to write asynchronous \"\n\"applications with bottle. This article documents the usage of Bottle with \"\n\"Asynchronous WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:7\nmsgid \"The Limits of Synchronous WSGI\"\nmsgstr \"\"\n\n#: ../../async.rst:9\nmsgid \"\"\n\"Briefly worded, the `WSGI specification (pep 3333) \"\n\"<http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response \"\n\"circle as follows: The application callable is invoked once for each request\"\n\" and must return a body iterator. The server then iterates over the body and\"\n\" writes each chunk to the socket. As soon as the body iterator is exhausted,\"\n\" the client connection is closed.\"\nmsgstr \"\"\n\n#: ../../async.rst:11\nmsgid \"\"\n\"Simple enough, but there is a snag: All this happens synchronously. If your \"\n\"application needs to wait for data (IO, sockets, databases, ...), it must \"\n\"either yield empty strings (busy wait) or block the current thread. Both \"\n\"solutions occupy the handling thread and prevent it from answering new \"\n\"requests. There is consequently only one ongoing request per thread.\"\nmsgstr \"\"\n\n#: ../../async.rst:13\nmsgid \"\"\n\"Most servers limit the number of threads to avoid their relatively high \"\n\"overhead. Pools of 20 or less threads are common. As soon as all threads are\"\n\" occupied, any new connection is stalled. The server is effectively dead for\"\n\" everyone else. If you want to implement a chat that uses long-polling ajax \"\n\"requests to get real-time updates, you'd reach the limited at 20 concurrent \"\n\"connections. That's a pretty small chat.\"\nmsgstr \"\"\n\n#: ../../async.rst:16\nmsgid \"Greenlets to the rescue\"\nmsgstr \"\"\n\n#: ../../async.rst:18\nmsgid \"\"\n\"Most servers limit the size of their worker pools to a relatively low number\"\n\" of concurrent threads, due to the high overhead involved in switching \"\n\"between and creating new threads. While threads are cheap compared to \"\n\"processes (forks), they are still expensive to create for each new \"\n\"connection.\"\nmsgstr \"\"\n\n#: ../../async.rst:20\nmsgid \"\"\n\"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. \"\n\"Greenlets behave similar to traditional threads, but are very cheap to \"\n\"create. A gevent-based server can spawn thousands of greenlets (one for each\"\n\" connection) with almost no overhead. Blocking individual greenlets has no \"\n\"impact on the servers ability to accept new requests. The number of \"\n\"concurrent connections is virtually unlimited.\"\nmsgstr \"\"\n\n#: ../../async.rst:22\nmsgid \"\"\n\"This makes creating asynchronous applications incredibly easy, because they \"\n\"look and feel like synchronous applications. A gevent-based server is \"\n\"actually not asynchronous, but massively multi-threaded. Here is an \"\n\"example::\"\nmsgstr \"\"\n\n#: ../../async.rst:39\nmsgid \"\"\n\"The first line is important. It causes gevent to monkey-patch most of \"\n\"Python's blocking APIs to not block the current thread, but pass the CPU to \"\n\"the next greenlet instead. It actually replaces Python's threading with \"\n\"gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` \"\n\"which would normally block the whole thread. If you don't feel comfortable \"\n\"with monkey-patching python built-ins, you can use the corresponding gevent \"\n\"functions (``gevent.sleep()`` in this case).\"\nmsgstr \"\"\n\n#: ../../async.rst:41\nmsgid \"\"\n\"If you run this script and point your browser to \"\n\"``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and \"\n\"`END` show up one by one (rather than waiting 8 seconds to see them all at \"\n\"once). It works exactly as with normal threads, but now your server can \"\n\"handle thousands of concurrent requests without any problems.\"\nmsgstr \"\"\n\n#: ../../async.rst:45\nmsgid \"\"\n\"Some browsers buffer a certain amount of data before they start rendering a \"\n\"page. You might need to yield more than a few bytes to see an effect in \"\n\"these browsers. Additionally, many browsers have a limit of one concurrent \"\n\"connection per URL. If this is the case, you can use a second browser or a \"\n\"benchmark tool (e.g. `ab` or `httperf`) to measure performance.\"\nmsgstr \"\"\n\n#: ../../async.rst:52\nmsgid \"Event Callbacks\"\nmsgstr \"\"\n\n#: ../../async.rst:54\nmsgid \"\"\n\"A very common design pattern in asynchronous frameworks (including tornado, \"\n\"twisted, node.js and friends) is to use non-blocking APIs and bind callbacks\"\n\" to asynchronous events. The socket object is kept open until it is closed \"\n\"explicitly to allow callbacks to write to the socket at a later point. Here \"\n\"is an example based on the `tornado library \"\n\"<http://www.tornadoweb.org/documentation#non-blocking-asynchronous-\"\n\"requests>`_::\"\nmsgstr \"\"\n\n#: ../../async.rst:63\nmsgid \"\"\n\"The main benefit is that the request handler terminates early. The handling \"\n\"thread can move on and accept new requests while the callbacks continue to \"\n\"write to sockets of previous requests. This is how these frameworks manage \"\n\"to process a lot of concurrent requests with only a small number of OS \"\n\"threads.\"\nmsgstr \"\"\n\n#: ../../async.rst:65\nmsgid \"\"\n\"With Gevent+WSGI, things are different: First, terminating early has no \"\n\"benefit because we have an unlimited pool of (pseudo)threads to accept new \"\n\"connections. Second, we cannot terminate early because that would close the \"\n\"socket (as required by WSGI). Third, we must return an iterable to conform \"\n\"to WSGI.\"\nmsgstr \"\"\n\n#: ../../async.rst:67\nmsgid \"\"\n\"In order to conform to the WSGI standard, all we have to do is to return a \"\n\"body iterable that we can write to asynchronously. With the help of \"\n\"`gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate*\"\n\" a detached socket and rewrite the previous example as follows::\"\nmsgstr \"\"\n\n#: ../../async.rst:78\nmsgid \"\"\n\"From the server perspective, the queue object is iterable. It blocks if \"\n\"empty and stops as soon as it reaches ``StopIteration``. This conforms to \"\n\"WSGI. On the application side, the queue object behaves like a non-blocking \"\n\"socket. You can write to it at any time, pass it around and even start a new\"\n\" (pseudo)thread that writes to it asynchronously. This is how long-polling \"\n\"is implemented most of the time.\"\nmsgstr \"\"\n\n#: ../../async.rst:82\nmsgid \"Finally: WebSockets\"\nmsgstr \"\"\n\n#: ../../async.rst:84\nmsgid \"\"\n\"Lets forget about the low-level details for a while and speak about \"\n\"WebSockets. Since you are reading this article, you probably know what \"\n\"WebSockets are: A bidirectional communication channel between a browser \"\n\"(client) and a web application (server).\"\nmsgstr \"\"\n\n#: ../../async.rst:86\nmsgid \"\"\n\"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-\"\n\"websocket/>`_ package does all the hard work for us. Here is a simple \"\n\"WebSocket endpoint that receives messages and just sends them back to the \"\n\"client::\"\nmsgstr \"\"\n\n#: ../../async.rst:111\nmsgid \"\"\n\"The while-loop runs until the client closes the connection. You get the idea\"\n\" :)\"\nmsgstr \"\"\n\n#: ../../async.rst:113\nmsgid \"The client-site JavaScript API is really straight forward, too::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/changelog.po",
    "content": "#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../changelog.rst:6\nmsgid \"Release Notes and Changelog\"\nmsgstr \"\"\n\n#: ../../changelog.rst:9\nmsgid \"Release 0.13\"\nmsgstr \"\"\n\n#: ../../changelog.rst:13\nmsgid \"Added :func:`patch` shortcut for `route(..., method='PATCH')`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:17\nmsgid \"Release 0.12\"\nmsgstr \"\"\n\n#: ../../changelog.rst:19\nmsgid \"\"\n\"New SimpleTemplate parser implementation * Support for multi-line code \"\n\"blocks (`<% ... %>`). * The keywords `include` and `rebase` are functions \"\n\"now and can accept variable template names.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:22\nmsgid \"\"\n\"The new :meth:`BaseRequest.route` property returns the :class:`Route` that \"\n\"originally matched the request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:23\nmsgid \"\"\n\"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in \"\n\"CPythons dict() implementation was fixed over a year ago. If you are still \"\n\"using Python 2.5 in production, consider upgrading or at least make sure \"\n\"that you get security fixed from your distributor.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:24\nmsgid \"New :class:`ConfigDict` API (see :doc:`configuration`)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:26\nmsgid \"\"\n\"More information can be found in this `development blog post \"\n\"<http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:30\nmsgid \"Release 0.11\"\nmsgstr \"\"\n\n#: ../../changelog.rst:32\nmsgid \"\"\n\"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:33\nmsgid \"\"\n\"Support for partial downloads (``Range`` header) in :func:`static_file`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:34\nmsgid \"\"\n\"The new :class:`ResourceManager` interface helps locating files bundled with\"\n\" an application.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:35\nmsgid \"\"\n\"Added a server adapter for `waitress \"\n\"<http://docs.pylonsproject.org/projects/waitress/en/latest/>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:36\nmsgid \"\"\n\"New :meth:`Bottle.merge` method to install all routes from one application \"\n\"into another.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:37\nmsgid \"\"\n\"New :attr:`BaseRequest.app` property to get the application object that \"\n\"handles a request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:38\nmsgid \"\"\n\"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by \"\n\"WTForms).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:39\nmsgid \":class:`MultiDict` and subclasses are now pickle-able.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:42\nmsgid \"API Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:43\nmsgid \"\"\n\":attr:`Response.status` is a read-write property that can be assigned either\"\n\" a numeric status code or a status string with a reason phrase (``200 OK``).\"\n\" The return value is now a string to better match existing APIs (WebOb, \"\n\"werkzeug). To be absolutely clear, you can use the read-only properties \"\n\":attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:46\nmsgid \"API Deprecations\"\nmsgstr \"\"\n\n#: ../../changelog.rst:47\nmsgid \"\"\n\":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:50\nmsgid \"Release 0.10\"\nmsgstr \"\"\n\n#: ../../changelog.rst:52\nmsgid \"Plugin API v2\"\nmsgstr \"\"\n\n#: ../../changelog.rst:54\nmsgid \"To use the new API, set :attr:`Plugin.api` to ``2``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:55\nmsgid \"\"\n\":meth:`Plugin.apply` receives a :class:`Route` object instead of a context \"\n\"dictionary as second parameter. The new object offers some additional \"\n\"information and may be extended in the future.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:56\nmsgid \"\"\n\"Plugin names are considered unique now. The topmost plugin with a given name\"\n\" on a given route is installed, all other plugins with the same name are \"\n\"silently ignored.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:58\nmsgid \"The Request/Response Objects\"\nmsgstr \"\"\n\n#: ../../changelog.rst:60\nmsgid \"\"\n\"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, \"\n\":attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and \"\n\":attr:`BaseRequest.script_name`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:61\nmsgid \"\"\n\"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` \"\n\"attributes. In future releases, :attr:`BaseResponse.status` will return a \"\n\"string (e.g. ``200 OK``) instead of an integer to match the API of other \"\n\"common frameworks. To make the transition as smooth as possible, you should \"\n\"use the verbose attributes from now on.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:62\nmsgid \"\"\n\"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many \"\n\"places. The new dict implementation allows attribute access and handles \"\n\"unicode form values transparently.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:64\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../changelog.rst:66\nmsgid \"\"\n\"Added three new functions to the SimpleTemplate default namespace that \"\n\"handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and \"\n\":func:`stpl.setdefault`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:67\nmsgid \"\"\n\"The default escape function for SimpleTemplate now additionally escapes \"\n\"single and double quotes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:69\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../changelog.rst:71\nmsgid \"\"\n\"A new route syntax (e.g. ``/object/<id:int>``) and support for route \"\n\"wildcard filters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:72\nmsgid \"Four new wildcard filters: `int`, `float`, `path` and `re`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:74\nmsgid \"Other changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:76\nmsgid \"Added command line interface to load applications and start servers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:77\nmsgid \"\"\n\"Introduced a :class:`ConfigDict` that makes accessing configuration a lot \"\n\"easier (attribute access and auto-expanding namespaces).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:78\nmsgid \"Added support for raw WSGI applications to :meth:`Bottle.mount`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:79\nmsgid \":meth:`Bottle.mount` parameter order changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:80\nmsgid \"\"\n\":meth:`Bottle.route` now accpets an import string for the ``callback`` \"\n\"parameter.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:81\nmsgid \"Dropped Gunicorn 0.8 support. Current supported version is 0.13.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:82\nmsgid \"Added custom options to Gunicorn server.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:83\nmsgid \"\"\n\"Finally dropped support for type filters. Replace with a custom plugin of \"\n\"needed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:87\nmsgid \"Release 0.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:90\nmsgid \"Whats new?\"\nmsgstr \"\"\n\n#: ../../changelog.rst:91\nmsgid \"\"\n\"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:92\nmsgid \"\"\n\"The :func:`route` decorator got a lot of new features. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:93\nmsgid \"\"\n\"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld \"\n\"<http://meinheld.org/>`_ and `bjoern \"\n\"<https://github.com/jonashaag/bjoern>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:94\nmsgid \"Support for SimpleTAL templates.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:95\nmsgid \"Better runtime exception handling for mako templates in debug mode.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:96\nmsgid \"Lots of documentation, fixes and small improvements.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:97\nmsgid \"A new :data:`Request.urlparts` property.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:100\nmsgid \"Performance improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:101\nmsgid \"\"\n\"The :class:`Router` now special-cases ``wsgi.run_once`` environments to \"\n\"speed up CGI.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:102\nmsgid \"\"\n\"Reduced module load time by ~30% and optimized template parser. See `8ccb2d \"\n\"<http://github.com/bottlepy/bottle/commit/8ccb2d>`_, `f72a7c <http://github.com/bottlepy/bottle/commit/f72a7c>`_ and `b14b9a \"\n\"<http://github.com/bottlepy/bottle/commit/b14b9a>`_ for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:103\nmsgid \"\"\n\"Support for \\\"App Caching\\\" on Google App Engine. See `af93ec \"\n\"<http://github.com/bottlepy/bottle/commit/af93ec>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:104\nmsgid \"\"\n\"Some of the rarely used or deprecated features are now plugins that avoid \"\n\"overhead if the feature is not used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:107 ../../changelog.rst:118\nmsgid \"API changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:108\nmsgid \"\"\n\"This release is mostly backward compatible, but some APIs are marked \"\n\"deprecated now and will be removed for the next release. Most noteworthy:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:110\nmsgid \"\"\n\"The ``static`` route parameter is deprecated. You can escape wild-cards with\"\n\" a backslash.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:111\nmsgid \"\"\n\"Type-based output filters are deprecated. They can easily be replaced with \"\n\"plugins.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:115\nmsgid \"Release 0.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:119\nmsgid \"These changes may break compatibility with previous versions.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:121\nmsgid \"\"\n\"The built-in Key/Value database is not available anymore. It is marked \"\n\"deprecated since 0.6.4\"\nmsgstr \"\"\n\n#: ../../changelog.rst:122\nmsgid \"The Route syntax and behaviour changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:124\nmsgid \"\"\n\"Regular expressions must be encapsulated with ``#``. In 0.6 all non-\"\n\"alphanumeric characters not present in the regular expression were allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:125\nmsgid \"\"\n\"Regular expressions not part of a route wildcard are escaped automatically. \"\n\"You don't have to escape dots or other regular control characters anymore. \"\n\"In 0.6 the whole URL was interpreted as a regular expression. You can use \"\n\"anonymous wildcards (``/index:#(\\\\.html)?#``) to achieve a similar \"\n\"behaviour.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:127\nmsgid \"\"\n\"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:128\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine escapes HTML special characters in \"\n\"``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` \"\n\"syntax to get old behaviour (no escaping).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:129\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine returns unicode strings instead of lists \"\n\"of byte strings.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:130\nmsgid \"\"\n\"``bottle.optimize()`` and the automatic route optimization is obsolete.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:131\nmsgid \"Some functions and attributes were renamed:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:133\nmsgid \":attr:`Request._environ` is now :attr:`Request.environ`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:134\nmsgid \":attr:`Response.header` is now :attr:`Response.headers`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:135\nmsgid \":func:`default_app` is obsolete. Use :func:`app` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:137\nmsgid \"The default :func:`redirect` code changed from 307 to 303.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:138\nmsgid \"Removed support for ``@default``. Use ``@error(404)`` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:142\nmsgid \"New features\"\nmsgstr \"\"\n\n#: ../../changelog.rst:143\nmsgid \"This is an incomplete list of new features and improved functionality.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:145\nmsgid \"\"\n\"The :class:`Request` object got new properties: :attr:`Request.body`, \"\n\":attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, \"\n\":attr:`Request.forms`, :attr:`Request.files`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:146\nmsgid \"\"\n\"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are \"\n\"now able to encode and decode python objects. This is called a *secure \"\n\"cookie* because the encoded values are signed and protected from changes on \"\n\"client side. All pickle-able data structures are allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:147\nmsgid \"\"\n\"The new :class:`Router` class drastically improves performance for setups \"\n\"with lots of dynamic routes and supports named routes (named route + dict = \"\n\"URL string).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:148\nmsgid \"\"\n\"It is now possible (and recommended) to return :exc:`HTTPError` and \"\n\":exc:`HTTPResponse` instances or other exception objects instead of raising \"\n\"them.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:149\nmsgid \"\"\n\"The new function :func:`static_file` equals :func:`send_file` but returns a \"\n\":exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. \"\n\":func:`send_file` is deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:150\nmsgid \"\"\n\"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:151\nmsgid \"The :class:`SimpleTemplate` engine got full unicode support.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:152\nmsgid \"Lots of non-critical bugfixes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:158\nmsgid \"Contributors\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:1\nmsgid \"\"\n\"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:3\nmsgid \"\"\n\"Thanks to all the people who found bugs, sent patches, spread the word, \"\n\"helped each other on the mailing-list and made this project possible. I hope\"\n\" the following (alphabetically sorted) list is complete. If you miss your \"\n\"name on that list (or want your name removed) please :doc:`tell me \"\n\"<contact>` or add it yourself.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:5\nmsgid \"acasajus\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:6\nmsgid \"Adam R. Smith\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:7\nmsgid \"Alexey Borzenkov\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:8\nmsgid \"Alexis Daboville\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:9\nmsgid \"Anton I. Sipos\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:10\nmsgid \"Anton Kolechkin\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:11\nmsgid \"apexi200sx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:12\nmsgid \"apheage\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:13\nmsgid \"BillMa\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:14\nmsgid \"Brad Greenlee\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:15\nmsgid \"Brandon Gilmore\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:16\nmsgid \"Branko Vukelic\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:17\nmsgid \"Brian Sierakowski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:18\nmsgid \"Brian Wickman\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:19\nmsgid \"Carl Scharenberg\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:20\nmsgid \"Damien Degois\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:21\nmsgid \"David Buxton\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:22\nmsgid \"Duane Johnson\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:23\nmsgid \"fcamel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:24\nmsgid \"Frank Murphy\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:25\nmsgid \"Frederic Junod\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:26\nmsgid \"goldfaber3012\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:27\nmsgid \"Greg Milby\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:28\nmsgid \"gstein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:29\nmsgid \"Ian Davis\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:30\nmsgid \"Itamar Nabriski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:31\nmsgid \"Iuri de Silvio\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:32\nmsgid \"Jaimie Murdock\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:33\nmsgid \"Jeff Nichols\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:34\nmsgid \"Jeremy Kelley\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:35\nmsgid \"joegester\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:36\nmsgid \"Johannes Krampf\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:37\nmsgid \"Jonas Haag\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:38\nmsgid \"Joshua Roesslein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:39\nmsgid \"Judson Neer\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:40\nmsgid \"Karl\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:41\nmsgid \"Kevin Zuber\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:42\nmsgid \"Kraken\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:43\nmsgid \"Kyle Fritz\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:44\nmsgid \"m35\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:45\nmsgid \"Marcos Neves\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:46\nmsgid \"masklinn\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:47\nmsgid \"Michael Labbe\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:48\nmsgid \"Michael Soulier\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:49\nmsgid \"`reddit <http://reddit.com/r/python>`_\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:50\nmsgid \"Nicolas Vanhoren\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:51\nmsgid \"Robert Rollins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:52\nmsgid \"rogererens\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:53\nmsgid \"rwxrwx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:54\nmsgid \"Santiago Gala\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:55\nmsgid \"Sean M. Collins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:56\nmsgid \"Sebastian Wollrath\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:57\nmsgid \"Seth\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:58\nmsgid \"Sigurd Høgsbro\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:59\nmsgid \"Stuart Rackham\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:60\nmsgid \"Sun Ning\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:61\nmsgid \"Tomás A. Schertel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:62\nmsgid \"Tristan Zajonc\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:63\nmsgid \"voltron\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:64\nmsgid \"Wieland Hoffmann\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:65\nmsgid \"zombat\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:66\nmsgid \"Thiago Avelino\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/configuration.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../configuration.rst:3\nmsgid \"Configuration (DRAFT)\"\nmsgstr \"\"\n\n#: ../../configuration.rst:8\nmsgid \"\"\n\"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_\"\n\" what you think.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:10\nmsgid \"\"\n\"Bottle applications can store their configuration in :attr:`Bottle.config`, \"\n\"a dict-like object and central place for application specific settings. This\"\n\" dictionary controls many aspects of the framework, tells (newer) plugins \"\n\"what to do, and can be used to store your own configuration as well.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:13\nmsgid \"Configuration Basics\"\nmsgstr \"\"\n\n#: ../../configuration.rst:15\nmsgid \"\"\n\"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. \"\n\"All the common dict methods work as expected. Let us start with some \"\n\"examples::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:44\nmsgid \"\"\n\"The app object is not always available, but as long as you are within a \"\n\"request context, you can use the `request` object to get the current \"\n\"application and its configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:51\nmsgid \"Naming Convention\"\nmsgstr \"\"\n\n#: ../../configuration.rst:53\nmsgid \"\"\n\"To make life easier, plugins and applications should follow some simple \"\n\"rules when it comes to config parameter names:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:55\nmsgid \"\"\n\"All keys should be lowercase strings and follow the rules for python \"\n\"identifiers (no special characters but the underscore).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:56\nmsgid \"\"\n\"Namespaces are separated by dots (e.g. ``namespace.field`` or \"\n\"``namespace.subnamespace.field``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:57\nmsgid \"\"\n\"Bottle uses the root namespace for its own configuration. Plugins should \"\n\"store all their variables in their own namespace (e.g. ``sqlite.db`` or \"\n\"``werkzeug.use_debugger``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:58\nmsgid \"\"\n\"Your own application should use a separate namespace (e.g. ``myapp.*``).\"\nmsgstr \"\"\n\n#: ../../configuration.rst:62\nmsgid \"Loading Configuration from a File\"\nmsgstr \"\"\n\n#: ../../configuration.rst:66\nmsgid \"\"\n\"Configuration files are useful if you want to enable non-programmers to \"\n\"configure your application, or just don't want to hack python module files \"\n\"just to change the database port. A very common syntax for configuration \"\n\"files is shown here:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:78\nmsgid \"\"\n\"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style \"\n\"configuration files from disk and import their values into your existing \"\n\"configuration::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:84\nmsgid \"Loading Configuration from a nested :class:`dict`\"\nmsgstr \"\"\n\n#: ../../configuration.rst:88\nmsgid \"\"\n\"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an \"\n\"entire structure of nested dictionaries and turns it into a flat list of \"\n\"keys and values with namespaced keys::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:109\nmsgid \"Listening to configuration changes\"\nmsgstr \"\"\n\n#: ../../configuration.rst:113\nmsgid \"\"\n\"The ``config`` hook on the application object is triggered each time a value\"\n\" in :attr:`Bottle.config` is changed. This hook can be used to react on \"\n\"configuration changes at runtime, for example reconnect to a new database, \"\n\"change the debug settings on a background service or resize worker thread \"\n\"pools. The hook callback receives two arguments (key, new_value) and is \"\n\"called before the value is actually changed in the dictionary. Raising an \"\n\"exception from a hook callback cancels the change and the old value is \"\n\"preserved.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:122\nmsgid \"\"\n\"The hook callbacks cannot *change* the value that is to be stored to the \"\n\"dictionary. That is what filters are for.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:128\nmsgid \"Filters and other Meta Data\"\nmsgstr \"\"\n\n#: ../../configuration.rst:132\nmsgid \"\"\n\":class:`ConfigDict` allows you to store meta data along with configuration \"\n\"keys. Two meta fields are currently defined:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:136\nmsgid \"help\"\nmsgstr \"\"\n\n#: ../../configuration.rst:135\nmsgid \"\"\n\"A help or description string. May be used by debugging, introspection or \"\n\"admin tools to help the site maintainer configuring their application.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:139\nmsgid \"filter\"\nmsgstr \"\"\n\n#: ../../configuration.rst:139\nmsgid \"\"\n\"A callable that accepts and returns a single value. If a filter is defined \"\n\"for a key, any new value stored to that key is first passed through the \"\n\"filter callback. The filter can be used to cast the value to a different \"\n\"type, check for invalid values (throw a ValueError) or trigger side effects.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:141\nmsgid \"\"\n\"This feature is most useful for plugins. They can validate their config \"\n\"parameters or trigger side effects using filters and document their \"\n\"configuration via ``help`` fields::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:163\nmsgid \"API Documentation\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:1\nmsgid \"\"\n\"A dict-like configuration storage with additional support for namespaces, \"\n\"validators, meta-data, on_change listeners and more.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:1\nmsgid \"Load values from an ``*.ini`` style config file.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:3\nmsgid \"\"\n\"If the config file contains sections, their names are used as namespaces for\"\n\" the values within. The two special sections ``DEFAULT`` and ``bottle`` \"\n\"refer to the root namespace (no prefix).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_dict:1\nmsgid \"\"\n\"Load values from a dictionary structure. Nesting can be used to represent \"\n\"namespaces.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.update:1\nmsgid \"\"\n\"If the first parameter is a string, all keys are prefixed with this \"\n\"namespace. Apart from that it works just as the usual dict.update(). \"\n\"Example: ``update('some.namespace', key='value')``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_get:1\nmsgid \"Return the value of a meta field for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_set:1\nmsgid \"\"\n\"Set the meta field for a key to a new value. This triggers the on-change \"\n\"handler for existing keys.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_list:1\nmsgid \"Return an iterable of meta field names defined for a key.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/contact.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../contact.rst:3\nmsgid \"Contact\"\nmsgstr \"\"\n\n#: ../../contact.rst:6\nmsgid \"About the Autor\"\nmsgstr \"\"\n\n#: ../../contact.rst:7\nmsgid \"\"\n\"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy \"\n\"behind this website. I'm 27 years old and studying computer science at the \"\n\"Georg-August-University in Göttingen, Germany. Python is my favorite \"\n\"language, but I also code in ruby and JavaScript a lot. Watch me on `twitter\"\n\" <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub \"\n\"<http://github.com/defnull>`_ to get in contact. A `mailinglist \"\n\"<http://groups.google.de/group/bottlepy>`_ is open for Bottle related \"\n\"questions, too.\"\nmsgstr \"\"\n\n#: ../../contact.rst:10\nmsgid \"About Bottle\"\nmsgstr \"\"\n\n#: ../../contact.rst:11\nmsgid \"\"\n\"This is my first open source project so far. It started and a small \"\n\"experiment but soon got so much positive feedback I decided to make \"\n\"something real out of it. Here it is.\"\nmsgstr \"\"\n\n#: ../../contact.rst:14\nmsgid \"Impressum und Kontaktdaten\"\nmsgstr \"\"\n\n#: ../../contact.rst:15\nmsgid \"\"\n\"(This is required by `German law \"\n\"<http://bundesrecht.juris.de/tmg/__5.html>`_)\"\nmsgstr \"\"\n\n#: ../../contact.rst:17\nmsgid \"\"\n\"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die \"\n\"Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen \"\n\"vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist \"\n\"ausdrücklich untersagt.\"\nmsgstr \"\"\n\n#: ../../contact.rst:22\nmsgid \"**Betreiber**: Marcel Hellkamp\"\nmsgstr \"\"\n\n#: ../../contact.rst:23\nmsgid \"**Ort**: D - 37075 Göttingen\"\nmsgstr \"\"\n\n#: ../../contact.rst:24\nmsgid \"**Strasse**: Theodor-Heuss Strasse 13\"\nmsgstr \"\"\n\n#: ../../contact.rst:25\nmsgid \"**Telefon**: +49 (0) 551 20005915\"\nmsgstr \"\"\n\n#: ../../contact.rst:26\nmsgid \"**E-Mail**: marc at gsites dot de\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/deployment.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../deployment.rst:27\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../deployment.rst:29\nmsgid \"\"\n\"The bottle :func:`run` function, when called without any parameters, starts \"\n\"a local development server on port 8080. You can access and test your \"\n\"application via http://localhost:8080/ if you are on the same host.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:31\nmsgid \"\"\n\"To get your application available to the outside world, specify the IP of \"\n\"the interface the server should listen to (e.g. ``run(host='192.168.0.1')``)\"\n\" or let the server listen to all interfaces at once (e.g. \"\n\"``run(host='0.0.0.0')``). The listening port can be changed in a similar \"\n\"way, but you need root or admin rights to choose a port below 1024. Port 80 \"\n\"is the standard for HTTP servers::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:36\nmsgid \"Server Options\"\nmsgstr \"\"\n\n#: ../../deployment.rst:38\nmsgid \"\"\n\"The built-in default server is based on `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-\"\n\"wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine \"\n\"for development and early production, but may become a performance \"\n\"bottleneck when server load increases. There are three ways to eliminate \"\n\"this bottleneck:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:40\nmsgid \"Use a different server that is either multi-threaded or asynchronous.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:41\nmsgid \"\"\n\"Start multiple server processes and spread the load with a load-balancer.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:42\nmsgid \"Do both.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:44\nmsgid \"\"\n\"**Multi-threaded** servers are the 'classic' way to do it. They are very \"\n\"robust, reasonably fast and easy to manage. As a drawback, they can only \"\n\"handle a limited number of connections at the same time and utilize only one\"\n\" CPU core due to the \\\"Global Interpreter Lock\\\" (GIL) of the Python \"\n\"runtime. This does not hurt most applications, they are waiting for network \"\n\"IO most of the time anyway, but may slow down CPU intensive tasks (e.g. \"\n\"image processing).\"\nmsgstr \"\"\n\n#: ../../deployment.rst:46\nmsgid \"\"\n\"**Asynchronous** servers are very fast, can handle a virtually unlimited \"\n\"number of concurrent connections and are easy to manage. To take full \"\n\"advantage of their potential, you need to design your application \"\n\"accordingly and understand the concepts of the specific server.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:48\nmsgid \"\"\n\"**Multi-processing** (forking) servers are not limited by the GIL and \"\n\"utilize more than one CPU core, but make communication between server \"\n\"instances more expensive. You need a database or external message query to \"\n\"share state between processes, or design your application so that it does \"\n\"not need any shared state. The setup is also a bit more complicated, but \"\n\"there are good tutorials available.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:51\nmsgid \"Switching the Server Backend\"\nmsgstr \"\"\n\n#: ../../deployment.rst:53\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded default server::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:57\nmsgid \"\"\n\"Bottle ships with a lot of ready-to-use adapters for the most common WSGI \"\n\"servers and automates the setup process. Here is an incomplete list:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:60\nmsgid \"Name\"\nmsgstr \"\"\n\n#: ../../deployment.rst:60\nmsgid \"Homepage\"\nmsgstr \"\"\n\n#: ../../deployment.rst:60\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../deployment.rst:62\nmsgid \"cgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:62\nmsgid \"Run as CGI script\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"flup\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"flup_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"Run as FastCGI process\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"gae\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"gae_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"Helper for Google App Engine deployments\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"wsgiref\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"wsgiref_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"Single-threaded default server\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"cherrypy\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"cherrypy_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"Multi-threaded and very stable\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"paste\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"paste_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"Multi-threaded, stable, tried and tested\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"Multi-threaded\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"Multi-threaded, poweres Pyramid\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"Pre-forked, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"Asynchronous framework with WSGI support.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72 ../../deployment.rst:73\nmsgid \"Asynchronous (greenlets)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"fapws3\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"fapws3_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"Asynchronous (network side only), written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"tornado\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"tornado_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"Asynchronous, powers some parts of Facebook\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"twisted_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"Asynchronous, well tested but... twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"meinheld\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"meinheld_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"Asynchronous, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"bjoern\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"bjoern_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"Asynchronous, very fast and written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:79\nmsgid \"auto\"\nmsgstr \"\"\n\n#: ../../deployment.rst:79\nmsgid \"Automatically selects an available server adapter\"\nmsgstr \"\"\n\n#: ../../deployment.rst:82\nmsgid \"The full list is available through :data:`server_names`.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:84\nmsgid \"\"\n\"If there is no adapter for your favorite server or if you need more control \"\n\"over the server setup, you may want to start the server manually. Refer to \"\n\"the server documentation on how to run WSGI applications. Here is an example\"\n\" for paste_::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:93\nmsgid \"Apache mod_wsgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:95\nmsgid \"\"\n\"Instead of running your own HTTP server from within Bottle, you can attach \"\n\"Bottle applications to an `Apache server <apache>`_ using mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:97\nmsgid \"\"\n\"All you need is an ``app.wsgi`` file that provides an ``application`` \"\n\"object. This object is used by mod_wsgi to start your application and should\"\n\" be a WSGI-compatible Python callable.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:99\nmsgid \"File ``/var/www/yourapp/app.wsgi``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:109\nmsgid \"The Apache configuration may look like this::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:128\nmsgid \"Google AppEngine\"\nmsgstr \"\"\n\n#: ../../deployment.rst:132\nmsgid \"\"\n\"New App Engine applications using the Python 2.7 runtime environment support\"\n\" any WSGI application and should be configured to use the Bottle application\"\n\" object directly. For example suppose your application's main module is \"\n\"``myapp.py``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:142\nmsgid \"\"\n\"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object \"\n\"like so::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:153\nmsgid \"\"\n\"Bottle also provides a ``gae`` server adapter for legacy App Engine \"\n\"applications using the Python 2.5 runtime environment. It works similar to \"\n\"the ``cgi`` adapter in that it does not start a new HTTP server, but \"\n\"prepares and optimizes your application for Google App Engine and makes sure\"\n\" it conforms to their API::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:157\nmsgid \"\"\n\"It is always a good idea to let GAE serve static files directly. Here is \"\n\"example for a working  ``app.yaml`` (using the legacy Python 2.5 runtime \"\n\"environment)::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:173\nmsgid \"Load Balancer (Manual Setup)\"\nmsgstr \"\"\n\n#: ../../deployment.rst:175\nmsgid \"\"\n\"A single Python process can utilize only one CPU at a time, even if there \"\n\"are more CPU cores available. The trick is to balance the load between \"\n\"multiple independent Python processes to utilize all of your CPU cores.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:177\nmsgid \"\"\n\"Instead of a single Bottle application server, you start one instance for \"\n\"each CPU core available using different local port (localhost:8080, 8081, \"\n\"8082, ...). You can choose any server adapter you want, even asynchronous \"\n\"ones. Then a high performance load balancer acts as a reverse proxy and \"\n\"forwards each new requests to a random port, spreading the load between all \"\n\"available back-ends. This way you can use all of your CPU cores and even \"\n\"spread out the load between different physical servers.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:179\nmsgid \"\"\n\"One of the fastest load balancers available is Pound_ but most common web \"\n\"servers have a proxy-module that can do the work just fine.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:181\nmsgid \"Pound example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:199\nmsgid \"Apache example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:207\nmsgid \"Lighttpd example::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:219\nmsgid \"Good old CGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:221\nmsgid \"\"\n\"A CGI server starts a new process for each request. This adds a lot of \"\n\"overhead but is sometimes the only option, especially on cheap hosting \"\n\"packages. The `cgi` server adapter does not actually start a CGI server, but\"\n\" transforms your bottle application into a valid CGI application::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/development.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../development.rst:2\nmsgid \"Developer Notes\"\nmsgstr \"\"\n\n#: ../../development.rst:4\nmsgid \"\"\n\"This document is intended for developers and package maintainers interested \"\n\"in the bottle development and release workflow. If you want to contribute, \"\n\"you are just right!\"\nmsgstr \"\"\n\n#: ../../development.rst:8\nmsgid \"Get involved\"\nmsgstr \"\"\n\n#: ../../development.rst:10\nmsgid \"\"\n\"There are several ways to join the community and stay up to date. Here are \"\n\"some of them:\"\nmsgstr \"\"\n\n#: ../../development.rst:12\nmsgid \"\"\n\"**Mailing list**: Join our mailing list by sending an email to \"\n\"`bottlepy+subscribe@googlegroups.com \"\n\"<mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required).\"\nmsgstr \"\"\n\n#: ../../development.rst:13\nmsgid \"\"\n\"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or \"\n\"search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag.\"\nmsgstr \"\"\n\n#: ../../development.rst:14\nmsgid \"\"\n\"**IRC**: Join `#bottlepy on irc.freenode.net \"\n\"<irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:15\nmsgid \"\"\n\"**Google plus**: We sometimes `blog about Bottle, releases and technical \"\n\"stuff \"\n\"<https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_\"\n\" on our Google+ page.\"\nmsgstr \"\"\n\n#: ../../development.rst:19\nmsgid \"Get the Sources\"\nmsgstr \"\"\n\n#: ../../development.rst:21\nmsgid \"\"\n\"The bottle `development repository <https://github.com/bottlepy/bottle>`_ \"\n\"and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are \"\n\"both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan \"\n\"to contribute, it is a good idea to create an account there and fork the \"\n\"main repository. This way your changes and ideas are visible to other \"\n\"developers and can be discussed openly. Even without an account, you can \"\n\"clone the repository or just download the latest development version as a \"\n\"source archive.\"\nmsgstr \"\"\n\n#: ../../development.rst:23\nmsgid \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:24\nmsgid \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\nmsgstr \"\"\n\n#: ../../development.rst:25\nmsgid \"\"\n\"**Download:** Development branch as `tar archive \"\n\"<http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file \"\n\"<http://github.com/bottlepy/bottle/zipball/master>`_.\"\nmsgstr \"\"\n\n#: ../../development.rst:29\nmsgid \"Releases and Updates\"\nmsgstr \"\"\n\n#: ../../development.rst:31\nmsgid \"\"\n\"Bottle is released at irregular intervals and distributed through `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-\"\n\"revisions of outdated releases are only available from the git repository \"\n\"mentioned above. Some Linux distributions may offer packages for outdated \"\n\"releases, though.\"\nmsgstr \"\"\n\n#: ../../development.rst:33\nmsgid \"\"\n\"The Bottle version number splits into three parts \"\n\"(**major.minor.revision**). These are *not* used to promote new features but\"\n\" to indicate important bug-fixes and/or API changes. Critical bugs are fixed\"\n\" in at least the two latest minor releases and announced in all available \"\n\"channels (mailinglist, twitter, github). Non-critical bugs or features are \"\n\"not guaranteed to be backported. This may change in the future, through.\"\nmsgstr \"\"\n\n#: ../../development.rst:36\nmsgid \"Major Release (x.0)\"\nmsgstr \"\"\n\n#: ../../development.rst:36\nmsgid \"\"\n\"The major release number is increased on important milestones or updates \"\n\"that completely break backward compatibility. You probably have to work over\"\n\" your entire application to use a new release. These releases are very rare,\"\n\" through.\"\nmsgstr \"\"\n\n#: ../../development.rst:39\nmsgid \"Minor Release (x.y)\"\nmsgstr \"\"\n\n#: ../../development.rst:39\nmsgid \"\"\n\"The minor release number is increased on updates that change the API or \"\n\"behaviour in some way. You might get some depreciation warnings any may have\"\n\" to tweak some configuration settings to restore the old behaviour, but in \"\n\"most cases these changes are designed to be backward compatible for at least\"\n\" one minor release. You should update to stay up do date, but don't have to.\"\n\" An exception is 0.8, which *will* break backward compatibility hard. (This \"\n\"is why 0.7 was skipped). Sorry about that.\"\nmsgstr \"\"\n\n#: ../../development.rst:42\nmsgid \"Revision (x.y.z)\"\nmsgstr \"\"\n\n#: ../../development.rst:42\nmsgid \"\"\n\"The revision number is increased on bug-fixes and other patches that do not \"\n\"change the API or behaviour. You can safely update without editing your \"\n\"application code. In fact, you really should as soon as possible, because \"\n\"important security fixes are released this way.\"\nmsgstr \"\"\n\n#: ../../development.rst:46\nmsgid \"Pre-Release Versions\"\nmsgstr \"\"\n\n#: ../../development.rst:45\nmsgid \"\"\n\"Release candidates are marked by an ``rc`` in their revision number. These \"\n\"are API stable most of the time and open for testing, but not officially \"\n\"released yet. You should not use these for production.\"\nmsgstr \"\"\n\n#: ../../development.rst:49\nmsgid \"Repository Structure\"\nmsgstr \"\"\n\n#: ../../development.rst:51\nmsgid \"The source repository is structured as follows:\"\nmsgstr \"\"\n\n#: ../../development.rst:54\nmsgid \"``master`` branch\"\nmsgstr \"\"\n\n#: ../../development.rst:54\nmsgid \"\"\n\"This is the integration, testing and development branch. All changes that \"\n\"are planned to be part of the next release are merged and tested here.\"\nmsgstr \"\"\n\n#: ../../development.rst:57\nmsgid \"``release-x.y`` branches\"\nmsgstr \"\"\n\n#: ../../development.rst:57\nmsgid \"\"\n\"As soon as the master branch is (almost) ready for a new release, it is \"\n\"branched into a new release branch. This \\\"release candidate\\\" is feature-\"\n\"frozen but may receive bug-fixes and last-minute changes until it is \"\n\"considered production ready and officially released. From that point on it \"\n\"is called a \\\"support branch\\\" and still receives bug-fixes, but only \"\n\"important ones. The revision number is increased on each push to these \"\n\"branches, so you can keep up with important changes.\"\nmsgstr \"\"\n\n#: ../../development.rst:60\nmsgid \"``bugfix_name-x.y`` branches\"\nmsgstr \"\"\n\n#: ../../development.rst:60\nmsgid \"\"\n\"These branches are only temporary and used to develop and share non-trivial \"\n\"bug-fixes for existing releases. They are merged into the corresponding \"\n\"release branch and deleted soon after that.\"\nmsgstr \"\"\n\n#: ../../development.rst:64\nmsgid \"Feature branches\"\nmsgstr \"\"\n\n#: ../../development.rst:63\nmsgid \"\"\n\"All other branches are feature branches. These are based on the master \"\n\"branch and only live as long as they are still active and not merged back \"\n\"into ``master``.\"\nmsgstr \"\"\n\n#: ../../development.rst:67\nmsgid \"What does this mean for a developer?\"\nmsgstr \"\"\n\n#: ../../development.rst:68\nmsgid \"\"\n\"If you want to add a feature, create a new branch from ``master``. If you \"\n\"want to fix a bug, branch ``release-x.y`` for each affected release. Please \"\n\"use a separate branch for each feature or bug to make integration as easy as\"\n\" possible. Thats all. There are git workflow examples at the bottom of this \"\n\"page.\"\nmsgstr \"\"\n\n#: ../../development.rst:70\nmsgid \"\"\n\"Oh, and never ever change the release number. We'll do that on integration. \"\n\"You never know in which order we pull pending requests anyway :)\"\nmsgstr \"\"\n\n#: ../../development.rst:74\nmsgid \"What does this mean for a maintainer ?\"\nmsgstr \"\"\n\n#: ../../development.rst:75\nmsgid \"\"\n\"Watch the tags (and the mailing list) for bug-fixes and new releases. If you\"\n\" want to fetch a specific release from the git repository, trust the tags, \"\n\"not the branches. A branch may contain changes that are not released yet, \"\n\"but a tag marks the exact commit which changed the version number.\"\nmsgstr \"\"\n\n#: ../../development.rst:79\nmsgid \"Submitting Patches\"\nmsgstr \"\"\n\n#: ../../development.rst:81\nmsgid \"\"\n\"The best way to get your changes integrated into the main development branch\"\n\" is to fork the main repository at github, create a new feature-branch, \"\n\"apply your changes and send a pull-request. Further down this page is a \"\n\"small collection of git workflow examples that may guide you. Submitting \"\n\"git-compatible patches to the mailing list is fine too. In any case, please \"\n\"follow some basic rules:\"\nmsgstr \"\"\n\n#: ../../development.rst:83\nmsgid \"\"\n\"**Documentation:** Tell us what your patch does. Comment your code. If you \"\n\"introduced a new feature, add to the documentation so others can learn about\"\n\" it.\"\nmsgstr \"\"\n\n#: ../../development.rst:84\nmsgid \"\"\n\"**Test:** Write tests to prove that your code works as expected and does not\"\n\" break anything. If you fixed a bug, write at least one test-case that \"\n\"triggers the bug. Make sure that all tests pass before you submit a patch.\"\nmsgstr \"\"\n\n#: ../../development.rst:85\nmsgid \"\"\n\"**One patch at a time:** Only fix one bug or add one feature at a time. \"\n\"Design your patches so that they can be applyed as a whole. Keep your \"\n\"patches clean, small and focused.\"\nmsgstr \"\"\n\n#: ../../development.rst:86\nmsgid \"\"\n\"**Sync with upstream:** If the ``upstream/master`` branch changed while you \"\n\"were working on your patch, rebase or pull to make sure that your patch \"\n\"still applies without conflicts.\"\nmsgstr \"\"\n\n#: ../../development.rst:90\nmsgid \"Building the Documentation\"\nmsgstr \"\"\n\n#: ../../development.rst:92\nmsgid \"\"\n\"You need a recent version of Sphinx to build the documentation. The \"\n\"recommended way is to install :command:`virtualenv` using your distribution \"\n\"package repository and install sphinx manually to get an up-to-date version.\"\nmsgstr \"\"\n\n#: ../../development.rst:123\nmsgid \"GIT Workflow Examples\"\nmsgstr \"\"\n\n#: ../../development.rst:125\nmsgid \"\"\n\"The following examples assume that you have an (free) `github account \"\n\"<https://github.com>`_. This is not mandatory, but makes things a lot \"\n\"easier.\"\nmsgstr \"\"\n\n#: ../../development.rst:127\nmsgid \"\"\n\"First of all you need to create a fork (a personal clone) of the official \"\n\"repository. To do this, you simply click the \\\"fork\\\" button on the `bottle \"\n\"project page <https://github.com/bottlepy/bottle>`_. When the fork is done, \"\n\"you will be presented with a short introduction to your new repository.\"\nmsgstr \"\"\n\n#: ../../development.rst:129\nmsgid \"\"\n\"The fork you just created is hosted at github and read-able by everyone, but\"\n\" write-able only by you. Now you need to clone the fork locally to actually \"\n\"make changes to it. Make sure you use the private (read-write) URL and *not*\"\n\" the public (read-only) one::\"\nmsgstr \"\"\n\n#: ../../development.rst:133\nmsgid \"\"\n\"Once the clone is complete your repository will have a remote named \"\n\"\\\"origin\\\" that points to your fork on github. Don’t let the name confuse \"\n\"you, this does not point to the original bottle repository, but to your own \"\n\"fork. To keep track of the official repository, add another remote named \"\n\"\\\"upstream\\\"::\"\nmsgstr \"\"\n\n#: ../../development.rst:139\nmsgid \"\"\n\"Note that \\\"upstream\\\" is a public clone URL, which is read-only. You cannot\"\n\" push changes directly to it. Instead, we will pull from your public \"\n\"repository. This is described later.\"\nmsgstr \"\"\n\n#: ../../development.rst:142\nmsgid \"Submit a Feature\"\nmsgstr \"\"\n\n#: ../../development.rst:143\nmsgid \"\"\n\"New features are developed in separate feature-branches to make integration \"\n\"easy. Because they are going to be integrated into the ``master`` branch, \"\n\"they must be based on ``upstream/master``. To create a new feature-branch, \"\n\"type the following::\"\nmsgstr \"\"\n\n#: ../../development.rst:147\nmsgid \"\"\n\"Now implement your feature, write tests, update the documentation, make sure\"\n\" that all tests pass and commit your changes::\"\nmsgstr \"\"\n\n#: ../../development.rst:151\nmsgid \"\"\n\"If the ``upstream/master`` branch changed in the meantime, there may be \"\n\"conflicts with your changes. To solve these, 'rebase' your feature-branch \"\n\"onto the top of the updated ``upstream/master`` branch::\"\nmsgstr \"\"\n\n#: ../../development.rst:156\nmsgid \"\"\n\"This is equivalent to undoing all your changes, updating your branch to the \"\n\"latest version and reapplying all your patches again. If you released your \"\n\"branch already (see next step), this is not an option because it rewrites \"\n\"your history. You can do a normal pull instead. Resolve any conflicts, run \"\n\"the tests again and commit.\"\nmsgstr \"\"\n\n#: ../../development.rst:158\nmsgid \"\"\n\"Now you are almost ready to send a pull request. But first you need to make \"\n\"your feature-branch public by pushing it to your github fork::\"\nmsgstr \"\"\n\n#: ../../development.rst:162\nmsgid \"\"\n\"After you’ve pushed your commit(s) you need to inform us about the new \"\n\"feature. One way is to send a pull-request using github. Another way would \"\n\"be to start a thread in the mailing-list, which is recommended. It allows \"\n\"other developers to see and discuss your patches and you get some feedback \"\n\"for free :)\"\nmsgstr \"\"\n\n#: ../../development.rst:164\nmsgid \"\"\n\"If we accept your patch, we will integrate it into the official development \"\n\"branch and make it part of the next release.\"\nmsgstr \"\"\n\n#: ../../development.rst:167\nmsgid \"Fix a Bug\"\nmsgstr \"\"\n\n#: ../../development.rst:168\nmsgid \"\"\n\"The workflow for bug-fixes is very similar to the one for features, but \"\n\"there are some differences:\"\nmsgstr \"\"\n\n#: ../../development.rst:170\nmsgid \"\"\n\"Branch off of the affected release branches instead of just the development \"\n\"branch.\"\nmsgstr \"\"\n\n#: ../../development.rst:171\nmsgid \"Write at least one test-case that triggers the bug.\"\nmsgstr \"\"\n\n#: ../../development.rst:172\nmsgid \"\"\n\"Do this for each affected branch including ``upstream/master`` if it is \"\n\"affected. ``git cherry-pick`` may help you reducing repetitive work.\"\nmsgstr \"\"\n\n#: ../../development.rst:173\nmsgid \"\"\n\"Name your branch after the release it is based on to avoid confusion. \"\n\"Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/faq.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../faq.rst:10\nmsgid \"Frequently Asked Questions\"\nmsgstr \"\"\n\n#: ../../faq.rst:13\nmsgid \"About Bottle\"\nmsgstr \"\"\n\n#: ../../faq.rst:16\nmsgid \"Is bottle suitable for complex applications?\"\nmsgstr \"\"\n\n#: ../../faq.rst:18\nmsgid \"\"\n\"Bottle is a *micro* framework designed for prototyping and building small \"\n\"web applications and services. It stays out of your way and allows you to \"\n\"get things done fast, but misses some advanced features and ready-to-use \"\n\"solutions found in other frameworks (MVC, ORM, form validation, scaffolding,\"\n\" XML-RPC). Although it *is* possible to add these features and build complex\"\n\" applications with Bottle, you should consider using a full-stack Web \"\n\"framework like pylons_ or paste_ instead.\"\nmsgstr \"\"\n\n#: ../../faq.rst:22\nmsgid \"Common Problems and Pitfalls\"\nmsgstr \"\"\n\n#: ../../faq.rst:29\nmsgid \"\\\"Template Not Found\\\" in mod_wsgi/mod_python\"\nmsgstr \"\"\n\n#: ../../faq.rst:31\nmsgid \"\"\n\"Bottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ \"\n\"or mod_wsgi_ environment, the working directory (``./``) depends on your \"\n\"Apache settings. You should add an absolute path to the template search \"\n\"path::\"\nmsgstr \"\"\n\n#: ../../faq.rst:35\nmsgid \"so bottle searches the right paths.\"\nmsgstr \"\"\n\n#: ../../faq.rst:38\nmsgid \"Dynamic Routes and Slashes\"\nmsgstr \"\"\n\n#: ../../faq.rst:40\nmsgid \"\"\n\"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder \"\n\"token (``:name``) matches everything up to the next slash. This equals to \"\n\"``[^/]+`` in regular expression syntax. To accept slashes too, you have to \"\n\"add a custom regular pattern to the placeholder. An example: \"\n\"``/images/:filepath#.*#`` would match ``/images/icons/error.png`` but \"\n\"``/images/:filename`` won't.\"\nmsgstr \"\"\n\n#: ../../faq.rst:43\nmsgid \"Problems with reverse proxies\"\nmsgstr \"\"\n\n#: ../../faq.rst:45\nmsgid \"\"\n\"Redirects and url-building only works if bottle knows the public address and\"\n\" location of your application. If you run bottle locally behind a reverse \"\n\"proxy or load balancer, some information might get lost along the way. For \"\n\"example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect \"\n\"the local request by your proxy, not the real request by the client. Here is\"\n\" a small WSGI middleware snippet that helps to fix these values::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/index.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../index.rst:21\nmsgid \"Bottle: Python Web Framework\"\nmsgstr \"\"\n\n#: ../../index.rst:23\nmsgid \"\"\n\"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for \"\n\"Python_. It is distributed as a single file module and has no dependencies \"\n\"other than the `Python Standard Library <http://docs.python.org/library/>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:26\nmsgid \"\"\n\"**Routing:** Requests to function-call mapping with support for clean and  \"\n\"dynamic URLs.\"\nmsgstr \"\"\n\n#: ../../index.rst:27\nmsgid \"\"\n\"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-\"\n\"templates>` and support for mako_, jinja2_ and cheetah_ templates.\"\nmsgstr \"\"\n\n#: ../../index.rst:28\nmsgid \"\"\n\"**Utilities:** Convenient access to form data, file uploads, cookies, \"\n\"headers and other HTTP-related metadata.\"\nmsgstr \"\"\n\n#: ../../index.rst:29\nmsgid \"\"\n\"**Server:** Built-in HTTP development server and support for paste_, \"\n\"fapws3_, bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server.\"\nmsgstr \"\"\n\n#: ../../index.rst:32\nmsgid \"Example: \\\"Hello World\\\" in a bottle\"\nmsgstr \"\"\n\n#: ../../index.rst:43\nmsgid \"\"\n\"Run this script or paste it into a Python console, then point your browser \"\n\"to `<http://localhost:8080/hello/world>`_. That's it.\"\nmsgstr \"\"\n\n#: ../../index.rst:46\nmsgid \"Download and Install\"\nmsgstr \"\"\n\n#: ../../index.rst:49\nmsgid \"\"\n\"Install the latest stable release with ``pip install bottle``, \"\n\"``easy_install -U bottle`` or download `bottle.py`__ (unstable) into your \"\n\"project directory. There are no hard [1]_ dependencies other than the Python\"\n\" standard library. Bottle runs with **Python 2.5+ and 3.x**.\"\nmsgstr \"\"\n\n#: ../../index.rst:52\nmsgid \"User's Guide\"\nmsgstr \"\"\n\n#: ../../index.rst:53\nmsgid \"\"\n\"Start here if you want to learn how to use the bottle framework for web \"\n\"development. If you have any questions not answered here, feel free to ask \"\n\"the `mailing list <mailto:bottlepy@googlegroups.com>`_.\"\nmsgstr \"\"\n\n#: ../../index.rst:68\nmsgid \"Knowledge Base\"\nmsgstr \"\"\n\n#: ../../index.rst:69\nmsgid \"A collection of articles, guides and HOWTOs.\"\nmsgstr \"\"\n\n#: ../../index.rst:81\nmsgid \"Development and Contribution\"\nmsgstr \"\"\n\n#: ../../index.rst:83\nmsgid \"\"\n\"These chapters are intended for developers interested in the bottle \"\n\"development and release workflow.\"\nmsgstr \"\"\n\n#: ../../index.rst:100\nmsgid \"License\"\nmsgstr \"\"\n\n#: ../../index.rst:102\nmsgid \"Code and documentation are available according to the MIT License:\"\nmsgstr \"\"\n\n#: ../../index.rst:107\nmsgid \"\"\n\"The Bottle logo however is *NOT* covered by that license. It is allowed to \"\n\"use the logo as a link to the bottle homepage or in direct context with the \"\n\"unmodified library. In all other cases please ask first.\"\nmsgstr \"\"\n\n#: ../../index.rst:112\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../index.rst:113\nmsgid \"\"\n\"Usage of the template or server adapter classes of course requires the \"\n\"corresponding template or server modules.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/plugindev.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../plugindev.rst:6\nmsgid \"Plugin Development Guide\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:8\nmsgid \"\"\n\"This guide explains the plugin API and how to write custom plugins. I \"\n\"suggest reading :ref:`plugins` first if you have not done that already. You \"\n\"might also want to have a look at the :doc:`/plugins/index` for some \"\n\"practical examples.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:12\nmsgid \"\"\n\"This is a draft. If you see any errors or find that a specific part is not \"\n\"explained clear enough, please tell the `mailing-list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or file a `bug report \"\n\"<https://github.com/bottlepy/bottle/issues>`_.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:16\nmsgid \"How Plugins Work: The Basics\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:18\nmsgid \"\"\n\"The plugin API builds on the concept of `decorators \"\n\"<http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, \"\n\"a plugin is a decorator applied to every single route callback of an \"\n\"application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:20\nmsgid \"\"\n\"Of course, this is just a simplification. Plugins can do a lot more than \"\n\"just decorating route callbacks, but it is a good starting point. Lets have \"\n\"a look at some code::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:36\nmsgid \"\"\n\"This plugin measures the execution time for each request and adds an \"\n\"appropriate ``X-Exec-Time`` header to the response. As you can see, the \"\n\"plugin returns a wrapper and the wrapper calls the original callback \"\n\"recursively. This is how decorators usually work.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:38\nmsgid \"\"\n\"The last line tells Bottle to install the plugin to the default application.\"\n\" This causes the plugin to be automatically applied to all routes of that \"\n\"application. In other words, ``stopwatch()`` is called once for each route \"\n\"callback and the return value is used as a replacement for the original \"\n\"callback.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:40\nmsgid \"\"\n\"Plugins are applied on demand, that is, as soon as a route is requested for \"\n\"the first time. For this to work properly in multi-threaded environments, \"\n\"the plugin should be thread-safe. This is not a problem most of the time, \"\n\"but keep it in mind.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:42\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped callback is cached and \"\n\"subsequent requests are handled by the cached version directly. This means \"\n\"that a plugin is usually applied only once to a specific route. That cache, \"\n\"however, is cleared every time the list of installed plugins changes. Your \"\n\"plugin should be able to decorate the same route more than once.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:44\nmsgid \"\"\n\"The decorator API is quite limited, though. You don't know anything about \"\n\"the route being decorated or the associated application object and have no \"\n\"way to efficiently store data that is shared among all routes. But fear not!\"\n\" Plugins are not limited to just decorator functions. Bottle accepts \"\n\"anything as a plugin as long as it is callable or implements an extended \"\n\"API. This API is described below and gives you a lot of control over the \"\n\"whole process.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:48\nmsgid \"Plugin API\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:50\nmsgid \"\"\n\":class:`Plugin` is not a real class (you cannot import it from \"\n\":mod:`bottle`) but an interface that plugins are expected to implement. \"\n\"Bottle accepts any object of any type as a plugin, as long as it conforms to\"\n\" the following API.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:54\nmsgid \"\"\n\"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is \"\n\"defined, it is always preferred over calling the plugin directly. All other \"\n\"methods and attributes are optional.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:58\nmsgid \"\"\n\"Both :meth:`Bottle.uninstall` and the `skip` parameter of \"\n\":meth:`Bottle.route()` accept a name string to refer to a plugin or plugin \"\n\"type. This works only for plugins that have a name attribute.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:62\nmsgid \"\"\n\"The Plugin API is still evolving. This integer attribute tells bottle which \"\n\"version to use. If it is missing, bottle defaults to the first version. The \"\n\"current version is ``2``. See :ref:`plugin-changelog` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:66\nmsgid \"\"\n\"Called as soon as the plugin is installed to an application (see \"\n\":meth:`Bottle.install`). The only parameter is the associated application \"\n\"object.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:70\nmsgid \"\"\n\"As long as :meth:`apply` is not defined, the plugin itself is used as a \"\n\"decorator and applied directly to each route callback. The only parameter is\"\n\" the callback to decorate. Whatever is returned by this method replaces the \"\n\"original callback. If there is no need to wrap or replace a given callback, \"\n\"just return the unmodified callback parameter.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:74\nmsgid \"\"\n\"If defined, this method is used in favor of :meth:`__call__` to decorate \"\n\"route callbacks. The additional `route` parameter is an instance of \"\n\":class:`Route` and provides a lot of meta-information and context for that \"\n\"route. See :ref:`route-context` for details.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:78\nmsgid \"\"\n\"Called immediately before the plugin is uninstalled or the application is \"\n\"closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:81\nmsgid \"\"\n\"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for \"\n\"plugins that are applied directly to a route via the :meth:`Bottle.route()` \"\n\"decorator, but only for plugins installed to an application.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:87\nmsgid \"Plugin API changes\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:89\nmsgid \"\"\n\"The Plugin API is still evolving and changed with Bottle 0.10 to address \"\n\"certain issues with the route context dictionary. To ensure backwards \"\n\"compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` \"\n\"attribute to tell bottle which API to use. The API differences are \"\n\"summarized here.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:91\nmsgid \"**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:93\nmsgid \"Original Plugin API as described in the 0.9 docs.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:95\nmsgid \"**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:97\nmsgid \"\"\n\"The `context` parameter of the :meth:`Plugin.apply` method is now an \"\n\"instance of :class:`Route` instead of a context dictionary.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:103\nmsgid \"The Route Context\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:105\nmsgid \"\"\n\"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed\"\n\" informations about the associated route. The most important attributes are \"\n\"summarized here:\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:108\nmsgid \"Description\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"app\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"The application object this route is installed to.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"rule\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"The rule string (e.g. ``/wiki/:page``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"method\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"name\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"plugins\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"\"\n\"A list of route-specific plugins. These are applied in addition to \"\n\"application-wide plugins. (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"skiplist\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"\"\n\"A list of plugins to not apply to this route (again, see \"\n\":meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"config\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific configuration and \"\n\"meta-data.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:125\nmsgid \"\"\n\"For your plugin, :attr:`Route.config` is probably the most important \"\n\"attribute. Keep in mind that this dictionary is local to the route, but \"\n\"shared between all plugins. It is always a good idea to add a unique prefix \"\n\"or, if your plugin needs a lot of configuration, store it in a separate \"\n\"namespace within the `config` dictionary. This helps to avoid naming \"\n\"collisions between plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:129\nmsgid \"Changing the :class:`Route` object\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:131\nmsgid \"\"\n\"While some :class:`Route` attributes are mutable, changes may have unwanted \"\n\"effects on other plugins. It is most likely a bad idea to monkey-patch a \"\n\"broken route instead of providing a helpful error message and let the user \"\n\"fix the problem.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:133\nmsgid \"\"\n\"In some rare cases, however, it might be justifiable to break this rule. \"\n\"After you made your changes to the :class:`Route` instance, raise \"\n\":exc:`RouteReset` as an exception. This removes the current route from the \"\n\"cache and causes all plugins to be re-applied. The router is not updated, \"\n\"however. Changes to `rule` or `method` values have no effect on the router, \"\n\"but only on plugins. This may change in the future, though.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:137\nmsgid \"Runtime optimizations\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:139\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped route callback is \"\n\"cached to speed up subsequent requests. If the behavior of your plugin \"\n\"depends on configuration, and you want to be able to change that \"\n\"configuration at runtime, you need to read the configuration on each \"\n\"request. Easy enough.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:141\nmsgid \"\"\n\"For performance reasons, however, it might be worthwhile to choose a \"\n\"different wrapper based on current needs, work with closures, or enable or \"\n\"disable a plugin at runtime. Let's take the built-in HooksPlugin as an \"\n\"example: If no hooks are installed, the plugin removes itself from all \"\n\"affected routes and has virtaully no overhead. As soon as you install the \"\n\"first hook, the plugin activates itself and takes effect again.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:143\nmsgid \"\"\n\"To achieve this, you need control over the callback cache: \"\n\":meth:`Route.reset` clears the cache for a single route and \"\n\":meth:`Bottle.reset` clears all caches for all routes of an application at \"\n\"once. On the next request, all plugins are re-applied to the route as if it \"\n\"were requested for the first time.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:145\nmsgid \"\"\n\"Both methods won't affect the current request if called from within a route \"\n\"callback, of cause. To force a restart of the current request, raise \"\n\":exc:`RouteReset` as an exception.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:149\nmsgid \"Plugin Example: SQLitePlugin\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:151\nmsgid \"\"\n\"This plugin provides an sqlite3 database connection handle as an additional \"\n\"keyword argument to wrapped callbacks, but only if the callback expects it. \"\n\"If not, the route is ignored and no overhead is added. The wrapper does not \"\n\"affect the return value, but handles plugin-related exceptions properly. \"\n\":meth:`Plugin.setup` is used to inspect the application and search for \"\n\"conflicting plugins.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:218\nmsgid \"\"\n\"This plugin is actually useful and very similar to the version bundled with \"\n\"Bottle. Not bad for less than 60 lines of code, don't you think? Here is a \"\n\"usage example::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:239\nmsgid \"\"\n\"The first route needs a database connection and tells the plugin to create a\"\n\" handle by requesting a ``db`` keyword argument. The second route does not \"\n\"need a database and is therefore ignored by the plugin. The third route does\"\n\" expect a 'db' keyword argument, but explicitly skips the sqlite plugin. \"\n\"This way the argument is not overruled by the plugin and still contains the \"\n\"value of the same-named url argument.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/plugins/index.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../plugins/index.rst:5\nmsgid \"List of available Plugins\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:7\nmsgid \"\"\n\"This is a list of third-party plugins that add extend Bottles core \"\n\"functionality or integrate other libraries with the Bottle framework.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:9\nmsgid \"\"\n\"Have a look at :ref:`plugins` for general questions about plugins \"\n\"(installation, usage). If you plan to develop a new plugin, the \"\n\":doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"Beaker to session and caching library with WSGI Middleware\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"`Bottle-Cork <http://cork.firelet.net/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"\"\n\"Cork provides a simple set of methods to implement Authentication and \"\n\"Authorization in web applications based on Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"Meta package to install the bottle plugin collection.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"flash plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"FIFO Queue for Bottle built upon redis\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"`Macaron <http://nobrin.github.com/macaron/webapp.html>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"Macaron is an object-relational mapper (ORM) for SQLite.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"Memcache integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"MongoDB integration for Bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"Redis integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"Renderer plugin for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"A reusable app that serves static files for bottle apps\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"SQLAlchemy integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"SQLite3 database integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"Web2py Dal integration for Bottle.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"\"\n\"Integrates the `werkzeug` library (alternative request and response objects,\"\n\" advanced debugging middleware and more).\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:56\nmsgid \"\"\n\"Plugins listed here are not part of Bottle or the Bottle project, but \"\n\"developed and maintained by third parties.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/recipes.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../recipes.rst:16\nmsgid \"Recipes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:18\nmsgid \"\"\n\"This is a collection of code snippets and examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:21\nmsgid \"Keeping track of Sessions\"\nmsgstr \"\"\n\n#: ../../recipes.rst:23\nmsgid \"\"\n\"There is no built-in support for sessions because there is no *right* way to\"\n\" do it (in a micro framework). Depending on requirements and environment you\"\n\" could use beaker_ middleware with a fitting backend or implement it \"\n\"yourself. Here is an example for beaker sessions with a file-based backend::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:46\nmsgid \"Debugging with Style: Debugging Middleware\"\nmsgstr \"\"\n\n#: ../../recipes.rst:48\nmsgid \"\"\n\"Bottle catches all Exceptions raised in your app code to prevent your WSGI \"\n\"server from crashing. If the built-in :func:`debug` mode is not enough and \"\n\"you need exceptions to propagate to a debugging middleware, you can turn off\"\n\" this behaviour::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:56\nmsgid \"\"\n\"Now, bottle only catches its own exceptions (:exc:`HTTPError`, \"\n\":exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can \"\n\"handle the rest.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:58\nmsgid \"\"\n\"The werkzeug_ and paste_ libraries both ship with very powerful debugging \"\n\"WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for \"\n\"werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for \"\n\"paste_. They both allow you do inspect the stack and even execute python \"\n\"code within the stack context, so **do not use them in production**.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:62\nmsgid \"Unit-Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:64\nmsgid \"\"\n\"Unit-testing is usually performed against methods defined in your web \"\n\"application without running a WSGI environment.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:66\nmsgid \"A simple example using `Nose <http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:77\nmsgid \"Test script::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:84\nmsgid \"\"\n\"In the example the Bottle route() method is never executed - only index() is\"\n\" tested.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:88\nmsgid \"Functional Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:90\nmsgid \"\"\n\"Any HTTP-based testing system can be used with a running WSGI server, but \"\n\"some testing frameworks work more intimately with WSGI, and provide the \"\n\"ability the call WSGI applications in a controlled environment, with \"\n\"tracebacks and full use of debugging tools. `Testing tools for WSGI \"\n\"<http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:92\nmsgid \"\"\n\"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose \"\n\"<http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:112\nmsgid \"Embedding other WSGI Apps\"\nmsgstr \"\"\n\n#: ../../recipes.rst:114\nmsgid \"\"\n\"This is not the recommend way (you should use a middleware in front of \"\n\"bottle to do this) but you can call other WSGI applications from within your\"\n\" bottle app and let bottle act as a pseudo-middleware. Here is an example::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:130\nmsgid \"\"\n\"Again, this is not the recommend way to implement subprojects. It is only \"\n\"here because many people asked for this and to show how bottle maps to WSGI.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:134\nmsgid \"Ignore trailing slashes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:136\nmsgid \"\"\n\"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To\"\n\" treat both URLs the same you can add two ``@route`` decorators::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:142\nmsgid \"or add a WSGI middleware that strips trailing slashes from all URLs::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:156\nmsgid \"Footnotes\"\nmsgstr \"\"\n\n#: ../../recipes.rst:157\nmsgid \"Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>\"\nmsgstr \"\"\n\n#: ../../recipes.rst:161\nmsgid \"Keep-alive requests\"\nmsgstr \"\"\n\n#: ../../recipes.rst:165\nmsgid \"For a more detailed explanation, see :doc:`async`.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:167\nmsgid \"\"\n\"Several \\\"push\\\" mechanisms like XHR multipart need the ability to write \"\n\"response data without closing the connection in conjunction with the \"\n\"response header \\\"Connection: keep-alive\\\". WSGI does not easily lend itself\"\n\" to this behavior, but it is still possible to do so in Bottle by using the \"\n\"gevent_ async framework. Here is a sample that works with either the gevent_\"\n\" HTTP server or the paste_ HTTP server (it may work with others, but I have \"\n\"not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the\"\n\" paste_ server::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:184\nmsgid \"\"\n\"If you browse to ``http://localhost:8080/stream``, you should see 'START', \"\n\"'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to \"\n\"see them all at once).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:187\nmsgid \"Gzip Compression in Bottle\"\nmsgstr \"\"\n\n#: ../../recipes.rst:190\nmsgid \"For a detailed discussion, see compression_\"\nmsgstr \"\"\n\n#: ../../recipes.rst:192\nmsgid \"\"\n\"A common feature request is for Bottle to support Gzip compression, which \"\n\"speeds up sites by compressing static resources (like CSS and JS files) \"\n\"during a request.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:194\nmsgid \"\"\n\"Supporting Gzip compression is not a straightforward proposition, due to a \"\n\"number of corner cases that crop up frequently. A proper Gzip implementation\"\n\" must:\"\nmsgstr \"\"\n\n#: ../../recipes.rst:196\nmsgid \"Compress on the fly and be fast doing so.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:197\nmsgid \"Do not compress for browsers that don't support it.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:198\nmsgid \"Do not compress files that are compressed already (images, videos).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:199\nmsgid \"Do not compress dynamic files.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:200\nmsgid \"Support two differed compression algorithms (gzip and deflate).\"\nmsgstr \"\"\n\n#: ../../recipes.rst:201\nmsgid \"Cache compressed files that don't change often.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:202\nmsgid \"De-validate the cache if one of the files changed anyway.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:203\nmsgid \"Make sure the cache does not get to big.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:204\nmsgid \"\"\n\"Do not cache small files because a disk seek would take longer than on-the-\"\n\"fly compression.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:206\nmsgid \"\"\n\"Because of these requirements, it is the recommendation of the Bottle \"\n\"project that Gzip compression is best handled by the WSGI server Bottle runs\"\n\" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware \"\n\"that can be used to accomplish this.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:210\nmsgid \"Using the hooks plugin\"\nmsgstr \"\"\n\n#: ../../recipes.rst:212\nmsgid \"\"\n\"For example, if you want to allow Cross-Origin Resource Sharing for the \"\n\"content returned by all of your URL, you can use the hook decorator and \"\n\"setup a callback function::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:230\nmsgid \"\"\n\"You can also use the ``before_request`` to take an action before every \"\n\"function gets called.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:235\nmsgid \"Using Bottle with Heroku\"\nmsgstr \"\"\n\n#: ../../recipes.rst:237\nmsgid \"\"\n\"Heroku_, a popular cloud application platform now provides support for \"\n\"running Python applications on their infastructure.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:240\nmsgid \"\"\n\"This recipe is based upon the `Heroku Quickstart \"\n\"<http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific \"\n\"code replacing the `Write Your App \"\n\"<http://devcenter.heroku.com/articles/python#write_your_app>`_ section of \"\n\"the `Getting Started with Python on Heroku/Cedar \"\n\"<http://devcenter.heroku.com/articles/python>`_ guide::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:256\nmsgid \"\"\n\"Heroku's app stack passes the port that the application needs to listen on \"\n\"for requests, using the `os.environ` dictionary.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/routing.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../routing.rst:3\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../routing.rst:5\nmsgid \"\"\n\"Bottle uses a powerful routing engine to find the right callback for each \"\n\"request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This \"\n\"document covers advanced techniques and rule mechanics in detail.\"\nmsgstr \"\"\n\n#: ../../routing.rst:8\nmsgid \"Rule Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:10\nmsgid \"\"\n\"The :class:`Router` distinguishes between two basic types of routes: \"\n\"**static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. \"\n\"``/hello/<name>``). A route that contains one or more *wildcards* it is \"\n\"considered dynamic. All other routes are static.\"\nmsgstr \"\"\n\n#: ../../routing.rst:14\nmsgid \"\"\n\"The simplest form of a wildcard consists of a name enclosed in angle \"\n\"brackets (e.g. ``<name>``). The name should be unique for a given route and \"\n\"form a valid python identifier (alphanumeric, starting with a letter). This \"\n\"is because wildcards are used as keyword arguments for the request callback \"\n\"later.\"\nmsgstr \"\"\n\n#: ../../routing.rst:16\nmsgid \"\"\n\"Each wildcard matches one or more characters, but stops at the first slash \"\n\"(``/``). This equals a regular expression of ``[^/]+`` and ensures that only\"\n\" one path segment is matched and routes with more than one wildcard stay \"\n\"unambiguous.\"\nmsgstr \"\"\n\n#: ../../routing.rst:18\nmsgid \"The rule ``/<action>/<item>`` matches as follows:\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Path\"\nmsgstr \"\"\n\n#: ../../routing.rst:21\nmsgid \"Result\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"/save/123\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"``{'action': 'save', 'item': '123'}``\"\nmsgstr \"\"\n\n#: ../../routing.rst:24\nmsgid \"/save/123/\"\nmsgstr \"\"\n\n#: ../../routing.rst:24 ../../routing.rst:25 ../../routing.rst:26\nmsgid \"`No Match`\"\nmsgstr \"\"\n\n#: ../../routing.rst:25\nmsgid \"/save/\"\nmsgstr \"\"\n\n#: ../../routing.rst:26\nmsgid \"//123\"\nmsgstr \"\"\n\n#: ../../routing.rst:29\nmsgid \"\"\n\"You can change the exact behaviour in many ways using filters. This is \"\n\"described in the next section.\"\nmsgstr \"\"\n\n#: ../../routing.rst:32\nmsgid \"Wildcard Filters\"\nmsgstr \"\"\n\n#: ../../routing.rst:36\nmsgid \"\"\n\"Filters are used to define more specific wildcards, and/or transform the \"\n\"matched part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../routing.rst:38\nmsgid \"The following standard filters are implemented:\"\nmsgstr \"\"\n\n#: ../../routing.rst:40\nmsgid \"**:int** matches (signed) digits and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../routing.rst:41\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../routing.rst:42\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and may be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../routing.rst:43\nmsgid \"\"\n\"**:re[:exp]** allows you to specify a custom regular expression in the \"\n\"config field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../routing.rst:45\nmsgid \"\"\n\"You can add your own filters to the router. All you need is a function that \"\n\"returns three elements: A regular expression string, a callable to convert \"\n\"the URL fragment to a python value, and a callable that does the opposite. \"\n\"The filter function is called with the configuration string as the only \"\n\"parameter and may parse it as needed::\"\nmsgstr \"\"\n\n#: ../../routing.rst:71\nmsgid \"Legacy Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:75\nmsgid \"\"\n\"The new rule syntax was introduce in **Bottle 0.10** to simplify some common\"\n\" use cases, but the old syntax still works and you can find lot code \"\n\"examples still using it. The differences are best described by example:\"\nmsgstr \"\"\n\n#: ../../routing.rst:78\nmsgid \"Old Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:78\nmsgid \"New Syntax\"\nmsgstr \"\"\n\n#: ../../routing.rst:80\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../routing.rst:80\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:81\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:81\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:82\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:83\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../routing.rst:83\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"\"\n\"Try to avoid the old syntax in future projects if you can. It is not \"\n\"currently deprecated, but will be eventually.\"\nmsgstr \"\"\n\n#: ../../routing.rst:91\nmsgid \"Explicit routing configuration\"\nmsgstr \"\"\n\n#: ../../routing.rst:93\nmsgid \"\"\n\"Route decorator can also be directly called as method. This way provides \"\n\"flexibility in complex setups, allowing you to directly control, when and \"\n\"how routing configuration done.\"\nmsgstr \"\"\n\n#: ../../routing.rst:95\nmsgid \"\"\n\"Here is a basic example of explicit routing configuration for default bottle\"\n\" application::\"\nmsgstr \"\"\n\n#: ../../routing.rst:101\nmsgid \"\"\n\"In fact, any :class:`Bottle` instance routing can be configured same way::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/stpl.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../stpl.rst:3\nmsgid \"SimpleTemplate Engine\"\nmsgstr \"\"\n\n#: ../../stpl.rst:7\nmsgid \"\"\n\"Bottle comes with a fast, powerful and easy to learn built-in template \"\n\"engine called *SimpleTemplate* or *stpl* for short. It is the default engine\"\n\" used by the :func:`view` and :func:`template` helpers but can be used as a \"\n\"stand-alone general purpose template engine too. This document explains the \"\n\"template syntax and shows examples for common use cases.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:10\nmsgid \"Basic API Usage:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:11\nmsgid \":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:18\nmsgid \"\"\n\"In this document we use the :func:`template` helper in examples for the sake\"\n\" of simplicity::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:24\nmsgid \"\"\n\"You can also pass a dictionary into the template using keyword arguments::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:31\nmsgid \"\"\n\"Just keep in mind that compiling and rendering templates are two different \"\n\"actions, even if the :func:`template` helper hides this fact. Templates are \"\n\"usually compiled only once and cached internally, but rendered many times \"\n\"with different keyword arguments.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:34\nmsgid \":class:`SimpleTemplate` Syntax\"\nmsgstr \"\"\n\n#: ../../stpl.rst:36\nmsgid \"\"\n\"Python is a very powerful language but its whitespace-aware syntax makes it \"\n\"difficult to use as a template language. SimpleTemplate removes some of \"\n\"these restrictions and allows you to write clean, readable and maintainable \"\n\"templates while preserving full access to the features, libraries and speed \"\n\"of the Python language.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:40\nmsgid \"\"\n\"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and \"\n\"is executed on each :meth:`SimpleTemplate.render` call. Do not render \"\n\"untrusted templates! They may contain and execute harmful python code.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:43\nmsgid \"Inline Expressions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:45\nmsgid \"\"\n\"You already learned the use of the ``{{...}}`` syntax from the \\\"Hello \"\n\"World!\\\" example above, but there is more: any python expression is allowed \"\n\"within the curly brackets as long as it evaluates to a string or something \"\n\"that has a string representation::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:54\nmsgid \"\"\n\"The contained python expression is executed at render-time and has access to\"\n\" all keyword arguments passed to the :meth:`SimpleTemplate.render` method. \"\n\"HTML special characters are escaped automatically to prevent `XSS \"\n\"<http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start\"\n\" the expression with an exclamation mark to disable escaping for that \"\n\"expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:62\nmsgid \"Embedded python code\"\nmsgstr \"\"\n\n#: ../../stpl.rst:66\nmsgid \"\"\n\"The template engine allows you to embed lines or blocks of python code \"\n\"within your template. Code lines start with ``%`` and code blocks are \"\n\"surrounded by ``<%`` and ``%>`` tokens::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:76\nmsgid \"\"\n\"Embedded python code follows regular python syntax, but with two additional \"\n\"syntax rules:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:78\nmsgid \"\"\n\"**Indentation is ignored.** You can put as much whitespace in front of \"\n\"statements as you want. This allows you to align your code with the \"\n\"surrounding markup and can greatly improve readability.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:79\nmsgid \"\"\n\"Blocks that are normally indented now have to be closed explicitly with an \"\n\"``end`` keyword.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:89\nmsgid \"\"\n\"Both the ``%`` and the ``<%`` tokens are only recognized if they are the \"\n\"first non-whitespace characters in a line. You don't have to escape them if \"\n\"they appear mid-text in your template markup. Only if a line of text starts \"\n\"with one of these tokens, you have to escape it with a backslash. In the \"\n\"rare case where the backslash + token combination appears in your markup at \"\n\"the beginning of a line, you can always help yourself with a string literal \"\n\"in an inline expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:96\nmsgid \"\"\n\"If you find yourself to escape a lot, consider using :ref:`custom tokens \"\n\"<stpl-custom-tokens>`.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:99\nmsgid \"Whitespace Control\"\nmsgstr \"\"\n\n#: ../../stpl.rst:101\nmsgid \"\"\n\"Code blocks and code lines always span the whole line. Whitespace in front \"\n\"of after a code segment is stripped away. You won't see empty lines or \"\n\"dangling whitespace in your template because of embedded code::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:109\nmsgid \"This snippet renders to clean and compact html::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:115\nmsgid \"\"\n\"But embedding code still requires you to start a new line, which may not \"\n\"what you want to see in your rendered template. To skip the newline in front\"\n\" of a code segment, end the text line with a double-backslash::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:123\nmsgid \"THis time the rendered template looks like this::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:127\nmsgid \"\"\n\"This only works directly in front of code segments. In all other places you \"\n\"can control the whitespace yourself and don't need any special syntax.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:130\nmsgid \"Template Functions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:132\nmsgid \"\"\n\"Each template is preloaded with a bunch of functions that help with the most\"\n\" common use cases. These functions are always available. You don't have to \"\n\"import or provide them yourself. For everything not covered here there are \"\n\"probably good python libraries available. Remember that you can ``import`` \"\n\"anything you want within your templates. They are python programs after all.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:136\nmsgid \"\"\n\"Prior to this release, :func:`include` and :func:`rebase` were syntax \"\n\"keywords, not functions.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:141\nmsgid \"\"\n\"Render a sub-template with the specified variables and insert the resulting \"\n\"text into the current template. The function returns a dictionary containing\"\n\" the local variables passed to or defined within the sub-template::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:149\nmsgid \"\"\n\"Mark the current template to be later included into a different template. \"\n\"After the current template is rendered, its resulting text is stored in a \"\n\"variable named ``base`` and passed to the base-template, which is then \"\n\"rendered. This can be used to `wrap` a template with surrounding text, or \"\n\"simulate the inheritance feature found in other template engines::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:154\nmsgid \"This can be combined with the following ``base.tpl``::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:166\nmsgid \"\"\n\"Accessing undefined variables in a template raises :exc:`NameError` and \"\n\"stops rendering immediately. This is standard python behavior and nothing \"\n\"new, but vanilla python lacks an easy way to check the availability of a \"\n\"variable. This quickly gets annoying if you want to support flexible inputs \"\n\"or use the same template in different situations. These functions may help:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:174\nmsgid \"\"\n\"Return True if the variable is defined in the current template namespace, \"\n\"False otherwise.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:179\nmsgid \"Return the variable, or a default value.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:183\nmsgid \"\"\n\"If the variable is not defined, create it with the given default value. \"\n\"Return the variable.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:186\nmsgid \"\"\n\"Here is an example that uses all three functions to implement optional \"\n\"template variables in different ways::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:200\nmsgid \":class:`SimpleTemplate` API\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.render:1\nmsgid \"Render the template using keyword arguments as local variables.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/tutorial.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../tutorial.rst:24\nmsgid \"Tutorial\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:26\nmsgid \"\"\n\"This tutorial introduces you to the concepts and features of the Bottle web \"\n\"framework and covers basic and advanced topics alike. You can read it from \"\n\"start to end, or use it as a reference later on. The automatically generated\"\n\" :doc:`api` may be interesting for you, too. It covers more details, but \"\n\"explains less than this tutorial. Solutions for the most common questions \"\n\"can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If \"\n\"you need any help, join our `mailing list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:31\nmsgid \"Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:33\nmsgid \"\"\n\"Bottle does not depend on any external libraries. You can just download \"\n\"`bottle.py </bottle.py>`_ into your project directory and start coding:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:39\nmsgid \"\"\n\"This will get you the latest development snapshot that includes all the new \"\n\"features. If you prefer a more stable environment, you should stick with the\"\n\" stable releases. These are available on `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_ and can be installed via \"\n\":command:`pip` (recommended), :command:`easy_install` or your package \"\n\"manager:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:47\nmsgid \"\"\n\"Either way, you'll need Python 2.5 or newer (including 3.x) to run bottle \"\n\"applications. If you do not have permissions to install packages system-wide\"\n\" or simply don't want to, create a `virtualenv \"\n\"<http://pypi.python.org/pypi/virtualenv>`_ first:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:55\nmsgid \"Or, if virtualenv is not installed on your system:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:67\nmsgid \"Quickstart: \\\"Hello World\\\"\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:69\nmsgid \"\"\n\"This tutorial assumes you have Bottle either :ref:`installed <installation>`\"\n\" or copied into your project directory. Let's start with a very basic \"\n\"\\\"Hello World\\\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:79\nmsgid \"\"\n\"This is it. Run this script, visit http://localhost:8080/hello and you will \"\n\"see \\\"Hello World!\\\" in your browser. Here is how it works:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:81\nmsgid \"\"\n\"The :func:`route` decorator binds a piece of code to an URL path. In this \"\n\"case, we link the ``/hello`` path to the ``hello()`` function. This is \"\n\"called a `route` (hence the decorator name) and is the most important \"\n\"concept of this framework. You can define as many routes as you want. \"\n\"Whenever a browser requests a URL, the associated function is called and the\"\n\" return value is sent back to the browser. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:83\nmsgid \"\"\n\"The :func:`run` call in the last line starts a built-in development server. \"\n\"It runs on ``localhost`` port ``8080`` and serves requests until you hit \"\n\":kbd:`Control-c`. You can switch the server backend later, but for now a \"\n\"development server is all we need. It requires no setup at all and is an \"\n\"incredibly painless way to get your application up and running for local \"\n\"tests.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:85\nmsgid \"\"\n\"The :ref:`tutorial-debugging` is very helpful during early development, but \"\n\"should be switched off for public applications. Keep that in mind.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:87\nmsgid \"\"\n\"Of course this is a very simple example, but it shows the basic concept of \"\n\"how applications are built with Bottle. Continue reading and you'll see what\"\n\" else is possible.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:92\nmsgid \"The Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:94\nmsgid \"\"\n\"For the sake of simplicity, most examples in this tutorial use a module-\"\n\"level :func:`route` decorator to define routes. This adds routes to a global\"\n\" \\\"default application\\\", an instance of :class:`Bottle` that is \"\n\"automatically created the first time you call :func:`route`. Several other \"\n\"module-level decorators and functions relate to this default application, \"\n\"but if you prefer a more object oriented approach and don't mind the extra \"\n\"typing, you can create a separate application object and use that instead of\"\n\" the global one::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:106\nmsgid \"\"\n\"The object-oriented approach is further described in the :ref:`default-app` \"\n\"section. Just keep in mind that you have a choice.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:114\nmsgid \"Request Routing\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:116\nmsgid \"\"\n\"In the last chapter we built a very simple web application with only a \"\n\"single route. Here is the routing part of the \\\"Hello World\\\" example \"\n\"again::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:122\nmsgid \"\"\n\"The :func:`route` decorator links an URL path to a callback function, and \"\n\"adds a new route to the :ref:`default application <tutorial-default>`. An \"\n\"application with just one route is kind of boring, though. Let's add some \"\n\"more (don't forget ``from bottle import template``)::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:129\nmsgid \"\"\n\"This example demonstrates two things: You can bind more than one route to a \"\n\"single callback, and you can add wildcards to URLs and access them via \"\n\"keyword arguments.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:136\nmsgid \"Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:138\nmsgid \"\"\n\"Routes that contain wildcards are called `dynamic routes` (as opposed to \"\n\"`static routes`) and match more than one URL at the same time. A simple \"\n\"wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and\"\n\" accepts one or more characters up to the next slash (``/``). For example, \"\n\"the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as\"\n\" ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:140\nmsgid \"\"\n\"Each wildcard passes the covered part of the URL as a keyword argument to \"\n\"the request callback. You can use them right away and implement RESTful, \"\n\"nice-looking and meaningful URLs with ease. Here are some other examples \"\n\"along with the URLs they'd match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:152\nmsgid \"\"\n\"Filters are used to define more specific wildcards, and/or transform the \"\n\"covered part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:154\nmsgid \"\"\n\"The following filters are implemented by default and more may be added:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:156\nmsgid \"\"\n\"**:int** matches (signed) digits only and converts the value to integer.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:157\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:158\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and can be used to match more than one path segment.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:159\nmsgid \"\"\n\"**:re** allows you to specify a custom regular expression in the config \"\n\"field. The matched value is not modified.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:161\nmsgid \"Let's have a look at some practical examples::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:175\nmsgid \"You can add your own filters as well. See :doc:`routing` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:179\nmsgid \"\"\n\"The new rule syntax was introduced in **Bottle 0.10** to simplify some \"\n\"common use cases, but the old syntax still works and you can find a lot of \"\n\"code examples still using it. The differences are best described by example:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:182\nmsgid \"Old Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:182\nmsgid \"New Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:184\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:184\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:185\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:185\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:186\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:186\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:187\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:187\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:190\nmsgid \"\"\n\"Try to avoid the old syntax in future projects if you can. It is not \"\n\"currently deprecated, but will be eventually.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:194\nmsgid \"HTTP Request Methods\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:198\nmsgid \"\"\n\"The HTTP protocol defines several `request methods`__ (sometimes referred to\"\n\" as \\\"verbs\\\") for different tasks. GET is the default for all routes with \"\n\"no other method specified. These routes will match GET requests only. To \"\n\"handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` \"\n\"keyword argument to the :func:`route` decorator or use one of the four \"\n\"alternative decorators: :func:`get`, :func:`post`, :func:`put`, \"\n\":func:`delete` or :func:`patch`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:200\nmsgid \"\"\n\"The POST method is commonly used for HTML form submission. This example \"\n\"shows how to handle a login form using POST::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:223\nmsgid \"\"\n\"In this example the ``/login`` URL is linked to two distinct callbacks, one \"\n\"for GET requests and another for POST requests. The first one displays a \"\n\"HTML form to the user. The second callback is invoked on a form submission \"\n\"and checks the login credentials the user entered into the form. The use of \"\n\":attr:`Request.forms` is further described in the :ref:`tutorial-request` \"\n\"section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:226\nmsgid \"Special Methods: HEAD and ANY\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:227\nmsgid \"\"\n\"The HEAD method is used to ask for the response identical to the one that \"\n\"would correspond to a GET request, but without the response body. This is \"\n\"useful for retrieving meta-information about a resource without having to \"\n\"download the entire document. Bottle handles these requests automatically by\"\n\" falling back to the corresponding GET route and cutting off the request \"\n\"body, if present. You don't have to specify any HEAD routes yourself.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:229\nmsgid \"\"\n\"Additionally, the non-standard ANY method works as a low priority fallback: \"\n\"Routes that listen to ANY will match requests regardless of their HTTP \"\n\"method but only if no other more specific route is defined. This is helpful \"\n\"for *proxy-routes* that redirect requests to more specific sub-applications.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:231\nmsgid \"\"\n\"To sum it up: HEAD requests fall back to GET routes and all requests fall \"\n\"back to ANY routes, but only if there is no matching route for the original \"\n\"request method. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:236\nmsgid \"Routing Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:238\nmsgid \"\"\n\"Static files such as images or CSS files are not served automatically. You \"\n\"have to add a route and a callback to control which files get served and \"\n\"where to find them::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:245\nmsgid \"\"\n\"The :func:`static_file` function is a helper to serve files in a safe and \"\n\"convenient way (see :ref:`tutorial-static-files`). This example is limited \"\n\"to files directly within the ``/path/to/your/static/files`` directory \"\n\"because the ``<filename>`` wildcard won't match a path with a slash in it. \"\n\"To serve files in subdirectories, change the wildcard to use the `path` \"\n\"filter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:251\nmsgid \"\"\n\"Be careful when specifying a relative root-path such as \"\n\"``root='./static/files'``. The working directory (``./``) and the project \"\n\"directory are not always the same.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:259\nmsgid \"Error Pages\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:261\nmsgid \"\"\n\"If anything goes wrong, Bottle displays an informative but fairly plain \"\n\"error page. You can override the default for a specific HTTP status code \"\n\"with the :func:`error` decorator::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:268\nmsgid \"\"\n\"From now on, `404 File not Found` errors will display a custom error page to\"\n\" the user. The only parameter passed to the error-handler is an instance of \"\n\":exc:`HTTPError`. Apart from that, an error-handler is quite similar to a \"\n\"regular request callback. You can read from :data:`request`, write to \"\n\":data:`response` and return any supported data-type except for \"\n\":exc:`HTTPError` instances.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"\"\n\"Error handlers are used only if your application returns or raises an \"\n\":exc:`HTTPError` exception (:func:`abort` does just that). Changing \"\n\":attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the \"\n\"error handler.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:280\nmsgid \"Generating content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"\"\n\"In pure WSGI, the range of types you may return from your application is \"\n\"very limited. Applications must return an iterable yielding byte strings. \"\n\"You may return a string (because strings are iterable) but this causes most \"\n\"servers to transmit your content char by char. Unicode strings are not \"\n\"allowed at all. This is not very practical.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:284\nmsgid \"\"\n\"Bottle is much more flexible and supports a wide range of types. It even \"\n\"adds a ``Content-Length`` header if possible and encodes unicode \"\n\"automatically, so you don't have to. What follows is a list of data types \"\n\"you may return from your application callbacks and a short description of \"\n\"how these are handled by the framework:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:287\nmsgid \"Dictionaries\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:287\nmsgid \"\"\n\"As mentioned above, Python dictionaries (or subclasses thereof) are \"\n\"automatically transformed into JSON strings and returned to the browser with\"\n\" the ``Content-Type`` header set to ``application/json``. This makes it easy\"\n\" to implement json-based APIs. Data formats other than json are supported \"\n\"too. See the :ref:`tutorial-output-filter` to learn more.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:290\nmsgid \"Empty Strings, ``False``, ``None`` or other non-true values:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:290\nmsgid \"\"\n\"These produce an empty output with the ``Content-Length`` header set to 0.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:293\nmsgid \"Unicode strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:293\nmsgid \"\"\n\"Unicode strings (or iterables yielding unicode strings) are automatically \"\n\"encoded with the codec specified in the ``Content-Type`` header (utf8 by \"\n\"default) and then treated as normal byte strings (see below).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:296\nmsgid \"Byte strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:296\nmsgid \"\"\n\"Bottle returns strings as a whole (instead of iterating over each char) and \"\n\"adds a ``Content-Length`` header based on the string length. Lists of byte \"\n\"strings are joined first. Other iterables yielding byte strings are not \"\n\"joined because they may grow too big to fit into memory. The ``Content-\"\n\"Length`` header is not set in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:299\nmsgid \"Instances of :exc:`HTTPError` or :exc:`HTTPResponse`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:299\nmsgid \"\"\n\"Returning these has the same effect as when raising them as an exception. In\"\n\" case of an :exc:`HTTPError`, the error handler is applied. See :ref\"\n\":`tutorial-errorhandling` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:302\nmsgid \"File objects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:302\nmsgid \"\"\n\"Everything that has a ``.read()`` method is treated as a file or file-like \"\n\"object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI \"\n\"server framework. Some WSGI server implementations can make use of optimized\"\n\" system calls (sendfile) to transmit files more efficiently. In other cases \"\n\"this just iterates over chunks that fit into memory. Optional headers such \"\n\"as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use \"\n\":func:`send_file` if possible. See :ref:`tutorial-static-files` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:305\nmsgid \"Iterables and generators\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:305\nmsgid \"\"\n\"You are allowed to use ``yield`` within your callbacks or return an \"\n\"iterable, as long as the iterable yields byte strings, unicode strings, \"\n\":exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not \"\n\"supported, sorry. Please note that the HTTP status code and the headers are \"\n\"sent to the browser as soon as the iterable yields its first non-empty \"\n\"value. Changing these later has no effect.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:307\nmsgid \"\"\n\"The ordering of this list is significant. You may for example return a \"\n\"subclass of :class:`str` with a ``read()`` method. It is still treated as a \"\n\"string instead of a file, because strings are handled first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:310\nmsgid \"Changing the Default Encoding\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:311\nmsgid \"\"\n\"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide\"\n\" how to encode unicode strings. This header defaults to ``text/html; \"\n\"charset=UTF8`` and can be changed using the :attr:`Response.content_type` \"\n\"attribute or by setting the :attr:`Response.charset` attribute directly. \"\n\"(The :class:`Response` object is described in the section :ref:`tutorial-\"\n\"response`.)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:326\nmsgid \"\"\n\"In some rare cases the Python encoding names differ from the names supported\"\n\" by the HTTP specification. Then, you have to do both: first set the \"\n\":attr:`Response.content_type` header (which is sent to the client unchanged)\"\n\" and then set the :attr:`Response.charset` attribute (which is used to \"\n\"encode unicode).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:331\nmsgid \"Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:333\nmsgid \"\"\n\"You can directly return file objects, but :func:`static_file` is the \"\n\"recommended way to serve static files. It automatically guesses a mime-type,\"\n\" adds a ``Last-Modified`` header, restricts paths to a ``root`` directory \"\n\"for security reasons and generates appropriate error responses (403 on \"\n\"permission errors, 404 on missing files). It even supports the ``If-\"\n\"Modified-Since`` header and eventually generates a ``304 Not Modified`` \"\n\"response. You can pass a custom MIME type to disable guessing.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:346\nmsgid \"\"\n\"You can raise the return value of :func:`static_file` as an exception if you\"\n\" really need to.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:349\nmsgid \"Forced Download\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:350\nmsgid \"\"\n\"Most browsers try to open downloaded files if the MIME type is known and \"\n\"assigned to an application (e.g. PDF files). If this is not what you want, \"\n\"you can force a download dialog and even suggest a filename to the user::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:356\nmsgid \"\"\n\"If the ``download`` parameter is just ``True``, the original filename is \"\n\"used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:361\nmsgid \"HTTP Errors and Redirects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:363\nmsgid \"\"\n\"The :func:`abort` function is a shortcut for generating HTTP error pages.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:372\nmsgid \"\"\n\"To redirect a client to a different URL, you can send a ``303 See Other`` \"\n\"response with the ``Location`` header set to the new URL. :func:`redirect` \"\n\"does that for you::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:379\nmsgid \"You may provide a different HTTP status code as a second parameter.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:382\nmsgid \"\"\n\"Both functions will interrupt your callback code by raising an \"\n\":exc:`HTTPError` exception.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:385\nmsgid \"Other Exceptions\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:386\nmsgid \"\"\n\"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will \"\n\"result in a ``500 Internal Server Error`` response, so they won't crash your\"\n\" WSGI server. You can turn off this behavior to handle exceptions in your \"\n\"middleware by setting ``bottle.app().catchall`` to ``False``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:392\nmsgid \"The :class:`Response` Object\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:394\nmsgid \"\"\n\"Response metadata such as the HTTP status code, response headers and cookies\"\n\" are stored in an object called :data:`response` up to the point where they \"\n\"are transmitted to the browser. You can manipulate these metadata directly \"\n\"or use the predefined helper methods to do so. The full API and feature list\"\n\" is described in the API section (see :class:`Response`), but the most \"\n\"common use cases and features are covered here, too.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:397\nmsgid \"Status Code\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:398\nmsgid \"\"\n\"The `HTTP status code <http_code>`_ controls the behavior of the browser and\"\n\" defaults to ``200 OK``. In most scenarios you won't need to set the \"\n\":attr:`Response.status` attribute manually, but use the :func:`abort` helper\"\n\" or return an :exc:`HTTPResponse` instance with the appropriate status code.\"\n\" Any integer is allowed, but codes other than the ones defined by the `HTTP \"\n\"specification <http_code>`_ will only confuse the browser and break \"\n\"standards.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:401\nmsgid \"Response Header\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:402\nmsgid \"\"\n\"Response headers such as ``Cache-Control`` or ``Location`` are defined via \"\n\":meth:`Response.set_header`. This method takes two parameters, a header name\"\n\" and a value. The name part is case-insensitive::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:409\nmsgid \"\"\n\"Most headers are unique, meaning that only one header per name is send to \"\n\"the client. Some special headers however are allowed to appear more than \"\n\"once in a response. To add an additional header, use \"\n\":meth:`Response.add_header` instead of :meth:`Response.set_header`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:414\nmsgid \"\"\n\"Please note that this is just an example. If you want to work with cookies, \"\n\"read :ref:`ahead <tutorial-cookies>`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:420 ../../tutorial.rst:549\nmsgid \"Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:422\nmsgid \"\"\n\"A cookie is a named piece of text stored in the user's browser profile. You \"\n\"can access previously defined cookies via :meth:`Request.get_cookie` and set\"\n\" new cookies with :meth:`Response.set_cookie`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:432\nmsgid \"\"\n\"The :meth:`Response.set_cookie` method accepts a number of additional \"\n\"keyword arguments that control the cookies lifetime and behavior. Some of \"\n\"the most common settings are described here:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:434\nmsgid \"**max_age:**    Maximum age in seconds. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:435\nmsgid \"\"\n\"**expires:**    A datetime object or UNIX timestamp. (default: ``None``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:436\nmsgid \"\"\n\"**domain:**     The domain that is allowed to read the cookie. (default: \"\n\"current domain)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:437\nmsgid \"**path:**       Limit the cookie to a given path (default: ``/``)\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:438\nmsgid \"**secure:**     Limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:439\nmsgid \"\"\n\"**httponly:**   Prevent client-side javascript to read this cookie (default:\"\n\" off, requires Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:441\nmsgid \"\"\n\"If neither `expires` nor `max_age` is set, the cookie expires at the end of \"\n\"the browser session or as soon as the browser window is closed. There are \"\n\"some other gotchas you should consider when using cookies:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:443\nmsgid \"Cookies are limited to 4 KB of text in most browsers.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:444\nmsgid \"\"\n\"Some users configure their browsers to not accept cookies at all. Most \"\n\"search engines ignore cookies too. Make sure that your application still \"\n\"works without cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:445\nmsgid \"\"\n\"Cookies are stored at client side and are not encrypted in any way. Whatever\"\n\" you store in a cookie, the user can read it. Worse than that, an attacker \"\n\"might be able to steal a user's cookies through `XSS \"\n\"<http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_\"\n\" vulnerabilities on your side. Some viruses are known to read the browser \"\n\"cookies, too. Thus, never store confidential information in cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:446\nmsgid \"Cookies are easily forged by malicious clients. Do not trust cookies.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:451\nmsgid \"Signed Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:452\nmsgid \"\"\n\"As mentioned above, cookies are easily forged by malicious clients. Bottle \"\n\"can cryptographically sign your cookies to prevent this kind of \"\n\"manipulation. All you have to do is to provide a signature key via the \"\n\"`secret` keyword argument whenever you read or set a cookie and keep that \"\n\"key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` \"\n\"if the cookie is not signed or the signature keys don't match::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:472\nmsgid \"\"\n\"In addition, Bottle automatically pickles and unpickles any data stored to \"\n\"signed cookies. This allows you to store any pickle-able object (not only \"\n\"strings) to cookies, as long as the pickled data does not exceed the 4 KB \"\n\"limit.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:474\nmsgid \"\"\n\"Signed cookies are not encrypted (the client can still see the content) and \"\n\"not copy-protected (the client can restore an old cookie). The main \"\n\"intention is to make pickling and unpickling safe and prevent manipulation, \"\n\"not to store secret information at client side.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:487\nmsgid \"Request Data\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:489\nmsgid \"\"\n\"Cookies, HTTP header, HTML ``<form>`` fields and other request data is \"\n\"available through the global :data:`request` object. This special object \"\n\"always refers to the *current* request, even in multi-threaded environments \"\n\"where multiple client connections are handled at the same time::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:498\nmsgid \"\"\n\"The :data:`request` object is a subclass of :class:`BaseRequest` and has a \"\n\"very rich API to access data. We only cover the most commonly used features \"\n\"here, but it should be enough to get started.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:503\nmsgid \"Introducing :class:`FormsDict`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:505\nmsgid \"\"\n\"Bottle uses a special type of dictionary to store form data and cookies. \"\n\":class:`FormsDict` behaves like a normal dictionary, but has some additional\"\n\" features to make your life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:507\nmsgid \"\"\n\"**Attribute access**: All values in the dictionary are also accessible as \"\n\"attributes. These virtual attributes return unicode strings, even if the \"\n\"value is missing or unicode decoding fails. In that case, the string is \"\n\"empty, but still present::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:522\nmsgid \"\"\n\"**Multiple values per key:** :class:`FormsDict` is a subclass of \"\n\":class:`MultiDict` and can store more than one value per key. The standard \"\n\"dictionary access methods will only return a single value, but the \"\n\":meth:`~MultiDict.getall` method returns a (possibly empty) list of all \"\n\"values for a specific key::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:527\nmsgid \"\"\n\"**WTForms support:** Some libraries (e.g. `WTForms \"\n\"<http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input.\"\n\" :meth:`FormsDict.decode` does that for you. It decodes all values and \"\n\"returns a copy of itself, while preserving multiple values per key and all \"\n\"the other features.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:531\nmsgid \"\"\n\"In **Python 2** all keys and values are byte-strings. If you need unicode, \"\n\"you can call :meth:`FormsDict.getunicode` or fetch values via attribute \"\n\"access. Both methods try to decode the string (default: utf8) and return an \"\n\"empty string if that fails. No need to catch :exc:`UnicodeError`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:538\nmsgid \"\"\n\"In **Python 3** all strings are unicode, but HTTP is a byte-based wire \"\n\"protocol. The server has to decode the byte strings somehow before they are \"\n\"passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 \"\n\"(aka latin1), a reversible single-byte codec that can be re-encoded with a \"\n\"different encoding later. Bottle does that for :meth:`FormsDict.getunicode` \"\n\"and attribute access, but not for the dict-access methods. These return the \"\n\"unchanged values as provided by the server implementation, which is probably\"\n\" not what you want.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:545\nmsgid \"\"\n\"If you need the whole dictionary with correctly decoded values (e.g. for \"\n\"WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:551\nmsgid \"\"\n\"Cookies are small pieces of text stored in the clients browser and sent back\"\n\" to the server with each request. They are useful to keep some state around \"\n\"for more than one request (HTTP itself is stateless), but should not be used\"\n\" for security related stuff. They can be easily forged by the client.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:553\nmsgid \"\"\n\"All cookies sent by the client are available through \"\n\":attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a \"\n\"simple cookie-based view counter::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:563\nmsgid \"\"\n\"The :meth:`BaseRequest.get_cookie` method is a different way do access \"\n\"cookies. It supports decoding :ref:`signed cookies <tutorial-signed-\"\n\"cookies>` as described in a separate section.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:566\nmsgid \"HTTP Headers\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:568\nmsgid \"\"\n\"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or \"\n\"``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible \"\n\"through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict`\"\n\" is basically a dictionary with case-insensitive keys::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:580\nmsgid \"Query Variables\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:582\nmsgid \"\"\n\"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit\"\n\" a small number of key/value pairs to the server. You can use the \"\n\":attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these \"\n\"values and the :attr:`BaseRequest.query_string` attribute to get the whole \"\n\"string.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:595\nmsgid \"HTML `<form>` Handling\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:597\nmsgid \"\"\n\"Let us start from the beginning. In HTML, a typical ``<form>`` looks \"\n\"something like this:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:607\nmsgid \"\"\n\"The ``action`` attribute specifies the URL that will receive the form data. \"\n\"``method`` defines the HTTP method to use (``GET`` or ``POST``). With \"\n\"``method=\\\"get\\\"`` the form values are appended to the URL and available \"\n\"through :attr:`BaseRequest.query` as described above. This is considered \"\n\"insecure and has other limitations, so we use ``method=\\\"post\\\"`` here. If \"\n\"in doubt, use ``POST`` forms.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:609\nmsgid \"\"\n\"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms`\"\n\" as a :class:`FormsDict`. The server side code may look like this::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:632\nmsgid \"\"\n\"There are several other attributes used to access form data. Some of them \"\n\"combine values from different sources for easier access. The following table\"\n\" should give you a decent overview.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:635\nmsgid \"Attribute\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:635\nmsgid \"GET Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:635\nmsgid \"POST Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:635\nmsgid \"File Uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:637\nmsgid \":attr:`BaseRequest.query`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:637 ../../tutorial.rst:638 ../../tutorial.rst:639\n#: ../../tutorial.rst:640 ../../tutorial.rst:640 ../../tutorial.rst:641\n#: ../../tutorial.rst:642 ../../tutorial.rst:642\nmsgid \"yes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:637 ../../tutorial.rst:637 ../../tutorial.rst:638\n#: ../../tutorial.rst:638 ../../tutorial.rst:639 ../../tutorial.rst:639\n#: ../../tutorial.rst:640 ../../tutorial.rst:641 ../../tutorial.rst:641\n#: ../../tutorial.rst:642\nmsgid \"no\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:638\nmsgid \":attr:`BaseRequest.forms`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:639\nmsgid \":attr:`BaseRequest.files`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:640\nmsgid \":attr:`BaseRequest.params`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:641\nmsgid \":attr:`BaseRequest.GET`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:642\nmsgid \":attr:`BaseRequest.POST`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:647\nmsgid \"File uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:649\nmsgid \"\"\n\"To support file uploads, we have to change the ``<form>`` tag a bit. First, \"\n\"we tell the browser to encode the form data in a different way by adding an \"\n\"``enctype=\\\"multipart/form-data\\\"`` attribute to the ``<form>`` tag. Then, \"\n\"we add ``<input type=\\\"file\\\" />`` tags to allow the user to select a file. \"\n\"Here is an example:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:659\nmsgid \"\"\n\"Bottle stores file uploads in :attr:`BaseRequest.files` as \"\n\":class:`FileUpload` instances, along with some metadata about the upload. \"\n\"Let us assume you just want to save the file to disk::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:673\nmsgid \"\"\n\":attr:`FileUpload.filename` contains the name of the file on the clients \"\n\"file system, but is cleaned up and normalized to prevent bugs caused by \"\n\"unsupported characters or path segments in the filename. If you need the \"\n\"unmodified name as sent by the client, have a look at \"\n\":attr:`FileUpload.raw_filename`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:675\nmsgid \"\"\n\"The :attr:`FileUpload.save` method is highly recommended if you want to \"\n\"store the file to disk. It prevents some common errors (e.g. it does not \"\n\"overwrite existing files unless you tell it to) and stores the file in a \"\n\"memory efficient way. You can access the file object directly via \"\n\":attr:`FileUpload.file`. Just be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:679\nmsgid \"JSON Content\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:681\nmsgid \"\"\n\"Some JavaScript or REST clients send ``application/json`` content to the \"\n\"server. The :attr:`BaseRequest.json` attribute contains the parsed data \"\n\"structure, if available.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:685\nmsgid \"The raw request body\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:687\nmsgid \"\"\n\"You can access the raw body data as a file-like object via \"\n\":attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary \"\n\"file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` \"\n\"setting. In both cases the body is completely buffered before you can access\"\n\" the attribute. If you expect huge amounts of data and want to get direct \"\n\"unbuffered access to the stream, have a look at ``request['wsgi.input']``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:692\nmsgid \"WSGI Environment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:694\nmsgid \"\"\n\"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The \"\n\"original is stored in :attr:`BaseRequest.environ`, but the request object \"\n\"itself behaves like a dictionary, too. Most of the interesting data is \"\n\"exposed through special methods or attributes, but if you want to access \"\n\"`WSGI environ variables <WSGI specification>`_ directly, you can do so::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:712\nmsgid \"Templates\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:714\nmsgid \"\"\n\"Bottle comes with a fast and powerful built-in template engine called \"\n\":doc:`stpl`. To render a template you can use the :func:`template` function \"\n\"or the :func:`view` decorator. All you have to do is to provide the name of \"\n\"the template and the variables you want to pass to the template as keyword \"\n\"arguments. Here’s a simple example of how to render a template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:721\nmsgid \"\"\n\"This will load the template file ``hello_template.tpl`` and render it with \"\n\"the ``name`` variable set. Bottle will look for templates in the \"\n\"``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` \"\n\"list.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:723\nmsgid \"\"\n\"The :func:`view` decorator allows you to return a dictionary with the \"\n\"template variables instead of calling :func:`template`::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:732\nmsgid \"Syntax\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:735\nmsgid \"\"\n\"The template syntax is a very thin layer around the Python language. Its \"\n\"main purpose is to ensure correct indentation of blocks, so you can format \"\n\"your template without worrying about indentation. Follow the link for a full\"\n\" syntax description: :doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:737\nmsgid \"Here is an example template::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:748\nmsgid \"Caching\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:749\nmsgid \"\"\n\"Templates are cached in memory after compilation. Modifications made to the \"\n\"template files will have no affect until you clear the template cache. Call \"\n\"``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:759\nmsgid \"Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:763\nmsgid \"\"\n\"Bottle's core features cover most common use-cases, but as a micro-framework\"\n\" it has its limits. This is where \\\"Plugins\\\" come into play. Plugins add \"\n\"missing functionality to the framework, integrate third party libraries, or \"\n\"just automate some repetitive work.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:765\nmsgid \"\"\n\"We have a growing :doc:`/plugins/index` and most plugins are designed to be \"\n\"portable and re-usable across applications. The chances are high that your \"\n\"problem has already been solved and a ready-to-use plugin exists. If not, \"\n\"the :doc:`/plugindev` may help you.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:767\nmsgid \"\"\n\"The effects and APIs of plugins are manifold and depend on the specific \"\n\"plugin. The ``SQLitePlugin`` plugin for example detects callbacks that \"\n\"require a ``db`` keyword argument and creates a fresh database connection \"\n\"object every time the callback is called. This makes it very convenient to \"\n\"use a database::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:787\nmsgid \"\"\n\"Other plugin may populate the thread-safe :data:`local` object, change \"\n\"details of the :data:`request` object, filter the data returned by the \"\n\"callback or bypass the callback completely. An \\\"auth\\\" plugin for example \"\n\"could check for a valid session and return a login page instead of calling \"\n\"the original callback. What happens exactly depends on the plugin.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:791\nmsgid \"Application-wide Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:793\nmsgid \"\"\n\"Plugins can be installed application-wide or just to some specific routes \"\n\"that need additional functionality. Most plugins can safely be installed to \"\n\"all routes and are smart enough to not add overhead to callbacks that do not\"\n\" need their functionality.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:795\nmsgid \"\"\n\"Let us take the ``SQLitePlugin`` plugin for example. It only affects route \"\n\"callbacks that need a database connection. Other routes are left alone. \"\n\"Because of this, we can install the plugin application-wide with no \"\n\"additional overhead.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:797\nmsgid \"\"\n\"To install a plugin, just call :func:`install` with the plugin as first \"\n\"argument::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:802\nmsgid \"\"\n\"The plugin is not applied to the route callbacks yet. This is delayed to \"\n\"make sure no routes are missed. You can install plugins first and add routes\"\n\" later, if you want to. The order of installed plugins is significant, \"\n\"though. If a plugin requires a database connection, you need to install the \"\n\"database plugin first.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:806\nmsgid \"Uninstall Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:807\nmsgid \"\"\n\"You can use a name, class or instance to :func:`uninstall` a previously \"\n\"installed plugin::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:817\nmsgid \"\"\n\"Plugins can be installed and removed at any time, even at runtime while \"\n\"serving requests. This enables some neat tricks (installing slow debugging \"\n\"or profiling plugins only when needed) but should not be overused. Each time\"\n\" the list of plugins changes, the route cache is flushed and all plugins are\"\n\" re-applied.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:820\nmsgid \"\"\n\"The module-level :func:`install` and :func:`uninstall` functions affect the \"\n\":ref:`default-app`. To manage plugins for a specific application, use the \"\n\"corresponding methods on the :class:`Bottle` application object.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:824\nmsgid \"Route-specific Installation\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:826\nmsgid \"\"\n\"The ``apply`` parameter of the :func:`route` decorator comes in handy if you\"\n\" want to install plugins to only a small number of routes::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:836\nmsgid \"Blacklisting Plugins\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:838\nmsgid \"\"\n\"You may want to explicitly disable a plugin for a number of routes. The \"\n\":func:`route` decorator has a ``skip`` parameter for this purpose::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:860\nmsgid \"\"\n\"The ``skip`` parameter accepts a single value or a list of values. You can \"\n\"use a name, class or instance to identify the plugin that is to be skipped. \"\n\"Set ``skip=True`` to skip all plugins at once.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:863\nmsgid \"Plugins and Sub-Applications\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:865\nmsgid \"\"\n\"Most plugins are specific to the application they were installed to. \"\n\"Consequently, they should not affect sub-applications mounted with \"\n\":meth:`Bottle.mount`. Here is an example::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:876\nmsgid \"\"\n\"Whenever you mount an application, Bottle creates a proxy-route on the main-\"\n\"application that forwards all requests to the sub-application. Plugins are \"\n\"disabled for this kind of proxy-route by default. As a result, our \"\n\"(fictional) `WTForms` plugin affects the ``/contact`` route, but does not \"\n\"affect the routes of the ``/blog`` sub-application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:878\nmsgid \"\"\n\"This behavior is intended as a sane default, but can be overridden. The \"\n\"following example re-activates all plugins for a specific proxy-route::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:882\nmsgid \"\"\n\"But there is a snag: The plugin sees the whole sub-application as a single \"\n\"route, namely the proxy-route mentioned above. In order to affect each \"\n\"individual route of the sub-application, you have to install the plugin to \"\n\"the mounted application explicitly.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:887\nmsgid \"Development\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:889\nmsgid \"\"\n\"So you have learned the basics and want to write your own application? Here \"\n\"are some tips that might help you beeing more productive.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:895\nmsgid \"Default Application\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:897\nmsgid \"\"\n\"Bottle maintains a global stack of :class:`Bottle` instances and uses the \"\n\"top of the stack as a default for some of the module-level functions and \"\n\"decorators. The :func:`route` decorator, for example, is a shortcut for \"\n\"calling :meth:`Bottle.route` on the default application::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:905\nmsgid \"\"\n\"This is very convenient for small applications and saves you some typing, \"\n\"but also means that, as soon as your module is imported, routes are \"\n\"installed to the global default application. To avoid this kind of import \"\n\"side-effects, Bottle offers a second, more explicit way to build \"\n\"applications::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:915\nmsgid \"\"\n\"Separating the application object improves re-usability a lot, too. Other \"\n\"developers can safely import the ``app`` object from your module and use \"\n\":meth:`Bottle.mount` to merge applications together.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:920\nmsgid \"\"\n\"Starting with bottle-0.13 you can use :class:`Bottle` instances as context \"\n\"managers::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:945\nmsgid \"Debug Mode\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:947\nmsgid \"During early development, the debug mode can be very helpful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:955\nmsgid \"\"\n\"In this mode, Bottle is much more verbose and provides helpful debugging \"\n\"information whenever an error occurs. It also disables some optimisations \"\n\"that might get in your way and adds some checks that warn you about possible\"\n\" misconfiguration.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:957\nmsgid \"Here is an incomplete list of things that change in debug mode:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:959\nmsgid \"The default error page shows a traceback.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:960\nmsgid \"Templates are not cached.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:961\nmsgid \"Plugins are applied immediately.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:963\nmsgid \"Just make sure not to use the debug mode on a production server.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:966\nmsgid \"Auto Reloading\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:968\nmsgid \"\"\n\"During development, you have to restart the server a lot to test your recent\"\n\" changes. The auto reloader can do this for you. Every time you edit a \"\n\"module file, the reloader restarts the server process and loads the newest \"\n\"version of your code.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:978\nmsgid \"\"\n\"How it works: the main process will not start a server, but spawn a new \"\n\"child process using the same command line arguments used to start the main \"\n\"process. All module-level code is executed at least twice! Be careful.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:983\nmsgid \"\"\n\"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` \"\n\"and start as a normal non-reloading app server. As soon as any of the loaded\"\n\" modules changes, the child process is terminated and re-spawned by the main\"\n\" process. Changes in template files will not trigger a reload. Please use \"\n\"debug mode to deactivate template caching.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:989\nmsgid \"\"\n\"The reloading depends on the ability to stop the child process. If you are \"\n\"running on Windows or any other operating system not supporting \"\n\"``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), \"\n\"``signal.SIGTERM`` is used to kill the child. Note that exit handlers and \"\n\"finally clauses, etc., are not executed after a ``SIGTERM``.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:997\nmsgid \"Command Line Interface\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1001\nmsgid \"Starting with version 0.10 you can use bottle as a command-line tool:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1021\nmsgid \"\"\n\"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to \"\n\"``localhost:8080``. The other parameters should be self-explanatory.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1023\nmsgid \"\"\n\"Both plugins and applications are specified via import expressions. These \"\n\"consist of an import path (e.g. ``package.module``) and an expression to be \"\n\"evaluated in the namespace of that module, separated by a colon. See \"\n\":func:`load` for details. Here are some examples:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1044\nmsgid \"Deployment\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1046\nmsgid \"\"\n\"Bottle runs on the built-in `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_\"\n\"  by default. This non-threading HTTP server is perfectly fine for \"\n\"development and early production, but may become a performance bottleneck \"\n\"when server load increases.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1048\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded server::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1052\nmsgid \"\"\n\"This, and many other deployment options are described in a separate article:\"\n\" :doc:`deployment`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1060\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1063\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1065\nmsgid \"\"\n\"Programmer code that is to be called when some external action happens. In \"\n\"the context of web frameworks, the mapping between URL paths and application\"\n\" code is often achieved by specifying a callback function for each URL.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1069\nmsgid \"decorator\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1071\nmsgid \"\"\n\"A function returning another function, usually applied as a function \"\n\"transformation using the ``@decorator`` syntax. See `python documentation \"\n\"for function definition  \"\n\"<http://docs.python.org/reference/compound_stmts.html#function>`_ for more \"\n\"about decorators.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1072\nmsgid \"environ\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1074\nmsgid \"\"\n\"A structure where information about all documents under the root is saved, \"\n\"and used for cross-referencing.  The environment is pickled after the \"\n\"parsing stage, so that successive runs only need to read and parse new and \"\n\"changed documents.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1078\nmsgid \"handler function\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1080\nmsgid \"\"\n\"A function to handle some specific event or situation. In a web framework, \"\n\"the application is developed by attaching a handler function as callback for\"\n\" each specific URL comprising the application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1083\nmsgid \"source directory\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1085\nmsgid \"\"\n\"The directory which, including its subdirectories, contains all source files\"\n\" for one Sphinx project.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/_pot/tutorial_app.po",
    "content": "# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Bottle 0.13-dev\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2015-01-22 16:45-0200\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\n#: ../../tutorial_app.rst:20\nmsgid \"Tutorial: Todo-List Application\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:24\nmsgid \"\"\n\"This tutorial is a work in progess and written by `noisefloor \"\n\"<http://github.com/noisefloor>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:27\nmsgid \"\"\n\"This tutorial should give a brief introduction to the Bottle_ WSGI \"\n\"Framework. The main goal is to be able, after reading through this tutorial,\"\n\" to create a project using Bottle. Within this document, not all abilities \"\n\"will be shown, but at least the main and important ones like routing, \"\n\"utilizing the Bottle template abilities to format output and handling GET / \"\n\"POST parameters.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:29\nmsgid \"\"\n\"To understand the content here, it is not necessary to have a basic \"\n\"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. \"\n\"You should have a fair understanding of the Python_ programming language. \"\n\"Furthermore, the example used in the tutorial retrieves and stores data in a\"\n\" SQL databse, so a basic idea about SQL helps, but is not a must to \"\n\"understand the concepts of Bottle. Right here, SQLite_ is used. The output \"\n\"of Bottle sent to the browser is formatted in some examples by the help of \"\n\"HTML. Thus, a basic idea about the common HTML tags does help as well.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:31\nmsgid \"\"\n\"For the sake of introducing Bottle, the Python code \\\"in between\\\" is kept \"\n\"short, in order to keep the focus. Also all code within the tutorial is \"\n\"working fine, but you may not necessarily use it \\\"in the wild\\\", e.g. on a \"\n\"public web server. In order to do so, you may add e.g. more error handling, \"\n\"protect the database with a password, test and escape the input etc.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:0\nmsgid \"Table of Contents\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:36\nmsgid \"Goals\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:38\nmsgid \"\"\n\"At the end of this tutorial, we will have a simple, web-based ToDo list. The\"\n\" list contains a text (with max 100 characters) and a status (0 for closed, \"\n\"1 for open) for each item. Through the web-based user interface, open items \"\n\"can be view and edited and new items can be added.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:40\nmsgid \"\"\n\"During development, all pages will be available on ``localhost`` only, but \"\n\"later on it will be shown how to adapt the application for a \\\"real\\\" \"\n\"server, including how to use with Apache's mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:42\nmsgid \"\"\n\"Bottle will do the routing and format the output, with the help of \"\n\"templates. The items of the list will be stored inside a SQLite database. \"\n\"Reading and  writing the database will be done by Python code.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:44\nmsgid \"\"\n\"We will end up with an application with the following pages and \"\n\"functionality:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:46\nmsgid \"start page ``http://localhost:8080/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:47\nmsgid \"adding new items to the list: ``http://localhost:8080/new``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:48\nmsgid \"page for editing items: ``http://localhost:8080/edit/:no``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:49\nmsgid \"\"\n\"validating data assigned by dynamic routes with the @validate decorator\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:50\nmsgid \"catching errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:53\nmsgid \"Before We Start...\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:57\nmsgid \"Install Bottle\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:58\nmsgid \"\"\n\"Assuming that you have a fairly new installation of Python (version 2.5 or \"\n\"higher), you only need to install Bottle in addition to that. Bottle has no \"\n\"other dependencies than Python itself.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:60\nmsgid \"\"\n\"You can either manually install Bottle or use Python's easy_install: \"\n\"``easy_install bottle``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:64\nmsgid \"Further Software Necessities\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:65\nmsgid \"\"\n\"As we use SQLite3 as a database, make sure it is installed. On Linux \"\n\"systems, most distributions have SQLite3 installed by default. SQLite is \"\n\"available for Windows and MacOS X as well and the `sqlite3` module is part \"\n\"of the python standard library.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:68\nmsgid \"Create An SQL Database\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:69\nmsgid \"\"\n\"First, we need to create the database we use later on. To do so, save the \"\n\"following script in your project directory and run it with python. You can \"\n\"use the interactive interpreter too::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:80\nmsgid \"\"\n\"This generates a database-file `todo.db` with tables called ``todo`` and \"\n\"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for \"\n\"each row, which is used later on to reference the rows. The column ``task`` \"\n\"holds the text which describes the task, it can be max 100 characters long. \"\n\"Finally, the column ``status`` is used to mark a task as open (value 1) or \"\n\"closed (value 0).\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:83\nmsgid \"Using Bottle for a Web-Based ToDo List\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:85\nmsgid \"\"\n\"Now it is time to introduce Bottle in order to create a web-based \"\n\"application. But first, we need to look into a basic concept of Bottle: \"\n\"routes.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:89\nmsgid \"Understanding routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:90\nmsgid \"\"\n\"Basically, each page visible in the browser is dynamically generated when \"\n\"the page address is called. Thus, there is no static content. That is \"\n\"exactly what is called a \\\"route\\\" within Bottle: a certain address on the \"\n\"server. So, for example, when the page ``http://localhost:8080/todo`` is \"\n\"called from the browser, Bottle \\\"grabs\\\" the call and checks if there is \"\n\"any (Python) function defined for the route \\\"todo\\\". If so, Bottle will \"\n\"execute the corresponding Python code and return its result.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:94\nmsgid \"First Step - Showing All Open Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:95\nmsgid \"\"\n\"So, after understanding the concept of routes, let's create the first one. \"\n\"The goal is to see all open items from the ToDo list::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:110\nmsgid \"\"\n\"Save the code a ``todo.py``, preferably in the same directory as the file \"\n\"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the \"\n\"``sqlite3.connect()`` statement.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:112\nmsgid \"\"\n\"Let's have a look what we just did: We imported the necessary module \"\n\"``sqlite3`` to access to SQLite database and from Bottle we imported \"\n\"``route`` and ``run``. The ``run()`` statement simply starts the web server \"\n\"included in Bottle. By default, the web server serves the pages on localhost\"\n\" and port 8080. Furthermore, we imported ``route``, which is the function \"\n\"responsible for Bottle's routing. As you can see, we defined one function, \"\n\"``todo_list()``, with a few lines of code reading from the database. The \"\n\"important point is the `decorator statement`_ ``@route('/todo')`` right \"\n\"before the ``def todo_list()`` statement. By doing this, we bind this \"\n\"function to the route ``/todo``, so every time the browsers calls \"\n\"``http://localhost:8080/todo``, Bottle returns the result of the function \"\n\"``todo_list()``. That is how routing within bottle works.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:114\nmsgid \"\"\n\"Actually you can bind more than one route to a function. So the following \"\n\"code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:121\nmsgid \"\"\n\"will work fine, too. What will not work is to bind one route to more than \"\n\"one function.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:123\nmsgid \"\"\n\"What you will see in the browser is what is returned, thus the value given \"\n\"by the ``return`` statement. In this example, we need to convert ``result`` \"\n\"in to a string by ``str()``, as Bottle expects a string or a list of strings\"\n\" from the return statement. But here, the result of the database query is a \"\n\"list of tuples, which is the standard defined by the `Python DB API`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:125\nmsgid \"\"\n\"Now, after understanding the little script above, it is time to execute it \"\n\"and watch the result yourself. Remember that on Linux- / Unix-based systems \"\n\"the file ``todo.py`` needs to be executable first. Then, just run ``python \"\n\"todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. \"\n\"In case you made no mistake writing the script, the output should look like \"\n\"this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:129\nmsgid \"\"\n\"If so - congratulations! You are now a successful user of Bottle. In case it\"\n\" did not work and you need to make some changes to the script, remember to \"\n\"stop Bottle serving the page, otherwise the revised version will not be \"\n\"loaded.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:131\nmsgid \"\"\n\"Actually, the output is not really exciting nor nice to read. It is the raw \"\n\"result returned from the SQL query.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:133\nmsgid \"\"\n\"So, in the next step we format the output in a nicer way. But before we do \"\n\"that, we make our life easier.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:137\nmsgid \"Debugging and Auto-Reload\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:138\nmsgid \"\"\n\"Maybe you already noticed that Bottle sends a short error message to the \"\n\"browser in case something within the script is wrong, e.g. the connection to\"\n\" the database is not working. For debugging purposes it is quite helpful to \"\n\"get more details. This can be easily achieved by adding the following \"\n\"statement to the script::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:146\nmsgid \"\"\n\"By enabling \\\"debug\\\", you will get a full stacktrace of the Python \"\n\"interpreter, which usually contains useful information for finding bugs. \"\n\"Furthermore, templates (see below) are not cached, thus changes to templates\"\n\" will take effect without stopping the server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:150\nmsgid \"\"\n\"That ``debug(True)`` is supposed to be used for development only, it should \"\n\"*not* be used in production environments.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:154\nmsgid \"\"\n\"Another quite nice feature is auto-reloading, which is enabled by modifying \"\n\"the ``run()`` statement to\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:160\nmsgid \"\"\n\"This will automatically detect changes to the script and reload the new \"\n\"version once it is called again, without the need to stop and start the \"\n\"server.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:162\nmsgid \"\"\n\"Again, the feature is mainly supposed to be used while developing, not on \"\n\"production systems.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:166\nmsgid \"Bottle Template To Format The Output\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:167\nmsgid \"\"\n\"Now let's have a look at casting the output of the script into a proper \"\n\"format.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:169\nmsgid \"\"\n\"Actually Bottle expects to receive a string or a list of strings from a \"\n\"function and returns them by the help of the built-in server to the browser.\"\n\" Bottle does not bother about the content of the string itself, so it can be\"\n\" text formatted with HTML markup, too.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:171\nmsgid \"\"\n\"Bottle brings its own easy-to-use template engine with it. Templates are \"\n\"stored as separate files having a ``.tpl`` extension. The template can be \"\n\"called then from within a function. Templates can contain any type of text \"\n\"(which will be most likely HTML-markup mixed with Python statements). \"\n\"Furthermore, templates can take arguments, e.g. the result set of a database\"\n\" query, which will be then formatted nicely within the template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:173\nmsgid \"\"\n\"Right here, we are going to cast the result of our query showing the open \"\n\"ToDo items into a simple table with two columns: the first column will \"\n\"contain the ID of the item, the second column the text. The result set is, \"\n\"as seen above, a list of tuples, each tuple contains one set of results.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:175\nmsgid \"To include the template in our example, just add the following lines::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:185\nmsgid \"\"\n\"So we do here two things: first, we import ``template`` from Bottle in order\"\n\" to be able to use templates. Second, we assign the output of the template \"\n\"``make_table`` to the variable ``output``, which is then returned. In \"\n\"addition to calling the template, we assign ``result``, which we received \"\n\"from the database query, to the variable ``rows``, which is later on used \"\n\"within the template. If necessary, you can assign more than one variable / \"\n\"value to a template.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:187\nmsgid \"\"\n\"Templates always return a list of strings, thus there is no need to convert \"\n\"anything. Of course, we can save one line of code by writing ``return \"\n\"template('make_table', rows=result)``, which gives exactly the same result \"\n\"as above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:189\nmsgid \"\"\n\"Now it is time to write the corresponding template, which looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:203\nmsgid \"\"\n\"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` \"\n\"is stored.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:205\nmsgid \"\"\n\"Let's have a look at the code: every line starting with % is interpreted as \"\n\"Python code. Please note that, of course, only valid Python statements are \"\n\"allowed, otherwise the template will raise an exception, just as any other \"\n\"Python code. The other lines are plain HTML markup.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:207\nmsgid \"\"\n\"As you can see, we use Python's ``for`` statement two times, in order to go \"\n\"through ``rows``. As seen above, ``rows`` is a variable which holds the \"\n\"result of the database query, so it is a list of tuples. The first ``for`` \"\n\"statement accesses the tuples within the list, the second one the items \"\n\"within the tuple, which are put each into a cell of the table. It is \"\n\"important that you close all ``for``, ``if``, ``while`` etc. statements with\"\n\" ``%end``, otherwise the output may not be what you expect.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:209\nmsgid \"\"\n\"If you need to access a variable within a non-Python code line inside the \"\n\"template, you need to put it into double curly braces. This tells the \"\n\"template to insert the actual value of the variable right in place.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:211\nmsgid \"\"\n\"Run the script again and look at the output. Still not really nice, but at \"\n\"least more readable than the list of tuples. Of course, you can spice-up the\"\n\" very simple HTML markup above, e.g. by using in-line styles to get a better\"\n\" looking output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:215\nmsgid \"Using GET and POST Values\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:216\nmsgid \"\"\n\"As we can review all open items properly, we move to the next step, which is\"\n\" adding new items to the ToDo list. The new item should be received from a \"\n\"regular HTML-based form, which sends its data by the GET method.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:218\nmsgid \"\"\n\"To do so, we first add a new route to our script and tell the route that it \"\n\"should get GET data::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:241\nmsgid \"\"\n\"To access GET (or POST) data, we need to import ``request`` from Bottle. To \"\n\"assign the actual data to a variable, we use the statement \"\n\"``request.GET.get('task','').strip()`` statement, where ``task`` is the name\"\n\" of the GET data we want to access. That's all. If your GET data has more \"\n\"than one variable, multiple ``request.GET.get()`` statements can be used and\"\n\" assigned to other variables.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:243\nmsgid \"\"\n\"The rest of this piece of code is just processing of the gained data: \"\n\"writing to the database, retrieve the corresponding id from the database and\"\n\" generate the output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:245\nmsgid \"\"\n\"But where do we get the GET data from? Well, we can use a static HTML page \"\n\"holding the form. Or, what we do right now, is to use a template which is \"\n\"output when the route ``/new`` is called without GET data.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:247\nmsgid \"The code needs to be extended to::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:270\nmsgid \"``new_task.tpl`` looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:278\nmsgid \"That's all. As you can see, the template is plain HTML this time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:280\nmsgid \"Now we are able to extend our to do list.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:282\nmsgid \"\"\n\"By the way, if you prefer to use POST data: this works exactly the same way,\"\n\" just use ``request.POST.get()`` instead.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:286\nmsgid \"Editing Existing Items\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:287\nmsgid \"The last point to do is to enable editing of existing items.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:289\nmsgid \"\"\n\"By using only the routes we know so far it is possible, but may be quite \"\n\"tricky. But Bottle knows something called \\\"dynamic routes\\\", which makes \"\n\"this task quite easy.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:291\nmsgid \"The basic statement for a dynamic route looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:295\nmsgid \"\"\n\"The key point here is the colon. This tells Bottle to accept for \"\n\"``:something`` any string up to the next slash. Furthermore, the value of \"\n\"``something`` will be passed to the function assigned to that route, so the \"\n\"data can be processed within the function.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:297\nmsgid \"\"\n\"For our ToDo list, we will create a route ``@route('/edit/:no)``, where \"\n\"``no`` is the id of the item to edit.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:299\nmsgid \"The code looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:327\nmsgid \"\"\n\"It is basically pretty much the same what we already did above when adding \"\n\"new items, like using ``GET`` data etc. The main addition here is using the \"\n\"dynamic route ``:no``, which here passes the number to the corresponding \"\n\"function. As you can see, ``no`` is used within the function to access the \"\n\"right row of data within the database.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:329\nmsgid \"\"\n\"The template ``edit_task.tpl`` called within the function looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:344\nmsgid \"\"\n\"Again, this template is a mix of Python statements and HTML, as already \"\n\"explained above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:346\nmsgid \"\"\n\"A last word on dynamic routes: you can even use a regular expression for a \"\n\"dynamic route, as demonstrated later.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:350\nmsgid \"Validating Dynamic Routes\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:351\nmsgid \"\"\n\"Using dynamic routes is fine, but for many cases it makes sense to validate \"\n\"the dynamic part of the route. For example, we expect an integer number in \"\n\"our route for editing above. But if a float, characters or so are received, \"\n\"the Python interpreter throws an exception, which is not what we want.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:353\nmsgid \"\"\n\"For those cases, Bottle offers the ``@validate`` decorator, which validates \"\n\"the \\\"input\\\" prior to passing it to the function. In order to apply the \"\n\"validator, extend the code as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:362\nmsgid \"\"\n\"At first, we imported ``validate`` from the Bottle framework, than we apply \"\n\"the @validate-decorator. Right here, we validate if ``no`` is an integer. \"\n\"Basically, the validation works with all types of data like floats, lists \"\n\"etc.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:364\nmsgid \"\"\n\"Save the code and call the page again using a \\\"403 forbidden\\\" value for \"\n\"``:no``, e.g. a float. You will receive not an exception, but a \\\"403 - \"\n\"Forbidden\\\" error, saying that an integer was expected.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:367\nmsgid \"Dynamic Routes Using Regular Expressions\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:368\nmsgid \"\"\n\"Bottle can also handle dynamic routes, where the \\\"dynamic part\\\" of the \"\n\"route can be a regular expression.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:370\nmsgid \"\"\n\"So, just to demonstrate that, let's assume that all single items in our ToDo\"\n\" list should be accessible by their plain number, by a term like e.g. \"\n\"\\\"item1\\\". For obvious reasons, you do not want to create a route for every \"\n\"item. Furthermore, the simple dynamic routes do not work either, as part of \"\n\"the route, the term \\\"item\\\" is static.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:372\nmsgid \"As said above, the solution is a regular expression::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:386\nmsgid \"\"\n\"Of course, this example is somehow artificially constructed - it would be \"\n\"easier to use a plain dynamic route only combined with a validation. \"\n\"Nevertheless, we want to see how regular expression routes work: the line \"\n\"``@route(/item:item_#[0-9]+#)`` starts like a normal route, but the part \"\n\"surrounded by # is interpreted as a regular expression, which is the dynamic\"\n\" part of the route. So in this case, we want to match any digit between 0 \"\n\"and 9. The following function \\\"show_item\\\" just checks whether the given \"\n\"item is present in the database or not. In case it is present, the \"\n\"corresponding text of the task is returned. As you can see, only the regular\"\n\" expression part of the route is passed forward. Furthermore, it is always \"\n\"forwarded as a string, even if it is a plain integer number, like in this \"\n\"case.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:390\nmsgid \"Returning Static Files\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:391\nmsgid \"\"\n\"Sometimes it may become necessary to associate a route not to a Python \"\n\"function, but just return a static file. So if you have for example a help \"\n\"page for your application, you may want to return this page as plain HTML. \"\n\"This works as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:399\nmsgid \"\"\n\"At first, we need to import the ``static_file`` function from Bottle. As you\"\n\" can see, the ``return static_file`` statement replaces the ``return`` \"\n\"statement. It takes at least two arguments: the name of the file to be \"\n\"returned and the path to the file. Even if the file is in the same directory\"\n\" as your application, the path needs to be stated. But in this case, you can\"\n\" use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file \"\n\"automatically, but in case you like to state it explicitly, add a third \"\n\"argument to ``static_file``, which would be here ``mimetype='text/html'``. \"\n\"``static_file`` works with any type of route, including the dynamic ones.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:403\nmsgid \"Returning JSON Data\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:404\nmsgid \"\"\n\"There may be cases where you do not want your application to generate the \"\n\"output directly, but return data to be processed further on, e.g. by \"\n\"JavaScript. For those cases, Bottle offers the possibility to return JSON \"\n\"objects, which is sort of standard for exchanging data between web \"\n\"applications. Furthermore, JSON can be processed by many programming \"\n\"languages, including Python\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:406\nmsgid \"\"\n\"So, let's assume we want to return the data generated in the regular \"\n\"expression route example as a JSON object. The code looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:421\nmsgid \"\"\n\"As you can, that is fairly simple: just return a regular Python dictionary \"\n\"and Bottle will convert it automatically into a JSON object prior to \"\n\"sending. So if you e.g. call \\\"http://localhost/json1\\\" Bottle should in \"\n\"this case return the JSON object ``{\\\"Task\\\": [\\\"Read A-byte-of-python to \"\n\"get a good introduction into Python\\\"]}``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:426\nmsgid \"Catching Errors\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:427\nmsgid \"\"\n\"The next step may is to catch the error with Bottle itself, to keep away any\"\n\" type of error message from the user of your application. To do that, Bottle\"\n\" has an \\\"error-route\\\", which can be a assigned to a HTML-error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:429\nmsgid \"In our case, we want to catch a 403 error. The code is as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:437\nmsgid \"\"\n\"So, at first we need to import ``error`` from Bottle and define a route by \"\n\"``error(403)``, which catches all \\\"403 forbidden\\\" errors. The function \"\n\"\\\"mistake\\\" is assigned to that. Please note that ``error()`` always passes \"\n\"the error-code to the function - even if you do not need it. Thus, the \"\n\"function always needs to accept one argument, otherwise it will not work.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:439\nmsgid \"\"\n\"Again, you can assign more than one error-route to a function, or catch \"\n\"various errors with one function each. So this code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:446\nmsgid \"works fine, the following one as well::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:458\nmsgid \"Summary\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:459\nmsgid \"\"\n\"After going through all the sections above, you should have a brief \"\n\"understanding how the Bottle WSGI framework works. Furthermore you have all \"\n\"the knowledge necessary to use Bottle for your applications.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:461\nmsgid \"\"\n\"The following chapter give a short introduction how to adapt Bottle for \"\n\"larger projects. Furthermore, we will show how to operate Bottle with web \"\n\"servers which perform better on a higher load / more web traffic than the \"\n\"one we used so far.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:464\nmsgid \"Server Setup\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:466\nmsgid \"\"\n\"So far, we used the standard server used by Bottle, which is the `WSGI \"\n\"reference Server`_ shipped along with Python. Although this server is \"\n\"perfectly suitable for development purposes, it is not really suitable for \"\n\"larger applications. But before we have a look at the alternatives, let's \"\n\"have a look how to tweak the settings of the standard server first.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:470\nmsgid \"Running Bottle on a different port and IP\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:471\nmsgid \"\"\n\"As standard, Bottle serves the pages on the IP adress 127.0.0.1, also known \"\n\"as ``localhost``, and on port ``8080``. To modify the setting is pretty \"\n\"simple, as additional parameters can be passed to Bottle's ``run()`` \"\n\"function to change the port and the address.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:473\nmsgid \"\"\n\"To change the port, just add ``port=portnumber`` to the run command. So, for\"\n\" example::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:477\nmsgid \"would make Bottle listen to port 80.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:479\nmsgid \"To change the IP address where Bottle is listening::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:483\nmsgid \"Of course, both parameters can be combined, like::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:487\nmsgid \"\"\n\"The ``port`` and ``host`` parameter can also be applied when Bottle is \"\n\"running with a different server, as shown in the following section.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:491\nmsgid \"Running Bottle with a different server\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:492\nmsgid \"\"\n\"As said above, the standard server is perfectly suitable for development, \"\n\"personal use or a small group of people only using your application based on\"\n\" Bottle. For larger tasks, the standard server may become a bottleneck, as \"\n\"it is single-threaded, thus it can only serve one request at a time.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:494\nmsgid \"\"\n\"But Bottle has already various adapters to multi-threaded servers on board, \"\n\"which perform better on higher load. Bottle supports Cherrypy_, Fapws3_, \"\n\"Flup_ and Paste_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:496\nmsgid \"\"\n\"If you want to run for example Bottle with the Paste server, use the \"\n\"following code::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:502\nmsgid \"\"\n\"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and \"\n\"``FapwsServer``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:506\nmsgid \"Running Bottle on Apache with mod_wsgi\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:507\nmsgid \"\"\n\"Maybe you already have an Apache_ or you want to run a Bottle-based \"\n\"application large scale - then it is time to think about Apache with \"\n\"mod_wsgi_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:509\nmsgid \"\"\n\"We assume that your Apache server is up and running and mod_wsgi is working \"\n\"fine as well. On a lot of Linux distributions, mod_wsgi can be easily \"\n\"installed via whatever package management system is in use.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:511\nmsgid \"\"\n\"Bottle brings an adapter for mod_wsgi with it, so serving your application \"\n\"is an easy task.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:513\nmsgid \"\"\n\"In the following example, we assume that you want to make your application \"\n\"\\\"ToDo list\\\" accessible through ``http://www.mypage.com/todo`` and your \"\n\"code, templates and SQLite database are stored in the path \"\n\"``/var/www/todo``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:515\nmsgid \"\"\n\"When you run your application via mod_wsgi, it is imperative to remove the \"\n\"``run()`` statement from your code, otherwise it won't work here.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:517\nmsgid \"\"\n\"After that, create a file called ``adapter.wsgi`` with the following \"\n\"content::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:528\nmsgid \"\"\n\"and save it in the same path, ``/var/www/todo``. Actually the name of the \"\n\"file can be anything, as long as the extension is ``.wsgi``. The name is \"\n\"only used to reference the file from your virtual host.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:530\nmsgid \"\"\n\"Finally, we need to add a virtual host to the Apache configuration, which \"\n\"looks like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:546\nmsgid \"\"\n\"After restarting the server, your ToDo list should be accessible at \"\n\"``http://www.mypage.com/todo``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:549\nmsgid \"Final Words\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:551\nmsgid \"\"\n\"Now we are at the end of this introduction and tutorial to Bottle. We \"\n\"learned about the basic concepts of Bottle and wrote a first application \"\n\"using the Bottle framework. In addition to that, we saw how to adapt Bottle \"\n\"for large tasks and serve Bottle through an Apache web server with mod_wsgi.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:553\nmsgid \"\"\n\"As said in the introduction, this tutorial is not showing all shades and \"\n\"possibilities of Bottle. What we skipped here is e.g. receiving file objects\"\n\" and streams and how to handle authentication data. Furthermore, we did not \"\n\"show how templates can be called from within another template. For an \"\n\"introduction into those points, please refer to the full `Bottle \"\n\"documentation`_ .\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:556\nmsgid \"Complete Example Listing\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:558\nmsgid \"\"\n\"As the ToDo list example was developed piece by piece, here is the complete \"\n\"listing:\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:560\nmsgid \"Main code for the application ``todo.py``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:675\nmsgid \"Template ``make_table.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:689\nmsgid \"Template ``edit_task.tpl``::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:704\nmsgid \"Template ``new_task.tpl``::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/api.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# jluzhu <liulizhucn@qq.com>, 2019\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../api.rst:3\nmsgid \"API Reference\"\nmsgstr \"API参考\"\n\n#: ../../api.rst:10\nmsgid \"\"\n\"This is a mostly auto-generated API. If you are new to bottle, you might \"\n\"find the narrative :doc:`tutorial` more helpful.\"\nmsgstr \"这份文档几乎是全自动生成的。如果你刚接触bottle，也许 :doc:`tutorial` 会更有帮助。\"\n\n#: ../../api.rst:17\nmsgid \"Module Contents\"\nmsgstr \"模块目录\"\n\n#: ../../api.rst:19\nmsgid \"The module defines several functions, constants, and an exception.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.debug:1\nmsgid \"\"\n\"Change the debug level. There is only one debug level supported at the \"\n\"moment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:1\nmsgid \"\"\n\"Start a server instance. This method blocks until the server terminates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:0 ../../../bottle.pydocstring of\n#: bottle.path_shift:0 ../../../bottle.pydocstring of bottle.MultiDict.get:0\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager:0\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:0\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:0\n#: ../../../bottle.pydocstring of bottle.Bottle:0 ../../../bottle.pydocstring\n#: of bottle.Bottle.mount:0 ../../../bottle.pydocstring of\n#: bottle.Bottle.route:0 ../../../bottle.pydocstring of\n#: bottle.BaseRequest.path_shift:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0 ../../../bottle.pydocstring of\n#: bottle.BaseResponse.set_cookie:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:3\nmsgid \"\"\n\"WSGI application or target string supported by :func:`load_app`. (default: \"\n\":func:`default_app`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:5\nmsgid \"\"\n\"Server adapter to use. See :data:`server_names` keys for valid names or pass\"\n\" a :class:`ServerAdapter` subclass. (default: `wsgiref`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:8\nmsgid \"\"\n\"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces \"\n\"including the external one. (default: 127.0.0.1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:10\nmsgid \"\"\n\"Server port to bind to. Values below 1024 require root privileges. (default:\"\n\" 8080)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:12\nmsgid \"Start auto-reloading server? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:13\nmsgid \"Auto-reloader interval in seconds (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:14\nmsgid \"Suppress output to stdout and stderr? (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.run:15\nmsgid \"Options passed to the server adapter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:1\nmsgid \"Import a module or fetch an object from a module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:3\nmsgid \"``package.module`` returns `module` as a module object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:4\nmsgid \"``pack.mod:name`` returns the module variable `name` from `pack.mod`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:5\nmsgid \"``pack.mod:func()`` calls `pack.mod.func()` and returns the result.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load:7\nmsgid \"\"\n\"The last form accepts not only function calls, but any type of expression. \"\n\"Keyword arguments passed to this function are available as local variables. \"\n\"Example: ``import_string('re:compile(x)', x='[a-z]')``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.load_app:1\nmsgid \"\"\n\"Load a bottle application from a module and make sure that the import does \"\n\"not affect the current default application, but returns a separate \"\n\"application object. See :func:`load` for the target parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.request:1 ../../../bottle.pydocstring\n#: of bottle.request:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalRequest`. If accessed from within a \"\n\"request callback, this instance always refers to the *current* request (even\"\n\" on a multi-threaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.response:1\nmsgid \"\"\n\"A thread-safe instance of :class:`LocalResponse`. It is used to change the \"\n\"HTTP response for the *current* request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HTTP_CODES:1\nmsgid \"\"\n\"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')\"\nmsgstr \"\"\n\n#: ../../api.rst:38\nmsgid \"\"\n\"Return the current :ref:`default-app`. Actually, these are callable \"\n\"instances of :class:`AppStack` and implement a stack-like API.\"\nmsgstr \"\"\n\n#: ../../api.rst:42\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../api.rst:44\nmsgid \"\"\n\"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and \"\n\":class:`AppStack`) and uses the top of the stack as a *default application* \"\n\"for some of the module-level functions and decorators.\"\nmsgstr \"\"\n\n#: ../../api.rst:54\nmsgid \"\"\n\"Decorator to install a route to the current default application. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:59\nmsgid \"\"\n\"Decorator to install an error handler to the current default application. \"\n\"See :meth:`Bottle.error` for details.\"\nmsgstr \"\"\n\n#: ../../api.rst:63\nmsgid \"WSGI and HTTP Utilities\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_date:1\nmsgid \"Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.parse_auth:1\nmsgid \"\"\n\"Parse rfc2617 HTTP authentication header string (basic) and return \"\n\"(user,pass) tuple or None\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_encode:1\nmsgid \"Encode and sign a pickle-able object. Return a (byte) string\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_decode:1\nmsgid \"Verify and decode an encoded string. Return an object or None.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.cookie_is_encoded:1\nmsgid \"Return True if the argument looks like a encoded cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.yieldroutes:1\nmsgid \"\"\n\"Return a generator for routes that match the signature (name, args) of the \"\n\"func parameter. This may yield more than one route if the function takes \"\n\"optional keyword arguments. The output is best described by example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:1\nmsgid \"Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:0\nmsgid \"Returns\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:3\nmsgid \"The modified paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:4\nmsgid \"The SCRIPT_NAME path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:5\nmsgid \"The PATH_INFO path.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.path_shift:6\nmsgid \"\"\n\"The number of path fragments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../api.rst:81\nmsgid \"Data Structures\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict:1\nmsgid \"\"\n\"This dict stores multiple values per key, but behaves exactly like a normal \"\n\"dict in that it returns only the newest value for any given key. There are \"\n\"special methods available to access the full list of values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.keys:1\nmsgid \"D.keys() -> a set-like object providing a view on D's keys\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.values:1\nmsgid \"D.values() -> an object providing a view on D's values\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.items:1\nmsgid \"D.items() -> a set-like object providing a view on D's items\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:1\nmsgid \"Return the most recent value for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:3\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:3\nmsgid \"\"\n\"The default value to be returned if the key is not present or the type \"\n\"conversion fails.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:5\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:5\nmsgid \"An index for the list of available values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:6\n#: ../../../bottle.pydocstring of bottle.HeaderDict.get:6\nmsgid \"\"\n\"If defined, this callable is used to cast the value into a specific type. \"\n\"Exception are suppressed and result in the default value to be returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.append:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.append:1\nmsgid \"Add a new value to the list of values for this key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.replace:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.replace:1\nmsgid \"Replace the list of values with a single value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1\n#: ../../../bottle.pydocstring of bottle.HeaderDict.getall:1\nmsgid \"Return a (possibly empty) list of values for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.MultiDict.get:1\nmsgid \"Aliases for WTForms to mimic other multi-dict APIs (Django)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.HeaderDict:1\nmsgid \"\"\n\"A case-insensitive version of :class:`MultiDict` that defaults to replace \"\n\"the old value instead of appending it.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict:1\nmsgid \"\"\n\"This :class:`MultiDict` subclass is used to store request form data. \"\n\"Additionally to the normal dict-like item access methods (which return \"\n\"unmodified data as native strings), this container also supports attribute-\"\n\"like access to its values. Attributes are automatically de- or recoded to \"\n\"match :attr:`input_encoding` (default: 'utf8'). Missing attributes default \"\n\"to an empty string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.input_encoding:1\nmsgid \"Encoding used for attribute values.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.recode_unicode:1\nmsgid \"\"\n\"If true (default), unicode strings are first encoded with `latin1` and then \"\n\"decoded to match :attr:`input_encoding`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.decode:1\nmsgid \"\"\n\"Returns a copy with all keys and values de- or recoded to match \"\n\":attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode \"\n\"dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FormsDict.getunicode:1\nmsgid \"Return the value as a unicode string, or the default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:1\nmsgid \"\"\n\"This dict-like class wraps a WSGI environ dict and provides convenient \"\n\"access to HTTP_* fields. Keys and values are native strings (2.x bytes or \"\n\"3.x unicode) and keys are case-insensitive. If the WSGI environment contains\"\n\" non-native string values, these are de- or encoded using a lossless \"\n\"'latin1' character set.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:7\nmsgid \"\"\n\"The API will remain stable even on changes to the relevant PEPs. Currently \"\n\"PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-\"\n\"native strings.)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.cgikeys:1\nmsgid \"List of keys that do not have a ``HTTP_`` prefix.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.raw:1\nmsgid \"Return the header value as is (may be bytes or unicode).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack:1\nmsgid \"A stack-like list. Calling it returns the head of the stack.\"\nmsgstr \"\"\n\n#: ../../api.rst:100\nmsgid \"Return the current default application and remove it from the stack.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\n#: ../../../bottle.pydocstring of bottle.AppStack.push:1\nmsgid \"Add a new :class:`Bottle` instance to the stack\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:1\nmsgid \"\"\n\"This class manages a list of search paths and helps to find and open \"\n\"application-bound resources (files).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:4\nmsgid \"default value for :meth:`add_path` calls.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:5\nmsgid \"callable used to open resources.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager:6\nmsgid \"controls which lookups are cached. One of 'all', 'found' or 'none'.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.path:1\nmsgid \"A list of search paths. See :meth:`add_path` for details.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.ResourceManager.cache:1\nmsgid \"A cache for resolved paths. ``res.cache.clear()`` clears the cache.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:1\nmsgid \"\"\n\"Add a new path to the list of search paths. Return False if the path does \"\n\"not exist.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:4\nmsgid \"\"\n\"The new search path. Relative paths are turned into an absolute and \"\n\"normalized form. If the path looks like a file (not ending in `/`), the \"\n\"filename is stripped off.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:7\nmsgid \"\"\n\"Path used to absolutize relative search paths. Defaults to :attr:`base` \"\n\"which defaults to ``os.getcwd()``.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:9\nmsgid \"\"\n\"Position within the list of search paths. Defaults to last index (appends to\"\n\" the list).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:12\nmsgid \"\"\n\"The `base` parameter makes it easy to reference files installed along with a\"\n\" python module or package::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:1\nmsgid \"Search for a resource and return an absolute file path, or `None`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:3\nmsgid \"\"\n\"The :attr:`path` list is searched in order. The first match is returned. \"\n\"Symlinks are followed. The result is cached to speed up future lookups.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ResourceManager.open:1\nmsgid \"Find a resource and return a file object, or raise IOError.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.file:1\nmsgid \"Open file(-like) object (BytesIO buffer or temporary file)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.name:1\nmsgid \"Name of the upload form field\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.raw_filename:1\nmsgid \"Raw filename as sent by the client (may contain unsafe characters)\"\nmsgstr \"\"\n\n#: ../docstring of bottle.FileUpload.headers:1\nmsgid \"A :class:`HeaderDict` with additional headers (e.g. content-type)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_type:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_type:1\nmsgid \"Current value of the 'Content-Type' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.content_length:1\n#: ../../../bottle.pydocstring of bottle.BaseResponse.content_length:1\nmsgid \"Current value of the 'Content-Length' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.get_header:1\nmsgid \"Return the value of a header within the mulripart part.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:1\nmsgid \"\"\n\"Name of the file on the client file system, but normalized to ensure file \"\n\"system compatibility. An empty filename is returned as 'empty'.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.filename:4\nmsgid \"\"\n\"Only ASCII letters, digits, dashes, underscores and dots are allowed in the \"\n\"final filename. Accents are removed, if possible. Whitespace is replaced by \"\n\"a single dash. Leading or tailing dots or dashes are removed. The filename \"\n\"is limited to 255 characters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:1\nmsgid \"\"\n\"Save file to disk or copy its content to an open file(-like) object. If \"\n\"*destination* is a directory, :attr:`filename` is added to the path. \"\n\"Existing files are not overwritten by default (IOError).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:5\nmsgid \"File path, directory or file(-like) object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:6\nmsgid \"If True, replace existing files. (default: False)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.FileUpload.save:7\nmsgid \"Bytes to read at a time. (default: 64kb)\"\nmsgstr \"\"\n\n#: ../../api.rst:109\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BottleException:1\nmsgid \"A base class for exceptions used by bottle.\"\nmsgstr \"\"\n\n#: ../../api.rst:117\nmsgid \"The :class:`Bottle` Class\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:1\nmsgid \"\"\n\"Each Bottle object represents a single, distinct web application and \"\n\"consists of routes, callbacks, plugins, resources and configuration. \"\n\"Instances are callable WSGI applications.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle:5\nmsgid \"\"\n\"If true (default), handle all exceptions. Turn off to let debugging \"\n\"middleware handle exceptions.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.config:1\nmsgid \"A :class:`ConfigDict` for app specific configuration.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Bottle.resources:1\nmsgid \"A :class:`ResourceManager` for application files\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.catchall:1\nmsgid \"If true, most exceptions are caught and returned as :exc:`HTTPError`\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:1\nmsgid \"Attach a callback to a hook. Three hooks are currently implemented:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"before_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4\nmsgid \"\"\n\"Executed once before each request. The request context is available, but no \"\n\"routing has happened yet.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:6\nmsgid \"after_request\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:7\nmsgid \"Executed once after each request regardless of its outcome.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:8\nmsgid \"app_reset\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:9\nmsgid \"Called whenever :meth:`Bottle.reset` is called.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.remove_hook:1\nmsgid \"Remove a callback from a hook.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.trigger_hook:1\nmsgid \"Trigger a hook and return a list of results.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.hook:1\nmsgid \"\"\n\"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` \"\n\"for details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:1\nmsgid \"\"\n\"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL \"\n\"prefix. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:6\nmsgid \"path prefix or `mount-point`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:7\nmsgid \"an instance of :class:`Bottle` or a WSGI application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:9\nmsgid \"\"\n\"Plugins from the parent application are not applied to the routes of the \"\n\"mounted child application. If you need plugins in the child application, \"\n\"install them separately.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:13\nmsgid \"\"\n\"While it is possible to use path wildcards within the prefix path \"\n\"(:class:`Bottle` childs only), it is highly discouraged.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.mount:16\nmsgid \"\"\n\"The prefix path must end with a slash. If you want to access the root of the\"\n\" child application via `/prefix` in addition to `/prefix/`, consider adding \"\n\"a route with a 307 redirect to the parent application.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.merge:1\nmsgid \"\"\n\"Merge the routes of another :class:`Bottle` application or a list of \"\n\":class:`Route` objects into this application. The routes keep their 'owner',\"\n\" meaning that the :data:`Route.app` attribute is not changed.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.install:1\nmsgid \"\"\n\"Add a plugin to the list of plugins and prepare it for being applied to all \"\n\"routes of this application. A plugin may be a simple decorator or an object \"\n\"that implements the :class:`Plugin` API.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.uninstall:1\nmsgid \"\"\n\"Uninstall plugins. Pass an instance to remove a specific plugin, a type \"\n\"object to remove all plugins that match that type, a string to remove all \"\n\"plugins with a matching ``name`` attribute or ``True`` to remove all \"\n\"plugins. Return the list of removed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.reset:1\nmsgid \"\"\n\"Reset all routes (force plugins to be re-applied) and clear all caches. If \"\n\"an ID or route object is given, only that specific route is affected.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.close:1\nmsgid \"Close the application and all installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.run:1\nmsgid \"Calls :func:`run` with the same parameters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.match:1\nmsgid \"\"\n\"Search for a matching route and return a (:class:`Route`, urlargs) tuple. \"\n\"The second value is a dictionary with parameters extracted from the URL. \"\n\"Raise :exc:`HTTPError` (404/405) on a non-match.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get_url:1\nmsgid \"Return a string that matches a named route\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.add_route:1\nmsgid \"Add a route object, but do not change the :data:`Route.app` attribute.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:1\nmsgid \"A decorator to bind a function to a request URL. Example::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:7\nmsgid \"\"\n\"The ``<name>`` part is a wildcard. See :class:`Router` for syntax details.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:10\nmsgid \"\"\n\"Request path or a list of paths to listen to. If no path is specified, it is\"\n\" automatically generated from the signature of the function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:13\nmsgid \"\"\n\"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. \"\n\"(default: `GET`)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:15\nmsgid \"\"\n\"An optional shortcut to avoid the decorator syntax. ``route(..., \"\n\"callback=func)`` equals ``route(...)(func)``\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:17\nmsgid \"The name for this route. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:18\nmsgid \"\"\n\"A decorator or plugin or a list of plugins. These are applied to the route \"\n\"callback in addition to installed plugins.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:20\nmsgid \"\"\n\"A list of plugins, plugin classes or names. Matching plugins are not \"\n\"installed to this route. ``True`` skips all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.route:23\nmsgid \"\"\n\"Any additional keyword arguments are stored as route-specific configuration \"\n\"and passed to plugins (see :meth:`Plugin.apply`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.get:1\nmsgid \"Equals :meth:`route`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.post:1\nmsgid \"Equals :meth:`route` with a ``POST`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.put:1\nmsgid \"Equals :meth:`route` with a ``PUT`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.delete:1\nmsgid \"Equals :meth:`route` with a ``DELETE`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.patch:1\nmsgid \"Equals :meth:`route` with a ``PATCH`` method parameter.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.error:1\nmsgid \"\"\n\"Register an output handler for a HTTP error code. Can be used as a decorator\"\n\" or called directly ::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Bottle.wsgi:1\nmsgid \"The bottle WSGI-interface.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route:1\nmsgid \"\"\n\"This class wraps a route callback along with route specific metadata and \"\n\"configuration and applies Plugins on demand. It is also responsible for \"\n\"turning an URL path rule into a regular expression usable by the Router.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.app:1\nmsgid \"The application this route is installed to.\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.rule:1\nmsgid \"The path-rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.method:1\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"HTTP方法的字符串(例如： ``GET``)\"\n\n#: ../docstring of bottle.Route.callback:1\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"未应用任何插件的原始回调函数，用于内省。\"\n\n#: ../docstring of bottle.Route.name:1\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"route的名字，如未指定则为 ``None``\"\n\n#: ../docstring of bottle.Route.plugins:1\nmsgid \"A list of route-specific plugins (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.skiplist:1\nmsgid \"\"\n\"A list of plugins to not apply to this route (see :meth:`Bottle.route`).\"\nmsgstr \"\"\n\n#: ../docstring of bottle.Route.config:1\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific plugin configuration \"\n\"and meta-data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.call:1\nmsgid \"\"\n\"The route callback with all plugins applied. This property is created on \"\n\"demand and then cached to speed up subsequent requests.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.reset:1\nmsgid \"\"\n\"Forget any cached values. The next time :attr:`call` is accessed, all \"\n\"plugins are re-applied.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.prepare:1\nmsgid \"Do all on-demand work immediately (useful for debugging).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.all_plugins:1\nmsgid \"Yield all Plugins affecting this route.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_undecorated_callback:1\nmsgid \"\"\n\"Return the callback. If the callback is a decorated function, try to recover\"\n\" the original function.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_callback_args:1\nmsgid \"\"\n\"Return a list of argument names the callback (most likely) accepts as \"\n\"keyword arguments. If the callback is a decorated function, try to recover \"\n\"the original function before inspection.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.Route.get_config:1\nmsgid \"\"\n\"Lookup a config field and return its value, first checking the route.config,\"\n\" then route.app.config.\"\nmsgstr \"\"\n\n#: ../../api.rst:127\nmsgid \"The :class:`Request` Object\"\nmsgstr \"\"\n\n#: ../../api.rst:129\nmsgid \"\"\n\"The :class:`Request` class wraps a WSGI environment and provides helpful \"\n\"methods to parse and access form data, cookies, file uploads and other \"\n\"metadata. Most of the attributes are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:1\nmsgid \"\"\n\"A wrapper for WSGI environment dictionaries that adds a lot of convenient \"\n\"access methods and properties. Most of them are read-only.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest:4\nmsgid \"\"\n\"Adding new attributes to a request actually adds them to the environ \"\n\"dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to \"\n\"store and access request-specific data.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.MEMFILE_MAX:1\nmsgid \"Maximum size of memory buffer for :attr:`body` in bytes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.environ:1\nmsgid \"\"\n\"The wrapped WSGI environ dictionary. This is the only real attribute. All \"\n\"other attributes actually are read-only properties.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.app:1\nmsgid \"Bottle application handling this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.route:1\nmsgid \"The bottle :class:`Route` object that matches this request.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url_args:1\nmsgid \"The arguments extracted from the URL.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path:1\nmsgid \"\"\n\"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken \"\n\"clients and avoid the \\\"empty path\\\" edge case).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.method:1\nmsgid \"The ``REQUEST_METHOD`` value as an uppercase string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.headers:1\nmsgid \"\"\n\"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP \"\n\"request headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_header:1\nmsgid \"Return the value of a request header, or a given default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.cookies:1\nmsgid \"\"\n\"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. \"\n\"Use :meth:`get_cookie` if you expect signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.get_cookie:1\nmsgid \"\"\n\"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must\"\n\" match the one used to create the cookie (see \"\n\":meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or \"\n\"wrong signature), return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"\"\n\"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are \"\n\"sometimes called \\\"URL arguments\\\" or \\\"GET parameters\\\", but not to be \"\n\"confused with \\\"URL wildcards\\\" as they are provided by the :class:`Router`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.forms:1\nmsgid \"\"\n\"Form values parsed from an `url-encoded` or `multipart/form-data` encoded \"\n\"POST or PUT request body. The result is returned as a :class:`FormsDict`. \"\n\"All keys and values are strings. File uploads are stored separately in \"\n\":attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.params:1\nmsgid \"\"\n\"A :class:`FormsDict` with the combined values of :attr:`query` and \"\n\":attr:`forms`. File uploads are stored in :attr:`files`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.files:1\nmsgid \"\"\n\"File uploads parsed from `multipart/form-data` encoded POST or PUT request \"\n\"body. The values are instances of :class:`FileUpload`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.json:1\nmsgid \"\"\n\"If the ``Content-Type`` header is ``application/json`` or ``application\"\n\"/json-rpc``, this property holds the parsed content of the request body. \"\n\"Only requests smaller than :attr:`MEMFILE_MAX` are processed to avoid memory\"\n\" exhaustion. Invalid JSON raises a 400 error response.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.body:1\nmsgid \"\"\n\"The HTTP request body as a seek-able file-like object. Depending on \"\n\":attr:`MEMFILE_MAX`, this is either a temporary file or a \"\n\":class:`io.BytesIO` instance. Accessing this property for the first time \"\n\"reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses \"\n\"just do a `seek(0)` on the file object.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.chunked:1\nmsgid \"True if Chunked transfer encoding was.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1\nmsgid \"An alias for :attr:`query`.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.POST:1\nmsgid \"\"\n\"The values of :attr:`forms` and :attr:`files` combined into a single \"\n\":class:`FormsDict`. Values are either strings (form values) or instances of \"\n\":class:`cgi.FieldStorage` (file uploads).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.url:1\nmsgid \"\"\n\"The full request URI including hostname and scheme. If your app lives behind\"\n\" a reverse proxy or load balancer and you get confusing results, make sure \"\n\"that the ``X-Forwarded-Host`` header is set correctly.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.urlparts:1\nmsgid \"\"\n\"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple \"\n\"contains (scheme, host, path, query_string and fragment), but the fragment \"\n\"is always empty because it is not visible to the server.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.fullpath:1\nmsgid \"Request path including :attr:`script_name` (if present).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.query_string:1\nmsgid \"\"\n\"The raw :attr:`query` part of the URL (everything in between ``?`` and \"\n\"``#``) as a string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.script_name:1\nmsgid \"\"\n\"The initial portion of the URL's `path` that was removed by a higher level \"\n\"(server or routing middleware) before the application was called. This \"\n\"script path is returned with leading and tailing slashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"Shift path segments from :attr:`path` to :attr:`script_name` and\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2\nmsgid \"vice versa.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:4\nmsgid \"\"\n\"The number of path segments to shift. May be negative to change the shift \"\n\"direction. (default: 1)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_length:1\nmsgid \"\"\n\"The request body length as an integer. The client is responsible to set this\"\n\" header. Otherwise, the real length of the body is unknown and -1 is \"\n\"returned. In this case, :attr:`body` will be empty.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.content_type:1\nmsgid \"The Content-Type header as a lowercase-string (default: empty).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_xhr:1\nmsgid \"\"\n\"True if the request was triggered by a XMLHttpRequest. This only works with \"\n\"JavaScript libraries that support the `X-Requested-With` header (most of the\"\n\" popular libraries do).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.is_ajax:1\nmsgid \"Alias for :attr:`is_xhr`. \\\"Ajax\\\" is not the right term.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.auth:1\nmsgid \"\"\n\"HTTP authentication data as a (user, password) tuple. This implementation \"\n\"currently supports basic (not digest) authentication only. If the \"\n\"authentication happened at a higher level (e.g. in the front web-server or a\"\n\" middleware), the password field is None, but the user field is looked up \"\n\"from the ``REMOTE_USER`` environ variable. On any errors, None is returned.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_route:1\nmsgid \"\"\n\"A list of all IPs that were involved in this request, starting with the \"\n\"client IP and followed by zero or more proxies. This does only work if all \"\n\"proxies support the ```X-Forwarded-For`` header. Note that this information \"\n\"can be forged by malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_addr:1\nmsgid \"\"\n\"The client IP as a string. Note that this information can be forged by \"\n\"malicious clients.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.copy:1\nmsgid \"Return a new :class:`Request` with a shallow :attr:`environ` copy.\"\nmsgstr \"\"\n\n#: ../../api.rst:137\nmsgid \"\"\n\"The module-level :data:`bottle.request` is a proxy object (implemented in \"\n\":class:`LocalRequest`) and always refers to the `current` request, or in \"\n\"other words, the request that is currently processed by the request handler \"\n\"in the current thread. This `thread locality` ensures that you can safely \"\n\"use a global instance in a multi-threaded environment.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalRequest:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseRequest` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`request`). If accessed during a request/response cycle, \"\n\"this instance always refers to the *current* request (even on a \"\n\"multithreaded server).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseRequest.__init__:1\nmsgid \"Wrap a WSGI environ dictionary.\"\nmsgstr \"\"\n\n#: ../../api.rst:146\nmsgid \"The :class:`Response` Object\"\nmsgstr \":class:`Response` 对象\"\n\n#: ../../api.rst:148\nmsgid \"\"\n\"The :class:`Response` class stores the HTTP status code as well as headers \"\n\"and cookies that are to be sent to the client. Similar to \"\n\":data:`bottle.request` there is a thread-local :data:`bottle.response` \"\n\"instance that can be used to adjust the `current` response. Moreover, you \"\n\"can instantiate :class:`Response` and return it from your request handler. \"\n\"In this case, the custom instance overrules the headers and cookies defined \"\n\"in the global one.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:1\nmsgid \"Storage class for a response body as well as headers and cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:3\nmsgid \"\"\n\"This class does support dict-like case-insensitive item-access to headers, \"\n\"but is NOT a dict. Most notably, iterating over a response yields parts of \"\n\"the body and not the headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:7\nmsgid \"The response body as one of the supported types.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:8\nmsgid \"\"\n\"Either an HTTP status code (e.g. 200) or a status line including the reason \"\n\"phrase (e.g. '200 OK').\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:10\nmsgid \"A dictionary or a list of name-value pairs.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse:12\nmsgid \"\"\n\"Additional keyword arguments are added to the list of headers. Underscores \"\n\"in the header name are replaced with dashes.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.copy:1\nmsgid \"Returns a copy of self.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_line:1\nmsgid \"The HTTP status line as a string (e.g. ``404 Not Found``).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status_code:1\nmsgid \"The HTTP status code as an integer (e.g. 404).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.status:1\nmsgid \"\"\n\"A writeable property to change the HTTP response status. It accepts either a\"\n\" numeric code (100-999) or a string with a custom reason phrase (e.g. \\\"404 \"\n\"Brain not found\\\"). Both :data:`status_line` and :data:`status_code` are \"\n\"updated accordingly. The return value is always a status string.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headers:1\nmsgid \"\"\n\"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the\"\n\" response headers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.get_header:1\nmsgid \"\"\n\"Return the value of a previously defined header. If there is no header with \"\n\"that name, return a default value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_header:1\nmsgid \"\"\n\"Create a new response header, replacing any previously defined headers with \"\n\"the same name.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.add_header:1\nmsgid \"Add an additional response header, not removing duplicates.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.iter_headers:1\nmsgid \"\"\n\"Yield (header, value) tuples, skipping headers that are not allowed with the\"\n\" current response status code.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.headerlist:1\nmsgid \"WSGI conform list of (header, value) tuples.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.expires:1\nmsgid \"Current value of the 'Expires' header.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.charset:1\nmsgid \"\"\n\"Return the charset specified in the content-type header (default: utf8).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:1\nmsgid \"\"\n\"Create a new cookie or replace an old one. If the `secret` parameter is set,\"\n\" create a `Signed Cookie` (described below).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:4\nmsgid \"the name of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:5\nmsgid \"the value of the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:6\nmsgid \"a signature key required for signed cookies.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:8\nmsgid \"\"\n\"Additionally, this method accepts all RFC 2109 attributes that are supported\"\n\" by :class:`cookie.Morsel`, including:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:11\nmsgid \"maximum age in seconds. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:12\nmsgid \"a datetime object or UNIX timestamp. (default: None)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:13\nmsgid \"\"\n\"the domain that is allowed to read the cookie. (default: current domain)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:15\nmsgid \"limits the cookie to a given path (default: current path)\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:16\nmsgid \"limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:17\nmsgid \"\"\n\"prevents client-side javascript to read this cookie (default: off, requires \"\n\"Python 2.6 or newer).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:19\nmsgid \"\"\n\"Control or disable third-party use for this cookie. Possible values: `lax`, \"\n\"`strict` or `none` (default).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:22\nmsgid \"\"\n\"If neither `expires` nor `maxage` is set (default), the cookie will expire \"\n\"at the end of the browser session (as soon as the browser window is closed).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:26\nmsgid \"\"\n\"Signed cookies may store any pickle-able object and are cryptographically \"\n\"signed to prevent manipulation. Keep in mind that cookies are limited to 4kb\"\n\" in most browsers.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:30\nmsgid \"\"\n\"Warning: Pickle is a potentially dangerous format. If an attacker gains \"\n\"access to the secret key, he could forge cookies that execute code on server\"\n\" side if unpickled. Using pickle is discouraged and support for it will be \"\n\"removed in later versions of bottle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:35\nmsgid \"\"\n\"Warning: Signed cookies are not encrypted (the client can still see the \"\n\"content) and not copy-protected (the client can restore an old cookie). The \"\n\"main intention is to make pickling and unpickling save, not to store secret \"\n\"information at client side.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.delete_cookie:1\nmsgid \"\"\n\"Delete a cookie. Be sure to use the same `domain` and `path` settings as \"\n\"used to create the cookie.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse:1\nmsgid \"\"\n\"A thread-local subclass of :class:`BaseResponse` with a different set of \"\n\"attributes for each thread. There is usually only one global instance of \"\n\"this class (:data:`response`). Its attributes are used to build the HTTP \"\n\"response at the end of the request/response cycle.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseResponse.__init__:1\nmsgid \"Initialize self.  See help(type(self)) for accurate signature.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.LocalResponse.body:1\nmsgid \"Thread-local property\"\nmsgstr \"\"\n\n#: ../../api.rst:160\nmsgid \"\"\n\"The following two classes can be raised as an exception. The most noticeable\"\n\" difference is that bottle invokes error handlers for :class:`HTTPError`, \"\n\"but not for :class:`HTTPResponse` or other response types.\"\nmsgstr \"\"\n\n#: ../../api.rst:172\nmsgid \"Templates\"\nmsgstr \"模板\"\n\n#: ../../api.rst:174\nmsgid \"\"\n\"All template engines supported by :mod:`bottle` implement the \"\n\":class:`BaseTemplate` API. This way it is possible to switch and mix \"\n\"template engines without changing the application code at all.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate:1\nmsgid \"Base class and minimal API for template adapters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.__init__:1\nmsgid \"\"\n\"Create a new template. If the source parameter (str or buffer) is missing, \"\n\"the name argument is used to guess a template filename. Subclasses can \"\n\"assume that self.source and/or self.filename are set. Both are strings. The \"\n\"lookup, encoding and settings parameters are stored as instance variables. \"\n\"The lookup parameter stores a list containing directory paths. The encoding \"\n\"parameter should be used to decode byte strings or files. The settings \"\n\"parameter contains a dict for engine-specific settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.search:1\nmsgid \"\"\n\"Search name in all directories specified in lookup. First without, then with\"\n\" common extensions. Return first hit.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.global_config:1\nmsgid \"This reads or sets the global settings stored in class.settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.BaseTemplate.render:1\nmsgid \"\"\n\"Render the template with the specified local variables and return a single \"\n\"byte or unicode string. If it is a byte string, the encoding must match \"\n\"self.encoding. This method must be thread-safe! Local variables may be \"\n\"provided in dictionaries (args) or directly, as keywords (kwargs).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:1\nmsgid \"\"\n\"Decorator: renders a template for a handler. The handler can control its \"\n\"behavior like that:\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:4\nmsgid \"return a dict of template vars to fill out the template\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.view:5\nmsgid \"\"\n\"return something other than a dict and the view decorator will not process \"\n\"the template, but return the handler result as is. This includes returning a\"\n\" HTTPResponse(dict) to get, for instance, JSON with autojson or other \"\n\"castfilters.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.template:1\nmsgid \"\"\n\"Get a rendered template as a string iterator. You can use a name, a filename\"\n\" or a template string as first parameter. Template rendering arguments can \"\n\"be passed as dictionaries or directly (as keyword arguments).\"\nmsgstr \"\"\n\n#: ../../api.rst:185\nmsgid \"\"\n\"You can write your own adapter for your favourite template engine or use one\"\n\" of the predefined adapters. Currently there are four fully supported \"\n\"template engines:\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Class\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"URL\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Decorator\"\nmsgstr \"\"\n\n#: ../../api.rst:188\nmsgid \"Render function\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":class:`SimpleTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":doc:`stpl`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`view`\"\nmsgstr \"\"\n\n#: ../../api.rst:190\nmsgid \":func:`template`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":class:`MakoTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \"http://www.makotemplates.org\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:191\nmsgid \":func:`mako_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":class:`CheetahTemplate`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \"http://www.cheetahtemplate.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:192\nmsgid \":func:`cheetah_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":class:`Jinja2Template`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \"http://jinja.pocoo.org/\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_view`\"\nmsgstr \"\"\n\n#: ../../api.rst:193\nmsgid \":func:`jinja2_template`\"\nmsgstr \"\"\n\n#: ../../api.rst:196\nmsgid \"\"\n\"To use :class:`MakoTemplate` as your default template engine, just import \"\n\"its specialised decorator and render function::\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/async.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2017-09-21 22:57+0000\\n\"\n\"Last-Translator: Thiago Avelino <t@avelino.xxx>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../async.rst:2\nmsgid \"Primer to Asynchronous Applications\"\nmsgstr \"异步应用入门\"\n\n#: ../../async.rst:4\nmsgid \"\"\n\"Asynchronous design patterns don't mix well with the synchronous nature of \"\n\"`WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most \"\n\"asynchronous frameworks (tornado, twisted, ...) implement a specialized API \"\n\"to expose their asynchronous features. Bottle is a WSGI framework and shares\"\n\" the synchronous nature of WSGI, but thanks to the awesome `gevent project \"\n\"<http://www.gevent.org/>`_, it is still possible to write asynchronous \"\n\"applications with bottle. This article documents the usage of Bottle with \"\n\"Asynchronous WSGI.\"\nmsgstr \"异步设计模式和 `WSGI <http://www.python.org/dev/peps/pep-3333/>`_ 的同步本质并不能很好地兼容。这就是为什么大部分的异步框架(tornado, twisted, ...)都实现了专有的API来暴露它们的异步特征。Bottle是一个WSGI框架，也继承了WSGI的同步本质，但是谢谢优秀的 `gevent项目 <http://www.gevent.org/>`_ ，我们可以使用Bottle来编写异步应用。这份文档介绍了在Bottle中如何使用异步WSGI。\"\n\n#: ../../async.rst:7\nmsgid \"The Limits of Synchronous WSGI\"\nmsgstr \"同步WSGI的限制\"\n\n#: ../../async.rst:9\nmsgid \"\"\n\"Briefly worded, the `WSGI specification (pep 3333) \"\n\"<http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response \"\n\"circle as follows: The application callable is invoked once for each request\"\n\" and must return a body iterator. The server then iterates over the body and\"\n\" writes each chunk to the socket. As soon as the body iterator is exhausted,\"\n\" the client connection is closed.\"\nmsgstr \"简单来说， `WSGI标准 (pep 3333) <http://www.python.org/dev/peps/pep-3333/>`_ 定义了下面这一个request/response的循环：每次请求到达的时候，应用中的callable会被调用一次，返回一个主体iterator。接着服务器会遍历该主体，分块写入socket。遍历完整个主体，就关闭客户端的连接。\"\n\n#: ../../async.rst:11\nmsgid \"\"\n\"Simple enough, but there is a snag: All this happens synchronously. If your \"\n\"application needs to wait for data (IO, sockets, databases, ...), it must \"\n\"either yield empty strings (busy wait) or block the current thread. Both \"\n\"solutions occupy the handling thread and prevent it from answering new \"\n\"requests. There is consequently only one ongoing request per thread.\"\nmsgstr \"足够简单，但是存在一个小问题：所有这些都是同步的。如果你的应用需要等待数据(IO, socket, 数据库, ...)，除了返回一个空字符串(忙等)，就只能阻塞当前线程。两种办法都会占用当前线程，导致线程不能处理新的请求，只能处理当前的一个请求。\"\n\n#: ../../async.rst:13\nmsgid \"\"\n\"Most servers limit the number of threads to avoid their relatively high \"\n\"overhead. Pools of 20 or less threads are common. As soon as all threads are\"\n\" occupied, any new connection is stalled. The server is effectively dead for\"\n\" everyone else. If you want to implement a chat that uses long-polling ajax \"\n\"requests to get real-time updates, you'd reach the limited at 20 concurrent \"\n\"connections. That's a pretty small chat.\"\nmsgstr \"大部分服务器都限制了线程的数量，避免伴随它们而来的资源消耗。常见的是一个线程池，内有20个或更少数量的线程。一旦所有的线程都被占用了，任何新的请求都会阻塞。事实上，对于其他人来说，服务器已经宕机了。如果你想实现一个聊天程序，使用ajax轮询来获取实时消息，很快你就会受到线程数量的限制。这样能同时服务的用户就太少了。\"\n\n#: ../../async.rst:16\nmsgid \"Greenlets to the rescue\"\nmsgstr \"救星，Greenlet\"\n\n#: ../../async.rst:18\nmsgid \"\"\n\"Most servers limit the size of their worker pools to a relatively low number\"\n\" of concurrent threads, due to the high overhead involved in switching \"\n\"between and creating new threads. While threads are cheap compared to \"\n\"processes (forks), they are still expensive to create for each new \"\n\"connection.\"\nmsgstr \"大多数服务器的线程池都限制了线程池中线程的数量，避免创建和切换线程的代价。尽管和创建进程(fork)的代价比起来，线程还是挺便宜的。但是也没便宜到可以接受为每一个请求创建一个线程。\"\n\n#: ../../async.rst:20\nmsgid \"\"\n\"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. \"\n\"Greenlets behave similar to traditional threads, but are very cheap to \"\n\"create. A gevent-based server can spawn thousands of greenlets (one for each\"\n\" connection) with almost no overhead. Blocking individual greenlets has no \"\n\"impact on the servers ability to accept new requests. The number of \"\n\"concurrent connections is virtually unlimited.\"\nmsgstr \"`gevent <http://www.gevent.org/>`_ 模块添加了 *greenlet* 的支持。greenlet和传统的线程类似，但其创建只需消耗很少的资源。基于gevent的服务器可以生成成千上万的greenlet，为每个连接分配一个greenlet也毫无压力。阻塞greenlet，也不会影响到服务器接受新的请求。同时处理的连接数理论上是没有限制的。\"\n\n#: ../../async.rst:22\nmsgid \"\"\n\"This makes creating asynchronous applications incredibly easy, because they \"\n\"look and feel like synchronous applications. A gevent-based server is \"\n\"actually not asynchronous, but massively multi-threaded. Here is an \"\n\"example::\"\nmsgstr \"这令创建异步应用难以置信的简单，因为它们看起来很想同步程序。基于gevent服务器实际上不是异步的，是大规模多线程。下面是一个例子。\"\n\n#: ../../async.rst:39\nmsgid \"\"\n\"The first line is important. It causes gevent to monkey-patch most of \"\n\"Python's blocking APIs to not block the current thread, but pass the CPU to \"\n\"the next greenlet instead. It actually replaces Python's threading with \"\n\"gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` \"\n\"which would normally block the whole thread. If you don't feel comfortable \"\n\"with monkey-patching python built-ins, you can use the corresponding gevent \"\n\"functions (``gevent.sleep()`` in this case).\"\nmsgstr \"第一行很重要。它让gevent monkey-patch了大部分Python的阻塞API，让它们不阻塞当前线程，将CPU让给下一个greenlet。它实际上用基于gevent的伪线程替换了Python的线程。这就是你依然可以使用 ``time.sleep()`` 这个照常来说会阻塞线程的函数。如果这种monkey-patch的方式感令你感到不舒服，你依然可以使用gevent中相应的函数 ``gevent.sleep()`` 。\"\n\n#: ../../async.rst:41\nmsgid \"\"\n\"If you run this script and point your browser to \"\n\"``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and \"\n\"`END` show up one by one (rather than waiting 8 seconds to see them all at \"\n\"once). It works exactly as with normal threads, but now your server can \"\n\"handle thousands of concurrent requests without any problems.\"\nmsgstr \"如果你运行了上面的代码，接着访问 ``http://localhost:8080/stream`` ，你可看到 `START`, `MIDDLE`, 和 `END` 这几个字样依次出现(用时大约8秒)。它像普通的线程一样工作，但是现在你的服务器能同时处理成千上万的连接了。\"\n\n#: ../../async.rst:45\nmsgid \"\"\n\"Some browsers buffer a certain amount of data before they start rendering a \"\n\"page. You might need to yield more than a few bytes to see an effect in \"\n\"these browsers. Additionally, many browsers have a limit of one concurrent \"\n\"connection per URL. If this is the case, you can use a second browser or a \"\n\"benchmark tool (e.g. `ab` or `httperf`) to measure performance.\"\nmsgstr \"一些浏览器在开始渲染一个页面之前，会缓存确定容量的数据。在这些浏览器上，你需要返回更多的数据才能看到效果。另外，很多浏览器限制一个URL只使用一个连接。在这种情况下，你可以使用另外的浏览器，或性能测试工具(例如： `ab` 或 `httperf` )来测试性能。\"\n\n#: ../../async.rst:52\nmsgid \"Event Callbacks\"\nmsgstr \"事件回调函数\"\n\n#: ../../async.rst:54\nmsgid \"\"\n\"A very common design pattern in asynchronous frameworks (including tornado, \"\n\"twisted, node.js and friends) is to use non-blocking APIs and bind callbacks\"\n\" to asynchronous events. The socket object is kept open until it is closed \"\n\"explicitly to allow callbacks to write to the socket at a later point. Here \"\n\"is an example based on the `tornado library \"\n\"<http://www.tornadoweb.org/documentation#non-blocking-asynchronous-\"\n\"requests>`_::\"\nmsgstr \"异步框架的常见设计模式(包括 tornado, twisted, node.js 和 friends)，是使用非阻塞的API，绑定回调函数到异步事件上面。在显式地关闭之前，socket会保持打开，以便稍后回调函数往socket里面写东西。下面是一个基于 `tornado <http://www.tornadoweb.org/documentation#non-blocking-asynchronous-requests>`_ 的例子。\"\n\n#: ../../async.rst:63\nmsgid \"\"\n\"The main benefit is that the request handler terminates early. The handling \"\n\"thread can move on and accept new requests while the callbacks continue to \"\n\"write to sockets of previous requests. This is how these frameworks manage \"\n\"to process a lot of concurrent requests with only a small number of OS \"\n\"threads.\"\nmsgstr \"主要的好处就是MainHandler能早早结束，在回调函数继续写socket来响应之前的请求的时候，当前线程能继续接受新的请求。这样就是为什么这类框架能同时处理很多请求，只使用很少的操作系统线程。\"\n\n#: ../../async.rst:65\nmsgid \"\"\n\"With Gevent+WSGI, things are different: First, terminating early has no \"\n\"benefit because we have an unlimited pool of (pseudo)threads to accept new \"\n\"connections. Second, we cannot terminate early because that would close the \"\n\"socket (as required by WSGI). Third, we must return an iterable to conform \"\n\"to WSGI.\"\nmsgstr \"对于Gevent和WSGI来说，情况就不一样了：首先，早早结束没有好处，因为我们的(伪)线程池已经没有限制了。第二，我们不能早早结束，因为这样会关闭socket(WSGI要求如此)。第三，我们必须返回一个iterator，以遵守WSGI的约定。\"\n\n#: ../../async.rst:67\nmsgid \"\"\n\"In order to conform to the WSGI standard, all we have to do is to return a \"\n\"body iterable that we can write to asynchronously. With the help of \"\n\"`gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate*\"\n\" a detached socket and rewrite the previous example as follows::\"\nmsgstr \"为了遵循WSGI规范，我们只需返回一个iterable的实体，异步地将其写回客户端。在 `gevent.queue <http://www.gevent.org/gevent.queue.html>`_ 的帮助下，我们可以 *模拟* 一个脱管的socket，上面的例子可写成这样。\"\n\n#: ../../async.rst:78\nmsgid \"\"\n\"From the server perspective, the queue object is iterable. It blocks if \"\n\"empty and stops as soon as it reaches ``StopIteration``. This conforms to \"\n\"WSGI. On the application side, the queue object behaves like a non-blocking \"\n\"socket. You can write to it at any time, pass it around and even start a new\"\n\" (pseudo)thread that writes to it asynchronously. This is how long-polling \"\n\"is implemented most of the time.\"\nmsgstr \"从服务器的角度来看，queue对象是iterable的。如果为空，则阻塞，一旦遇到 ``StopIteration`` 则停止。这符合WSGI规范。从应用的角度来看，queue对象表现的像一个不会阻塞socket。你可以在任何时刻写入数据，pass it around，甚至启动一个新的(伪)线程，异步写入。这是在大部分情况下，实现长轮询。\"\n\n#: ../../async.rst:82\nmsgid \"Finally: WebSockets\"\nmsgstr \"最后： WebSockets\"\n\n#: ../../async.rst:84\nmsgid \"\"\n\"Lets forget about the low-level details for a while and speak about \"\n\"WebSockets. Since you are reading this article, you probably know what \"\n\"WebSockets are: A bidirectional communication channel between a browser \"\n\"(client) and a web application (server).\"\nmsgstr \"让我们暂时忘记底层的细节，来谈谈WebSocket。既然你正在阅读这篇文章，你有可能已经知道什么是WebSocket了，一个在浏览器(客户端)和Web应用(服务端)的双向的交流通道。\"\n\n#: ../../async.rst:86\nmsgid \"\"\n\"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-\"\n\"websocket/>`_ package does all the hard work for us. Here is a simple \"\n\"WebSocket endpoint that receives messages and just sends them back to the \"\n\"client::\"\nmsgstr \"感谢 `gevent-websocket <http://pypi.python.org/pypi/gevent-websocket/>`_ 包帮我们做的工作。下面是一个WebSocket的简单例子，接受消息然后将其发回客户端。\"\n\n#: ../../async.rst:111\nmsgid \"\"\n\"The while-loop runs until the client closes the connection. You get the idea\"\n\" :)\"\nmsgstr \"while循环直到客户端关闭连接的时候才会终止。You get the idea :)\"\n\n#: ../../async.rst:113\nmsgid \"The client-site JavaScript API is really straight forward, too::\"\nmsgstr \"客户端的JavaScript API也十分简洁明了::\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/changelog.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../changelog.rst:6\nmsgid \"Release Notes and Changelog\"\nmsgstr \"发布摘要和更改历史(不译)\"\n\n#: ../../changelog.rst:9\nmsgid \"Release 0.13\"\nmsgstr \"\"\n\n#: ../../changelog.rst:11\nmsgid \"Not released yet.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:14\nmsgid \"Dropped support for Python versions that reached their end-of-life.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:15\nmsgid \"\"\n\"Keeping up support for ancient Python versions hinders adaptation of new \"\n\"features and serves no real purpose. If you need support for older Python \"\n\"versions, you can stay on bottle-0.12. The updated list of tested and \"\n\"supported python releases is as follows:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:20\nmsgid \"Python 2.7 (>= 2.7.3)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:21\nmsgid \"Python 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:22\nmsgid \"Python 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:23\nmsgid \"Python 3.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:24\nmsgid \"Python 3.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:25\nmsgid \"PyPy 2.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:26\nmsgid \"PyPy 3.6\"\nmsgstr \"\"\n\n#: ../../changelog.rst:27\nmsgid \"PyPy 3.7\"\nmsgstr \"\"\n\n#: ../../changelog.rst:29\nmsgid \"\"\n\"Support for Python 2.5 was marked as deprecated since 0.12. We decided to go\"\n\" a step further and also remove support for 2.6 and 3.1 to 3.5 even if it \"\n\"was never deprecated explicitly in bottle. This means that this release is \"\n\"*not* backwards compatible in Python <2.7.3 or <3.6 environments. \"\n\"Maintainers for distributions or systems that still use these old python \"\n\"versions should not update to Bottle 0.13 and stick with 0.12 instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:35\nmsgid \"Stabilized APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:36\nmsgid \"\"\n\"The documented API of the :class:`ConfigDict` class is now considered stable\"\n\" and ready to use.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:38\nmsgid \"Deprecated APIs\"\nmsgstr \"\"\n\n#: ../../changelog.rst:39\nmsgid \"\"\n\"The old route syntax (``/hello/:name``) is deprecated in favor of the more \"\n\"readable and flexible ``/hello/<name>`` syntax.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:40\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes Bottle instance and will warn about \"\n\"parameters that are not compatible with the new mounting behavior. The old \"\n\"behavior (mount applications as WSGI callable) still works and is used as a \"\n\"fallback automatically.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:41\nmsgid \"The undocumented :func:`local_property` helper is now deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:42\nmsgid \"\"\n\"The server adapter for google app engine is not useful anymore and marked as\"\n\" deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:43\nmsgid \"\"\n\"Bottle uses pickle to store arbitrary objects into signed cookies. This is \"\n\"safe, as long as the signature key remains a secret. Unfortunately, people \"\n\"tend to push code with signature keys to github all the time, so we decided \"\n\"to remove pickle-support from bottle. Signed cookies will now issue a \"\n\"deprecation warning if the value is not a string, and support for non-string\"\n\" values will be removed in 0.14. The global :func:`cookie_encode`, \"\n\":func:`cookie_decode` and :func:`is_cookie_encoded` are now also deprecated.\"\n\" If you are using this feature, think about using json to serialize your \"\n\"objects before storing them into cookies, or switch to a session system that\"\n\" stores data server-side instead of client-side.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:45\nmsgid \"Removed APIs (deprecated since 0.12)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:46\nmsgid \"\"\n\"Plugins with the old API (``api=1`` or no api attribute) will no longer \"\n\"work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:47\nmsgid \"\"\n\"Parameter order of :meth:`Bottle.mount` changed in 0.10. The old order will \"\n\"now result in an error instead of a warning.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:48\nmsgid \"\"\n\"The :class:`ConfigDict` class was introduced in 0.11 and changed during \"\n\"0.12. These changes are now final.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:50\nmsgid \"\"\n\"Attribute access and assignment was removed due to high overhead and limited\"\n\" usability.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:51\nmsgid \"\"\n\"Namespaced sub-instance creation was removed. ``config[\\\"a\\\"][\\\"b\\\"]`` has a\"\n\" high overhead and little benefit over ``config[\\\"a.b\\\"]``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:52\nmsgid \"\"\n\":class:`ConfigDict` instances are no longer callable. This was a shortcut \"\n\"for :meth:`ConfigDict.update`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:53\nmsgid \"\"\n\":class:`ConfigDict` constructor no longer accepts any parameters. Use the \"\n\"`load_*` methods instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:55\nmsgid \"\"\n\"Bottle 0.12 changed some aspects of the Simple Template Engine. These \"\n\"changes are now final and the old syntax will now longer work.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:57\nmsgid \"\"\n\"The magic ``{{rebase()}}`` call was replaced by a ``base`` variable. \"\n\"Example: ``{{base}}``\"\nmsgstr \"\"\n\n#: ../../changelog.rst:58\nmsgid \"\"\n\"In STPL Templates, the 'rebase' and 'include' keywords were replaced with \"\n\"functions in 0.12.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:59\nmsgid \"\"\n\"PEP-263 encoding strings are no longer recognized. Templates are always \"\n\"utf-8.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:61\nmsgid \"\"\n\"The 'geventSocketIO' server adapter was removed without notice. It did not \"\n\"work anyway.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:63\nmsgid \"Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:64\nmsgid \"These changes might require special care when updating.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:66\nmsgid \"\"\n\"Signed cookies now use a stronger HMAC algorithm by default. This will \"\n\"result in old cookies to appear invalid after the update. Pass an explicit \"\n\"``digestmod=hashlib.md5`` to :meth:`Request.get_cookie` and \"\n\":meth:`Response.set_cookie` to get the old behavior.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:68\nmsgid \"Other Improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:69\nmsgid \"\"\n\"Bottle() instances are now context managers. If used in a with-statement, \"\n\"the default application changes to the specific instance and the shortcuts \"\n\"for many instance methods can be used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:70\nmsgid \"\"\n\"Added support for ``PATCH`` requests and the :meth:`Bottle.patch` decorator.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:71\nmsgid \"\"\n\"Added `aiohttp <http://aiohttp.readthedocs.io/en/stable/>`_ and `uvloop \"\n\"<https://github.com/MagicStack/uvloop>`_ server adapters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:72\nmsgid \"Added command-line arguments for config from json or ini files.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:73\nmsgid \"\"\n\":meth:`Bottle.mount` now recognizes instances of :class:`Bottle` and mounts \"\n\"them with significantly less overhead than other WSGI applications.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:74\nmsgid \"\"\n\"The :attr:`Request.json` property now accepts ``application/json-rpc`` \"\n\"requests.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:75\nmsgid \"\"\n\":func:`static_file` gained support for ``ETag`` headers. It will generate \"\n\"ETags and recognizes ``If-None-Match`` headers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:76\nmsgid \"Jinja2 templates will produce better error messages than before.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:82\nmsgid \"Release 0.12\"\nmsgstr \"\"\n\n#: ../../changelog.rst:84\nmsgid \"New SimpleTemplate parser implementation\"\nmsgstr \"\"\n\n#: ../../changelog.rst:86\nmsgid \"Support for multi-line code blocks (`<% ... %>`).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:87\nmsgid \"\"\n\"The keywords `include` and `rebase` are functions now and can accept \"\n\"variable template names.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:89\nmsgid \"\"\n\"The new :attr:`BaseRequest.route` property returns the :class:`Route` that \"\n\"originally matched the request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:90\nmsgid \"\"\n\"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in \"\n\"CPythons dict() implementation was fixed over a year ago. If you are still \"\n\"using Python 2.5 in production, consider upgrading or at least make sure \"\n\"that you get security fixed from your distributor.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:91\nmsgid \"New :class:`ConfigDict` API (see :doc:`configuration`)\"\nmsgstr \"\"\n\n#: ../../changelog.rst:93\nmsgid \"\"\n\"More information can be found in this `development blog post \"\n\"<http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:97\nmsgid \"Release 0.11\"\nmsgstr \"\"\n\n#: ../../changelog.rst:99\nmsgid \"\"\n\"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:100\nmsgid \"\"\n\"Support for partial downloads (``Range`` header) in :func:`static_file`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:101\nmsgid \"\"\n\"The new :class:`ResourceManager` interface helps locating files bundled with\"\n\" an application.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:102\nmsgid \"\"\n\"Added a server adapter for `waitress \"\n\"<http://docs.pylonsproject.org/projects/waitress/en/latest/>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:103\nmsgid \"\"\n\"New :meth:`Bottle.merge` method to install all routes from one application \"\n\"into another.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:104\nmsgid \"\"\n\"New :attr:`BaseRequest.app` property to get the application object that \"\n\"handles a request.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:105\nmsgid \"\"\n\"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by \"\n\"WTForms).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:106\nmsgid \":class:`MultiDict` and subclasses are now pickle-able.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:109\nmsgid \"API Changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:110\nmsgid \"\"\n\":attr:`Response.status` is a read-write property that can be assigned either\"\n\" a numeric status code or a status string with a reason phrase (``200 OK``).\"\n\" The return value is now a string to better match existing APIs (WebOb, \"\n\"werkzeug). To be absolutely clear, you can use the read-only properties \"\n\":attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:113\nmsgid \"API Deprecations\"\nmsgstr \"\"\n\n#: ../../changelog.rst:114\nmsgid \"\"\n\":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:117\nmsgid \"Release 0.10\"\nmsgstr \"\"\n\n#: ../../changelog.rst:119\nmsgid \"Plugin API v2\"\nmsgstr \"\"\n\n#: ../../changelog.rst:121\nmsgid \"To use the new API, set :attr:`Plugin.api` to ``2``.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:122\nmsgid \"\"\n\":meth:`Plugin.apply` receives a :class:`Route` object instead of a context \"\n\"dictionary as second parameter. The new object offers some additional \"\n\"information and may be extended in the future.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:123\nmsgid \"\"\n\"Plugin names are considered unique now. The topmost plugin with a given name\"\n\" on a given route is installed, all other plugins with the same name are \"\n\"silently ignored.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:125\nmsgid \"The Request/Response Objects\"\nmsgstr \"\"\n\n#: ../../changelog.rst:127\nmsgid \"\"\n\"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, \"\n\":attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and \"\n\":attr:`BaseRequest.script_name`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:128\nmsgid \"\"\n\"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` \"\n\"attributes. In future releases, :attr:`BaseResponse.status` will return a \"\n\"string (e.g. ``200 OK``) instead of an integer to match the API of other \"\n\"common frameworks. To make the transition as smooth as possible, you should \"\n\"use the verbose attributes from now on.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:129\nmsgid \"\"\n\"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many \"\n\"places. The new dict implementation allows attribute access and handles \"\n\"unicode form values transparently.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:131\nmsgid \"Templates\"\nmsgstr \"模板\"\n\n#: ../../changelog.rst:133\nmsgid \"\"\n\"Added three new functions to the SimpleTemplate default namespace that \"\n\"handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and \"\n\":func:`stpl.setdefault`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:134\nmsgid \"\"\n\"The default escape function for SimpleTemplate now additionally escapes \"\n\"single and double quotes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:136\nmsgid \"Routing\"\nmsgstr \"\"\n\n#: ../../changelog.rst:138\nmsgid \"\"\n\"A new route syntax (e.g. ``/object/<id:int>``) and support for route \"\n\"wildcard filters.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:139\nmsgid \"Four new wildcard filters: `int`, `float`, `path` and `re`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:141\nmsgid \"Other changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:143\nmsgid \"Added command line interface to load applications and start servers.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:144\nmsgid \"\"\n\"Introduced a :class:`ConfigDict` that makes accessing configuration a lot \"\n\"easier (attribute access and auto-expanding namespaces).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:145\nmsgid \"Added support for raw WSGI applications to :meth:`Bottle.mount`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:146\nmsgid \":meth:`Bottle.mount` parameter order changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:147\nmsgid \"\"\n\":meth:`Bottle.route` now accpets an import string for the ``callback`` \"\n\"parameter.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:148\nmsgid \"Dropped Gunicorn 0.8 support. Current supported version is 0.13.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:149\nmsgid \"Added custom options to Gunicorn server.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:150\nmsgid \"\"\n\"Finally dropped support for type filters. Replace with a custom plugin of \"\n\"needed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:154\nmsgid \"Release 0.9\"\nmsgstr \"\"\n\n#: ../../changelog.rst:157\nmsgid \"Whats new?\"\nmsgstr \"\"\n\n#: ../../changelog.rst:158\nmsgid \"\"\n\"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:159\nmsgid \"\"\n\"The :func:`route` decorator got a lot of new features. See \"\n\":meth:`Bottle.route` for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:160\nmsgid \"\"\n\"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld \"\n\"<http://meinheld.org/>`_ and `bjoern \"\n\"<https://github.com/jonashaag/bjoern>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:161\nmsgid \"Support for SimpleTAL templates.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:162\nmsgid \"Better runtime exception handling for mako templates in debug mode.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:163\nmsgid \"Lots of documentation, fixes and small improvements.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:164\nmsgid \"A new :data:`Request.urlparts` property.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:167\nmsgid \"Performance improvements\"\nmsgstr \"\"\n\n#: ../../changelog.rst:168\nmsgid \"\"\n\"The :class:`Router` now special-cases ``wsgi.run_once`` environments to \"\n\"speed up CGI.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:169\nmsgid \"\"\n\"Reduced module load time by ~30% and optimized template parser. See `8ccb2d \"\n\"</commit/8ccb2d>`_, `f72a7c </commit/f72a7c>`_ and `b14b9a \"\n\"</commit/b14b9a>`_ for details.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:170\nmsgid \"\"\n\"Support for \\\"App Caching\\\" on Google App Engine. See `af93ec \"\n\"</commit/af93ec>`_.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:171\nmsgid \"\"\n\"Some of the rarely used or deprecated features are now plugins that avoid \"\n\"overhead if the feature is not used.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:174 ../../changelog.rst:185\nmsgid \"API changes\"\nmsgstr \"\"\n\n#: ../../changelog.rst:175\nmsgid \"\"\n\"This release is mostly backward compatible, but some APIs are marked \"\n\"deprecated now and will be removed for the next release. Most noteworthy:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:177\nmsgid \"\"\n\"The ``static`` route parameter is deprecated. You can escape wild-cards with\"\n\" a backslash.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:178\nmsgid \"\"\n\"Type-based output filters are deprecated. They can easily be replaced with \"\n\"plugins.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:182\nmsgid \"Release 0.8\"\nmsgstr \"\"\n\n#: ../../changelog.rst:186\nmsgid \"These changes may break compatibility with previous versions.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:188\nmsgid \"\"\n\"The built-in Key/Value database is not available anymore. It is marked \"\n\"deprecated since 0.6.4\"\nmsgstr \"\"\n\n#: ../../changelog.rst:189\nmsgid \"The Route syntax and behaviour changed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:191\nmsgid \"\"\n\"Regular expressions must be encapsulated with ``#``. In 0.6 all non-\"\n\"alphanumeric characters not present in the regular expression were allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:192\nmsgid \"\"\n\"Regular expressions not part of a route wildcard are escaped automatically. \"\n\"You don't have to escape dots or other regular control characters anymore. \"\n\"In 0.6 the whole URL was interpreted as a regular expression. You can use \"\n\"anonymous wildcards (``/index:#(\\\\.html)?#``) to achieve a similar \"\n\"behaviour.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:194\nmsgid \"\"\n\"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:195\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine escapes HTML special characters in \"\n\"``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` \"\n\"syntax to get old behaviour (no escaping).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:196\nmsgid \"\"\n\"The :class:`SimpleTemplate` engine returns unicode strings instead of lists \"\n\"of byte strings.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:197\nmsgid \"\"\n\"``bottle.optimize()`` and the automatic route optimization is obsolete.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:198\nmsgid \"Some functions and attributes were renamed:\"\nmsgstr \"\"\n\n#: ../../changelog.rst:200\nmsgid \":attr:`Request._environ` is now :attr:`Request.environ`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:201\nmsgid \":attr:`Response.header` is now :attr:`Response.headers`\"\nmsgstr \"\"\n\n#: ../../changelog.rst:202\nmsgid \":func:`default_app` is obsolete. Use :func:`app` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:204\nmsgid \"The default :func:`redirect` code changed from 307 to 303.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:205\nmsgid \"Removed support for ``@default``. Use ``@error(404)`` instead.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:209\nmsgid \"New features\"\nmsgstr \"\"\n\n#: ../../changelog.rst:210\nmsgid \"This is an incomplete list of new features and improved functionality.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:212\nmsgid \"\"\n\"The :class:`Request` object got new properties: :attr:`Request.body`, \"\n\":attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, \"\n\":attr:`Request.forms`, :attr:`Request.files`.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:213\nmsgid \"\"\n\"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are \"\n\"now able to encode and decode python objects. This is called a *secure \"\n\"cookie* because the encoded values are signed and protected from changes on \"\n\"client side. All pickle-able data structures are allowed.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:214\nmsgid \"\"\n\"The new :class:`Router` class drastically improves performance for setups \"\n\"with lots of dynamic routes and supports named routes (named route + dict = \"\n\"URL string).\"\nmsgstr \"\"\n\n#: ../../changelog.rst:215\nmsgid \"\"\n\"It is now possible (and recommended) to return :exc:`HTTPError` and \"\n\":exc:`HTTPResponse` instances or other exception objects instead of raising \"\n\"them.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:216\nmsgid \"\"\n\"The new function :func:`static_file` equals :func:`send_file` but returns a \"\n\":exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. \"\n\":func:`send_file` is deprecated.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:217\nmsgid \"\"\n\"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:218\nmsgid \"The :class:`SimpleTemplate` engine got full unicode support.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:219\nmsgid \"Lots of non-critical bugfixes.\"\nmsgstr \"\"\n\n#: ../../changelog.rst:225\nmsgid \"Contributors\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:1\nmsgid \"\"\n\"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:3\nmsgid \"\"\n\"Thanks to all the people who found bugs, sent patches, spread the word, \"\n\"helped each other on the mailing-list and made this project possible. I hope\"\n\" the following (alphabetically sorted) list is complete. If you miss your \"\n\"name on that list (or want your name removed) please :doc:`tell me \"\n\"<contact>` or add it yourself.\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:5\nmsgid \"acasajus\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:6\nmsgid \"Adam R. Smith\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:7\nmsgid \"Alexey Borzenkov\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:8\nmsgid \"Alexis Daboville\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:9\nmsgid \"Anton I. Sipos\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:10\nmsgid \"Anton Kolechkin\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:11\nmsgid \"apexi200sx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:12\nmsgid \"apheage\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:13\nmsgid \"BillMa\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:14\nmsgid \"Brad Greenlee\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:15\nmsgid \"Brandon Gilmore\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:16\nmsgid \"Branko Vukelic\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:17\nmsgid \"Brian Sierakowski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:18\nmsgid \"Brian Wickman\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:19\nmsgid \"Carl Scharenberg\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:20\nmsgid \"Damien Degois\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:21\nmsgid \"David Buxton\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:22\nmsgid \"Duane Johnson\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:23\nmsgid \"fcamel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:24\nmsgid \"Frank Murphy\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:25\nmsgid \"Frederic Junod\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:26\nmsgid \"goldfaber3012\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:27\nmsgid \"Greg Milby\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:28\nmsgid \"gstein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:29\nmsgid \"Ian Davis\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:30\nmsgid \"Itamar Nabriski\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:31\nmsgid \"Iuri de Silvio\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:32\nmsgid \"Jaimie Murdock\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:33\nmsgid \"Jeff Nichols\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:34\nmsgid \"Jeremy Kelley\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:35\nmsgid \"joegester\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:36\nmsgid \"Johannes Krampf\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:37\nmsgid \"Jonas Haag\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:38\nmsgid \"Joshua Roesslein\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:39\nmsgid \"Judson Neer\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:40\nmsgid \"Karl\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:41\nmsgid \"Kevin Zuber\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:42\nmsgid \"Kraken\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:43\nmsgid \"Kyle Fritz\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:44\nmsgid \"m35\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:45\nmsgid \"Marcos Neves\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:46\nmsgid \"masklinn\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:47\nmsgid \"Michael Labbe\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:48\nmsgid \"Michael Soulier\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:49\nmsgid \"`reddit <http://reddit.com/r/python>`_\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:50\nmsgid \"Nicolas Vanhoren\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:51\nmsgid \"Oz N Tiram\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:52\nmsgid \"Robert Rollins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:53\nmsgid \"rogererens\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:54\nmsgid \"rwxrwx\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:55\nmsgid \"Santiago Gala\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:56\nmsgid \"Sean M. Collins\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:57\nmsgid \"Sebastian Wollrath\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:58\nmsgid \"Seth\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:59\nmsgid \"Sigurd Høgsbro\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:60\nmsgid \"Stuart Rackham\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:61\nmsgid \"Sun Ning\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:62\nmsgid \"Tomás A. Schertel\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:63\nmsgid \"Tristan Zajonc\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:64\nmsgid \"voltron\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:65\nmsgid \"Wieland Hoffmann\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:66\nmsgid \"zombat\"\nmsgstr \"\"\n\n#: ../../../AUTHORS:67\nmsgid \"Thiago Avelino\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/configuration.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../configuration.rst:3\nmsgid \"Configuration (DRAFT)\"\nmsgstr \"配置文件(初稿)\"\n\n#: ../../configuration.rst:8\nmsgid \"\"\n\"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_\"\n\" what you think.\"\nmsgstr \"这是一个新的API， 可以 `告诉我们 <mailto:bottlepy@googlegroups.com>`_ 你的想法\"\n\n#: ../../configuration.rst:10\nmsgid \"\"\n\"Bottle applications can store their configuration in :attr:`Bottle.config`, \"\n\"a dict-like object and central place for application specific settings. This\"\n\" dictionary controls many aspects of the framework, tells (newer) plugins \"\n\"what to do, and can be used to store your own configuration as well.\"\nmsgstr \"Bottle应用可以在 :attr:`Bottle.config` 这个类似于字典的对象中，存储它们的配置。这个对象在很多方面，影响着Bottle框架和相应的插件。你也可以在这个对象中，存储你的自定义配置。\"\n\n#: ../../configuration.rst:13\nmsgid \"Configuration Basics\"\nmsgstr \"基础知识\"\n\n#: ../../configuration.rst:15\nmsgid \"\"\n\"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. \"\n\"All the common dict methods work as expected. Let us start with some \"\n\"examples::\"\nmsgstr \" :attr:`Bottle.config` 这个对象，可以当成一个字典来使用，让我们举个例子::\"\n\n#: ../../configuration.rst:44\nmsgid \"\"\n\"The app object is not always available, but as long as you are within a \"\n\"request context, you can use the `request` object to get the current \"\n\"application and its configuration::\"\nmsgstr \"app对象不一定总是可用的，但只要你在处理一个请求，你可以使用 `request` 对象来获得当前的应用对象和它的配置::\"\n\n#: ../../configuration.rst:51\nmsgid \"Naming Convention\"\nmsgstr \"命名约定\"\n\n#: ../../configuration.rst:53\nmsgid \"\"\n\"To make life easier, plugins and applications should follow some simple \"\n\"rules when it comes to config parameter names:\"\nmsgstr \"方便起见，插件和应用应该遵循一些简单的规则，特别是在给配置参数命名的时候:\"\n\n#: ../../configuration.rst:55\nmsgid \"\"\n\"All keys should be lowercase strings and follow the rules for python \"\n\"identifiers (no special characters but the underscore).\"\nmsgstr \"所有的key都应该是小写的字符串，并符合Python的变量命名规则(除了下划线外，没有特殊字符)。\"\n\n#: ../../configuration.rst:56\nmsgid \"\"\n\"Namespaces are separated by dots (e.g. ``namespace.field`` or \"\n\"``namespace.subnamespace.field``).\"\nmsgstr \"命名空间通过点来区分(例如： ``namespace.field`` 或 ``namespace.subnamespacew.field`` )。\"\n\n#: ../../configuration.rst:57\nmsgid \"\"\n\"Bottle uses the root namespace for its own configuration. Plugins should \"\n\"store all their variables in their own namespace (e.g. ``sqlite.db`` or \"\n\"``werkzeug.use_debugger``).\"\nmsgstr \"Bottle框架，使用根命名空间来存储它的配置。插件应该在它们自己的命名空间中存储它们的变量(例如： `sqlite.db`` 或 ``werkzeug.use_debugger`` )。\"\n\n#: ../../configuration.rst:58\nmsgid \"\"\n\"Your own application should use a separate namespace (e.g. ``myapp.*``).\"\nmsgstr \"你的应用应该使用一个独立的命名空间(例如： ``myapp.*`` )。\"\n\n#: ../../configuration.rst:62\nmsgid \"Loading Configuration from a File\"\nmsgstr \"从文件中加载配置\"\n\n#: ../../configuration.rst:66\nmsgid \"\"\n\"Configuration files are useful if you want to enable non-programmers to \"\n\"configure your application, or just don't want to hack python module files \"\n\"just to change the database port. A very common syntax for configuration \"\n\"files is shown here:\"\nmsgstr \"在你不想通过修改代码来修改配置的时候，配置文件是非常有用的。常见的配置文件语法如下:\"\n\n#: ../../configuration.rst:78\nmsgid \"\"\n\"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style \"\n\"configuration files from disk and import their values into your existing \"\n\"configuration::\"\nmsgstr \"通过 :meth:`ConfigDict.load_config` 方法，你可以从一些ini文件中导入配置::\"\n\n#: ../../configuration.rst:85\nmsgid \"Loading Configuration from a python module\"\nmsgstr \"\"\n\n#: ../../configuration.rst:89\nmsgid \"\"\n\"Loading configuration from a Python module is a common pattern for Python \"\n\"programs and frameworks. Bottle assumes that configuration keys are all \"\n\"upper case:\"\nmsgstr \"\"\n\n#: ../../configuration.rst:98\nmsgid \"\"\n\"You can load the this Python module with :met:`ConfigDict.load_module`::\"\nmsgstr \"\"\n\n#: ../../configuration.rst:107\nmsgid \"\"\n\"Note the second parameter to disable loading as namespaced items as in \"\n\":meth:`ConfigDict.load_dict`. By default, loading from a Python module will \"\n\"call this method, unless you specifically call this method with `False` as \"\n\"the second argument.\"\nmsgstr \"\"\n\n#: ../../configuration.rst:110\nmsgid \"Loading Configuration from a nested :class:`dict`\"\nmsgstr \"从字典中加载配置\"\n\n#: ../../configuration.rst:114\nmsgid \"\"\n\"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an \"\n\"entire structure of nested dictionaries and turns it into a flat list of \"\n\"keys and values with namespaced keys::\"\nmsgstr \"另外一个有用的方法，是 :meth:`ConfigDict.load_dict` 。将字典中的配置，放到各自的命名空间下面::\"\n\n#: ../../configuration.rst:135\nmsgid \"Listening to configuration changes\"\nmsgstr \"监听配置的变更\"\n\n#: ../../configuration.rst:139\nmsgid \"\"\n\"The ``config`` hook on the application object is triggered each time a value\"\n\" in :attr:`Bottle.config` is changed. This hook can be used to react on \"\n\"configuration changes at runtime, for example reconnect to a new database, \"\n\"change the debug settings on a background service or resize worker thread \"\n\"pools. The hook callback receives two arguments (key, new_value) and is \"\n\"called before the value is actually changed in the dictionary. Raising an \"\n\"exception from a hook callback cancels the change and the old value is \"\n\"preserved.\"\nmsgstr \"每次 :attr:`Bottle.config` 中的值有变更的时候，会触发 ``config``  这个钩子。这个钩子可以用于在运行时，对配置的改动做出响应，例如连接到一个新的数据库，改变后台服务的debug配置，或更改线程池的大小。这个钩子接收两个参数(key, new_value)，在 :attr:`Bottle.config` 中的值被改动之前触发。如果这个钩子抛出了异常，那么 :attr:`Bottle.config` 中的值将不会被改动。\"\n\n#: ../../configuration.rst:148\nmsgid \"\"\n\"The hook callbacks cannot *change* the value that is to be stored to the \"\n\"dictionary. That is what filters are for.\"\nmsgstr \"这个钩子不能 *改变* 将要存到  :attr:`Bottle.config` 对象中的值。做这件事的是filter(过滤器)。\"\n\n#: ../../configuration.rst:154\nmsgid \"Filters and other Meta Data\"\nmsgstr \"过滤器和其它元数据\"\n\n#: ../../configuration.rst:158\nmsgid \"\"\n\":class:`ConfigDict` allows you to store meta data along with configuration \"\n\"keys. Two meta fields are currently defined:\"\nmsgstr \":class:`ConfigDict` 对象允许你给配置中每个key定义元数据。当前定义了help和filter:\"\n\n#: ../../configuration.rst:162\nmsgid \"help\"\nmsgstr \"\"\n\n#: ../../configuration.rst:161\nmsgid \"\"\n\"A help or description string. May be used by debugging, introspection or \"\n\"admin tools to help the site maintainer configuring their application.\"\nmsgstr \"一个描述字符串。可以被debug或管理工具利用，来帮助网站管理员填写配置。\"\n\n#: ../../configuration.rst:165\nmsgid \"filter\"\nmsgstr \"\"\n\n#: ../../configuration.rst:165\nmsgid \"\"\n\"A callable that accepts and returns a single value. If a filter is defined \"\n\"for a key, any new value stored to that key is first passed through the \"\n\"filter callback. The filter can be used to cast the value to a different \"\n\"type, check for invalid values (throw a ValueError) or trigger side effects.\"\nmsgstr \"一个可运行的对象，接受和返回一个值。如果一个key定义了一个filter，任何将要存到这个key中的值，都会先传给filter的相应回调函数。在回调函数中，可做类型转换，有效性检验等工作。\"\n\n#: ../../configuration.rst:167\nmsgid \"\"\n\"This feature is most useful for plugins. They can validate their config \"\n\"parameters or trigger side effects using filters and document their \"\n\"configuration via ``help`` fields::\"\nmsgstr \"这个功能比较适合被插件使用。它们可以检查它们的配置参数，或触发其它动作，或在 ``help`` 字段中，给配置添加说明::\"\n\n#: ../../configuration.rst:189\nmsgid \"API Documentation\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:1\nmsgid \"\"\n\"A dict-like configuration storage with additional support for namespaces, \"\n\"validators, meta-data, overlays and more.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict:4\nmsgid \"\"\n\"This dict-like class is heavily optimized for read access. All read-only \"\n\"methods as well as item access should be as fast as the built-in dict.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:1\nmsgid \"Load values from a Python module.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:3\nmsgid \"Example modue ``config.py``::\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:0\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:0\nmsgid \"Parameters\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_module:17\nmsgid \"\"\n\"If true (default), dictionary values are assumed to represent namespaces \"\n\"(see :meth:`load_dict`).\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:1\nmsgid \"Load values from an ``*.ini`` style config file.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:3\nmsgid \"\"\n\"A configuration file consists of sections, each led by a ``[section]`` \"\n\"header, followed by key/value entries separated by either ``=`` or ``:``. \"\n\"Section names and keys are case-insensitive. Leading and trailing whitespace\"\n\" is removed from keys and values. Values can be omitted, in which case the \"\n\"key/value delimiter may also be left out. Values can also span multiple \"\n\"lines, as long as they are indented deeper than the first line of the value.\"\n\" Commands are prefixed by ``#`` or ``;`` and may only appear on their own on\"\n\" an otherwise empty line.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:13\nmsgid \"\"\n\"Both section and key names may contain dots (``.``) as namespace separators.\"\n\" The actual configuration parameter name is constructed by joining section \"\n\"name and key name together and converting to lower case.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:18\nmsgid \"\"\n\"The special sections ``bottle`` and ``ROOT`` refer to the root namespace and\"\n\" the ``DEFAULT`` section defines default values for all other sections.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:22\nmsgid \"With Python 3, extended string interpolation is enabled.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:24\nmsgid \"The path of a config file, or a list of paths.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:25\nmsgid \"\"\n\"All keyword parameters are passed to the underlying \"\n\":class:`python:configparser.ConfigParser` constructor call.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.load_dict:1\nmsgid \"\"\n\"Load values from a dictionary structure. Nesting can be used to represent \"\n\"namespaces.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.update:1\nmsgid \"\"\n\"If the first parameter is a string, all keys are prefixed with this \"\n\"namespace. Apart from that it works just as the usual dict.update().\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:1\nmsgid \"Insert key with a value of default if key is not in the dictionary.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.setdefault:3\nmsgid \"Return the value for key if key is in the dictionary, else default.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_get:1\nmsgid \"Return the value of a meta field for a key.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_set:1\nmsgid \"Set the meta field for a key to a new value.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_list:1\nmsgid \"Return an iterable of meta field names defined for a key.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/contact.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../contact.rst:3\nmsgid \"Contact\"\nmsgstr \"\"\n\n#: ../../contact.rst:6\nmsgid \"About the Author\"\nmsgstr \"\"\n\n#: ../../contact.rst:7\nmsgid \"\"\n\"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy \"\n\"behind this website. I'm 27 years old and studying computer science at the \"\n\"Georg-August-University in Göttingen, Germany. Python is my favorite \"\n\"language, but I also code in ruby and JavaScript a lot. Watch me on `twitter\"\n\" <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub \"\n\"<http://github.com/defnull>`_ to get in contact. A `mailinglist \"\n\"<http://groups.google.de/group/bottlepy>`_ is open for Bottle related \"\n\"questions, too.\"\nmsgstr \"\"\n\n#: ../../contact.rst:10\nmsgid \"About Bottle\"\nmsgstr \"关于Bottle\"\n\n#: ../../contact.rst:11\nmsgid \"\"\n\"This is my first open source project so far. It started and a small \"\n\"experiment but soon got so much positive feedback I decided to make \"\n\"something real out of it. Here it is.\"\nmsgstr \"\"\n\n#: ../../contact.rst:14\nmsgid \"Impressum und Kontaktdaten\"\nmsgstr \"\"\n\n#: ../../contact.rst:15\nmsgid \"\"\n\"(This is required by `German law \"\n\"<http://bundesrecht.juris.de/tmg/__5.html>`_)\"\nmsgstr \"\"\n\n#: ../../contact.rst:17\nmsgid \"\"\n\"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die \"\n\"Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen \"\n\"vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist \"\n\"ausdrücklich untersagt.\"\nmsgstr \"\"\n\n#: ../../contact.rst:22\nmsgid \"**Betreiber**: Marcel Hellkamp\"\nmsgstr \"\"\n\n#: ../../contact.rst:23\nmsgid \"**Ort**: D - 37075 Göttingen\"\nmsgstr \"\"\n\n#: ../../contact.rst:24\nmsgid \"**Strasse**: Theodor-Heuss Strasse 13\"\nmsgstr \"\"\n\n#: ../../contact.rst:25\nmsgid \"**Telefon**: +49 (0) 551 20005915\"\nmsgstr \"\"\n\n#: ../../contact.rst:26\nmsgid \"**E-Mail**: marc at gsites dot de\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/deployment.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../deployment.rst:27\nmsgid \"Deployment\"\nmsgstr \"部署\"\n\n#: ../../deployment.rst:29\nmsgid \"\"\n\"The bottle :func:`run` function, when called without any parameters, starts \"\n\"a local development server on port 8080. You can access and test your \"\n\"application via http://localhost:8080/ if you are on the same host.\"\nmsgstr \"不添加任何参数，直接运行Bottle的 :func:`run` 函数，会启动一个本地的开发服务器，监听8080端口。你可在同一部主机上访问http://localhost:8080/来测试你的应用。\"\n\n#: ../../deployment.rst:31\nmsgid \"\"\n\"To get your application available to the outside world, specify the IP the \"\n\"server should listen to (e.g. ``run(host='192.168.0.1')``) or let the server\"\n\" listen to all interfaces at once (e.g. ``run(host='0.0.0.0')``). The \"\n\"listening port can be changed in a similar way, but you need root or admin \"\n\"rights to choose a port below 1024. Port 80 is the standard for HTTP \"\n\"servers::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:37\nmsgid \"Server Options\"\nmsgstr \"可选服务器\"\n\n#: ../../deployment.rst:39\nmsgid \"\"\n\"The built-in default server is based on `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-\"\n\"wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine \"\n\"for development, but may become a performance bottleneck when server load \"\n\"increases. There are three ways to eliminate this bottleneck:\"\nmsgstr \"\"\n\n#: ../../deployment.rst:41\nmsgid \"\"\n\"Use a different server that is either multi-threaded or supports \"\n\"asynchronous IO.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:42\nmsgid \"\"\n\"Start multiple server processes and spread the load with a load-balancer.\"\nmsgstr \"运行多个服务器，使用负载均衡\"\n\n#: ../../deployment.rst:43\nmsgid \"Do both.\"\nmsgstr \"同时使用上面两种方法\"\n\n#: ../../deployment.rst:45\nmsgid \"\"\n\"**Multi-threaded** servers are the 'classic' way to do it. They are very \"\n\"robust, reasonably fast and easy to manage. As a drawback, they can only \"\n\"handle a limited number of connections at the same time and utilize only one\"\n\" CPU core due to the \\\"Global Interpreter Lock\\\" (GIL) of the Python \"\n\"runtime. This does not hurt most applications, they are waiting for network \"\n\"IO most of the time anyway, but may slow down CPU intensive tasks (e.g. \"\n\"image processing).\"\nmsgstr \"\"\n\n#: ../../deployment.rst:47\nmsgid \"\"\n\"**Asynchronous IO** servers are very fast, can handle a virtually unlimited \"\n\"number of concurrent connections and are easy to manage. To take full \"\n\"advantage of their potential, you need to design your application \"\n\"accordingly and understand the concepts of the specific server.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:49\nmsgid \"\"\n\"**Multi-processing** (forking) servers are not limited by the GIL and \"\n\"utilize more than one CPU core, but make communication between server \"\n\"instances more expensive. You need a database or external message query to \"\n\"share state between processes, or design your application so that it does \"\n\"not need any shared state. The setup is also a bit more complicated, but \"\n\"there are good tutorials available.\"\nmsgstr \"**多进程** (forking) 服务器就没有受到GIL的限制，能利用多个CPU核心，但服务器实例之间的交流代价比较高昂。你需要一个数据库或消息队列来在进程之间共享状态，或将你的应用设计成根本不需要共享状态。多进程服务器的安装也比较负责，但已经有很多好的教程了。\"\n\n#: ../../deployment.rst:52\nmsgid \"Switching the Server Backend\"\nmsgstr \"更改服务器后端\"\n\n#: ../../deployment.rst:54\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded default server::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:58\nmsgid \"\"\n\"Bottle ships with a lot of ready-to-use adapters for the most common WSGI \"\n\"servers and automates the setup process. Here is an incomplete list:\"\nmsgstr \"Bottle为很多常见的WSGI服务器都编写了适配器，能自动化安装过程。下面是一个不完整的清单:\"\n\n#: ../../deployment.rst:61\nmsgid \"Name\"\nmsgstr \"名称\"\n\n#: ../../deployment.rst:61\nmsgid \"Homepage\"\nmsgstr \"主页\"\n\n#: ../../deployment.rst:61\nmsgid \"Description\"\nmsgstr \"描述\"\n\n#: ../../deployment.rst:63\nmsgid \"cgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:63\nmsgid \"Run as CGI script\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"flup_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:64\nmsgid \"Run as FastCGI process\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"gae_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:65\nmsgid \"Helper for Google App Engine deployments\"\nmsgstr \"用于Google App Engine\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"wsgiref_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:66\nmsgid \"Single-threaded default server\"\nmsgstr \"默认的单线程服务器\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"cherrypy_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:67\nmsgid \"Multi-threaded and very stable\"\nmsgstr \"多线程，稳定\"\n\n#: ../../deployment.rst:68\nmsgid \"paste\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"paste_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:68\nmsgid \"Multi-threaded, stable, tried and tested\"\nmsgstr \"多线程，稳定，久经考验，充分测试\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"waitress_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:69\nmsgid \"Multi-threaded, poweres Pyramid\"\nmsgstr \"多线程，源于Pyramid\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"gunicorn_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:70\nmsgid \"Pre-forked, partly written in C\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"eventlet_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:71\nmsgid \"Asynchronous framework with WSGI support.\"\nmsgstr \"支持WSGI的异步框架\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72\nmsgid \"gevent_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:72 ../../deployment.rst:73\nmsgid \"Asynchronous (greenlets)\"\nmsgstr \"异步 (greenlets)\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel\"\nmsgstr \"\"\n\n#: ../../deployment.rst:73\nmsgid \"diesel_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"tornado_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:74\nmsgid \"Asynchronous, powers some parts of Facebook\"\nmsgstr \"异步，支撑Facebook的部分应用\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"twisted_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:75\nmsgid \"Asynchronous, well tested but... twisted\"\nmsgstr \"异步, well tested but... twisted\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"meinheld_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:76\nmsgid \"Asynchronous, partly written in C\"\nmsgstr \"异步，部分用C语言编写\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"bjoern_\"\nmsgstr \"\"\n\n#: ../../deployment.rst:77\nmsgid \"Asynchronous, very fast and written in C\"\nmsgstr \"异步，用C语言编写，非常快\"\n\n#: ../../deployment.rst:78\nmsgid \"auto\"\nmsgstr \"\"\n\n#: ../../deployment.rst:78\nmsgid \"Automatically selects an available server adapter\"\nmsgstr \"自动选择一个可用的服务器\"\n\n#: ../../deployment.rst:81\nmsgid \"The full list is available through :data:`server_names`.\"\nmsgstr \"完整的列表在 :data:`server_names` 。\"\n\n#: ../../deployment.rst:83\nmsgid \"\"\n\"If there is no adapter for your favorite server or if you need more control \"\n\"over the server setup, you may want to start the server manually. Refer to \"\n\"the server documentation on how to run WSGI applications. Here is an example\"\n\" for paste_::\"\nmsgstr \"如果没有适合你的服务器的适配器，或者你需要更多地控制服务器的安装，你也许需要手动启动服务器。可参考你的服务器的文档，看看是如何运行一个WSGI应用。下面是一个使用 paste_ 的例子。\"\n\n#: ../../deployment.rst:91\nmsgid \"Apache mod_wsgi\"\nmsgstr \"\"\n\n#: ../../deployment.rst:93\nmsgid \"\"\n\"Instead of running your own HTTP server from within Bottle, you can attach \"\n\"Bottle applications to an `Apache server <apache>`_ using mod_wsgi_.\"\nmsgstr \"除了直接在Bottle里面运行HTTP服务器，你也可以将你的应用部署到一个Apache服务器上，使用 mod_wsgi_ 来运行。\"\n\n#: ../../deployment.rst:95\nmsgid \"\"\n\"All you need is an ``app.wsgi`` file that provides an ``application`` \"\n\"object. This object is used by mod_wsgi to start your application and should\"\n\" be a WSGI-compatible Python callable.\"\nmsgstr \"你需要的只是提供一个 ``application`` 对象的 ``app.wsgi`` 文件。mod_wsgi会使用这个对象来启动你的应用，这个对象必须是兼容WSGI的 callable对象。\"\n\n#: ../../deployment.rst:97\nmsgid \"File ``/var/www/yourapp/app.wsgi``::\"\nmsgstr \" ``/var/www/yourapp/app.wsgi`` 文件 \"\n\n#: ../../deployment.rst:108\nmsgid \"The Apache configuration may look like this::\"\nmsgstr \"Apache的配置\"\n\n#: ../../deployment.rst:126\nmsgid \"uWSGI\"\nmsgstr \"\"\n\n#: ../../deployment.rst:128\nmsgid \"\"\n\"uWSGI_ is a modern alternative to FastCGI and the recommended deployment \"\n\"option on servers like nginx_, lighttpd_, and cherokee_. The uWSGI project \"\n\"provides an application server that runs your application, and defines a \"\n\"protocol that frontend webservers can speak to. Have a look at the excellent\"\n\" `Quickstart for Python/WSGI applications <https://uwsgi-\"\n\"docs.readthedocs.io/en/latest/WSGIquickstart.html>`_.\"\nmsgstr \"\"\n\n#: ../../deployment.rst:132\nmsgid \"Google AppEngine\"\nmsgstr \"\"\n\n#: ../../deployment.rst:136\nmsgid \"\"\n\"New App Engine applications using the Python 2.7 runtime environment support\"\n\" any WSGI application and should be configured to use the Bottle application\"\n\" object directly. For example suppose your application's main module is \"\n\"``myapp.py``::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:146\nmsgid \"\"\n\"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object \"\n\"like so::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:158\nmsgid \"\"\n\"It is always a good idea to let GAE serve static files directly. Here is \"\n\"example for a working  ``app.yaml`` (using the legacy Python 2.5 runtime \"\n\"environment)::\"\nmsgstr \"\"\n\n#: ../../deployment.rst:175\nmsgid \"Load Balancer (Manual Setup)\"\nmsgstr \"负载均衡 (手动安装)\"\n\n#: ../../deployment.rst:177\nmsgid \"\"\n\"A single Python process can utilize only one CPU at a time, even if there \"\n\"are more CPU cores available. The trick is to balance the load between \"\n\"multiple independent Python processes to utilize all of your CPU cores.\"\nmsgstr \"单一的Python进程一次只能使用一个CPU内核，即使CPU是多核的。我们的方法就是在多核CPU的机器上，使用多线程来实现负载均衡。\"\n\n#: ../../deployment.rst:179\nmsgid \"\"\n\"Instead of a single Bottle application server, you start one instance for \"\n\"each CPU core available using different local port (localhost:8080, 8081, \"\n\"8082, ...). You can choose any server adapter you want, even asynchronous \"\n\"ones. Then a high performance load balancer acts as a reverse proxy and \"\n\"forwards each new requests to a random port, spreading the load between all \"\n\"available back-ends. This way you can use all of your CPU cores and even \"\n\"spread out the load between different physical servers.\"\nmsgstr \"不只是启动一个应用服务器，你需要同时启动多个应用服务器，监听不同的端口(localhost:8080, 8081, 8082, ...)。你可选择任何服务器，甚至那些异步服务器。然后一个高性能的负载均衡器，像一个反向代理那样工作，将新的请求发送到一个随机端口，在多个服务器之间分散压力。这样你就可以利用所有的CPU核心，甚至在多个机器上实现负载均衡。\"\n\n#: ../../deployment.rst:181\nmsgid \"\"\n\"One of the fastest load balancers available is Pound_ but most common web \"\n\"servers have a proxy-module that can do the work just fine.\"\nmsgstr \" Pound_ 是最快的负载均衡器之一，但是只要有代理模块的Web服务器，也可以充当这一角色。\"\n\n#: ../../deployment.rst:183\nmsgid \"Pound example::\"\nmsgstr \"Pound的例子::\"\n\n#: ../../deployment.rst:201\nmsgid \"Apache example::\"\nmsgstr \"Apache的例子::\"\n\n#: ../../deployment.rst:209\nmsgid \"Lighttpd example::\"\nmsgstr \"Lighttpd的例子::\"\n\n#: ../../deployment.rst:221\nmsgid \"Good old CGI\"\nmsgstr \"CGI这个老好人\"\n\n#: ../../deployment.rst:223\nmsgid \"\"\n\"A CGI server starts a new process for each request. This adds a lot of \"\n\"overhead but is sometimes the only option, especially on cheap hosting \"\n\"packages. The `cgi` server adapter does not actually start a CGI server, but\"\n\" transforms your bottle application into a valid CGI application::\"\nmsgstr \"CGI服务器会为每个请求启动一个进程。虽然这样代价高昂，但有时这是唯一的选择。 `cgi` 这个适配器实际上并没有启动一个CGI服务器，只是将你的Bottle应用转换成了一个有效的CGI应用。\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/development.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../development.rst:2\nmsgid \"Developer Notes\"\nmsgstr \"开发者笔记\"\n\n#: ../../development.rst:4\nmsgid \"\"\n\"This document is intended for developers and package maintainers interested \"\n\"in the bottle development and release workflow. If you want to contribute, \"\n\"you are just right!\"\nmsgstr \"这份文档是为那些对Bottle的开发和发布流程感兴趣的开发者和软件包维护者准备的。如果你想要做贡献，看它是对的！\"\n\n#: ../../development.rst:8\nmsgid \"Get involved\"\nmsgstr \"参与进来\"\n\n#: ../../development.rst:10\nmsgid \"\"\n\"There are several ways to join the community and stay up to date. Here are \"\n\"some of them:\"\nmsgstr \"有多种加入社区的途径，保持消息的灵通。这里是一些方法:\"\n\n#: ../../development.rst:12\nmsgid \"\"\n\"**Mailing list**: Join our mailing list by sending an email to \"\n\"`bottlepy+subscribe@googlegroups.com \"\n\"<mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required).\"\nmsgstr \"**邮件列表**: 发送邮件到 `bottlepy+subscribe@googlegroups.com <mailto:bottlepy+subscribe@googlegroups.com>`_ 以加入我们的邮件列表(无需Google账户)\"\n\n#: ../../development.rst:13\nmsgid \"\"\n\"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or \"\n\"search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag.\"\nmsgstr \"\"\n\n#: ../../development.rst:14\nmsgid \"\"\n\"**IRC**: Join `#bottlepy on irc.freenode.net \"\n\"<irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"**IRC**: 加入 `#irc.freenode.net上的bottlepy频道 <irc://irc.freenode.net/bottlepy>`_ 或使用 `web聊天界面 <http://webchat.freenode.net/?channels=bottlepy>`_ \"\n\n#: ../../development.rst:15\nmsgid \"\"\n\"**Google plus**: We sometimes `blog about Bottle, releases and technical \"\n\"stuff \"\n\"<https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_\"\n\" on our Google+ page.\"\nmsgstr \"**Google plus**: 有时我们会在Google+页面上发表一些 `与Bottle有关的博客 <https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_ \"\n\n#: ../../development.rst:19\nmsgid \"Get the Sources\"\nmsgstr \"获取源代码\"\n\n#: ../../development.rst:21\nmsgid \"\"\n\"The bottle `development repository <https://github.com/bottlepy/bottle>`_ \"\n\"and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are \"\n\"both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan \"\n\"to contribute, it is a good idea to create an account there and fork the \"\n\"main repository. This way your changes and ideas are visible to other \"\n\"developers and can be discussed openly. Even without an account, you can \"\n\"clone the repository or just download the latest development version as a \"\n\"source archive.\"\nmsgstr \"Bottle的 `开发仓库 <https://github.com/bottlepy/bottle>`_ 和 `问题追踪 <https://github.com/bottlepy/bottle/issues>`_ 都搭建在 `github <https://github.com/bottlepy/bottle>`_ 上面。如果你打算做贡献，创建一个github帐号然后fork一下吧。你做出的更改或建议都可被其他开发者看到，可以一起讨论。即使没有github帐号，你也可以clone代码仓库，或下载最新开发版本的压缩包。\"\n\n#: ../../development.rst:23\nmsgid \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\nmsgstr \"**git:** ``git clone git://github.com/bottlepy/bottle.git``\"\n\n#: ../../development.rst:24\nmsgid \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\nmsgstr \"**git/https:** ``git clone https://github.com/bottlepy/bottle.git``\"\n\n#: ../../development.rst:25\nmsgid \"\"\n\"**Download:** Development branch as `tar archive \"\n\"<http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file \"\n\"<http://github.com/bottlepy/bottle/zipball/master>`_.\"\nmsgstr \"**Download:** Development branch as `tar archive <http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file <http://github.com/bottlepy/bottle/zipball/master>`_.\"\n\n#: ../../development.rst:26\nmsgid \"\"\n\"**Translations:** `transifex.com/projects/p/bottle \"\n\"<https://www.transifex.com/projects/p/bottle/>`_\"\nmsgstr \"\"\n\n#: ../../development.rst:30\nmsgid \"Releases and Updates\"\nmsgstr \"发布和更新\"\n\n#: ../../development.rst:32\nmsgid \"\"\n\"Bottle is released at irregular intervals and distributed through `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-\"\n\"revisions of outdated releases are only available from the git repository \"\n\"mentioned above. Some Linux distributions may offer packages for outdated \"\n\"releases, though.\"\nmsgstr \"\"\n\n#: ../../development.rst:34\nmsgid \"\"\n\"The Bottle version number splits into three parts \"\n\"(**major.minor.revision**). These are *not* used to promote new features but\"\n\" to indicate important bug-fixes and/or API changes. Critical bugs are fixed\"\n\" in at least the two latest minor releases and announced in all available \"\n\"channels (mailinglist, twitter, github). Non-critical bugs or features are \"\n\"not guaranteed to be backported. This may change in the future, through.\"\nmsgstr \"Bottle的版本号分隔为三个部分(**major.minor.revision**)。版本号 *不会* 用于引入新特征，只是为了指出重要的bug-fix或API的改动。关键的bug会在近两个新的版本中修复，然后通过所有渠道发布(邮件列表, twitter, github)。不重要的bug修复或特征不保证添加到旧版本中。这个情况在未来也许会改变。\"\n\n#: ../../development.rst:37\nmsgid \"Major Release (x.0)\"\nmsgstr \"\"\n\n#: ../../development.rst:37\nmsgid \"\"\n\"The major release number is increased on important milestones or updates \"\n\"that completely break backward compatibility. You probably have to work over\"\n\" your entire application to use a new release. These releases are very rare,\"\n\" through.\"\nmsgstr \"在重要的里程碑达成或新的更新和旧版本彻底不兼容时，会增加major版本号。为了使用新版本，你也许需要修改整个应用，但major版本号极少会改变。\"\n\n#: ../../development.rst:40\nmsgid \"Minor Release (x.y)\"\nmsgstr \"\"\n\n#: ../../development.rst:40\nmsgid \"\"\n\"The minor release number is increased on updates that change the API or \"\n\"behaviour in some way. You might get some depreciation warnings any may have\"\n\" to tweak some configuration settings to restore the old behaviour, but in \"\n\"most cases these changes are designed to be backward compatible for at least\"\n\" one minor release. You should update to stay up do date, but don't have to.\"\n\" An exception is 0.8, which *will* break backward compatibility hard. (This \"\n\"is why 0.7 was skipped). Sorry about that.\"\nmsgstr \"在更改了API之后，或增加minor版本号。你可能会收到一些API已过时的警告，调整设置以继续使用旧的特征，但在大多数情况下，这些更新都会对旧版本兼容。你应当保持更新，但这不是必须的。0.8版本是一个特例，它 *不兼容* 旧版本(所以我们跳过了0.7版本直接发布0.8版本)，不好意思。\"\n\n#: ../../development.rst:43\nmsgid \"Revision (x.y.z)\"\nmsgstr \"\"\n\n#: ../../development.rst:43\nmsgid \"\"\n\"The revision number is increased on bug-fixes and other patches that do not \"\n\"change the API or behaviour. You can safely update without editing your \"\n\"application code. In fact, you really should as soon as possible, because \"\n\"important security fixes are released this way.\"\nmsgstr \"在修复了一些bug，和改动不会修改API的时候，会增加revision版本号。你可以放心更新，而不用修改你应用的代码。事实上，你确实应该更新这类版本，因为它常常修复一些安全问题。\"\n\n#: ../../development.rst:47\nmsgid \"Pre-Release Versions\"\nmsgstr \"\"\n\n#: ../../development.rst:46\nmsgid \"\"\n\"Release candidates are marked by an ``rc`` in their revision number. These \"\n\"are API stable most of the time and open for testing, but not officially \"\n\"released yet. You should not use these for production.\"\nmsgstr \"RC版本会在版本号中添加 ``rc`` 字样。API已基本稳定，已经开放测试，但还没正式发布。你不应该在生产环境中使用rc版本。\"\n\n#: ../../development.rst:50\nmsgid \"Repository Structure\"\nmsgstr \"代码仓库结构\"\n\n#: ../../development.rst:52\nmsgid \"The source repository is structured as follows:\"\nmsgstr \"代码仓库的结构如下:\"\n\n#: ../../development.rst:55\nmsgid \"``master`` branch\"\nmsgstr \"\"\n\n#: ../../development.rst:55\nmsgid \"\"\n\"This is the integration, testing and development branch. All changes that \"\n\"are planned to be part of the next release are merged and tested here.\"\nmsgstr \"该分支用于集成，测试和开发。所有计划添加到下一版本的改动，会在这里合并和测试。\"\n\n#: ../../development.rst:58\nmsgid \"``release-x.y`` branches\"\nmsgstr \"\"\n\n#: ../../development.rst:58\nmsgid \"\"\n\"As soon as the master branch is (almost) ready for a new release, it is \"\n\"branched into a new release branch. This \\\"release candidate\\\" is feature-\"\n\"frozen but may receive bug-fixes and last-minute changes until it is \"\n\"considered production ready and officially released. From that point on it \"\n\"is called a \\\"support branch\\\" and still receives bug-fixes, but only \"\n\"important ones. The revision number is increased on each push to these \"\n\"branches, so you can keep up with important changes.\"\nmsgstr \"只要master分支已经可以用来发布一个新的版本，它会被安排到一个新的发行分支里面。在RC阶段，不再添加或删除特征，只接受bug-fix和小改动，直到认为它可以用于生产环境和正式发布。基于这点考虑，我们称之为“支持分支(support branch)”，依然接受bug-fix，但仅限关键的bug-fix。每次更改后，版本号都会更新，这样你就能及时获取重要的改动了。\"\n\n#: ../../development.rst:62\nmsgid \"Feature branches\"\nmsgstr \"\"\n\n#: ../../development.rst:61\nmsgid \"\"\n\"All other branches are feature branches. These are based on the master \"\n\"branch and only live as long as they are still active and not merged back \"\n\"into ``master``.\"\nmsgstr \"所有这类分支都是用于新增特征的。基于master分支，在开发、合并完毕后，就会被删除。\"\n\n#: ../../development.rst:65\nmsgid \"What does this mean for a developer?\"\nmsgstr \"对于开发者，这意味着什么？\"\n\n#: ../../development.rst:66\nmsgid \"\"\n\"If you want to add a feature, create a new branch from ``master``. If you \"\n\"want to fix a bug, branch ``release-x.y`` for each affected release. Please \"\n\"use a separate branch for each feature or bug to make integration as easy as\"\n\" possible. Thats all. There are git workflow examples at the bottom of this \"\n\"page.\"\nmsgstr \"如果你想添加一个特征，可以从 ``master`` 分支创建一个分支。如果你想修复一个bug，可从 ``release-x.y`` 这类分支创建一个分支。无论是添加特征还是修复bug，都建议在一个独立的分支上进行，这样合并工作就简单了。就这些了！在页面底部会有git工作流程的例子。\"\n\n#: ../../development.rst:68\nmsgid \"\"\n\"Oh, and never ever change the release number. We'll do that on integration. \"\n\"You never know in which order we pull pending requests anyway :)\"\nmsgstr \"Oh，请不要修改版本号。我们会在集成的时候进行修改。因为你不知道我们什么时候会将你的request pull下来:)\"\n\n#: ../../development.rst:72\nmsgid \"What does this mean for a maintainer ?\"\nmsgstr \"对于软件包维护者，这意味着什么？\"\n\n#: ../../development.rst:73\nmsgid \"\"\n\"Watch the tags (and the mailing list) for bug-fixes and new releases. If you\"\n\" want to fetch a specific release from the git repository, trust the tags, \"\n\"not the branches. A branch may contain changes that are not released yet, \"\n\"but a tag marks the exact commit which changed the version number.\"\nmsgstr \"关注那些bugfix和新版本的tag，还有邮件列表。如果你想从代码仓库中获取特定的版本，请使用tag，而不是分支。分支中也许会包含一些未发布的改动，但tag会标记是那个commit更改了版本号。\"\n\n#: ../../development.rst:77\nmsgid \"Submitting Patches\"\nmsgstr \"提交补丁\"\n\n#: ../../development.rst:79\nmsgid \"\"\n\"The best way to get your changes integrated into the main development branch\"\n\" is to fork the main repository at github, create a new feature-branch, \"\n\"apply your changes and send a pull-request. Further down this page is a \"\n\"small collection of git workflow examples that may guide you. Submitting \"\n\"git-compatible patches to the mailing list is fine too. In any case, please \"\n\"follow some basic rules:\"\nmsgstr \"让你的补丁被集成进来的最好方法，是在github上面fork整个项目，创建一个新的分支，修改代码，然后发送一个pull-request。页面下方是git工作流程的例子，也许会有帮助。提交git兼容的补丁文件到邮件列表也是可以的。无论使用什么方法，请遵守以下的基本规则:\"\n\n#: ../../development.rst:81\nmsgid \"\"\n\"**Documentation:** Tell us what your patch does. Comment your code. If you \"\n\"introduced a new feature, add to the documentation so others can learn about\"\n\" it.\"\nmsgstr \"**文档：** 告诉我们你的补丁做了什么。注释你的代码。如果你添加了新的特征，请添加相应的使用方法。\"\n\n#: ../../development.rst:82\nmsgid \"\"\n\"**Test:** Write tests to prove that your code works as expected and does not\"\n\" break anything. If you fixed a bug, write at least one test-case that \"\n\"triggers the bug. Make sure that all tests pass before you submit a patch.\"\nmsgstr \"**测试：** 编写测试以证明你的补丁如期工作，且没有破坏任何东西。如果你修复了一个bug，至少写一个测试用例来触发这个bug。在提交补丁之前，请确保所有测试已通过。\"\n\n#: ../../development.rst:83\nmsgid \"\"\n\"**One patch at a time:** Only fix one bug or add one feature at a time. \"\n\"Design your patches so that they can be applyed as a whole. Keep your \"\n\"patches clean, small and focused.\"\nmsgstr \"**一次只提交一个补丁：** 一次只修改一个bug，一次只添加一个新特征。保持补丁的干净。\"\n\n#: ../../development.rst:84\nmsgid \"\"\n\"**Sync with upstream:** If the ``upstream/master`` branch changed while you \"\n\"were working on your patch, rebase or pull to make sure that your patch \"\n\"still applies without conflicts.\"\nmsgstr \"**与上流同步：** 如果在你编写补丁的时候， ``upstream/master`` 分支被修改了，那么先rebase或将新的修改pull下来，确保你的补丁在合并的时候不会造成冲突。\"\n\n#: ../../development.rst:88\nmsgid \"Building the Documentation\"\nmsgstr \"生成文档\"\n\n#: ../../development.rst:90\nmsgid \"\"\n\"You need a recent version of Sphinx to build the documentation. The \"\n\"recommended way is to install :command:`virtualenv` using your distribution \"\n\"package repository and install sphinx manually to get an up-to-date version.\"\nmsgstr \"你需要一个Sphinx的新版本来生产整份文档。建议将Sphinx安装到一个 :command:`virtualenv` 环境。\"\n\n#: ../../development.rst:121\nmsgid \"GIT Workflow Examples\"\nmsgstr \"GIT工作流程\"\n\n#: ../../development.rst:123\nmsgid \"\"\n\"The following examples assume that you have an (free) `github account \"\n\"<https://github.com>`_. This is not mandatory, but makes things a lot \"\n\"easier.\"\nmsgstr \"接下来的例子都假设你已经有一个 `git的免费帐号 <https://github.com>`_ 。虽然不是必须的，但可简单化很多东西。\"\n\n#: ../../development.rst:125\nmsgid \"\"\n\"First of all you need to create a fork (a personal clone) of the official \"\n\"repository. To do this, you simply click the \\\"fork\\\" button on the `bottle \"\n\"project page <https://github.com/bottlepy/bottle>`_. When the fork is done, \"\n\"you will be presented with a short introduction to your new repository.\"\nmsgstr \"首先，你需要从官方代码仓库创建一个fork。只需在 `bottle项目页面 <https://github.com/bottlepy/bottle>`_ 点击一下\\\"fork\\\"按钮就行了。创建玩fork之后，会得到一个关于这个新仓库的简介。\"\n\n#: ../../development.rst:127\nmsgid \"\"\n\"The fork you just created is hosted at github and read-able by everyone, but\"\n\" write-able only by you. Now you need to clone the fork locally to actually \"\n\"make changes to it. Make sure you use the private (read-write) URL and *not*\"\n\" the public (read-only) one::\"\nmsgstr \"你刚刚创建的fork托管在github上面，对所有人都是可见的，但只有你有修改的权限。现在你需要将其从线上clone下面，做出实际的修改。确保你使用的是(可写-可读)的私有URL，而不是(只读)的公开URL。\"\n\n#: ../../development.rst:131\nmsgid \"\"\n\"Once the clone is complete your repository will have a remote named \"\n\"\\\"origin\\\" that points to your fork on github. Don’t let the name confuse \"\n\"you, this does not point to the original bottle repository, but to your own \"\n\"fork. To keep track of the official repository, add another remote named \"\n\"\\\"upstream\\\"::\"\nmsgstr \"在你将代码仓库clone下来后，就有了一个\\\"origin\\\"分支，指向你在github上的fork。不要让名字迷惑了你，它并不指向bottle的官方代码仓库，只是指向你自己的fork。为了追踪官方的代码仓库，可添加一个新的\\\"upstream\\\"远程分支。\"\n\n#: ../../development.rst:137\nmsgid \"\"\n\"Note that \\\"upstream\\\" is a public clone URL, which is read-only. You cannot\"\n\" push changes directly to it. Instead, we will pull from your public \"\n\"repository. This is described later.\"\nmsgstr \"注意，\\\"upstream\\\"分支使用的是公开的URL，是只读的。你不能直接往该分支push东西，而是由我们来你的公开代码仓库pull，后面会讲到。\"\n\n#: ../../development.rst:140\nmsgid \"Submit a Feature\"\nmsgstr \"提交一个特征\"\n\n#: ../../development.rst:141\nmsgid \"\"\n\"New features are developed in separate feature-branches to make integration \"\n\"easy. Because they are going to be integrated into the ``master`` branch, \"\n\"they must be based on ``upstream/master``. To create a new feature-branch, \"\n\"type the following::\"\nmsgstr \"在独立的特征分支内开发新的特征，会令集成工作更简单。因为它们会被合并到 ``master`` 分支，所有它们必须是基于 ``upstream/master`` 的分支。下列命令创建一个特征分支。\"\n\n#: ../../development.rst:145\nmsgid \"\"\n\"Now implement your feature, write tests, update the documentation, make sure\"\n\" that all tests pass and commit your changes::\"\nmsgstr \"现在可开始写代码，写测试，更新文档。在提交更改之前，记得确保所有测试已经通过。\"\n\n#: ../../development.rst:149\nmsgid \"\"\n\"If the ``upstream/master`` branch changed in the meantime, there may be \"\n\"conflicts with your changes. To solve these, 'rebase' your feature-branch \"\n\"onto the top of the updated ``upstream/master`` branch::\"\nmsgstr \"与此同时，如果 ``upstream/master`` 这个分支有改动，那么你的提交就有可能造成冲突，可通过rebase操作来解决。\"\n\n#: ../../development.rst:154\nmsgid \"\"\n\"This is equivalent to undoing all your changes, updating your branch to the \"\n\"latest version and reapplying all your patches again. If you released your \"\n\"branch already (see next step), this is not an option because it rewrites \"\n\"your history. You can do a normal pull instead. Resolve any conflicts, run \"\n\"the tests again and commit.\"\nmsgstr \"这相当于先撤销你的所有改动，更新你的分支到最新版本，再重做你的所有改动。如果你已经发布了你的分支(下一步会提及)，这就不是一个好主意了，因为会覆写你的提交历史。这种情况下，你应该先将最新版本pull下来，手动解决所有冲突，运行测试，再提交。\"\n\n#: ../../development.rst:156\nmsgid \"\"\n\"Now you are almost ready to send a pull request. But first you need to make \"\n\"your feature-branch public by pushing it to your github fork::\"\nmsgstr \"现在，你已经做好准备发一个pull-request了。但首先你应该公开你的特征分支，很简单，将其push到你github的fork上面就行了。\"\n\n#: ../../development.rst:160\nmsgid \"\"\n\"After you’ve pushed your commit(s) you need to inform us about the new \"\n\"feature. One way is to send a pull-request using github. Another way would \"\n\"be to start a thread in the mailing-list, which is recommended. It allows \"\n\"other developers to see and discuss your patches and you get some feedback \"\n\"for free :)\"\nmsgstr \"在你push完你所有的commit之后，你需要告知我们这个新特征。一种办法是通过github发一个pull-request。另一种办法是把这个消息发到邮件列表，这也是我们推荐的方式，这样其他开发者就能看到和讨论你的补丁，你也能免费得到一些反馈 :)\"\n\n#: ../../development.rst:162\nmsgid \"\"\n\"If we accept your patch, we will integrate it into the official development \"\n\"branch and make it part of the next release.\"\nmsgstr \"如果我们接受了你的补丁，我们会将其集成到官方的开发分支中，它将成为下个发布版本的一部分。\"\n\n#: ../../development.rst:165\nmsgid \"Fix a Bug\"\nmsgstr \"修复Bug\"\n\n#: ../../development.rst:166\nmsgid \"\"\n\"The workflow for bug-fixes is very similar to the one for features, but \"\n\"there are some differences:\"\nmsgstr \"修复Bug和添加一个特征差不多，下面是一些不同点:\"\n\n#: ../../development.rst:168\nmsgid \"\"\n\"Branch off of the affected release branches instead of just the development \"\n\"branch.\"\nmsgstr \"修复所有受影响的分支，而不仅仅是开发分支(Branch off of the affected release branches instead of just the development branch)。\"\n\n#: ../../development.rst:169\nmsgid \"Write at least one test-case that triggers the bug.\"\nmsgstr \"至少编写一个触发该Bug的测试用例。\"\n\n#: ../../development.rst:170\nmsgid \"\"\n\"Do this for each affected branch including ``upstream/master`` if it is \"\n\"affected. ``git cherry-pick`` may help you reducing repetitive work.\"\nmsgstr \"修复所有受影响的分支，包括 ``upstream/master`` ，如果它也受影响。 ``git cherry-pick`` 可帮你完成一些重复工作。\"\n\n#: ../../development.rst:171\nmsgid \"\"\n\"Name your branch after the release it is based on to avoid confusion. \"\n\"Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``.\"\nmsgstr \"字后面要加上其修复的版本号，以防冲突。例子: ``my_bugfix-x.y`` 或 ``my_bugfix-dev`` 。\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/faq.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../faq.rst:10\nmsgid \"Frequently Asked Questions\"\nmsgstr \"常见问题\"\n\n#: ../../faq.rst:13\nmsgid \"About Bottle\"\nmsgstr \"关于Bottle\"\n\n#: ../../faq.rst:16\nmsgid \"Is bottle suitable for complex applications?\"\nmsgstr \"Bottle适合用于复杂的应用吗？\"\n\n#: ../../faq.rst:18\nmsgid \"\"\n\"Bottle is a *micro* framework designed for prototyping and building small \"\n\"web applications and services. It stays out of your way and allows you to \"\n\"get things done fast, but misses some advanced features and ready-to-use \"\n\"solutions found in other frameworks (MVC, ORM, form validation, scaffolding,\"\n\" XML-RPC). Although it *is* possible to add these features and build complex\"\n\" applications with Bottle, you should consider using a full-stack Web \"\n\"framework like pylons_ or paste_ instead.\"\nmsgstr \"Bottle是一个 *迷你* 框架，被设计来提供原型开发和创建小的Web应用和服务。它能快速上手，并帮助你快速完成任务，但缺少一些高级功能和一些其他框架已提供的已知问题解决方法(例如:MVC， ORM，表单验证，手脚架，XML-RPC)。尽管 *可以* 添加这些功能，然后通过Bottle来开发复杂的应用，但我们还是建议你使用一些功能完备的Web框架，例如 pylons_ 或 paste_ 。\"\n\n#: ../../faq.rst:22\nmsgid \"Common Problems and Pitfalls\"\nmsgstr \"常见的，意料之外的问题\"\n\n#: ../../faq.rst:29\nmsgid \"\\\"Template Not Found\\\" in mod_wsgi/mod_python\"\nmsgstr \"在mod_wsgi/mod_python中的 \\\"Template Not Found\\\" 错误\"\n\n#: ../../faq.rst:31\nmsgid \"\"\n\"Bottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ \"\n\"or mod_wsgi_ environment, the working directory (``./``) depends on your \"\n\"Apache settings. You should add an absolute path to the template search \"\n\"path::\"\nmsgstr \"Bottle会在 ``./`` 和 ``./views/`` 目录中搜索模板。在一个 mod_python_ 或 mod_wsgi_ 环境，当前工作目录( ``./`` )是由Apache的设置决定的。你应该在模板的搜索路径中添加一个绝对路径。\"\n\n#: ../../faq.rst:35\nmsgid \"so bottle searches the right paths.\"\nmsgstr \"这样，Bottle就能在正确的目录下搜索模板了\"\n\n#: ../../faq.rst:38\nmsgid \"Dynamic Routes and Slashes\"\nmsgstr \"动态route和反斜杠\"\n\n#: ../../faq.rst:40\nmsgid \"\"\n\"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder \"\n\"token (``<name>``) matches everything up to the next slash. This equals to \"\n\"``[^/]+`` in regular expression syntax. To accept slashes too, you have to \"\n\"add a custom regular pattern to the placeholder. An example: \"\n\"``/images/<filepath:path>`` would match ``/images/icons/error.png`` but \"\n\"``/images/<filename>`` won't.\"\nmsgstr \"\"\n\n#: ../../faq.rst:43\nmsgid \"Problems with reverse proxies\"\nmsgstr \"反向代理的问题\"\n\n#: ../../faq.rst:45\nmsgid \"\"\n\"Redirects and url-building only works if bottle knows the public address and\"\n\" location of your application. If you run bottle locally behind a reverse \"\n\"proxy or load balancer, some information might get lost along the way. For \"\n\"example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect \"\n\"the local request by your proxy, not the real request by the client. Here is\"\n\" a small WSGI middleware snippet that helps to fix these values::\"\nmsgstr \"只用Bottle知道公共地址和应用位置的情况下，重定向和url-building才会起作用。(译者注：保留原文)Redirects and url-building only works if bottle knows the public address and location of your application.如果Bottle应用运行在反向代理或负载均衡后面，一些信息也许会丢失。例如， ``wsgi.url_scheme`` 的值或 ``Host`` 头或许只能获取到代理的请求信息，而不是真实的用户请求。下面是一个简单的中间件代码片段，处理上面的问题，获取正确的值。\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\n# Dormouse Young <dormouse.young@gmail.com>, 2016\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../index.rst:20\nmsgid \"Bottle: Python Web Framework\"\nmsgstr \"Bottle ： Python Web 框架\"\n\n#: ../../index.rst:22\nmsgid \"\"\n\"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for \"\n\"Python_. It is distributed as a single file module and has no dependencies \"\n\"other than the `Python Standard Library <http://docs.python.org/library/>`_.\"\nmsgstr \"Bottle 是一个快速、简单、轻量级的 Python_ WSGI_ 微型 Web 框架。它只有一个文件，只依赖 `Python 标准库 <http://docs.python.org/library/>`_ 。\"\n\n#: ../../index.rst:25\nmsgid \"\"\n\"**Routing:** Requests to function-call mapping with support for clean and  \"\n\"dynamic URLs.\"\nmsgstr \"**URL映射(Routing):** 将URL请求映射到Python函数，支持动态URL，且URL更简洁。\"\n\n#: ../../index.rst:26\nmsgid \"\"\n\"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-\"\n\"templates>` and support for mako_, jinja2_ and cheetah_ templates.\"\nmsgstr \"**模板(Templates):** 快速且pythonic的 :ref:`内置模板引擎 <tutorial-templates>` ，同时支持 mako_ , jinja2_ 和 cheetah_ 等模板。\"\n\n#: ../../index.rst:27\nmsgid \"\"\n\"**Utilities:** Convenient access to form data, file uploads, cookies, \"\n\"headers and other HTTP-related metadata.\"\nmsgstr \"**基础功能(Utilities):** 方便地访问表单数据，上传文件，使用cookie，查看HTTP元数据。\"\n\n#: ../../index.rst:28\nmsgid \"\"\n\"**Server:** Built-in HTTP development server and support for paste_, \"\n\"bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server.\"\nmsgstr \"\"\n\n#: ../../index.rst:31\nmsgid \"Example: \\\"Hello World\\\" in a bottle\"\nmsgstr \"示例： \\\"Hello World\\\"\"\n\n#: ../../index.rst:42\nmsgid \"\"\n\"Run this script or paste it into a Python console, then point your browser \"\n\"to `<http://localhost:8080/hello/world>`_. That's it.\"\nmsgstr \"将其保存为py文件并执行，用浏览器访问 `<http://localhost:8080/hello/world>`_ 即可看到效果。就这么简单！\"\n\n#: ../../index.rst:45\nmsgid \"Download and Install\"\nmsgstr \"下载和安装\"\n\n#: ../../index.rst:48\nmsgid \"\"\n\"Install the latest stable release with ``pip install bottle`` or download \"\n\"`bottle.py`__ (unstable) into your project directory. There are no hard [1]_\"\n\" dependencies other than the Python standard library. Bottle supports \"\n\"**Python 2.7 and Python 3**.\"\nmsgstr \"\"\n\n#: ../../index.rst:50\nmsgid \"Support for Python 2.5 and 2.6 was dropped with this release.\"\nmsgstr \"\"\n\n#: ../../index.rst:55\nmsgid \"User's Guide\"\nmsgstr \"用户指南\"\n\n#: ../../index.rst:56\nmsgid \"\"\n\"Start here if you want to learn how to use the bottle framework for web \"\n\"development. If you have any questions not answered here, feel free to ask \"\n\"the `mailing list <mailto:bottlepy@googlegroups.com>`_.\"\nmsgstr \"如果你有将Bottle用于Web开发的打算，请继续看下去。如果这份文档没有解决你遇到的问题，尽管在 `邮件列表 <mailto:bottlepy@googlegroups.com>`_ 中吼出来吧（译者注：用英文哦）。\"\n\n#: ../../index.rst:71\nmsgid \"Knowledge Base\"\nmsgstr \"知识库\"\n\n#: ../../index.rst:72\nmsgid \"A collection of articles, guides and HOWTOs.\"\nmsgstr \"收集文章，使用指南和HOWTO\"\n\n#: ../../index.rst:84\nmsgid \"Development and Contribution\"\nmsgstr \"开发和贡献\"\n\n#: ../../index.rst:86\nmsgid \"\"\n\"These chapters are intended for developers interested in the bottle \"\n\"development and release workflow.\"\nmsgstr \"这些章节是为那些对Bottle的开发和发布流程感兴趣的开发者准备的。\"\n\n#: ../../index.rst:103\nmsgid \"License\"\nmsgstr \"许可证\"\n\n#: ../../index.rst:105\nmsgid \"Code and documentation are available according to the MIT License:\"\nmsgstr \"代码和文件皆使用MIT许可证:\"\n\n#: ../../index.rst:110\nmsgid \"\"\n\"The Bottle logo however is *NOT* covered by that license. It is allowed to \"\n\"use the logo as a link to the bottle homepage or in direct context with the \"\n\"unmodified library. In all other cases please ask first.\"\nmsgstr \"然而，许可证 *不包含* Bottle的logo。logo用作指向Bottle主页的连接，或未修改过的类库。如要用于其它用途，请先请求许可。\"\n\n#: ../../index.rst:115\nmsgid \"Footnotes\"\nmsgstr \"脚注\"\n\n#: ../../index.rst:116\nmsgid \"\"\n\"Usage of the template or server adapter classes requires the corresponding \"\n\"template or server modules.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/plugindev.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../plugindev.rst:6\nmsgid \"Plugin Development Guide\"\nmsgstr \"插件开发指南\"\n\n#: ../../plugindev.rst:8\nmsgid \"\"\n\"This guide explains the plugin API and how to write custom plugins. I \"\n\"suggest reading :ref:`plugins` first if you have not done that already. You \"\n\"might also want to have a look at the :doc:`/plugins/index` for some \"\n\"practical examples.\"\nmsgstr \"这份指南介绍了插件的API，以及如何编写自己的插件。我建议先阅读 :ref:`plugins` 这一部分，再看这份指南。 :doc:`/plugins/index` 这里也有一些实际的例子。\"\n\n#: ../../plugindev.rst:12\nmsgid \"\"\n\"This is a draft. If you see any errors or find that a specific part is not \"\n\"explained clear enough, please tell the `mailing-list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or file a `bug report \"\n\"<https://github.com/bottlepy/bottle/issues>`_.\"\nmsgstr \"这是一份初稿。如果你发现了任何错误，或某些部分解释的不够清楚，请通过 `邮件列表 <mailto:bottlepy@googlegroups.com>`_ 或  `bug report <https://github.com/bottlepy/bottle/issues>`_ 告知。\"\n\n#: ../../plugindev.rst:16\nmsgid \"How Plugins Work: The Basics\"\nmsgstr \"插件工作方式：基础知识\"\n\n#: ../../plugindev.rst:18\nmsgid \"\"\n\"The plugin API builds on the concept of `decorators \"\n\"<http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, \"\n\"a plugin is a decorator applied to every single route callback of an \"\n\"application.\"\nmsgstr \"插件的API是通过Python的 `修饰器 <http://docs.python.org/glossary.html#term-decorator>`_ 来实现的。简单来说，一个插件就是应用在route回调函数上的修饰器。\"\n\n#: ../../plugindev.rst:20\nmsgid \"\"\n\"This is just a simplification. Plugins can do a lot more than just \"\n\"decorating route callbacks, but it is a good starting point. Lets have a \"\n\"look at some code::\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:36\nmsgid \"\"\n\"This plugin measures the execution time for each request and adds an \"\n\"appropriate ``X-Exec-Time`` header to the response. As you can see, the \"\n\"plugin returns a wrapper and the wrapper calls the original callback \"\n\"recursively. This is how decorators usually work.\"\nmsgstr \"这个插件计算每次请求的响应时间，并在响应头中添加了 ``X-Exec-Time`` 字段。如你所见，插件返回了一个wrapper函数，由它来调用原先的回调函数。这就是修饰器的常见工作方式了。\"\n\n#: ../../plugindev.rst:38\nmsgid \"\"\n\"The last line tells Bottle to install the plugin to the default application.\"\n\" This causes the plugin to be automatically applied to all routes of that \"\n\"application. In other words, ``stopwatch()`` is called once for each route \"\n\"callback and the return value is used as a replacement for the original \"\n\"callback.\"\nmsgstr \"最后一行，将该插件安装到Bottle的默认应用里面。这样，应用中的所有route都会应用这个插件了。就是说，每次请求都会调用 ``stopwatch()`` ，更改了route的默认行为。\"\n\n#: ../../plugindev.rst:40\nmsgid \"\"\n\"Plugins are applied on demand, that is, as soon as a route is requested for \"\n\"the first time. For this to work properly in multi-threaded environments, \"\n\"the plugin should be thread-safe. This is not a problem most of the time, \"\n\"but keep it in mind.\"\nmsgstr \"插件是按需加载的，就是在route第一次被访问的时候加载。为了在多线程环境下工作，插件应该是线程安全的。在大多数情况下，这都不是一个问题，但务必提高警惕。\"\n\n#: ../../plugindev.rst:42\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped callback is cached and \"\n\"subsequent requests are handled by the cached version directly. This means \"\n\"that a plugin is usually applied only once to a specific route. That cache, \"\n\"however, is cleared every time the list of installed plugins changes. Your \"\n\"plugin should be able to decorate the same route more than once.\"\nmsgstr \"一旦route中使用了插件后，插件中的回调函数会被缓存起来，接下来都是直接使用缓存中的版本来响应请求。意味着每个route只会请求一次插件。在应用的插件列表变化的时候，这个缓存会被清空。你的插件应当可以多次修饰同一个route。\"\n\n#: ../../plugindev.rst:44\nmsgid \"\"\n\"The decorator API is quite limited, though. You don't know anything about \"\n\"the route being decorated or the associated application object and have no \"\n\"way to efficiently store data that is shared among all routes. But fear not!\"\n\" Plugins are not limited to just decorator functions. Bottle accepts \"\n\"anything as a plugin as long as it is callable or implements an extended \"\n\"API. This API is described below and gives you a lot of control over the \"\n\"whole process.\"\nmsgstr \"这种修饰器般的API受到种种限制。你不知道route或相应的应用对象是如何被修饰的，也不知道如何有效地存储那些在route之间共享的数据。但别怕！插件不仅仅是修饰器函数。只要一个插件是callable的或实现了一个扩展的API(后面会讲到)，Bottle都可接受。扩展的API给你更多的控制权。\"\n\n#: ../../plugindev.rst:48\nmsgid \"Plugin API\"\nmsgstr \"插件API\"\n\n#: ../../plugindev.rst:50\nmsgid \"\"\n\":class:`Plugin` is not a real class (you cannot import it from \"\n\":mod:`bottle`) but an interface that plugins are expected to implement. \"\n\"Bottle accepts any object of any type as a plugin, as long as it conforms to\"\n\" the following API.\"\nmsgstr \"``Plugin`` 类不是一个真正的类(你不能从bottle中导入它)，它只是一个插件需要实现的接口。只要一个对象实现了以下接口，Bottle就认可它作为一个插件。\"\n\n#: ../../plugindev.rst:54\nmsgid \"\"\n\"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is \"\n\"defined, it is always preferred over calling the plugin directly. All other \"\n\"methods and attributes are optional.\"\nmsgstr \"插件应该是callable的，或实现了 :meth:`apply` 方法。如果定义了 :meth:`apply` 方法，那么会优先调用，而不是直接调用插件。其它的方法和属性都是可选的。\"\n\n#: ../../plugindev.rst:58\nmsgid \"\"\n\"Both :meth:`Bottle.uninstall` and the `skip` parameter of \"\n\":meth:`Bottle.route()` accept a name string to refer to a plugin or plugin \"\n\"type. This works only for plugins that have a name attribute.\"\nmsgstr \":meth:`Bottle.uninstall` 方法和 :meth:`Bottle.route()` 中的 `skip` 参数都接受一个与名字有关的字符串，对应插件或其类型。只有插件中有一个name属性的时候，这才会起作用。\"\n\n#: ../../plugindev.rst:62\nmsgid \"\"\n\"The Plugin API is still evolving. This integer attribute tells bottle which \"\n\"version to use. If it is missing, bottle defaults to the first version. The \"\n\"current version is ``2``. See :ref:`plugin-changelog` for details.\"\nmsgstr \"插件的API还在逐步改进。这个整形数告诉Bottle使用哪个版本的插件。如果没有这个属性，Bottle默认使用第一个版本。当前版本是 ``2`` 。详见 :ref:`plugin-changelog` 。\"\n\n#: ../../plugindev.rst:66\nmsgid \"\"\n\"Called as soon as the plugin is installed to an application (see \"\n\":meth:`Bottle.install`). The only parameter is the associated application \"\n\"object.\"\nmsgstr \"插件被安装的时候调用(见 :meth:`Bottle.install` )。唯一的参数是相应的应用对象。\"\n\n#: ../../plugindev.rst:70\nmsgid \"\"\n\"As long as :meth:`apply` is not defined, the plugin itself is used as a \"\n\"decorator and applied directly to each route callback. The only parameter is\"\n\" the callback to decorate. Whatever is returned by this method replaces the \"\n\"original callback. If there is no need to wrap or replace a given callback, \"\n\"just return the unmodified callback parameter.\"\nmsgstr \"如果没有定义 :meth:`apply` 方法，插件本身会被直接当成一个修饰器使用(译者注：Python的Magic Method，调用一个类即是调用类的__call__函数)，应用到各个route。唯一的参数就是其所修饰的函数。这个方法返回的东西会直接替换掉原先的回调函数。如果无需如此，则直接返回未修改过的回调函数即可。\"\n\n#: ../../plugindev.rst:74\nmsgid \"\"\n\"If defined, this method is used in favor of :meth:`__call__` to decorate \"\n\"route callbacks. The additional `route` parameter is an instance of \"\n\":class:`Route` and provides a lot of meta-information and context for that \"\n\"route. See :ref:`route-context` for details.\"\nmsgstr \"如果存在，会优先调用，而不调用 :meth:`__call__` 。额外的 `route` 参数是 :class:`Route` 类的一个实例，提供很多该route信息和上下文。详见 :ref:`route-context` 。\"\n\n#: ../../plugindev.rst:78\nmsgid \"\"\n\"Called immediately before the plugin is uninstalled or the application is \"\n\"closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`).\"\nmsgstr \"插件被卸载或应用关闭的时候被调用，详见 :meth:`Bottle.uninstall` 或 :meth:`Bottle.close` 。\"\n\n#: ../../plugindev.rst:81\nmsgid \"\"\n\"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for \"\n\"plugins that are applied directly to a route via the :meth:`Bottle.route()` \"\n\"decorator, but only for plugins installed to an application.\"\nmsgstr \":meth:`Plugin.setup` 方法和 :meth:`Plugin.close` 方法 *不* 会被调用，如果插件是通过 :meth:`Bottle.route` 方法来应用到route上面的，但会在安装插件的时候被调用。\"\n\n#: ../../plugindev.rst:87\nmsgid \"Plugin API changes\"\nmsgstr \"插件API的改动\"\n\n#: ../../plugindev.rst:89\nmsgid \"\"\n\"The Plugin API is still evolving and changed with Bottle 0.10 to address \"\n\"certain issues with the route context dictionary. To ensure backwards \"\n\"compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` \"\n\"attribute to tell bottle which API to use. The API differences are \"\n\"summarized here.\"\nmsgstr \"插件的API还在不断改进中。在Bottle 0.10版本中的改动，定位了route上下文字典中已确定的问题。为了保持对0.9版本插件的兼容，我们添加了一个可选的 :attr:`Plugin.api` 属性，告诉Bottle使用哪个版本的API。API之间的不同点总结如下。\"\n\n#: ../../plugindev.rst:91\nmsgid \"**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)\"\nmsgstr \"**Bottle 0.9 API 1** (无 :attr:`Plugin.api` 属性)\"\n\n#: ../../plugindev.rst:93\nmsgid \"Original Plugin API as described in the 0.9 docs.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:95\nmsgid \"**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)\"\nmsgstr \"**Bottle 0.10 API 2** ( :attr:`Plugin.api` 属性为2)\"\n\n#: ../../plugindev.rst:97\nmsgid \"\"\n\"The `context` parameter of the :meth:`Plugin.apply` method is now an \"\n\"instance of :class:`Route` instead of a context dictionary.\"\nmsgstr \" :meth:`Plugin.apply` 方法中的 `context` 参数，现在是 :class:`Route` 类的一个实例，不再是一个上下文字典。\"\n\n#: ../../plugindev.rst:103\nmsgid \"The Route Context\"\nmsgstr \"Route上下文\"\n\n#: ../../plugindev.rst:105\nmsgid \"\"\n\"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed\"\n\" informations about the associated route. The most important attributes are \"\n\"summarized here:\"\nmsgstr \":class:`Route` 的实例被传递给 :meth:`Plugin.apply` 函数，以提供更多该route的相关信息。最重要的属性总结如下。\"\n\n#: ../../plugindev.rst:108\nmsgid \"Attribute\"\nmsgstr \"属性\"\n\n#: ../../plugindev.rst:108\nmsgid \"Description\"\nmsgstr \"描述\"\n\n#: ../../plugindev.rst:110\nmsgid \"app\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:110\nmsgid \"The application object this route is installed to.\"\nmsgstr \"安装该route的应用对象\"\n\n#: ../../plugindev.rst:111\nmsgid \"rule\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:111\nmsgid \"The rule string (e.g. ``/wiki/<page>``).\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"method\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:112\nmsgid \"The HTTP method as a string (e.g. ``GET``).\"\nmsgstr \"HTTP方法的字符串(例如： ``GET``)\"\n\n#: ../../plugindev.rst:113\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:113\nmsgid \"\"\n\"The original callback with no plugins applied. Useful for introspection.\"\nmsgstr \"未应用任何插件的原始回调函数，用于内省。\"\n\n#: ../../plugindev.rst:115\nmsgid \"name\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:115\nmsgid \"The name of the route (if specified) or ``None``.\"\nmsgstr \"route的名字，如未指定则为 ``None``\"\n\n#: ../../plugindev.rst:116\nmsgid \"plugins\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:116\nmsgid \"\"\n\"A list of route-specific plugins. These are applied in addition to \"\n\"application-wide plugins. (see :meth:`Bottle.route`).\"\nmsgstr \"route安装的插件列表，除了整个应用范围内的插件，额外添加的(见 :meth:`Bottle.route` )\"\n\n#: ../../plugindev.rst:118\nmsgid \"skiplist\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:118\nmsgid \"\"\n\"A list of plugins to not apply to this route (again, see \"\n\":meth:`Bottle.route`).\"\nmsgstr \"应用安装了，但该route没安装的插件列表(见 meth:`Bottle.route` )\"\n\n#: ../../plugindev.rst:120\nmsgid \"config\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:120\nmsgid \"\"\n\"Additional keyword arguments passed to the :meth:`Bottle.route` decorator \"\n\"are stored in this dictionary. Used for route-specific configuration and \"\n\"meta-data.\"\nmsgstr \"传递给 :meth:`Bottle.route` 修饰器的额外参数，存在一个字典中，用于特定的设置和元数据\"\n\n#: ../../plugindev.rst:125\nmsgid \"\"\n\"For your plugin, :attr:`Route.config` is probably the most important \"\n\"attribute. Keep in mind that this dictionary is local to the route, but \"\n\"shared between all plugins. It is always a good idea to add a unique prefix \"\n\"or, if your plugin needs a lot of configuration, store it in a separate \"\n\"namespace within the `config` dictionary. This helps to avoid naming \"\n\"collisions between plugins.\"\nmsgstr \"对你的应用而言， :attr:`Route.config` 也许是最重要的属性了。记住，这个字典会在所有插件中共享，建议添加一个独一无二的前缀。如果你的插件需要很多设置，将其保存在 `config` 字典的一个独立的命名空间吧。防止插件之间的命名冲突。\"\n\n#: ../../plugindev.rst:129\nmsgid \"Changing the :class:`Route` object\"\nmsgstr \"改变 :class:`Route` 对象\"\n\n#: ../../plugindev.rst:131\nmsgid \"\"\n\"While some :class:`Route` attributes are mutable, changes may have unwanted \"\n\"effects on other plugins. It is most likely a bad idea to monkey-patch a \"\n\"broken route instead of providing a helpful error message and let the user \"\n\"fix the problem.\"\nmsgstr \":class:`Route` 的一些属性是不可变的，改动也许会影响到其它插件。坏主意就是，monkey-patch一个损坏的route，而不是提供有效的帮助信息来让用户修复问题。\"\n\n#: ../../plugindev.rst:133\nmsgid \"\"\n\"In some rare cases, however, it might be justifiable to break this rule. \"\n\"After you made your changes to the :class:`Route` instance, raise \"\n\":exc:`RouteReset` as an exception. This removes the current route from the \"\n\"cache and causes all plugins to be re-applied. The router is not updated, \"\n\"however. Changes to `rule` or `method` values have no effect on the router, \"\n\"but only on plugins. This may change in the future, though.\"\nmsgstr \"在极少情况下，破坏规则也许是恰当的。在你更改了 :class:`Route` 实例后，抛一个 :exc:`RouteReset` 异常。这会从缓存中删除当前的route，并重新应用所有插件。无论如何，router没有被更新。改变 `rule` 或 `method` 的值并不会影响到router，只会影响到插件。这个情况在将来也许会改变。\"\n\n#: ../../plugindev.rst:137\nmsgid \"Runtime optimizations\"\nmsgstr \"运行时优化\"\n\n#: ../../plugindev.rst:139\nmsgid \"\"\n\"Once all plugins are applied to a route, the wrapped route callback is \"\n\"cached to speed up subsequent requests. If the behavior of your plugin \"\n\"depends on configuration, and you want to be able to change that \"\n\"configuration at runtime, you need to read the configuration on each \"\n\"request. Easy enough.\"\nmsgstr \"插件应用到route以后，被插件封装起来的回调函数会被缓存，以加速后续的访问。如果你的插件的行为依赖一些设置，你需要在运行时更改这些设置，你需要在每次请求的时候读取设置信息。够简单了吧。\"\n\n#: ../../plugindev.rst:141\nmsgid \"\"\n\"For performance reasons, however, it might be worthwhile to choose a \"\n\"different wrapper based on current needs, work with closures, or enable or \"\n\"disable a plugin at runtime. Let's take the built-in HooksPlugin as an \"\n\"example: If no hooks are installed, the plugin removes itself from all \"\n\"affected routes and has virtually no overhead. As soon as you install the \"\n\"first hook, the plugin activates itself and takes effect again.\"\nmsgstr \"\"\n\n#: ../../plugindev.rst:143\nmsgid \"\"\n\"To achieve this, you need control over the callback cache: \"\n\":meth:`Route.reset` clears the cache for a single route and \"\n\":meth:`Bottle.reset` clears all caches for all routes of an application at \"\n\"once. On the next request, all plugins are re-applied to the route as if it \"\n\"were requested for the first time.\"\nmsgstr \"为了达到这个目的，你需要控制回调函数的缓存： :meth:`Route.reset` 函数清空单一route的缓存， :meth:`Bottle.reset` 函数清空所有route的缓存。在下一次请求的时候，所有插件被重新应用到route上面，就像第一次请求时那样。\"\n\n#: ../../plugindev.rst:145\nmsgid \"\"\n\"Both methods won't affect the current request if called from within a route \"\n\"callback, of cause. To force a restart of the current request, raise \"\n\":exc:`RouteReset` as an exception.\"\nmsgstr \"如果在route的回调函数里面调用，两种方法都不会影响当前的请求。当然，可以抛出一个 :exc:`RouteReset` 异常，来改变当前的请求。\"\n\n#: ../../plugindev.rst:149\nmsgid \"Plugin Example: SQLitePlugin\"\nmsgstr \"插件例子： SQLitePlugin\"\n\n#: ../../plugindev.rst:151\nmsgid \"\"\n\"This plugin provides an sqlite3 database connection handle as an additional \"\n\"keyword argument to wrapped callbacks, but only if the callback expects it. \"\n\"If not, the route is ignored and no overhead is added. The wrapper does not \"\n\"affect the return value, but handles plugin-related exceptions properly. \"\n\":meth:`Plugin.setup` is used to inspect the application and search for \"\n\"conflicting plugins.\"\nmsgstr \"这个插件提供对sqlite3数据库的访问，如果route的回调函数提供了关键字参数(默认是\\\"db\\\")，则\\\"db\\\"可做为数据库连接，如果route的回调函数没有提供该参数，则忽略该route。wrapper不会影响返回值，但是会处理插件相关的异常。 :meth:`Plugin.setup` 方法用于检查应用，查找冲突的插件。\"\n\n#: ../../plugindev.rst:218\nmsgid \"\"\n\"This plugin is actually useful and very similar to the version bundled with \"\n\"Bottle. Not bad for less than 60 lines of code, don't you think? Here is a \"\n\"usage example::\"\nmsgstr \"这个插件十分有用，已经和Bottle提供的那个版本很类似了(译者注：=。= 一模一样)。只要60行代码，还不赖嘛！下面是一个使用例子。\"\n\n#: ../../plugindev.rst:239\nmsgid \"\"\n\"The first route needs a database connection and tells the plugin to create a\"\n\" handle by requesting a ``db`` keyword argument. The second route does not \"\n\"need a database and is therefore ignored by the plugin. The third route does\"\n\" expect a 'db' keyword argument, but explicitly skips the sqlite plugin. \"\n\"This way the argument is not overruled by the plugin and still contains the \"\n\"value of the same-named url argument.\"\nmsgstr \"第一个route提供了一个\\\"db\\\"参数，告诉插件它需要一个数据库连接。第二个route不需要一个数据库连接，所以会被插件忽略。第三个route确实有一个\\\"db\\\"参数，但显式的禁用了sqlite插件，这样，\\\"db\\\"参数不会被插件修改，还是包含URL传过来的那个值。\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/plugins/index.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../plugins/index.rst:5\nmsgid \"List of available Plugins\"\nmsgstr \"可用插件列表\"\n\n#: ../../plugins/index.rst:7\nmsgid \"\"\n\"This is a list of third-party plugins that add extend Bottles core \"\n\"functionality or integrate other libraries with the Bottle framework.\"\nmsgstr \"这是一份第三方插件的列表，扩展Bottle的核心功能，或集成其它类库。\"\n\n#: ../../plugins/index.rst:9\nmsgid \"\"\n\"Have a look at :ref:`plugins` for general questions about plugins \"\n\"(installation, usage). If you plan to develop a new plugin, the \"\n\":doc:`/plugindev` may help you.\"\nmsgstr \"在 :ref:`plugins` 查看常见的插件问题(安装，使用)。如果你计划开发一个新的插件， :doc:`/plugindev` 也许对你有帮助。\"\n\n#: ../../plugins/index.rst:12\nmsgid \"`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:12\nmsgid \"Beaker to session and caching library with WSGI Middleware\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"`Bottle-Cork <http://cork.firelet.net/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:15\nmsgid \"\"\n\"Cork provides a simple set of methods to implement Authentication and \"\n\"Authorization in web applications based on Bottle.\"\nmsgstr \"Cork插件基于Bottle，提供了一些简单的方法来实现Web应用的权限验证。\"\n\n#: ../../plugins/index.rst:18\nmsgid \"`Bottle-Cors-plugin <http://pypi.org/project/bottle-cors-plugin/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:18\nmsgid \"\"\n\"Cors-plugin is the easiest way to implement cors on your bottle web \"\n\"application\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:21\nmsgid \"Meta package to install the bottle plugin collection.\"\nmsgstr \"安装Bottle插件的集合\"\n\n#: ../../plugins/index.rst:24\nmsgid \"`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:24\nmsgid \"flash plugin for bottle\"\nmsgstr \"Bottle的flash插件\"\n\n#: ../../plugins/index.rst:27\nmsgid \"`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:27\nmsgid \"FIFO Queue for Bottle built upon redis\"\nmsgstr \"基于redis的FIFO队列服务\"\n\n#: ../../plugins/index.rst:30\nmsgid \"`Macaron <http://nobrin.github.com/macaron/webapp.html>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:30\nmsgid \"Macaron is an object-relational mapper (ORM) for SQLite.\"\nmsgstr \"Macaron是用于SQLite的ORM\"\n\n#: ../../plugins/index.rst:33\nmsgid \"`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:33\nmsgid \"Memcache integration for Bottle.\"\nmsgstr \"Memcache集成\"\n\n#: ../../plugins/index.rst:36\nmsgid \"`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:36\nmsgid \"MongoDB integration for Bottle\"\nmsgstr \"MongoDB集成\"\n\n#: ../../plugins/index.rst:39\nmsgid \"`Bottle-OAuthlib <http://pypi.python.org/pypi/bottle-oauthlib/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:39\nmsgid \"Adapter for oauthlib - create your own OAuth2.0 implementation\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:42\nmsgid \"Redis integration for Bottle.\"\nmsgstr \"Redis集成\"\n\n#: ../../plugins/index.rst:45\nmsgid \"`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:45\nmsgid \"Renderer plugin for bottle\"\nmsgstr \"Renderer插件\"\n\n#: ../../plugins/index.rst:48\nmsgid \"`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:48\nmsgid \"A reusable app that serves static files for bottle apps\"\nmsgstr \"一个可重用的APP，为Bottle应用提供静态文件服务。\"\n\n#: ../../plugins/index.rst:51\nmsgid \"`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:51\nmsgid \"SQLAlchemy integration for Bottle.\"\nmsgstr \"SQLAlchemy集成\"\n\n#: ../../plugins/index.rst:54\nmsgid \"`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:54\nmsgid \"SQLite3 database integration for Bottle.\"\nmsgstr \"SQLite3数据库集成\"\n\n#: ../../plugins/index.rst:57\nmsgid \"`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:57\nmsgid \"Web2py Dal integration for Bottle.\"\nmsgstr \"Wbe2py的Dal集成\"\n\n#: ../../plugins/index.rst:60\nmsgid \"`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:60\nmsgid \"\"\n\"Integrates the `werkzeug` library (alternative request and response objects,\"\n\" advanced debugging middleware and more).\"\nmsgstr \"集成 `werkzeug` （可选的request和response对象，更高级的调试中间件等等）\"\n\n#: ../../plugins/index.rst:63\nmsgid \"\"\n\"`bottle-smart-filters <https://github.com/agile4you/bottle-smart-filters/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:63\nmsgid \"Bottle Querystring smart guessing.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"`bottle-jwt <https://github.com/agile4you/bottle-jwt/>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:66\nmsgid \"JSON Web Token authentication plugin for bottle.py\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"`Bottle-jwt <https://github.com/agalera/bottlejwt>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:69\nmsgid \"JWT integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"`canister <https://github.com/dagnelies/canister>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:72\nmsgid \"a bottle wrapper to provide logging, sessions and authentication\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"`bottle-cerberus <https://github.com/agalera/bottle-cerberus>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:75\nmsgid \"Cerberus integration for bottle\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"`Bottle-errorsrest <https://github.com/agalera/bottle-errorsrest>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:78\nmsgid \"All errors generated from bottle are returned in json\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:82\nmsgid \"`Bottle-tools <https://github.com/theSage21/bottle-tools>`_\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:81\nmsgid \"\"\n\"Decorators that auto-supply function arguments using POST/query string data.\"\nmsgstr \"\"\n\n#: ../../plugins/index.rst:84\nmsgid \"\"\n\"Plugins listed here are not part of Bottle or the Bottle project, but \"\n\"developed and maintained by third parties.\"\nmsgstr \"这里列出的插件不属于Bottle或Bottle项目，是第三方开发并维护的。\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/recipes.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../recipes.rst:16\nmsgid \"Recipes\"\nmsgstr \"秘诀\"\n\n#: ../../recipes.rst:18\nmsgid \"\"\n\"This is a collection of code snippets and examples for common use cases.\"\nmsgstr \"这里收集了一些常见用例的代码片段和例子.\"\n\n#: ../../recipes.rst:21\nmsgid \"Keeping track of Sessions\"\nmsgstr \"使用Session\"\n\n#: ../../recipes.rst:23\nmsgid \"\"\n\"There is no built-in support for sessions because there is no *right* way to\"\n\" do it (in a micro framework). Depending on requirements and environment you\"\n\" could use beaker_ middleware with a fitting backend or implement it \"\n\"yourself. Here is an example for beaker sessions with a file-based backend::\"\nmsgstr \"Bottle自身并没有提供Session的支持，因为在一个迷你框架里面，没有合适的方法来实现。根据需求和使用环境，你可以使用 beaker_ 中间件或自己来实现。下面是一个使用beaker的例子，Session数据存放在\\\"./data\\\"目录里面::\"\n\n#: ../../recipes.rst:45\nmsgid \"\"\n\"WARNING: Beaker's SessionMiddleware is not thread safe.  If two concurrent \"\n\"requests modify the same session at the same time, one of the updates might \"\n\"get lost. For this reason, sessions should only be populated once and \"\n\"treated as a read-only store after that. If you find yourself updating \"\n\"sessions regularly, and don't want to risk losing any updates, think about \"\n\"using a real database instead or seek alternative session middleware \"\n\"libraries.\"\nmsgstr \"\"\n\n#: ../../recipes.rst:49\nmsgid \"Debugging with Style: Debugging Middleware\"\nmsgstr \"Debugging with Style: 调试中间件\"\n\n#: ../../recipes.rst:51\nmsgid \"\"\n\"Bottle catches all Exceptions raised in your app code to prevent your WSGI \"\n\"server from crashing. If the built-in :func:`debug` mode is not enough and \"\n\"you need exceptions to propagate to a debugging middleware, you can turn off\"\n\" this behaviour::\"\nmsgstr \"Bottle捕获所有应用抛出的异常，防止异常导致WSGI服务器崩溃。如果内置的 :func:`debug` 模式不能满足你的要求，你想在你自己写的中间件里面处理这些异常，那么你可以关闭这个功能。\"\n\n#: ../../recipes.rst:59\nmsgid \"\"\n\"Now, bottle only catches its own exceptions (:exc:`HTTPError`, \"\n\":exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can \"\n\"handle the rest.\"\nmsgstr \"现在，Bottle仅会捕获并处理它自己抛出的异常( :exc:`HTTPError` , :exc:`HTTPResponse` 和 :exc:`BottleException` )，你的中间件可以处理剩下的那些异常。\"\n\n#: ../../recipes.rst:61\nmsgid \"\"\n\"The werkzeug_ and paste_ libraries both ship with very powerful debugging \"\n\"WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for \"\n\"werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for \"\n\"paste_. They both allow you do inspect the stack and even execute python \"\n\"code within the stack context, so **do not use them in production**.\"\nmsgstr \"werkzeug_ 和 paste_ 这两个第三方库都提供了非常强大的调试中间件。如果是 werkzeug_ ，可看看 :class:`werkzeug.debug.DebuggedApplication` ，如果是 paste_ ，可看看 :class:`paste.evalexception.middleware.EvalException` 。它们都可让你检查运行栈，甚至在保持运行栈上下文的情况下，执行Python代码。所以 **不要在生产环境中使用它们** 。\"\n\n#: ../../recipes.rst:65\nmsgid \"Unit-Testing Bottle Applications\"\nmsgstr \"\"\n\n#: ../../recipes.rst:67\nmsgid \"\"\n\"Unit-testing is usually performed against methods defined in your web \"\n\"application without running a WSGI environment.\"\nmsgstr \"Unit测试一般用于测试应用中的函数，但不需要一个WSGI环境。\"\n\n#: ../../recipes.rst:69\nmsgid \"A simple example using `Nose <http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"使用 `Nose <http://readthedocs.org/docs/nose>`_ 的简单例子。\"\n\n#: ../../recipes.rst:80 ../../recipes.rst:97\nmsgid \"Test script::\"\nmsgstr \"测试代码::\"\n\n#: ../../recipes.rst:87\nmsgid \"\"\n\"In the example the Bottle route() method is never executed - only index() is\"\n\" tested.\"\nmsgstr \"在这个例子中，Bottle的route()函数没有被执行，仅测试了index()函数。\"\n\n#: ../../recipes.rst:89\nmsgid \"\"\n\"If the code being tested requires access to ``bottle.request`` you can mock \"\n\"it using `Boddle <https://github.com/keredson/boddle>`_::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:108\nmsgid \"Functional Testing Bottle Applications\"\nmsgstr \"功能测试\"\n\n#: ../../recipes.rst:110\nmsgid \"\"\n\"Any HTTP-based testing system can be used with a running WSGI server, but \"\n\"some testing frameworks work more intimately with WSGI, and provide the \"\n\"ability the call WSGI applications in a controlled environment, with \"\n\"tracebacks and full use of debugging tools. `Testing tools for WSGI \"\n\"<http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point.\"\nmsgstr \"任何基于HTTP的测试系统都可用于测试WSGI服务器，但是有些测试框架与WSGI服务器工作得更好。它们可以在一个可控环境里运行WSGI应用，充分利用traceback和调试工具。 `Testing tools for WSGI <http://www.wsgi.org/en/latest/testing.html>`_ 是一个很好的上手工具。\"\n\n#: ../../recipes.rst:112\nmsgid \"\"\n\"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose \"\n\"<http://readthedocs.org/docs/nose>`_::\"\nmsgstr \"使用 `WebTest <http://webtest.pythonpaste.org/>`_ 和 `Nose <http://readthedocs.org/docs/nose>`_ 的例子。\"\n\n#: ../../recipes.rst:132\nmsgid \"Embedding other WSGI Apps\"\nmsgstr \"嵌入其他WSGI应用\"\n\n#: ../../recipes.rst:134\nmsgid \"\"\n\"This is not the recommend way (you should use a middleware in front of \"\n\"bottle to do this) but you can call other WSGI applications from within your\"\n\" bottle app and let bottle act as a pseudo-middleware. Here is an example::\"\nmsgstr \"并不建议你使用这个方法，你应该在Bottle前面使用一个中间件来做这样的事情。但你确实可以在Bottle里面调用其他WSGI应用，让Bottle扮演一个中间件的角色。下面是一个例子。\"\n\n#: ../../recipes.rst:150\nmsgid \"\"\n\"Again, this is not the recommend way to implement subprojects. It is only \"\n\"here because many people asked for this and to show how bottle maps to WSGI.\"\nmsgstr \"再次强调，并不建议使用这种方法。之所以介绍这种方法，是因为很多人问起，如何在Bottle中调用WSGI应用。\"\n\n#: ../../recipes.rst:154\nmsgid \"Ignore trailing slashes\"\nmsgstr \"忽略尾部的反斜杠\"\n\n#: ../../recipes.rst:156\nmsgid \"\"\n\"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To\"\n\" treat both URLs the same you can add two ``@route`` decorators::\"\nmsgstr \"在Bottle看来， ``/example`` 和 ``/example/`` 是两个不同的route [1]_ 。为了一致对待这两个URL，你应该添加两个route。\"\n\n#: ../../recipes.rst:162\nmsgid \"add a WSGI middleware that strips trailing slashes from all URLs::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:175\nmsgid \"or add a ``before_request`` hook to strip the trailing slashes::\"\nmsgstr \"\"\n\n#: ../../recipes.rst:182\nmsgid \"Footnotes\"\nmsgstr \"脚注\"\n\n#: ../../recipes.rst:183\nmsgid \"Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>\"\nmsgstr \"因为确实如此，见 <http://www.ietf.org/rfc/rfc3986.txt>\"\n\n#: ../../recipes.rst:187\nmsgid \"Keep-alive requests\"\nmsgstr \"Keep-alive 请求\"\n\n#: ../../recipes.rst:191\nmsgid \"For a more detailed explanation, see :doc:`async`.\"\nmsgstr \"详见 :doc:`async` 。\"\n\n#: ../../recipes.rst:193\nmsgid \"\"\n\"Several \\\"push\\\" mechanisms like XHR multipart need the ability to write \"\n\"response data without closing the connection in conjunction with the \"\n\"response header \\\"Connection: keep-alive\\\". WSGI does not easily lend itself\"\n\" to this behavior, but it is still possible to do so in Bottle by using the \"\n\"gevent_ async framework. Here is a sample that works with either the gevent_\"\n\" HTTP server or the paste_ HTTP server (it may work with others, but I have \"\n\"not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the\"\n\" paste_ server::\"\nmsgstr \"像XHR这样的\\\"push\\\"机制，需要在HTTP响应头中加入 \\\"Connection: keep-alive\\\" ，以便在不关闭连接的情况下，写入响应数据。WSGI并不支持这种行为，但如果在Bottle中使用 gevent_ 这个异步框架，还是可以实现的。下面是一个例子，可配合 gevent_ HTTP服务器或 paste_ HTTP服务器使用(也许支持其他服务器，但是我没试过)。在run()函数里面使用 ``server='gevent'`` 或 ``server='paste'`` 即可使用这两种服务器。\"\n\n#: ../../recipes.rst:210\nmsgid \"\"\n\"If you browse to ``http://localhost:8080/stream``, you should see 'START', \"\n\"'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to \"\n\"see them all at once).\"\nmsgstr \"通过浏览器访问 ``http://localhost:8080/stream`` ，可看到'START'，'MIDDLE'，和'END'这三个字眼依次出现，一共用了8秒。\"\n\n#: ../../recipes.rst:213\nmsgid \"Gzip Compression in Bottle\"\nmsgstr \"Gzip压缩\"\n\n#: ../../recipes.rst:216\nmsgid \"For a detailed discussion, see compression_\"\nmsgstr \"详见 compression_\"\n\n#: ../../recipes.rst:218\nmsgid \"\"\n\"A common feature request is for Bottle to support Gzip compression, which \"\n\"speeds up sites by compressing static resources (like CSS and JS files) \"\n\"during a request.\"\nmsgstr \"Gzip压缩，可加速网站静态资源(例如CSS和JS文件)的访问。人们希望Bottle支持Gzip压缩，（但是不支持)......\"\n\n#: ../../recipes.rst:220\nmsgid \"\"\n\"Supporting Gzip compression is not a straightforward proposition, due to a \"\n\"number of corner cases that crop up frequently. A proper Gzip implementation\"\n\" must:\"\nmsgstr \"支持Gzip压缩并不简单，一个合适的Gzip实现应该满足以下条件。\"\n\n#: ../../recipes.rst:222\nmsgid \"Compress on the fly and be fast doing so.\"\nmsgstr \"压缩速度要快\"\n\n#: ../../recipes.rst:223\nmsgid \"Do not compress for browsers that don't support it.\"\nmsgstr \"如果浏览器不支持，则不压缩\"\n\n#: ../../recipes.rst:224\nmsgid \"Do not compress files that are compressed already (images, videos).\"\nmsgstr \"不压缩那些已经充分压缩的文件(图像，视频)\"\n\n#: ../../recipes.rst:225\nmsgid \"Do not compress dynamic files.\"\nmsgstr \"不压缩动态文件\"\n\n#: ../../recipes.rst:226\nmsgid \"Support two differed compression algorithms (gzip and deflate).\"\nmsgstr \"支持两种压缩算法(gzip和deflate)\"\n\n#: ../../recipes.rst:227\nmsgid \"Cache compressed files that don't change often.\"\nmsgstr \"缓存那些不经常变化的压缩文件\"\n\n#: ../../recipes.rst:228\nmsgid \"De-validate the cache if one of the files changed anyway.\"\nmsgstr \"不验证缓存中那些已经变化的文件(De-validate the cache if one of the files changed anyway)\"\n\n#: ../../recipes.rst:229\nmsgid \"Make sure the cache does not get to big.\"\nmsgstr \"确保缓存不太大\"\n\n#: ../../recipes.rst:230\nmsgid \"\"\n\"Do not cache small files because a disk seek would take longer than on-the-\"\n\"fly compression.\"\nmsgstr \"不缓存小文件，因为寻道时间或许比压缩时间还长\"\n\n#: ../../recipes.rst:232\nmsgid \"\"\n\"Because of these requirements, it is the recommendation of the Bottle \"\n\"project that Gzip compression is best handled by the WSGI server Bottle runs\"\n\" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware \"\n\"that can be used to accomplish this.\"\nmsgstr \"因为有上述种种限制，建议由WSGI服务器来处理Gzip压缩而不是Bottle。像 cherrypy_ 就提供了一个 GzipFilter_ 中间件来处理Gzip压缩。\"\n\n#: ../../recipes.rst:236\nmsgid \"Using the hooks plugin\"\nmsgstr \"使用钩子\"\n\n#: ../../recipes.rst:238\nmsgid \"\"\n\"For example, if you want to allow Cross-Origin Resource Sharing for the \"\n\"content returned by all of your URL, you can use the hook decorator and \"\n\"setup a callback function::\"\nmsgstr \"例如，你想提供跨域资源共享，可参考下面的例子。\"\n\n#: ../../recipes.rst:256\nmsgid \"\"\n\"You can also use the ``before_request`` to take an action before every \"\n\"function gets called.\"\nmsgstr \"你也可以使用 ``before_request`` ，这样在route的回调函数被调用之前，都会调用你的钩子函数。\"\n\n#: ../../recipes.rst:261\nmsgid \"Using Bottle with Heroku\"\nmsgstr \"在Heroku中使用Bottle\"\n\n#: ../../recipes.rst:263\nmsgid \"\"\n\"Heroku_, a popular cloud application platform now provides support for \"\n\"running Python applications on their infastructure.\"\nmsgstr \"Heroku_ ，一个流行的云应用平台，提供Python支持。\"\n\n#: ../../recipes.rst:266\nmsgid \"\"\n\"This recipe is based upon the `Heroku Quickstart \"\n\"<http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific \"\n\"code replacing the `Write Your App \"\n\"<http://devcenter.heroku.com/articles/python#write_your_app>`_ section of \"\n\"the `Getting Started with Python on Heroku/Cedar \"\n\"<http://devcenter.heroku.com/articles/python>`_ guide::\"\nmsgstr \"这份教程基于 `Heroku Quickstart <http://devcenter.heroku.com/articles/quickstart>`_, 用Bottle特有的代码替换了 `Getting Started with Python on Heroku/Cedar <http://devcenter.heroku.com/articles/python>`_ 中的`Write Your App <http://devcenter.heroku.com/articles/python#write_your_app>`_ 这部分::\"\n\n#: ../../recipes.rst:282\nmsgid \"\"\n\"Heroku's app stack passes the port that the application needs to listen on \"\n\"for requests, using the `os.environ` dictionary.\"\nmsgstr \"Heroku使用 `os.environ` 字典来提供Bottle应用需要监听的端口。\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/routing.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../routing.rst:3\nmsgid \"Request Routing\"\nmsgstr \"URL映射\"\n\n#: ../../routing.rst:5\nmsgid \"\"\n\"Bottle uses a powerful routing engine to find the right callback for each \"\n\"request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This \"\n\"document covers advanced techniques and rule mechanics in detail.\"\nmsgstr \"Bottle内置一个强大的route引擎，可以给每个浏览器请求找到正确的回调函数。 :ref:`tutorial <tutorial-routing>` 中已经介绍了一些基础知识。接下来是一些进阶知识和route的规则。\"\n\n#: ../../routing.rst:8\nmsgid \"Rule Syntax\"\nmsgstr \"route的语法\"\n\n#: ../../routing.rst:10\nmsgid \"\"\n\"The :class:`Router` distinguishes between two basic types of routes: \"\n\"**static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. \"\n\"``/hello/<name>``). A route that contains one or more *wildcards* it is \"\n\"considered dynamic. All other routes are static.\"\nmsgstr \":class:`Router` 类中明确区分两种类型的route： **静态route** (例如 ``/contact`` )和 **动态route** (例如 ``/hello/<name>`` )。包含了 *通配符* 的route即是动态route，除此之外的都是静态的。\"\n\n#: ../../routing.rst:14\nmsgid \"\"\n\"The simplest form of a wildcard consists of a name enclosed in angle \"\n\"brackets (e.g. ``<name>``). The name should be unique for a given route and \"\n\"form a valid python identifier (alphanumeric, starting with a letter). This \"\n\"is because wildcards are used as keyword arguments for the request callback \"\n\"later.\"\nmsgstr \"包含通配符，最简单的形式就是将其放到一对<>里面(例如 ``<name>`` )。在同一个route里面，这个变量名需要是唯一的。因为稍后会将其当作参数传给回调函数，所以这个变量名的第一个字符应该是字母。\"\n\n#: ../../routing.rst:16\nmsgid \"\"\n\"Each wildcard matches one or more characters, but stops at the first slash \"\n\"(``/``). This equals a regular expression of ``[^/]+`` and ensures that only\"\n\" one path segment is matched and routes with more than one wildcard stay \"\n\"unambiguous.\"\nmsgstr \"每一个通配符匹配一个或多个字符，直到遇到 ``/`` 。类似于 ``[^/]+`` 这样一个正则表达式，确保在route包含多个通配符的时候不出现歧义。\"\n\n#: ../../routing.rst:18\nmsgid \"The rule ``/<action>/<item>`` matches as follows:\"\nmsgstr \"``/<action>/<item>`` 这个规则匹配的情况如下\"\n\n#: ../../routing.rst:21\nmsgid \"Path\"\nmsgstr \"路径\"\n\n#: ../../routing.rst:21\nmsgid \"Result\"\nmsgstr \"结果\"\n\n#: ../../routing.rst:23\nmsgid \"/save/123\"\nmsgstr \"\"\n\n#: ../../routing.rst:23\nmsgid \"``{'action': 'save', 'item': '123'}``\"\nmsgstr \"\"\n\n#: ../../routing.rst:24\nmsgid \"/save/123/\"\nmsgstr \"\"\n\n#: ../../routing.rst:24 ../../routing.rst:25 ../../routing.rst:26\nmsgid \"`No Match`\"\nmsgstr \"不匹配\"\n\n#: ../../routing.rst:25\nmsgid \"/save/\"\nmsgstr \"\"\n\n#: ../../routing.rst:26\nmsgid \"//123\"\nmsgstr \"\"\n\n#: ../../routing.rst:29\nmsgid \"\"\n\"Is it possible to escape characters like colon ``:`` with a backslash \"\n\"``\\\\``. This will prevent to trigger the old syntax in case you need to use \"\n\"``:``. For example: the rule ``/<action>/item:<id>`` triggers the old \"\n\"syntax, (see below) but ``/action/item\\\\:<id>`` works as intended with the \"\n\"new syntax.\"\nmsgstr \"\"\n\n#: ../../routing.rst:33\nmsgid \"\"\n\"You can change the exact behaviour in many ways using filters. This is \"\n\"described in the next section.\"\nmsgstr \"你可通过过滤器来改变这一行为，稍后会介绍。\"\n\n#: ../../routing.rst:36\nmsgid \"Wildcard Filters\"\nmsgstr \"通配符过滤器\"\n\n#: ../../routing.rst:40\nmsgid \"\"\n\"Filters are used to define more specific wildcards, and/or transform the \"\n\"matched part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"过滤器被用于定义更特殊的通配符，可在URL中\\\"被匹配到的部分\\\"被传递给回调函数之前，处理其内容。可通过 ``<name:filter>`` 或 ``<name:filer:config>`` 这样的语句来声明一个过滤器。\\\"config\\\"部分的语法由被使用的过滤器决定。\"\n\n#: ../../routing.rst:42\nmsgid \"The following standard filters are implemented:\"\nmsgstr \"Bottle中已实现以下过滤器:\"\n\n#: ../../routing.rst:44\nmsgid \"**:int** matches (signed) digits and converts the value to integer.\"\nmsgstr \"**:int** 匹配一个整形数，并将其转换为int\"\n\n#: ../../routing.rst:45\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"**:float** 同上，匹配一个浮点数\"\n\n#: ../../routing.rst:46\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and may be used to match more than one path segment.\"\nmsgstr \"**:path** 匹配所有字符，包括'/'\"\n\n#: ../../routing.rst:47\nmsgid \"\"\n\"**:re[:exp]** allows you to specify a custom regular expression in the \"\n\"config field. The matched value is not modified.\"\nmsgstr \"**:re[:exp]** 允许在exp中写一个正则表达式\"\n\n#: ../../routing.rst:49\nmsgid \"\"\n\"You can add your own filters to the router. All you need is a function that \"\n\"returns three elements: A regular expression string, a callable to convert \"\n\"the URL fragment to a python value, and a callable that does the opposite. \"\n\"The filter function is called with the configuration string as the only \"\n\"parameter and may parse it as needed::\"\nmsgstr \"你可在route中添加自己写的过滤器。过滤器是一个有三个返回值的函数：一个正则表达式，一个callable的对象(转换URL片段为Python对象)，另一个callable对象(转换Python对象为URL片段)。过滤器仅接受一个参数，就是设置字符串(译者注：例如re过滤器的exp部分)。\"\n\n#: ../../routing.rst:75\nmsgid \"Legacy Syntax\"\nmsgstr \"旧语法\"\n\n#: ../../routing.rst:79\nmsgid \"\"\n\"The new rule syntax was introduce in **Bottle 0.10** to simplify some common\"\n\" use cases, but the old syntax still works and you can find lot code \"\n\"examples still using it. The differences are best described by example:\"\nmsgstr \"在 **Bottle 0.10** 版本中引入了新的语法，来简单化一些常见用例，但依然兼容旧的语法。新旧语法的区别如下。\"\n\n#: ../../routing.rst:82\nmsgid \"Old Syntax\"\nmsgstr \"旧语法\"\n\n#: ../../routing.rst:82\nmsgid \"New Syntax\"\nmsgstr \"新语法\"\n\n#: ../../routing.rst:84\nmsgid \"``:name``\"\nmsgstr \"\"\n\n#: ../../routing.rst:84\nmsgid \"``<name>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``:name#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:85\nmsgid \"``<name:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``:#regexp#``\"\nmsgstr \"\"\n\n#: ../../routing.rst:86\nmsgid \"``<:re:regexp>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``:##``\"\nmsgstr \"\"\n\n#: ../../routing.rst:87\nmsgid \"``<:re>``\"\nmsgstr \"\"\n\n#: ../../routing.rst:90\nmsgid \"\"\n\"Try to avoid the old syntax in future projects if you can. It is not \"\n\"currently deprecated, but will be eventually.\"\nmsgstr \"请尽量在新项目中避免使用旧的语法，虽然它现在还没被废弃，但终究会的。\"\n\n#: ../../routing.rst:95\nmsgid \"Explicit routing configuration\"\nmsgstr \"显式的route配置\"\n\n#: ../../routing.rst:97\nmsgid \"\"\n\"Route decorator can also be directly called as method. This way provides \"\n\"flexibility in complex setups, allowing you to directly control, when and \"\n\"how routing configuration done.\"\nmsgstr \"route修饰器也可以直接当作函数来调用。在复杂的部署中，这种方法或许更灵活，直接由你来控制“何时”及“如何”配置route。\"\n\n#: ../../routing.rst:99\nmsgid \"\"\n\"Here is a basic example of explicit routing configuration for default bottle\"\n\" application::\"\nmsgstr \"下面是一个简单的例子\"\n\n#: ../../routing.rst:105\nmsgid \"\"\n\"In fact, any :class:`Bottle` instance routing can be configured same way::\"\nmsgstr \"实际上，bottle可以是任何 :class:`Bottle` 类的实例\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/stpl.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../stpl.rst:3\nmsgid \"SimpleTemplate Engine\"\nmsgstr \"SimpleTemplate 模板引擎\"\n\n#: ../../stpl.rst:7\nmsgid \"\"\n\"Bottle comes with a fast, powerful and easy to learn built-in template \"\n\"engine called *SimpleTemplate* or *stpl* for short. It is the default engine\"\n\" used by the :func:`view` and :func:`template` helpers but can be used as a \"\n\"stand-alone general purpose template engine too. This document explains the \"\n\"template syntax and shows examples for common use cases.\"\nmsgstr \"Bottle自带了一个快速，强大，易用的模板引擎，名为 *SimpleTemplate* 或简称为 *stpl* 。它是 :func:`view` 和 :func:`template` 两个函数默认调用的模板引擎。接下来会介绍该引擎的模板语法和一些常见用例。\"\n\n#: ../../stpl.rst:10\nmsgid \"Basic API Usage:\"\nmsgstr \"基础API :\"\n\n#: ../../stpl.rst:11\nmsgid \":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::\"\nmsgstr \":class:`SimpleTemplate` 类实现了 :class:`BaseTemplate` 接口\"\n\n#: ../../stpl.rst:18\nmsgid \"\"\n\"In this document we use the :func:`template` helper in examples for the sake\"\n\" of simplicity::\"\nmsgstr \"简单起见，我们在例子中使用 :func:`template` 函数\"\n\n#: ../../stpl.rst:24\nmsgid \"\"\n\"You can also pass a dictionary into the template using keyword arguments::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:31\nmsgid \"\"\n\"Just keep in mind that compiling and rendering templates are two different \"\n\"actions, even if the :func:`template` helper hides this fact. Templates are \"\n\"usually compiled only once and cached internally, but rendered many times \"\n\"with different keyword arguments.\"\nmsgstr \"注意，编译模板和渲染模板是两件事情，尽管 :func:`template` 函数隐藏了这一事实。通常，模板只会被编译一次，然后会被缓存起来，但是会根据不同的参数，被多次渲染。\"\n\n#: ../../stpl.rst:34\nmsgid \":class:`SimpleTemplate` Syntax\"\nmsgstr \":class:`SimpleTemplate` 的语法\"\n\n#: ../../stpl.rst:36\nmsgid \"\"\n\"Python is a very powerful language but its whitespace-aware syntax makes it \"\n\"difficult to use as a template language. SimpleTemplate removes some of \"\n\"these restrictions and allows you to write clean, readable and maintainable \"\n\"templates while preserving full access to the features, libraries and speed \"\n\"of the Python language.\"\nmsgstr \"虽然Python是一门强大的语言，但它对空白敏感的语法令其很难作为一个模板语言。SimpleTemplate移除了一些限制，允许你写出干净的，有可读性的，可维护的模板，且保留了Python的强大功能。\"\n\n#: ../../stpl.rst:40\nmsgid \"\"\n\"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and \"\n\"is executed on each :meth:`SimpleTemplate.render` call. Do not render \"\n\"untrusted templates! They may contain and execute harmful python code.\"\nmsgstr \" :class:`SimpleTemplate` 模板会被编译为Python字节码，且在每次通过 :meth:`SimpleTemplate.render` 渲染的时候执行。请不要渲染不可靠的模板！它们也许包含恶意代码。\"\n\n#: ../../stpl.rst:43\nmsgid \"Inline Expressions\"\nmsgstr \"内嵌表达式\"\n\n#: ../../stpl.rst:45\nmsgid \"\"\n\"You already learned the use of the ``{{...}}`` syntax from the \\\"Hello \"\n\"World!\\\" example above, but there is more: any python expression is allowed \"\n\"within the curly brackets as long as it evaluates to a string or something \"\n\"that has a string representation::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:54\nmsgid \"\"\n\"The contained python expression is executed at render-time and has access to\"\n\" all keyword arguments passed to the :meth:`SimpleTemplate.render` method. \"\n\"HTML special characters are escaped automatically to prevent `XSS \"\n\"<http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start\"\n\" the expression with an exclamation mark to disable escaping for that \"\n\"expression::\"\nmsgstr \"{{}}中的Python语句会在渲染的时候被执行，可访问传递给 :meth:`SimpleTemplate.render` 方法的所有参数。默认情况下，自动转义HTML标签以防止 `XSS <http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ 攻击。可在语句前加上\\\"!\\\"来关闭自动转义。\"\n\n#: ../../stpl.rst:62\nmsgid \"Embedded python code\"\nmsgstr \"嵌入Pyhton代码\"\n\n#: ../../stpl.rst:66\nmsgid \"\"\n\"The template engine allows you to embed lines or blocks of python code \"\n\"within your template. Code lines start with ``%`` and code blocks are \"\n\"surrounded by ``<%`` and ``%>`` tokens::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:76\nmsgid \"\"\n\"Embedded python code follows regular python syntax, but with two additional \"\n\"syntax rules:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:78\nmsgid \"\"\n\"**Indentation is ignored.** You can put as much whitespace in front of \"\n\"statements as you want. This allows you to align your code with the \"\n\"surrounding markup and can greatly improve readability.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:79\nmsgid \"\"\n\"Blocks that are normally indented now have to be closed explicitly with an \"\n\"``end`` keyword.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:89\nmsgid \"\"\n\"Both the ``%`` and the ``<%`` tokens are only recognized if they are the \"\n\"first non-whitespace characters in a line. You don't have to escape them if \"\n\"they appear mid-text in your template markup. Only if a line of text starts \"\n\"with one of these tokens, you have to escape it with a backslash. In the \"\n\"rare case where the backslash + token combination appears in your markup at \"\n\"the beginning of a line, you can always help yourself with a string literal \"\n\"in an inline expression::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:96\nmsgid \"\"\n\"If you find yourself needing to escape a lot, consider using :ref:`custom \"\n\"tokens <stpl-custom-tokens>`.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:98\nmsgid \"\"\n\"Note that ``%`` and ``<% %>`` work in *exactly* the same way. The latter is \"\n\"only a convenient way to type less and avoid clutter for longer code \"\n\"segments. This means that in ``<% %>`` blocks, all indented code must be \"\n\"terminated with an ``end``, as in the following example::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:114\nmsgid \"Whitespace Control\"\nmsgstr \"\"\n\n#: ../../stpl.rst:116\nmsgid \"\"\n\"Code blocks and code lines always span the whole line. Whitespace in front \"\n\"of after a code segment is stripped away. You won't see empty lines or \"\n\"dangling whitespace in your template because of embedded code::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:124\nmsgid \"This snippet renders to clean and compact html::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:130\nmsgid \"\"\n\"But embedding code still requires you to start a new line, which may not \"\n\"what you want to see in your rendered template. To skip the newline in front\"\n\" of a code segment, end the text line with a double-backslash::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:138\nmsgid \"This time the rendered template looks like this::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:142\nmsgid \"\"\n\"This only works directly in front of code segments. In all other places you \"\n\"can control the whitespace yourself and don't need any special syntax.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:145\nmsgid \"Template Functions\"\nmsgstr \"\"\n\n#: ../../stpl.rst:147\nmsgid \"\"\n\"Each template is preloaded with a bunch of functions that help with the most\"\n\" common use cases. These functions are always available. You don't have to \"\n\"import or provide them yourself. For everything not covered here there are \"\n\"probably good python libraries available. Remember that you can ``import`` \"\n\"anything you want within your templates. They are python programs after all.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:151\nmsgid \"\"\n\"Prior to this release, :func:`include` and :func:`rebase` were syntax \"\n\"keywords, not functions.\"\nmsgstr \"\"\n\n#: ../../stpl.rst:156\nmsgid \"\"\n\"Render a sub-template with the specified variables and insert the resulting \"\n\"text into the current template. The function returns a dictionary containing\"\n\" the local variables passed to or defined within the sub-template::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:164\nmsgid \"\"\n\"Mark the current template to be later included into a different template. \"\n\"After the current template is rendered, its resulting text is stored in a \"\n\"variable named ``base`` and passed to the base-template, which is then \"\n\"rendered. This can be used to `wrap` a template with surrounding text, or \"\n\"simulate the inheritance feature found in other template engines::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:169\nmsgid \"This can be combined with the following ``base.tpl``::\"\nmsgstr \"\"\n\n#: ../../stpl.rst:181\nmsgid \"\"\n\"Accessing undefined variables in a template raises :exc:`NameError` and \"\n\"stops rendering immediately. This is standard python behavior and nothing \"\n\"new, but vanilla python lacks an easy way to check the availability of a \"\n\"variable. This quickly gets annoying if you want to support flexible inputs \"\n\"or use the same template in different situations. These functions may help:\"\nmsgstr \"\"\n\n#: ../../stpl.rst:189\nmsgid \"\"\n\"Return True if the variable is defined in the current template namespace, \"\n\"False otherwise.\"\nmsgstr \"如果变量已定义则返回True，反之返回False。\"\n\n#: ../../stpl.rst:194\nmsgid \"Return the variable, or a default value.\"\nmsgstr \"返回该变量，或一个默认值\"\n\n#: ../../stpl.rst:198\nmsgid \"\"\n\"If the variable is not defined, create it with the given default value. \"\n\"Return the variable.\"\nmsgstr \"如果该变量未定义，则定义它，赋一个默认值，返回该变量\"\n\n#: ../../stpl.rst:201\nmsgid \"\"\n\"Here is an example that uses all three functions to implement optional \"\n\"template variables in different ways::\"\nmsgstr \"下面是使用了这三个函数的例子，实现了模板中的可选参数。\"\n\n#: ../../stpl.rst:215\nmsgid \":class:`SimpleTemplate` API\"\nmsgstr \":class:`SimpleTemplate` API\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.prepare:1\nmsgid \"\"\n\"Run preparations (parsing, caching, ...). It should be possible to call this\"\n\" again to refresh a template or to update settings.\"\nmsgstr \"\"\n\n#: ../../../bottle.pydocstring of bottle.SimpleTemplate.render:1\nmsgid \"Render the template using keyword arguments as local variables.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/tutorial.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: defnull <marc@gsites.de>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../tutorial.rst:24\nmsgid \"Tutorial\"\nmsgstr \"教程\"\n\n#: ../../tutorial.rst:26\nmsgid \"\"\n\"This tutorial introduces you to the concepts and features of the Bottle web \"\n\"framework and covers basic and advanced topics alike. You can read it from \"\n\"start to end, or use it as a reference later on. The automatically generated\"\n\" :doc:`api` may be interesting for you, too. It covers more details, but \"\n\"explains less than this tutorial. Solutions for the most common questions \"\n\"can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If \"\n\"you need any help, join our `mailing list \"\n\"<mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel \"\n\"<http://webchat.freenode.net/?channels=bottlepy>`_.\"\nmsgstr \"这份教程将向你介绍Bottle的开发理念和功能特性。既介绍Bottle的基本用法，也包含了进阶用法。你可以从头到尾通读一遍，也可当做开发时的参考。你也许对自动生成的 :doc:`api` 感兴趣。它包含了更多的细节，但解释没有这份教程详细。在 :doc:`recipes` 或 :doc:`faq` 可找到常见问题的解决办法。如果需要任何帮助，可加入我们的 `邮件列表 <mailto:bottlepy@googlegroups.com>`_ 或在 `IRC频道 <http://webchat.freenode.net/?channels=bottlepy>`_ 和我们交流。\"\n\n#: ../../tutorial.rst:31\nmsgid \"Installation\"\nmsgstr \"安装\"\n\n#: ../../tutorial.rst:33\nmsgid \"\"\n\"Bottle does not depend on any external libraries. You can just download \"\n\"`bottle.py </bottle.py>`_ into your project directory and start coding:\"\nmsgstr \"Bottle不依赖其他库，你需要做的仅是下载 `bottle.py </bottle.py>`_ (开发版)到你的项目文件夹，然后开始写代码。\"\n\n#: ../../tutorial.rst:39\nmsgid \"\"\n\"This will get you the latest development snapshot that includes all the new \"\n\"features. If you prefer a more stable environment, you should stick with the\"\n\" stable releases. These are available on `PyPI \"\n\"<http://pypi.python.org/pypi/bottle>`_ and can be installed via \"\n\":command:`pip` (recommended), :command:`easy_install` or your package \"\n\"manager:\"\nmsgstr \"在终端运行以上命令，即可下载到Bottle的最新开发版，包含了所有新功能特性。如果更需要稳定性，你应该坚持使用Bottle的稳定版本。可在 `PyPI <http://pypi.python.org/pypi/bottle>`_ 下载稳定版本，然后通过 :command:`pip` (推荐), :command:`easy_install` 或你的包管理软件安装。\"\n\n#: ../../tutorial.rst:47\nmsgid \"\"\n\"Either way, you'll need Python 2.7 or newer (including 3.4+) to run bottle \"\n\"applications. If you do not have permissions to install packages system-wide\"\n\" or simply don't want to, create a `virtualenv \"\n\"<http://pypi.python.org/pypi/virtualenv>`_ first:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:55\nmsgid \"Or, if virtualenv is not installed on your system:\"\nmsgstr \"如果还未安装virtualenv:\"\n\n#: ../../tutorial.rst:67\nmsgid \"Quickstart: \\\"Hello World\\\"\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:69\nmsgid \"\"\n\"This tutorial assumes you have Bottle either :ref:`installed <installation>`\"\n\" or copied into your project directory. Let's start with a very basic \"\n\"\\\"Hello World\\\" example::\"\nmsgstr \"到目前为止，我假设你已经 :ref:`安装 <installation>` 好了bottle或已将bottle.py拷贝到你的项目文件夹。接下来我们就可以写一个非常简单的\\\"Hello World\\\"了::\"\n\n#: ../../tutorial.rst:79\nmsgid \"\"\n\"This is it. Run this script, visit http://localhost:8080/hello and you will \"\n\"see \\\"Hello World!\\\" in your browser. Here is how it works:\"\nmsgstr \"就这么简单！保存为py文件并执行，用浏览器访问 http://localhost:8080/hello 就可以看到\\\"Hello World!\\\"。它的执行流程大致如下:\"\n\n#: ../../tutorial.rst:81\nmsgid \"\"\n\"The :func:`route` decorator binds a piece of code to an URL path. In this \"\n\"case, we link the ``/hello`` path to the ``hello()`` function. This is \"\n\"called a `route` (hence the decorator name) and is the most important \"\n\"concept of this framework. You can define as many routes as you want. \"\n\"Whenever a browser requests a URL, the associated function is called and the\"\n\" return value is sent back to the browser. It's as simple as that.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:83\nmsgid \"\"\n\"The :func:`run` call in the last line starts a built-in development server. \"\n\"It runs on ``localhost`` port ``8080`` and serves requests until you hit \"\n\":kbd:`Control-c`. You can switch the server backend later, but for now a \"\n\"development server is all we need. It requires no setup at all and is an \"\n\"incredibly painless way to get your application up and running for local \"\n\"tests.\"\nmsgstr \"最后一行调用的 :func:`run` 函数启动了内置的开发服务器。它监听 `localhost` 的8080端口并响应请求， :kbd:`Control-c` 可将其关闭。到目前为止，这个内置的开发服务器已经足够用于日常的开发测试了。它根本不需要安装，就可以让你的应用跑起来。在教程的后面，你将学会如何让你的应用跑在其他服务器上面（译者注：内置服务器不能满足生产环境的要求）\"\n\n#: ../../tutorial.rst:85\nmsgid \"\"\n\"The :ref:`tutorial-debugging` is very helpful during early development, but \"\n\"should be switched off for public applications. Keep that in mind.\"\nmsgstr \":ref:`tutorial-debugging` 在早期开发的时候非常有用，但请务必记得，在生产环境中将其关闭。\"\n\n#: ../../tutorial.rst:87\nmsgid \"\"\n\"This is just a demonstration of the basic concept of how applications are \"\n\"built with Bottle. Continue reading and you'll see what else is possible.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:92\nmsgid \"The Default Application\"\nmsgstr \"`默认应用`\"\n\n#: ../../tutorial.rst:94\nmsgid \"\"\n\"For the sake of simplicity, most examples in this tutorial use a module-\"\n\"level :func:`route` decorator to define routes. This adds routes to a global\"\n\" \\\"default application\\\", an instance of :class:`Bottle` that is \"\n\"automatically created the first time you call :func:`route`. Several other \"\n\"module-level decorators and functions relate to this default application, \"\n\"but if you prefer a more object oriented approach and don't mind the extra \"\n\"typing, you can create a separate application object and use that instead of\"\n\" the global one::\"\nmsgstr \"基于简单性考虑，这份教程中的大部分例子都使用一个模块层面的 :func:`route` 修饰器函数来定义route。这样的话，所有route都添加到了一个全局的“默认应用”里面，即是在第一次调用 :func:`route` 函数时，创建的一个 :class:`Bottle` 类的实例。其他几个模块层面的修饰器函数都与这个“默认应用”有关，如果你偏向于面向对象的做法且不介意多打点字，你可以创建一个独立的应用对象，这样就可避免使用全局范围的“默认应用”。\"\n\n#: ../../tutorial.rst:106\nmsgid \"\"\n\"The object-oriented approach is further described in the :ref:`default-app` \"\n\"section. Just keep in mind that you have a choice.\"\nmsgstr \"接下来的 :ref:`default-app` 章节中将更详细地介绍这种做法。现在，你只需知道不止有一种选择就好了。\"\n\n#: ../../tutorial.rst:114\nmsgid \"Request Routing\"\nmsgstr \"URL映射\"\n\n#: ../../tutorial.rst:116\nmsgid \"\"\n\"In the last chapter we built a very simple web application with only a \"\n\"single route. Here is the routing part of the \\\"Hello World\\\" example \"\n\"again::\"\nmsgstr \"在上一章中，我们实现了一个十分简单的web应用，只有一个URL映射(route)。让我们再来看一下“Hello World”中与routing有关的部分::\"\n\n#: ../../tutorial.rst:122\nmsgid \"\"\n\"The :func:`route` decorator links an URL path to a callback function, and \"\n\"adds a new route to the :ref:`default application <tutorial-default>`. An \"\n\"application with just one route is kind of boring, though. Let's add some \"\n\"more (don't forget ``from bottle import template``)::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:129\nmsgid \"\"\n\"This example demonstrates two things: You can bind more than one route to a \"\n\"single callback, and you can add wildcards to URLs and access them via \"\n\"keyword arguments.\"\nmsgstr \"这个例子说明了两件事情，一个回调函数可绑定多个route，你也可以在URL中添加通配符，然后在回调函数中使用它们。\"\n\n#: ../../tutorial.rst:136\nmsgid \"Dynamic Routes\"\nmsgstr \"动态URL映射\"\n\n#: ../../tutorial.rst:138\nmsgid \"\"\n\"Routes that contain wildcards are called `dynamic routes` (as opposed to \"\n\"`static routes`) and match more than one URL at the same time. A simple \"\n\"wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and\"\n\" accepts one or more characters up to the next slash (``/``). For example, \"\n\"the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as\"\n\" ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``.\"\nmsgstr \"包含通配符的route，我们称之为动态route(与之对应的是静态route)，它能匹配多个URL地址。一个通配符包含在一对尖括号里面(像这样 ``<name>`` )，通配符之间用\\\"/\\\"分隔开来。如果我们将URL定义为 ``/hello/<name>`` 这样，那么它就能匹配 ``/hello/alice`` 和 ``/hello/bob`` 这样的浏览器请求，但不能匹配 ``/hello`` , ``/hello/`` 和 ``/hello/mr/smith`` 。\"\n\n#: ../../tutorial.rst:140\nmsgid \"\"\n\"Each wildcard passes the covered part of the URL as a keyword argument to \"\n\"the request callback. You can use them right away and implement RESTful, \"\n\"nice-looking and meaningful URLs with ease. Here are some other examples \"\n\"along with the URLs they'd match::\"\nmsgstr \"URL中的通配符都会当作参数传给回调函数，直接在回调函数中使用。这样可以漂亮地实现RESTful形式的URL。例子如下::\"\n\n#: ../../tutorial.rst:150\nmsgid \"\"\n\"Filters can be used to define more specific wildcards, and/or transform the \"\n\"covered part of the URL before it is passed to the callback. A filtered \"\n\"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The \"\n\"syntax for the optional config part depends on the filter used.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:152\nmsgid \"\"\n\"The following filters are implemented by default and more may be added:\"\nmsgstr \"已实现下面几种形式的过滤器，后续可能会继续添加:\"\n\n#: ../../tutorial.rst:154\nmsgid \"\"\n\"**:int** matches (signed) digits only and converts the value to integer.\"\nmsgstr \"**:int** 匹配一个数字，自动将其转换为int类型。\"\n\n#: ../../tutorial.rst:155\nmsgid \"**:float** similar to :int but for decimal numbers.\"\nmsgstr \"**:float** 与:int类似，用于浮点数。\"\n\n#: ../../tutorial.rst:156\nmsgid \"\"\n\"**:path** matches all characters including the slash character in a non-\"\n\"greedy way and can be used to match more than one path segment.\"\nmsgstr \"**:path** 匹配一个路径(包含\\\"/\\\")\"\n\n#: ../../tutorial.rst:157\nmsgid \"\"\n\"**:re** allows you to specify a custom regular expression in the config \"\n\"field. The matched value is not modified.\"\nmsgstr \"**:re** 匹配config部分的一个正则表达式，不更改被匹配到的值\"\n\n#: ../../tutorial.rst:159\nmsgid \"Let's have a look at some practical examples::\"\nmsgstr \"让我们来看看具体的使用例子::\"\n\n#: ../../tutorial.rst:173\nmsgid \"You can add your own filters as well. See :doc:`routing` for details.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:177\nmsgid \"HTTP Request Methods\"\nmsgstr \"HTTP请求方法\"\n\n#: ../../tutorial.rst:181\nmsgid \"\"\n\"The HTTP protocol defines several `request methods`__ (sometimes referred to\"\n\" as \\\"verbs\\\") for different tasks. GET is the default for all routes with \"\n\"no other method specified. These routes will match GET requests only. To \"\n\"handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` \"\n\"keyword argument to the :func:`route` decorator or use one of the five \"\n\"alternative decorators: :func:`get`, :func:`post`, :func:`put`, \"\n\":func:`delete` or :func:`patch`.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:183\nmsgid \"\"\n\"The POST method is commonly used for HTML form submission. This example \"\n\"shows how to handle a login form using POST::\"\nmsgstr \"POST方法一般用于HTML表单的提交。下面是一个使用POST来实现用户登录的例子::\"\n\n#: ../../tutorial.rst:206\nmsgid \"\"\n\"In this example the ``/login`` URL is linked to two distinct callbacks, one \"\n\"for GET requests and another for POST requests. The first one displays a \"\n\"HTML form to the user. The second callback is invoked on a form submission \"\n\"and checks the login credentials the user entered into the form. The use of \"\n\":attr:`Request.forms` is further described in the :ref:`tutorial-request` \"\n\"section.\"\nmsgstr \"在这个例子中， ``/login`` 绑定了两个回调函数，一个回调函数响应GET请求，一个回调函数响应POST请求。如果浏览器使用GET请求访问 ``/login`` ，则调用login_form()函数来返回登录页面，浏览器使用POST方法提交表单后，调用login_submit()函数来检查用户有效性，并返回登录结果。接下来的 :ref:`tutorial-request` 章节中，会详细介绍 :attr:`Request.forms` 的用法。\"\n\n#: ../../tutorial.rst:209\nmsgid \"Special Methods: HEAD and ANY\"\nmsgstr \"特殊请求方法: HEAD 和 ANY\"\n\n#: ../../tutorial.rst:210\nmsgid \"\"\n\"The HEAD method is used to ask for the response identical to the one that \"\n\"would correspond to a GET request, but without the response body. This is \"\n\"useful for retrieving meta-information about a resource without having to \"\n\"download the entire document. Bottle handles these requests automatically by\"\n\" falling back to the corresponding GET route and cutting off the request \"\n\"body, if present. You don't have to specify any HEAD routes yourself.\"\nmsgstr \"HEAD方法类似于GET方法，但服务器不会返回HTTP响应正文，一般用于获取HTTP原数据而不用下载整个页面。Bottle像处理GET请求那样处理HEAD请求，但是会自动去掉HTTP响应正文。你无需亲自处理HEAD请求。\"\n\n#: ../../tutorial.rst:212\nmsgid \"\"\n\"Additionally, the non-standard ANY method works as a low priority fallback: \"\n\"Routes that listen to ANY will match requests regardless of their HTTP \"\n\"method but only if no other more specific route is defined. This is helpful \"\n\"for *proxy-routes* that redirect requests to more specific sub-applications.\"\nmsgstr \"另外，非标准的ANY方法做为一个低优先级的fallback：在没有其它route的时候，监听ANY方法的route会匹配所有请求，而不管请求的方法是什么。这对于用做代理的route很有用，可将所有请求都重定向给子应用。\"\n\n#: ../../tutorial.rst:214\nmsgid \"\"\n\"To sum it up: HEAD requests fall back to GET routes and all requests fall \"\n\"back to ANY routes, but only if there is no matching route for the original \"\n\"request method. It's as simple as that.\"\nmsgstr \"总而言之：HEAD请求被响应GET请求的route来处理，响应ANY请求的route处理所有请求，但仅限于没有其它route来匹配原先的请求的情况。就这么简单。\"\n\n#: ../../tutorial.rst:219\nmsgid \"Routing Static Files\"\nmsgstr \"静态文件映射\"\n\n#: ../../tutorial.rst:221\nmsgid \"\"\n\"Static files such as images or CSS files are not served automatically. You \"\n\"have to add a route and a callback to control which files get served and \"\n\"where to find them::\"\nmsgstr \"Bottle不会处理像图片或CSS文件的静态文件请求。你需要给静态文件提供一个route，一个回调函数(用于查找和控制静态文件的访问)。\"\n\n#: ../../tutorial.rst:228\nmsgid \"\"\n\"The :func:`static_file` function is a helper to serve files in a safe and \"\n\"convenient way (see :ref:`tutorial-static-files`). This example is limited \"\n\"to files directly within the ``/path/to/your/static/files`` directory \"\n\"because the ``<filename>`` wildcard won't match a path with a slash in it. \"\n\"To serve files in subdirectories, change the wildcard to use the `path` \"\n\"filter::\"\nmsgstr \":func:`static_file` 函数用于响应静态文件的请求。 (详见 :ref:`tutorial-static-files` )这个例子只能响应在 ``/path/to/your/static/files`` 目录下的文件请求，因为 ``<filename>`` 这样的通配符定义不能匹配一个路径(路径中包含\\\"/\\\")。 为了响应子目录下的文件请求，我们需要更改 `path` 过滤器的定义::\"\n\n#: ../../tutorial.rst:234\nmsgid \"\"\n\"Be careful when specifying a relative root-path such as \"\n\"``root='./static/files'``. The working directory (``./``) and the project \"\n\"directory are not always the same.\"\nmsgstr \"使用 ``root='./static/files'`` 这样的相对路径的时候，请注意当前工作目录 (``./``) 不一定是项目文件夹。\"\n\n#: ../../tutorial.rst:242\nmsgid \"Error Pages\"\nmsgstr \"错误页面\"\n\n#: ../../tutorial.rst:244\nmsgid \"\"\n\"If anything goes wrong, Bottle displays an informative but fairly plain \"\n\"error page. You can override the default for a specific HTTP status code \"\n\"with the :func:`error` decorator::\"\nmsgstr \"如果出错了，Bottle会显示一个默认的错误页面，提供足够的debug信息。你也可以使用 :func:`error` 函数来自定义你的错误页面::\"\n\n#: ../../tutorial.rst:251\nmsgid \"\"\n\"From now on, `404 File not Found` errors will display a custom error page to\"\n\" the user. The only parameter passed to the error-handler is an instance of \"\n\":exc:`HTTPError`. Apart from that, an error-handler is quite similar to a \"\n\"regular request callback. You can read from :data:`request`, write to \"\n\":data:`response` and return any supported data-type except for \"\n\":exc:`HTTPError` instances.\"\nmsgstr \"从现在开始，在遇到404错误的时候，将会返回你在上面自定义的页面。传给error404函数的唯一参数，是一个 :exc:`HTTPError` 对象的实例。除此之外，这个回调函数与我们用来响应普通请求的回调函数没有任何不同。你可以从 :data:`request` 中读取数据， 往 :data:`response` 中写入数据和返回所有支持的数据类型，除了 :exc:`HTTPError` 的实例。\"\n\n#: ../../tutorial.rst:253\nmsgid \"\"\n\"Error handlers are used only if your application returns or raises an \"\n\":exc:`HTTPError` exception (:func:`abort` does just that). Changing \"\n\":attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the \"\n\"error handler.\"\nmsgstr \"只有在你的应用返回或raise一个 :exc:`HTTPError` 异常的时候(就像 :func:`abort` 函数那样)，处理Error的函数才会被调用。更改 :attr:`Request.status` 或返回 :exc:`HTTPResponse` 不会触发错误处理函数。\"\n\n#: ../../tutorial.rst:263\nmsgid \"Generating content\"\nmsgstr \"生成内容\"\n\n#: ../../tutorial.rst:265\nmsgid \"\"\n\"In pure WSGI, the range of types you may return from your application is \"\n\"very limited. Applications must return an iterable yielding byte strings. \"\n\"You may return a string (because strings are iterable) but this causes most \"\n\"servers to transmit your content char by char. Unicode strings are not \"\n\"allowed at all. This is not very practical.\"\nmsgstr \"在纯WSGI环境里，你的应用能返回的内容类型相当有限。应用必须返回一个iterable的字节型字符串。你可以返回一个字符串(因为字符串是iterable的)，但这会导致服务器按字符来传输你的内容。Unicode字符串根本不允许。这不是很实用。\"\n\n#: ../../tutorial.rst:267\nmsgid \"\"\n\"Bottle is much more flexible and supports a wide range of types. It even \"\n\"adds a ``Content-Length`` header if possible and encodes unicode \"\n\"automatically, so you don't have to. What follows is a list of data types \"\n\"you may return from your application callbacks and a short description of \"\n\"how these are handled by the framework:\"\nmsgstr \"Bottle支持返回更多的内容类型，更具弹性。它甚至能在合适的情况下，在HTTP头中添加 `Content-Length` 字段和自动转换unicode编码。下面列出了所有你能返回的内容类型，以及框架处理方式的一个简述。\"\n\n#: ../../tutorial.rst:270\nmsgid \"Dictionaries\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:270\nmsgid \"\"\n\"As mentioned above, Python dictionaries (or subclasses thereof) are \"\n\"automatically transformed into JSON strings and returned to the browser with\"\n\" the ``Content-Type`` header set to ``application/json``. This makes it easy\"\n\" to implement json-based APIs. Data formats other than json are supported \"\n\"too. See the :ref:`tutorial-output-filter` to learn more.\"\nmsgstr \"上面已经提及，Python中的字典类型(或其子类)会被自动转换为JSON字符串。返回给浏览器的时候，HTTP头的 ``Content-Type`` 字段被自动设置为 `` application/json`` 。可十分简单地实现基于JSON的API。Bottle同时支持json之外的数据类型，详见 :ref:`tutorial-output-filter` 。\"\n\n#: ../../tutorial.rst:273\nmsgid \"Empty Strings, ``False``, ``None`` or other non-true values:\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:273\nmsgid \"\"\n\"These produce an empty output with the ``Content-Length`` header set to 0.\"\nmsgstr \"输出为空， ``Content-Length`` 设为0。\"\n\n#: ../../tutorial.rst:276\nmsgid \"Unicode strings\"\nmsgstr \"Unicode的问题\"\n\n#: ../../tutorial.rst:276\nmsgid \"\"\n\"Unicode strings (or iterables yielding unicode strings) are automatically \"\n\"encoded with the codec specified in the ``Content-Type`` header (utf8 by \"\n\"default) and then treated as normal byte strings (see below).\"\nmsgstr \"Unicode字符串 (or iterables yielding unicode strings) 被自动转码， ``Content-Type`` 被默认设置为utf8，接着视之为普通字符串(见下文)。\"\n\n#: ../../tutorial.rst:279\nmsgid \"Byte strings\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:279\nmsgid \"\"\n\"Bottle returns strings as a whole (instead of iterating over each char) and \"\n\"adds a ``Content-Length`` header based on the string length. Lists of byte \"\n\"strings are joined first. Other iterables yielding byte strings are not \"\n\"joined because they may grow too big to fit into memory. The ``Content-\"\n\"Length`` header is not set in this case.\"\nmsgstr \"Bottle将字符串当作一个整体来返回(而不是按字符来遍历)，并根据字符串长度添加 ``Content-Length`` 字段。包含字节型字符串的列表先被合并。其它iterable的字节型字符串不会被合并，因为它们也许太大来，耗内存。在这种情况下， ``Content-Length`` 字段不会被设置。\"\n\n#: ../../tutorial.rst:282\nmsgid \"Instances of :exc:`HTTPError` or :exc:`HTTPResponse`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:282\nmsgid \"\"\n\"Returning these has the same effect as when raising them as an exception. In\"\n\" case of an :exc:`HTTPError`, the error handler is applied. See :ref\"\n\":`tutorial-errorhandling` for details.\"\nmsgstr \"返回它们和直接raise出来有一样的效果。对于 :exc:`HTTPError` 来说，会调用错误处理程序。详见 :ref:`tutorial-errorhandling` 。\"\n\n#: ../../tutorial.rst:285\nmsgid \"File objects\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:285\nmsgid \"\"\n\"Everything that has a ``.read()`` method is treated as a file or file-like \"\n\"object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI \"\n\"server framework. Some WSGI server implementations can make use of optimized\"\n\" system calls (sendfile) to transmit files more efficiently. In other cases \"\n\"this just iterates over chunks that fit into memory. Optional headers such \"\n\"as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use \"\n\":func:`send_file` if possible. See :ref:`tutorial-static-files` for details.\"\nmsgstr \"任何有 ``.read()`` 方法的对象都被当成一个file-like对象来对待，会被传给 WSGI Server 框架定义的 ``wsgi.file_wrapper`` callable对象来处理。一些WSGI Server实现会利用优化过的系统调用(sendfile)来更有效地传输文件，另外就是分块遍历。可选的HTTP头，例如 ``Content-Length`` 和 ``Content-Type`` 不会被自动设置。尽可能使用 :func:`send_file` 。详见 :ref:`tutorial-static-files` 。\"\n\n#: ../../tutorial.rst:288\nmsgid \"Iterables and generators\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:288\nmsgid \"\"\n\"You are allowed to use ``yield`` within your callbacks or return an \"\n\"iterable, as long as the iterable yields byte strings, unicode strings, \"\n\":exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not \"\n\"supported, sorry. Please note that the HTTP status code and the headers are \"\n\"sent to the browser as soon as the iterable yields its first non-empty \"\n\"value. Changing these later has no effect.\"\nmsgstr \"你可以在回调函数中使用 ``yield`` 语句，或返回一个iterable的对象，只要该对象返回的是字节型字符串，unicode字符串， :exc:`HTTPError` 或 :exc:`HTTPResponse` 实例。不支持嵌套iterable对象，不好意思。注意，在iterable对象返回第一个非空值的时候，就会把HTTP状态码和HTTP头发送给浏览器。稍后再更改它们就起不到什么作用了。\"\n\n#: ../../tutorial.rst:290\nmsgid \"\"\n\"The ordering of this list is significant. You may for example return a \"\n\"subclass of :class:`str` with a ``read()`` method. It is still treated as a \"\n\"string instead of a file, because strings are handled first.\"\nmsgstr \"以上列表的顺序非常重要。在你返回一个 :class:`str` 类的子类的时候，即使它有 ``.read()`` 方法，它依然会被当成一个字符串对待，而不是文件，因为字符串先被处理。\"\n\n#: ../../tutorial.rst:293\nmsgid \"Changing the Default Encoding\"\nmsgstr \"改变默认编码\"\n\n#: ../../tutorial.rst:294\nmsgid \"\"\n\"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide\"\n\" how to encode unicode strings. This header defaults to ``text/html; \"\n\"charset=UTF8`` and can be changed using the :attr:`Response.content_type` \"\n\"attribute or by setting the :attr:`Response.charset` attribute directly. \"\n\"(The :class:`Response` object is described in the section :ref:`tutorial-\"\n\"response`.)\"\nmsgstr \"Bottle使用 ``Content-Type`` 的 `charset` 参数来决定编码unicode字符串的方式。默认的 ``Content-Type`` 是 ``text/html;charset=UTF8`` ，可在 :attr:`Response.content_type` 属性中修改，或直接设置 :attr:`Response.charset` 的值。关于 :class:`Response` 对象的介绍，详见 :ref:`tutorial-response` 。\"\n\n#: ../../tutorial.rst:309\nmsgid \"\"\n\"In some rare cases the Python encoding names differ from the names supported\"\n\" by the HTTP specification. Then, you have to do both: first set the \"\n\":attr:`Response.content_type` header (which is sent to the client unchanged)\"\n\" and then set the :attr:`Response.charset` attribute (which is used to \"\n\"encode unicode).\"\nmsgstr \"在极少情况下，Python中定义的编码名字和HTTP标准中的定义不一样。这样，你就必须同时修改 :attr:`Response.content_type`` (发送给客户端的)和设置 :attr:`Response.charset` 属性 (用于编码unicode)。\"\n\n#: ../../tutorial.rst:314\nmsgid \"Static Files\"\nmsgstr \"静态文件\"\n\n#: ../../tutorial.rst:316\nmsgid \"\"\n\"You can directly return file objects, but :func:`static_file` is the \"\n\"recommended way to serve static files. It automatically guesses a mime-type,\"\n\" adds a ``Last-Modified`` header, restricts paths to a ``root`` directory \"\n\"for security reasons and generates appropriate error responses (403 on \"\n\"permission errors, 404 on missing files). It even supports the ``If-\"\n\"Modified-Since`` header and eventually generates a ``304 Not Modified`` \"\n\"response. You can pass a custom MIME type to disable guessing.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:329\nmsgid \"\"\n\"You can raise the return value of :func:`static_file` as an exception if you\"\n\" really need to.\"\nmsgstr \"如果确实需要，你可将 :func:`static_file` 的返回值当作异常raise出来。\"\n\n#: ../../tutorial.rst:332\nmsgid \"Forced Download\"\nmsgstr \"强制下载\"\n\n#: ../../tutorial.rst:333\nmsgid \"\"\n\"Most browsers try to open downloaded files if the MIME type is known and \"\n\"assigned to an application (e.g. PDF files). If this is not what you want, \"\n\"you can force a download dialog and even suggest a filename to the user::\"\nmsgstr \"大多数浏览器在知道MIME类型的时候，会尝试直接调用相关程序来打开文件(例如PDF文件)。如果你不想这样，你可强制浏览器只是下载该文件，甚至提供文件名。::\"\n\n#: ../../tutorial.rst:339\nmsgid \"\"\n\"If the ``download`` parameter is just ``True``, the original filename is \"\n\"used.\"\nmsgstr \"如果 ``download`` 参数的值为 ``True`` ，会使用原始的文件名。\"\n\n#: ../../tutorial.rst:344\nmsgid \"HTTP Errors and Redirects\"\nmsgstr \"HTTP错误和重定向\"\n\n#: ../../tutorial.rst:346\nmsgid \"\"\n\"The :func:`abort` function is a shortcut for generating HTTP error pages.\"\nmsgstr \":func:`abort` 函数是生成HTTP错误页面的一个捷径。\"\n\n#: ../../tutorial.rst:355\nmsgid \"\"\n\"To redirect a client to a different URL, you can send a ``303 See Other`` \"\n\"response with the ``Location`` header set to the new URL. :func:`redirect` \"\n\"does that for you::\"\nmsgstr \"为了将用户访问重定向到其他URL，你在 ``Location`` 中设置新的URL，接着返回一个 ``303 See Other`` 。 :func:`redirect` 函数可以帮你做这件事情。\"\n\n#: ../../tutorial.rst:362\nmsgid \"You may provide a different HTTP status code as a second parameter.\"\nmsgstr \"你可以在第二个参数中提供另外的HTTP状态码。\"\n\n#: ../../tutorial.rst:365\nmsgid \"\"\n\"Both functions will interrupt your callback code by raising an \"\n\":exc:`HTTPResponse` exception.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:368\nmsgid \"Other Exceptions\"\nmsgstr \"其他异常\"\n\n#: ../../tutorial.rst:369\nmsgid \"\"\n\"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will \"\n\"result in a ``500 Internal Server Error`` response, so they won't crash your\"\n\" WSGI server. You can turn off this behavior to handle exceptions in your \"\n\"middleware by setting ``bottle.app().catchall`` to ``False``.\"\nmsgstr \"除了 :exc:`HTTPResponse` 或 :exc:`HTTPError` 以外的其他异常，都会导致500错误，所以不会造成WSGI服务器崩溃。你将 ``bottle.app().catchall`` 的值设为 ``False`` 来关闭这种行为，以便在你的中间件中处理异常。\"\n\n#: ../../tutorial.rst:375\nmsgid \"The :class:`Response` Object\"\nmsgstr \":class:`Response` 对象\"\n\n#: ../../tutorial.rst:377\nmsgid \"\"\n\"Response metadata such as the HTTP status code, response headers and cookies\"\n\" are stored in an object called :data:`response` up to the point where they \"\n\"are transmitted to the browser. You can manipulate these metadata directly \"\n\"or use the predefined helper methods to do so. The full API and feature list\"\n\" is described in the API section (see :class:`Response`), but the most \"\n\"common use cases and features are covered here, too.\"\nmsgstr \"诸如HTTP状态码，HTTP响应头，用户cookie等元数据都保存在一个名字为 :data:`response` 的对象里面，接着被传输给浏览器。你可直接操作这些元数据或使用一些更方便的函数。在API章节可查到所有相关API(详见 :class:`Response` )，这里主要介绍一些常用方法。\"\n\n#: ../../tutorial.rst:380\nmsgid \"Status Code\"\nmsgstr \"状态码\"\n\n#: ../../tutorial.rst:381\nmsgid \"\"\n\"The `HTTP status code <http_code>`_ controls the behavior of the browser and\"\n\" defaults to ``200 OK``. In most scenarios you won't need to set the \"\n\":attr:`Response.status` attribute manually, but use the :func:`abort` helper\"\n\" or return an :exc:`HTTPResponse` instance with the appropriate status code.\"\n\" Any integer is allowed, but codes other than the ones defined by the `HTTP \"\n\"specification <http_code>`_ will only confuse the browser and break \"\n\"standards.\"\nmsgstr \"`HTTP状态码 <http_code>`_ 控制着浏览器的行为，默认为 ``200 OK`` 。多数情况下，你不必手动修改 :attr:`Response.status` 的值，可使用 :func:`abort` 函数或return一个 :exc:`HTTPResponse` 实例(带有合适的状态码)。虽然所有整数都可当作状态码返回，但浏览器不知道如何处理 `HTTP标准 <http_code>`_ 中定义的那些状态码之外的数字，你也破坏了大家约定的标准。\"\n\n#: ../../tutorial.rst:384\nmsgid \"Response Header\"\nmsgstr \"响应头\"\n\n#: ../../tutorial.rst:385\nmsgid \"\"\n\"Response headers such as ``Cache-Control`` or ``Location`` are defined via \"\n\":meth:`Response.set_header`. This method takes two parameters, a header name\"\n\" and a value. The name part is case-insensitive::\"\nmsgstr \"``Cache-Control`` 和 ``Location`` 之类的响应头通过 :meth:`Response.set_header` 来定义。这个方法接受两个参数，一个是响应头的名字，一个是它的值，名字是大小写敏感的。\"\n\n#: ../../tutorial.rst:392\nmsgid \"\"\n\"Most headers are unique, meaning that only one header per name is send to \"\n\"the client. Some special headers however are allowed to appear more than \"\n\"once in a response. To add an additional header, use \"\n\":meth:`Response.add_header` instead of :meth:`Response.set_header`::\"\nmsgstr \"大多数的响应头是唯一的，meaning that only one header per name is send to the client。一些特殊的响应头在一次response中允许出现多次。使用 :meth:`Response.add_header` 来添加一个额外的响应头，而不是 :meth:`Response.set_header` ::\"\n\n#: ../../tutorial.rst:397\nmsgid \"\"\n\"Please note that this is just an example. If you want to work with cookies, \"\n\"read :ref:`ahead <tutorial-cookies>`.\"\nmsgstr \"请注意，这只是一个例子。如果你想使用cookie，详见 :ref:`ahead <tutorial-cookies>` 。\"\n\n#: ../../tutorial.rst:403 ../../tutorial.rst:533\nmsgid \"Cookies\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:405\nmsgid \"\"\n\"A cookie is a named piece of text stored in the user's browser profile. You \"\n\"can access previously defined cookies via :meth:`Request.get_cookie` and set\"\n\" new cookies with :meth:`Response.set_cookie`::\"\nmsgstr \"Cookie是储存在浏览器配置文件里面的一小段文本。你可通过 :meth:`Request.get_cookie` 来访问已存在的Cookie，或通过 :meth:`Response.set_cookie` 来设置新的Cookie。\"\n\n#: ../../tutorial.rst:415\nmsgid \"\"\n\"The :meth:`Response.set_cookie` method accepts a number of additional \"\n\"keyword arguments that control the cookies lifetime and behavior. Some of \"\n\"the most common settings are described here:\"\nmsgstr \":meth:`Response.set_cookie` 方法接受一系列额外的参数，来控制Cookie的生命周期及行为。一些常用的设置如下:\"\n\n#: ../../tutorial.rst:417\nmsgid \"**max_age:**    Maximum age in seconds. (default: ``None``)\"\nmsgstr \"**max_age:**    最大有效时间，以秒为单位 (默认: ``None``)\"\n\n#: ../../tutorial.rst:418\nmsgid \"\"\n\"**expires:**    A datetime object or UNIX timestamp. (default: ``None``)\"\nmsgstr \"**expires:**    一个datetime对象或一个UNIX timestamp (默认: ``None``)\"\n\n#: ../../tutorial.rst:419\nmsgid \"\"\n\"**domain:**     The domain that is allowed to read the cookie. (default: \"\n\"current domain)\"\nmsgstr \"**domain:**     可访问该Cookie的域名 (默认: 当前域名)\"\n\n#: ../../tutorial.rst:420\nmsgid \"**path:**       Limit the cookie to a given path (default: ``/``)\"\nmsgstr \"**path:**       限制cookie的访问路径 (默认: ``/``)\"\n\n#: ../../tutorial.rst:421\nmsgid \"**secure:**     Limit the cookie to HTTPS connections (default: off).\"\nmsgstr \"**secure:**     只允许在HTTPS链接中访问cookie (默认: off)\"\n\n#: ../../tutorial.rst:422\nmsgid \"\"\n\"**httponly:**   Prevent client-side javascript to read this cookie (default:\"\n\" off, requires Python 2.7 or newer).\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:423\nmsgid \"\"\n\"**same_site:**  Disables third-party use for a cookie. Allowed attributes: \"\n\"`lax` and `strict`. In strict mode the cookie will never be sent. In lax \"\n\"mode the cookie is only sent with a top-level GET request.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:425\nmsgid \"\"\n\"If neither `expires` nor `max_age` is set, the cookie expires at the end of \"\n\"the browser session or as soon as the browser window is closed. There are \"\n\"some other gotchas you should consider when using cookies:\"\nmsgstr \"如果 `expires` 和 `max_age` 两个值都没设置，cookie会在当前的浏览器session失效或浏览器窗口关闭后失效。在使用cookie的时候，应该注意一下几个陷阱。\"\n\n#: ../../tutorial.rst:427\nmsgid \"Cookies are limited to 4 KB of text in most browsers.\"\nmsgstr \"在大多数浏览器中，cookie的最大容量为4KB。\"\n\n#: ../../tutorial.rst:428\nmsgid \"\"\n\"Some users configure their browsers to not accept cookies at all. Most \"\n\"search engines ignore cookies too. Make sure that your application still \"\n\"works without cookies.\"\nmsgstr \"一些用户将浏览器设置为不接受任何cookie。大多数搜索引擎也忽略cookie。确保你的应用在无cookie的时候也能工作。\"\n\n#: ../../tutorial.rst:429\nmsgid \"\"\n\"Cookies are stored at client side and are not encrypted in any way. Whatever\"\n\" you store in a cookie, the user can read it. Worse than that, an attacker \"\n\"might be able to steal a user's cookies through `XSS \"\n\"<http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_\"\n\" vulnerabilities on your side. Some viruses are known to read the browser \"\n\"cookies, too. Thus, never store confidential information in cookies.\"\nmsgstr \"cookie被储存在客户端，也没被加密。你在cookie中储存的任何数据，用户都可以读取。更坏的情况下，cookie会被攻击者通过 `XSS <http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_ 偷走，一些已知病毒也会读取浏览器的cookie。既然如此，就不要在cookie中储存任何敏感信息。\"\n\n#: ../../tutorial.rst:430\nmsgid \"Cookies are easily forged by malicious clients. Do not trust cookies.\"\nmsgstr \"cookie可以被伪造，不要信任cookie！\"\n\n#: ../../tutorial.rst:435\nmsgid \"Signed Cookies\"\nmsgstr \"Cookie签名\"\n\n#: ../../tutorial.rst:436\nmsgid \"\"\n\"As mentioned above, cookies are easily forged by malicious clients. Bottle \"\n\"can cryptographically sign your cookies to prevent this kind of \"\n\"manipulation. All you have to do is to provide a signature key via the \"\n\"`secret` keyword argument whenever you read or set a cookie and keep that \"\n\"key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` \"\n\"if the cookie is not signed or the signature keys don't match::\"\nmsgstr \"上面提到，cookie容易被客户端伪造。Bottle可通过加密cookie来防止此类攻击。你只需在读取和设置cookie的时候，通过 `secret` 参数来提供一个密钥。如果cookie未签名或密钥不匹配， :meth:`Request.get_cookie` 方法返回 ``None`` \"\n\n#: ../../tutorial.rst:456\nmsgid \"\"\n\"In addition, Bottle automatically pickles and unpickles any data stored to \"\n\"signed cookies. This allows you to store any pickle-able object (not only \"\n\"strings) to cookies, as long as the pickled data does not exceed the 4 KB \"\n\"limit.\"\nmsgstr \"例外，Bottle自动序列化储存在签名cookie里面的数据。你可在cookie中储存任何可序列化的对象(不仅仅是字符串)，只要对象大小不超过4KB。\"\n\n#: ../../tutorial.rst:458\nmsgid \"\"\n\"Signed cookies are not encrypted (the client can still see the content) and \"\n\"not copy-protected (the client can restore an old cookie). The main \"\n\"intention is to make pickling and unpickling safe and prevent manipulation, \"\n\"not to store secret information at client side.\"\nmsgstr \"签名cookie在客户端不加密(译者注：即在客户端没有经过二次加密)，也没有写保护(客户端可使用之前的cookie)。给cookie签名的主要意义在于在cookie中存储序列化对象和防止伪造cookie，依然不要在cookie中存储敏感信息。\"\n\n#: ../../tutorial.rst:471\nmsgid \"Request Data\"\nmsgstr \"请求数据 (Request Data)\"\n\n#: ../../tutorial.rst:473\nmsgid \"\"\n\"Cookies, HTTP header, HTML ``<form>`` fields and other request data is \"\n\"available through the global :data:`request` object. This special object \"\n\"always refers to the *current* request, even in multi-threaded environments \"\n\"where multiple client connections are handled at the same time::\"\nmsgstr \"可通过全局的 :data:`request` 对象来访问Cookies，HTTP头，HTML的 ``<form>`` 字段，以及其它的请求数据。这个特殊的对象总是指向 *当前* 的请求，即使在同时处理多个客户端连接的多线程情况下。\"\n\n#: ../../tutorial.rst:482\nmsgid \"\"\n\"The :data:`request` object is a subclass of :class:`BaseRequest` and has a \"\n\"very rich API to access data. We only cover the most commonly used features \"\n\"here, but it should be enough to get started.\"\nmsgstr \":data:`request` 对象继承自 :class:`BaseRequest` ，提供了丰富的API来访问数据。虽然我们只介绍最常用的特性，也足够入门了。\"\n\n#: ../../tutorial.rst:487\nmsgid \"Introducing :class:`FormsDict`\"\nmsgstr \"介绍 :class:`FormsDict` \"\n\n#: ../../tutorial.rst:489\nmsgid \"\"\n\"Bottle uses a special type of dictionary to store form data and cookies. \"\n\":class:`FormsDict` behaves like a normal dictionary, but has some additional\"\n\" features to make your life easier.\"\nmsgstr \"Bottle使用了一个特殊的字典来储存表单数据和cookies。 :class:`FormsDict` 表现得像一个普通的字典，但提供了更方便的额外功能。\"\n\n#: ../../tutorial.rst:491\nmsgid \"\"\n\"**Attribute access**: All values in the dictionary are also accessible as \"\n\"attributes. These virtual attributes return unicode strings, even if the \"\n\"value is missing or unicode decoding fails. In that case, the string is \"\n\"empty, but still present::\"\nmsgstr \"**属性访问** ：字典中所有的值都可以当做属性来访问。这些虚拟的属性返回unicode字符串。在字典中缺少对应的值，或unicode解码失败的情况下，属性返回的字符串为空。\"\n\n#: ../../tutorial.rst:506\nmsgid \"\"\n\"**Multiple values per key:** :class:`FormsDict` is a subclass of \"\n\":class:`MultiDict` and can store more than one value per key. The standard \"\n\"dictionary access methods will only return a single value, but the \"\n\":meth:`~MultiDict.getall` method returns a (possibly empty) list of all \"\n\"values for a specific key::\"\nmsgstr \"**一个key对应多个value：** :class:`FormsDict` 是 :class:`MutilDict` 的子类，一个key可存储多个value。标准的字典访问方法只返回一个值，但 :meth:`~MultiDict.getall` 方法会返回一个包含了所有value的一个list（也许为空）。\"\n\n#: ../../tutorial.rst:511\nmsgid \"\"\n\"**WTForms support:** Some libraries (e.g. `WTForms \"\n\"<http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input.\"\n\" :meth:`FormsDict.decode` does that for you. It decodes all values and \"\n\"returns a copy of itself, while preserving multiple values per key and all \"\n\"the other features.\"\nmsgstr \"**WTForms支持：** 一些第三方库（例如 `WTForms <http://wtforms.simplecodes.com/>`_ ）希望输入中的所有字典都是unicode的。 :meth:`FormsDict.decode` 帮你做了这件事情。它将所有value重新编码，并返回原字典的一个拷贝，同时保留所有特性，例如一个key对应多个value。\"\n\n#: ../../tutorial.rst:515\nmsgid \"\"\n\"In **Python 2** all keys and values are byte-strings. If you need unicode, \"\n\"you can call :meth:`FormsDict.getunicode` or fetch values via attribute \"\n\"access. Both methods try to decode the string (default: utf8) and return an \"\n\"empty string if that fails. No need to catch :exc:`UnicodeError`::\"\nmsgstr \"在 **Python2** 中，所有的key和value都是byte-string。如果你需要unicode，可使用 :meth:`FormsDict.getunicode` 方法或像访问属性那样访问。这两种方法都试着将字符串转码(默认: utf8)，如果失败，将返回一个空字符串。无需捕获 :exc:`UnicodeError` 异常。\"\n\n#: ../../tutorial.rst:522\nmsgid \"\"\n\"In **Python 3** all strings are unicode, but HTTP is a byte-based wire \"\n\"protocol. The server has to decode the byte strings somehow before they are \"\n\"passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 \"\n\"(aka latin1), a reversible single-byte codec that can be re-encoded with a \"\n\"different encoding later. Bottle does that for :meth:`FormsDict.getunicode` \"\n\"and attribute access, but not for the dict-access methods. These return the \"\n\"unchanged values as provided by the server implementation, which is probably\"\n\" not what you want.\"\nmsgstr \"在 **Python3** 中，所有的字符串都是unicode。但HTTP是基于字节的协议，在byte-string被传给应用之前，服务器必须将其转码。安全起见，WSGI协议建议使用ISO-8859-1 (即是latin1)，一个可反转的单字节编码，可被转换为其他编码。Bottle通过 :meth:`FormsDict.getunicode` 和属性访问实现了转码，但不支持字典形式的访问。通过字典形式的访问，将直接返回服务器返回的字符串，未经处理，这或许不是你想要的。\"\n\n#: ../../tutorial.rst:529\nmsgid \"\"\n\"If you need the whole dictionary with correctly decoded values (e.g. for \"\n\"WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy.\"\nmsgstr \"如果你整个字典包含正确编码后的值(e.g. for WTForms)，可通过 :meth:`FormsDict.decode` 方法来获取一个转码后的拷贝(译者注：一个新的实例)。\"\n\n#: ../../tutorial.rst:535\nmsgid \"\"\n\"Cookies are small pieces of text stored in the clients browser and sent back\"\n\" to the server with each request. They are useful to keep some state around \"\n\"for more than one request (HTTP itself is stateless), but should not be used\"\n\" for security related stuff. They can be easily forged by the client.\"\nmsgstr \"Cookie是客户端浏览器存储的一些文本数据，在每次请求的时候发送回给服务器。Cookie被用于在多次请求间保留状态信息（HTTP本身是无状态的），但不应该用于保存安全相关信息。因为客户端很容易伪造Cookie。\"\n\n#: ../../tutorial.rst:537\nmsgid \"\"\n\"All cookies sent by the client are available through \"\n\":attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a \"\n\"simple cookie-based view counter::\"\nmsgstr \"可通过 :attr:`BaseRequest.cookies` (一个 :class:`FormsDict`) 来访问所有客户端发来的Cookie。下面的是一个基于Cookie的访问计数。\"\n\n#: ../../tutorial.rst:547\nmsgid \"\"\n\"The :meth:`BaseRequest.get_cookie` method is a different way do access \"\n\"cookies. It supports decoding :ref:`signed cookies <tutorial-signed-\"\n\"cookies>` as described in a separate section.\"\nmsgstr \":meth:`BaseRequest.get_cookie` 是访问cookie的另一种方法。它支持解析 :ref:`signed cookies <tutorial-signed-cookies>` 。\"\n\n#: ../../tutorial.rst:550\nmsgid \"HTTP Headers\"\nmsgstr \"HTTP头\"\n\n#: ../../tutorial.rst:552\nmsgid \"\"\n\"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or \"\n\"``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible \"\n\"through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict`\"\n\" is basically a dictionary with case-insensitive keys::\"\nmsgstr \"所有客户端发送过来的HTTP头(例如 ``Referer``, ``Agent`` 和 ``Accept-Language``)存储在一个 :class:`WSGIHeaderDict` 中，可通过 :attr:`BaseRequest.headers` 访问。  :class:`WSGIHeaderDict` 基本上是一个字典，其key大小写敏感。\"\n\n#: ../../tutorial.rst:564\nmsgid \"Query Variables\"\nmsgstr \"查询变量\"\n\n#: ../../tutorial.rst:566\nmsgid \"\"\n\"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit\"\n\" a small number of key/value pairs to the server. You can use the \"\n\":attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these \"\n\"values and the :attr:`BaseRequest.query_string` attribute to get the whole \"\n\"string.\"\nmsgstr \"查询字符串(例如 ``/forum?id=1&page=5`` )一般用于向服务器传输键值对。你可通过 :attr:`BaseRequest.query` ( :class:`FormsDict` 类的实例) 来访问，和通过 :attr:`BaseRequest.query_string` 来获取整个字符串。\"\n\n#: ../../tutorial.rst:579\nmsgid \"HTML `<form>` Handling\"\nmsgstr \"处理HTML的 `<form>` 标签\"\n\n#: ../../tutorial.rst:581\nmsgid \"\"\n\"Let us start from the beginning. In HTML, a typical ``<form>`` looks \"\n\"something like this:\"\nmsgstr \"让我们从头开始。在HTML中，一个典型的 ``<form>`` 标签看起来是这样的。\"\n\n#: ../../tutorial.rst:591\nmsgid \"\"\n\"The ``action`` attribute specifies the URL that will receive the form data. \"\n\"``method`` defines the HTTP method to use (``GET`` or ``POST``). With \"\n\"``method=\\\"get\\\"`` the form values are appended to the URL and available \"\n\"through :attr:`BaseRequest.query` as described above. This is considered \"\n\"insecure and has other limitations, so we use ``method=\\\"post\\\"`` here. If \"\n\"in doubt, use ``POST`` forms.\"\nmsgstr \"``action`` 属性指定了用于接收表单数据的URL， ``method`` 定义了使用的HTTP方法（ ``GET`` 或 ``POST`` ）。如果使用GET方法，表单中的数据会附加到URL后面，可通过 :attr:`BaseRequest.query` 来访问。这被认为是不安全的，且有其它限制。所以这里我们使用POST方法。如果有疑惑，就使用 ``POST`` 吧。\"\n\n#: ../../tutorial.rst:593\nmsgid \"\"\n\"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms`\"\n\" as a :class:`FormsDict`. The server side code may look like this::\"\nmsgstr \"通过POST方法传输的表单字段，作为一个 :class:`FormsDict` 存储在 :attr:`BaseRequest.forms` 中。服务器端的代码看起来是这样的。\"\n\n#: ../../tutorial.rst:616\nmsgid \"\"\n\"There are several other attributes used to access form data. Some of them \"\n\"combine values from different sources for easier access. The following table\"\n\" should give you a decent overview.\"\nmsgstr \"有其它一些属性也可以用来访问表单数据。为了方便，一些属性包含了多个来源的数据。下面的表格可给你一个直观的印象。\"\n\n#: ../../tutorial.rst:619\nmsgid \"Attribute\"\nmsgstr \"属性\"\n\n#: ../../tutorial.rst:619\nmsgid \"GET Form fields\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:619\nmsgid \"POST Form fields\"\nmsgstr \"POST表单数据\"\n\n#: ../../tutorial.rst:619\nmsgid \"File Uploads\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621\nmsgid \":attr:`BaseRequest.query`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:622 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:624 ../../tutorial.rst:625\n#: ../../tutorial.rst:626 ../../tutorial.rst:626\nmsgid \"yes\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:621 ../../tutorial.rst:621 ../../tutorial.rst:622\n#: ../../tutorial.rst:622 ../../tutorial.rst:623 ../../tutorial.rst:623\n#: ../../tutorial.rst:624 ../../tutorial.rst:625 ../../tutorial.rst:625\n#: ../../tutorial.rst:626\nmsgid \"no\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:622\nmsgid \":attr:`BaseRequest.forms`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:623\nmsgid \":attr:`BaseRequest.files`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:624\nmsgid \":attr:`BaseRequest.params`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:625\nmsgid \":attr:`BaseRequest.GET`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:626\nmsgid \":attr:`BaseRequest.POST`\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:631\nmsgid \"File uploads\"\nmsgstr \"文件上传\"\n\n#: ../../tutorial.rst:633\nmsgid \"\"\n\"To support file uploads, we have to change the ``<form>`` tag a bit. First, \"\n\"we tell the browser to encode the form data in a different way by adding an \"\n\"``enctype=\\\"multipart/form-data\\\"`` attribute to the ``<form>`` tag. Then, \"\n\"we add ``<input type=\\\"file\\\" />`` tags to allow the user to select a file. \"\n\"Here is an example:\"\nmsgstr \"为了支持文件上传，我们需要小改一下上面 ``<form>`` 标签，加上 ``enctype=\\\"multipart/form-data\\\"`` 属性，告诉浏览器用另一种方式编码表单数据。接下来，我们添加 ``<input type=\\\"file\\\" />`` 标签，让用户可以选择需要上传的文件。例子如下。\"\n\n#: ../../tutorial.rst:643\nmsgid \"\"\n\"Bottle stores file uploads in :attr:`BaseRequest.files` as \"\n\":class:`FileUpload` instances, along with some metadata about the upload. \"\n\"Let us assume you just want to save the file to disk::\"\nmsgstr \"Bottle将上传的文件当做一个 :class:`FileUpload` 实例存储在 :attr:`BaseRequest.files` 中，伴随着一些这次上传的元数据。我们假设你仅是想把上传的文件保存到磁盘中。\"\n\n#: ../../tutorial.rst:657\nmsgid \"\"\n\":attr:`FileUpload.filename` contains the name of the file on the clients \"\n\"file system, but is cleaned up and normalized to prevent bugs caused by \"\n\"unsupported characters or path segments in the filename. If you need the \"\n\"unmodified name as sent by the client, have a look at \"\n\":attr:`FileUpload.raw_filename`.\"\nmsgstr \":attr:`FileUpload.filename` 包含客户端传上来的文件的文件名，但为了防止异常字符带来的bug，这里的文件名已经被处理过。如果你需要未经改动的文件名，看看 :attr:`FileUpload.raw_filename` 。\"\n\n#: ../../tutorial.rst:659\nmsgid \"\"\n\"The :attr:`FileUpload.save` method is highly recommended if you want to \"\n\"store the file to disk. It prevents some common errors (e.g. it does not \"\n\"overwrite existing files unless you tell it to) and stores the file in a \"\n\"memory efficient way. You can access the file object directly via \"\n\":attr:`FileUpload.file`. Just be careful.\"\nmsgstr \"如果你想将文件保存到磁盘，强烈建议你使用 :attr:`FileUpload.save` 方法。它避免了一些常见的错误（例如，它不会覆盖已经存在的文件，除非你告诉它可以覆盖），并且更有效地使用内存。你可以通过 :attr:`FileUpload.file` 来直接访问文件对象，但是要谨慎。\"\n\n#: ../../tutorial.rst:663\nmsgid \"JSON Content\"\nmsgstr \"JSON内容\"\n\n#: ../../tutorial.rst:665\nmsgid \"\"\n\"Some JavaScript or REST clients send ``application/json`` content to the \"\n\"server. The :attr:`BaseRequest.json` attribute contains the parsed data \"\n\"structure, if available.\"\nmsgstr \"一些JavaScript或支持REST的客户端会发送 ``application/json`` 内容给服务器。如果可用（合法的JSON）， :attr:`BaseRequest.json` 会包含解析后的数据结构。\"\n\n#: ../../tutorial.rst:669\nmsgid \"The raw request body\"\nmsgstr \"原始的请求数据\"\n\n#: ../../tutorial.rst:671\nmsgid \"\"\n\"You can access the raw body data as a file-like object via \"\n\":attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary \"\n\"file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` \"\n\"setting. In both cases the body is completely buffered before you can access\"\n\" the attribute. If you expect huge amounts of data and want to get direct \"\n\"unbuffered access to the stream, have a look at ``request['wsgi.input']``.\"\nmsgstr \"你可以把  :attr:`BaseRequest.body` 当做一个file-like 对象来访问。根据内容的长度，以及 :attr:`BaseRequest.MEMFILE_MAX` 中的设置，它可以是一个 :class:`BytesIO` 缓存或一个磁盘上的临时文件。无论如何，它都是被缓存的。如果你无需缓存，想直接访问文件流，可看看 ``request['wsgi.input']`` 。\"\n\n#: ../../tutorial.rst:676\nmsgid \"WSGI Environment\"\nmsgstr \"WSGI环境\"\n\n#: ../../tutorial.rst:678\nmsgid \"\"\n\"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The \"\n\"original is stored in :attr:`BaseRequest.environ`, but the request object \"\n\"itself behaves like a dictionary, too. Most of the interesting data is \"\n\"exposed through special methods or attributes, but if you want to access \"\n\"`WSGI environ variables <WSGI_Specification>`_ directly, you can do so::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:696\nmsgid \"Templates\"\nmsgstr \"模板\"\n\n#: ../../tutorial.rst:698\nmsgid \"\"\n\"Bottle comes with a fast and powerful built-in template engine called \"\n\":doc:`stpl`. To render a template you can use the :func:`template` function \"\n\"or the :func:`view` decorator. All you have to do is to provide the name of \"\n\"the template and the variables you want to pass to the template as keyword \"\n\"arguments. Here’s a simple example of how to render a template::\"\nmsgstr \"Bottle内置了一个快速的，强大的模板引擎，称为 :doc:`stpl` 。可通过 :func:`template` 函数或 :func:`view` 修饰器来渲染一个模板。只需提供模板的名字和传递给模板的变量。下面是一个渲染模板的简单例子::\"\n\n#: ../../tutorial.rst:705\nmsgid \"\"\n\"This will load the template file ``hello_template.tpl`` and render it with \"\n\"the ``name`` variable set. Bottle will look for templates in the \"\n\"``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` \"\n\"list.\"\nmsgstr \"这会加载 ``hello_template.tpl`` 模板文件，并提供 ``name`` 变量。默认情况，Bottle会在 ``./views/`` 目录查找模板文件(译者注：或当前目录)。可在 ``bottle.TEMPLATE_PATH`` 这个列表中添加更多的模板路径。\"\n\n#: ../../tutorial.rst:707\nmsgid \"\"\n\"The :func:`view` decorator allows you to return a dictionary with the \"\n\"template variables instead of calling :func:`template`::\"\nmsgstr \":func:`view` 修饰器允许你在回调函数中返回一个字典，并将其传递给模板，和 :func:`template` 函数做同样的事情。\"\n\n#: ../../tutorial.rst:716\nmsgid \"Syntax\"\nmsgstr \"语法\"\n\n#: ../../tutorial.rst:719\nmsgid \"\"\n\"The template syntax is a very thin layer around the Python language. Its \"\n\"main purpose is to ensure correct indentation of blocks, so you can format \"\n\"your template without worrying about indentation. Follow the link for a full\"\n\" syntax description: :doc:`stpl`\"\nmsgstr \"模板语法类似于Python的语法。它要确保语句块的正确缩进，所以你在写模板的时候无需担心会出现缩进问题。详细的语法描述可看 :doc:`stpl` 。\"\n\n#: ../../tutorial.rst:721\nmsgid \"Here is an example template::\"\nmsgstr \"简单的模板例子::\"\n\n#: ../../tutorial.rst:732\nmsgid \"Caching\"\nmsgstr \"缓存\"\n\n#: ../../tutorial.rst:733\nmsgid \"\"\n\"Templates are cached in memory after compilation. Modifications made to the \"\n\"template files will have no affect until you clear the template cache. Call \"\n\"``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode.\"\nmsgstr \"模板在经过编译后被缓存在内存里。你在修改模板文件后，要调用 ``bottle.TEMPLATES.clear()`` 函数清除缓存才能看到效果。在debug模式下，缓存被禁用了，无需手动清除缓存。\"\n\n#: ../../tutorial.rst:743\nmsgid \"Plugins\"\nmsgstr \"插件\"\n\n#: ../../tutorial.rst:747\nmsgid \"\"\n\"Bottle's core features cover most common use-cases, but as a micro-framework\"\n\" it has its limits. This is where \\\"Plugins\\\" come into play. Plugins add \"\n\"missing functionality to the framework, integrate third party libraries, or \"\n\"just automate some repetitive work.\"\nmsgstr \"Bottle的核心功能覆盖了常见的使用情况，但是作为一个迷你框架，它有它的局限性。所以我们引入了插件机制，插件可以给框架添加其缺少的功能，集成第三方的库，或是自动化一些重复性的工作。\"\n\n#: ../../tutorial.rst:749\nmsgid \"\"\n\"We have a growing :doc:`/plugins/index` and most plugins are designed to be \"\n\"portable and re-usable across applications. The chances are high that your \"\n\"problem has already been solved and a ready-to-use plugin exists. If not, \"\n\"the :doc:`/plugindev` may help you.\"\nmsgstr \"我们有一个不断增长的 :doc:`/plugins/index` 插件列表，大多数插件都被设计为可插拔的。有很大可能，你的问题已经被解决，而且已经有现成的插件可以使用了。如果没有现成的插件， :doc:`/plugindev` 有介绍如何开发一个插件。\"\n\n#: ../../tutorial.rst:751\nmsgid \"\"\n\"The effects and APIs of plugins are manifold and depend on the specific \"\n\"plugin. The ``SQLitePlugin`` plugin for example detects callbacks that \"\n\"require a ``db`` keyword argument and creates a fresh database connection \"\n\"object every time the callback is called. This makes it very convenient to \"\n\"use a database::\"\nmsgstr \"插件扮演着各种各样的角色。例如， ``SQLitePlugin`` 插件给每个route的回调函数都添加了一个 ``db`` 参数，在回调函数被调用的时候，会新建一个数据库连接。这样，使用数据库就非常简单了。\"\n\n#: ../../tutorial.rst:771\nmsgid \"\"\n\"Other plugin may populate the thread-safe :data:`local` object, change \"\n\"details of the :data:`request` object, filter the data returned by the \"\n\"callback or bypass the callback completely. An \\\"auth\\\" plugin for example \"\n\"could check for a valid session and return a login page instead of calling \"\n\"the original callback. What happens exactly depends on the plugin.\"\nmsgstr \"其它插件或许在线程安全的 :data:`local` 对象里面发挥作用，改变 :data:`request` 对象的细节，过滤回调函数返回的数据或完全绕开回调函数。举个例子，一个用于登录验证的插件会在调用原先的回调函数响应请求之前，验证用户的合法性，如果是非法访问，则返回登录页面而不是调用回调函数。具体的做法要看插件是如何实现的。\"\n\n#: ../../tutorial.rst:775\nmsgid \"Application-wide Installation\"\nmsgstr \"整个应用的范围内安装插件\"\n\n#: ../../tutorial.rst:777\nmsgid \"\"\n\"Plugins can be installed application-wide or just to some specific routes \"\n\"that need additional functionality. Most plugins can safely be installed to \"\n\"all routes and are smart enough to not add overhead to callbacks that do not\"\n\" need their functionality.\"\nmsgstr \"可以在整个应用的范围内安装插件，也可以只是安装给某些route。大多数插件都可安全地安装给所有route，也足够智能，可忽略那些并不需要它们的route。\"\n\n#: ../../tutorial.rst:779\nmsgid \"\"\n\"Let us take the ``SQLitePlugin`` plugin for example. It only affects route \"\n\"callbacks that need a database connection. Other routes are left alone. \"\n\"Because of this, we can install the plugin application-wide with no \"\n\"additional overhead.\"\nmsgstr \"让我们拿 ``SQLitePlugin`` 插件举例，它只会影响到那些需要数据库连接的route，其它route都被忽略了。正因为如此，我们可以放心地在整个应用的范围内安装这个插件。\"\n\n#: ../../tutorial.rst:781\nmsgid \"\"\n\"To install a plugin, just call :func:`install` with the plugin as first \"\n\"argument::\"\nmsgstr \"调用 :func:`install` 函数来安装一个插件::\"\n\n#: ../../tutorial.rst:786\nmsgid \"\"\n\"The plugin is not applied to the route callbacks yet. This is delayed to \"\n\"make sure no routes are missed. You can install plugins first and add routes\"\n\" later, if you want to. The order of installed plugins is significant, \"\n\"though. If a plugin requires a database connection, you need to install the \"\n\"database plugin first.\"\nmsgstr \"插件没有马上应用到所有route上面，它被延迟执行来确保没有遗漏任何route。你可以先安装插件，再添加route。有时，插件的安装顺序很重要，如果另外一个插件需要连接数据库，那么你就需要先安装操作数据库的插件。\"\n\n#: ../../tutorial.rst:790\nmsgid \"Uninstall Plugins\"\nmsgstr \"卸载插件\"\n\n#: ../../tutorial.rst:791\nmsgid \"\"\n\"You can use a name, class or instance to :func:`uninstall` a previously \"\n\"installed plugin::\"\nmsgstr \"调用 :func:`uninstall` 函数来卸载已经安装的插件\"\n\n#: ../../tutorial.rst:801\nmsgid \"\"\n\"Plugins can be installed and removed at any time, even at runtime while \"\n\"serving requests. This enables some neat tricks (installing slow debugging \"\n\"or profiling plugins only when needed) but should not be overused. Each time\"\n\" the list of plugins changes, the route cache is flushed and all plugins are\"\n\" re-applied.\"\nmsgstr \"在任何时候，插件都可以被安装或卸载，即使是在服务器正在运行的时候。一些小技巧应用到了这个特征，例如在需要的时候安装一些供debug和性能测试的插件，但不可滥用这个特性。每一次安装或卸载插件的时候，route缓存都会被刷新，所有插件被重新加载。\"\n\n#: ../../tutorial.rst:804\nmsgid \"\"\n\"The module-level :func:`install` and :func:`uninstall` functions affect the \"\n\":ref:`default-app`. To manage plugins for a specific application, use the \"\n\"corresponding methods on the :class:`Bottle` application object.\"\nmsgstr \"模块层面的 :func:`install` 和 :func:`unistall` 函数会影响 :ref:`default-app` 。针对应用来管理插件，可使用 :class:`Bottle` 应用对象的相应方法。\"\n\n#: ../../tutorial.rst:808\nmsgid \"Route-specific Installation\"\nmsgstr \"安装给特定的route\"\n\n#: ../../tutorial.rst:810\nmsgid \"\"\n\"The ``apply`` parameter of the :func:`route` decorator comes in handy if you\"\n\" want to install plugins to only a small number of routes::\"\nmsgstr \":func:`route` 修饰器的 ``apply`` 参数可以给指定的route安装插件\"\n\n#: ../../tutorial.rst:820\nmsgid \"Blacklisting Plugins\"\nmsgstr \"插件黑名单\"\n\n#: ../../tutorial.rst:822\nmsgid \"\"\n\"You may want to explicitly disable a plugin for a number of routes. The \"\n\":func:`route` decorator has a ``skip`` parameter for this purpose::\"\nmsgstr \"如果你想显式地在一些route上面禁用某些插件，可使用 :func:`route` 修饰器的 ``skip`` 参数::\"\n\n#: ../../tutorial.rst:844\nmsgid \"\"\n\"The ``skip`` parameter accepts a single value or a list of values. You can \"\n\"use a name, class or instance to identify the plugin that is to be skipped. \"\n\"Set ``skip=True`` to skip all plugins at once.\"\nmsgstr \"``skip`` 参数接受单一的值或是一个list。你可使用插件的名字，类，实例来指定你想要禁用的插件。如果 ``skip`` 的值为True，则禁用所有插件。\"\n\n#: ../../tutorial.rst:847\nmsgid \"Plugins and Sub-Applications\"\nmsgstr \"插件和子应用\"\n\n#: ../../tutorial.rst:849\nmsgid \"\"\n\"Most plugins are specific to the application they were installed to. \"\n\"Consequently, they should not affect sub-applications mounted with \"\n\":meth:`Bottle.mount`. Here is an example::\"\nmsgstr \"大多数插件只会影响到安装了它们的应用。因此，它们不应该影响通过 :meth:`Bottle.mount` 方法挂载上来的子应用。这里有一个例子。\"\n\n#: ../../tutorial.rst:860\nmsgid \"\"\n\"Whenever you mount an application, Bottle creates a proxy-route on the main-\"\n\"application that forwards all requests to the sub-application. Plugins are \"\n\"disabled for this kind of proxy-route by default. As a result, our \"\n\"(fictional) `WTForms` plugin affects the ``/contact`` route, but does not \"\n\"affect the routes of the ``/blog`` sub-application.\"\nmsgstr \"在你挂载一个应用的时候，Bottle在主应用上面创建一个代理route，将所有请求转接给子应用。在代理route上，默认禁用了插件。如上所示，我们的 ``WTForms`` 插件影响了 ``/contact`` route，但不会影响挂载在root上面的 ``/blog`` 。\"\n\n#: ../../tutorial.rst:862\nmsgid \"\"\n\"This behavior is intended as a sane default, but can be overridden. The \"\n\"following example re-activates all plugins for a specific proxy-route::\"\nmsgstr \"这个是一个合理的行为，但可被改写。下面的例子，在指定的代理route上面应用了插件。\"\n\n#: ../../tutorial.rst:866\nmsgid \"\"\n\"But there is a snag: The plugin sees the whole sub-application as a single \"\n\"route, namely the proxy-route mentioned above. In order to affect each \"\n\"individual route of the sub-application, you have to install the plugin to \"\n\"the mounted application explicitly.\"\nmsgstr \"这里存在一个小难题: 插件会整个子应用当作一个route看待，即是上面提及的代理route。如果想在子应用的每个route上面应用插件，你必须显式地在子应用上面安装插件。\"\n\n#: ../../tutorial.rst:871\nmsgid \"Development\"\nmsgstr \"开发\"\n\n#: ../../tutorial.rst:873\nmsgid \"\"\n\"So you have learned the basics and want to write your own application? Here \"\n\"are some tips that might help you being more productive.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:879\nmsgid \"Default Application\"\nmsgstr \"默认应用\"\n\n#: ../../tutorial.rst:881\nmsgid \"\"\n\"Bottle maintains a global stack of :class:`Bottle` instances and uses the \"\n\"top of the stack as a default for some of the module-level functions and \"\n\"decorators. The :func:`route` decorator, for example, is a shortcut for \"\n\"calling :meth:`Bottle.route` on the default application::\"\nmsgstr \"Bottle维护一个全局的 :class:`Bottle` 实例的栈，模块层面的函数和修饰器使用栈顶实例作为默认应用。例如 :func:`route` 修饰器，相当于在默认应用上面调用了 :meth:`Bottle.route` 方法。\"\n\n#: ../../tutorial.rst:889\nmsgid \"\"\n\"This is very convenient for small applications and saves you some typing, \"\n\"but also means that, as soon as your module is imported, routes are \"\n\"installed to the global default application. To avoid this kind of import \"\n\"side-effects, Bottle offers a second, more explicit way to build \"\n\"applications::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:899\nmsgid \"\"\n\"Separating the application object improves re-usability a lot, too. Other \"\n\"developers can safely import the ``app`` object from your module and use \"\n\":meth:`Bottle.mount` to merge applications together.\"\nmsgstr \"分离应用对象，大大提高了可重用性。其他开发者可安全地从你的应用中导入 ``app`` 对象，然后通过 :meth:`Bottle.mount` 方法来合并到其它应用中。\"\n\n#: ../../tutorial.rst:904\nmsgid \"\"\n\"Starting with bottle-0.13 you can use :class:`Bottle` instances as context \"\n\"managers::\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:929\nmsgid \"Debug Mode\"\nmsgstr \"调试模式\"\n\n#: ../../tutorial.rst:931\nmsgid \"During early development, the debug mode can be very helpful.\"\nmsgstr \"在开发的早期阶段，调试模式非常有用。\"\n\n#: ../../tutorial.rst:939\nmsgid \"\"\n\"In this mode, Bottle is much more verbose and provides helpful debugging \"\n\"information whenever an error occurs. It also disables some optimisations \"\n\"that might get in your way and adds some checks that warn you about possible\"\n\" misconfiguration.\"\nmsgstr \"在调试模式下，当错误发生的时候，Bottle会提供更多的调试信息。同时禁用一些可能妨碍你的优化措施，检查你的错误设置。\"\n\n#: ../../tutorial.rst:941\nmsgid \"Here is an incomplete list of things that change in debug mode:\"\nmsgstr \"下面是调试模式下会发生改变的东西，但这份列表不完整:\"\n\n#: ../../tutorial.rst:943\nmsgid \"The default error page shows a traceback.\"\nmsgstr \"默认的错误页面会打印出运行栈。\"\n\n#: ../../tutorial.rst:944\nmsgid \"Templates are not cached.\"\nmsgstr \"模板不会被缓存。\"\n\n#: ../../tutorial.rst:945\nmsgid \"Plugins are applied immediately.\"\nmsgstr \"插件马上生效。\"\n\n#: ../../tutorial.rst:947\nmsgid \"Just make sure not to use the debug mode on a production server.\"\nmsgstr \"请确保不要在生产环境中使用调试模式。\"\n\n#: ../../tutorial.rst:950\nmsgid \"Auto Reloading\"\nmsgstr \"自动加载\"\n\n#: ../../tutorial.rst:952\nmsgid \"\"\n\"During development, you have to restart the server a lot to test your recent\"\n\" changes. The auto reloader can do this for you. Every time you edit a \"\n\"module file, the reloader restarts the server process and loads the newest \"\n\"version of your code.\"\nmsgstr \"在开发的时候，你需要不断地重启服务器来验证你最新的改动。自动加载功能可以替你做这件事情。在你编辑完一个模块文件后，它会自动重启服务器进程，加载最新版本的代码。\"\n\n#: ../../tutorial.rst:962\nmsgid \"\"\n\"How it works: the main process will not start a server, but spawn a new \"\n\"child process using the same command line arguments used to start the main \"\n\"process. All module-level code is executed at least twice! Be careful.\"\nmsgstr \"它的工作原理，主进程不会启动服务器，它使用相同的命令行参数，创建一个子进程来启动服务器。请注意，所有模块级别的代码都被执行了至少两次。\"\n\n#: ../../tutorial.rst:967\nmsgid \"\"\n\"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` \"\n\"and start as a normal non-reloading app server. As soon as any of the loaded\"\n\" modules changes, the child process is terminated and re-spawned by the main\"\n\" process. Changes in template files will not trigger a reload. Please use \"\n\"debug mode to deactivate template caching.\"\nmsgstr \"子进程中 ``os.environ['BOOTLE_CHILD']`` 变量的值被设为 ``True`` ，它运行一个不会自动加载的服务器。在代码改变后，主进程会终止掉子进程，并创建一个新的子进程。更改模板文件不会触发自动重载，请使用debug模式来禁用模板缓存。\"\n\n#: ../../tutorial.rst:973\nmsgid \"\"\n\"The reloading depends on the ability to stop the child process. If you are \"\n\"running on Windows or any other operating system not supporting \"\n\"``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), \"\n\"``signal.SIGTERM`` is used to kill the child. Note that exit handlers and \"\n\"finally clauses, etc., are not executed after a ``SIGTERM``.\"\nmsgstr \"自动加载需要终止子进程。如果你运行在Windows等不支持 ``signal.SIGINT`` (会在Python中raise ``KeyboardInterrupt`` 异常)的系统上，会使用 ``signal.SIGTERM`` 来杀掉子进程。在子进程被 ``SIGTERM`` 杀掉的时候，exit handlers和finally等语句不会被执行。\"\n\n#: ../../tutorial.rst:981\nmsgid \"Command Line Interface\"\nmsgstr \"命令行接口\"\n\n#: ../../tutorial.rst:985\nmsgid \"Starting with version 0.10 you can use bottle as a command-line tool:\"\nmsgstr \"从0.10版本开始，你可像一个命令行工具那样使用Bottle:\"\n\n#: ../../tutorial.rst:1009\nmsgid \"\"\n\"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to \"\n\"``localhost:8080``. The other parameters should be self-explanatory.\"\nmsgstr \"`ADDRESS` 参数接受一个IP地址或IP:端口，其默认为 ``localhost:8080`` 。其它参数都很好地自我解释了。\"\n\n#: ../../tutorial.rst:1011\nmsgid \"\"\n\"Both plugins and applications are specified via import expressions. These \"\n\"consist of an import path (e.g. ``package.module``) and an expression to be \"\n\"evaluated in the namespace of that module, separated by a colon. See \"\n\":func:`load` for details. Here are some examples:\"\nmsgstr \"插件和应用都通过一个导入表达式来指定。包含了导入的路径(例如: ``package.module`` )和模块命名空间内的一个表达式，两者用\\\":\\\"分开。下面是一个简单例子，详见 :func:`load` 。\"\n\n#: ../../tutorial.rst:1032\nmsgid \"Deployment\"\nmsgstr \"部署\"\n\n#: ../../tutorial.rst:1034\nmsgid \"\"\n\"Bottle runs on the built-in `wsgiref WSGIServer \"\n\"<http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_\"\n\"  by default. This non-threading HTTP server is perfectly fine for \"\n\"development, but may become a performance bottleneck when server load \"\n\"increases.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1036\nmsgid \"\"\n\"The easiest way to increase performance is to install a multi-threaded \"\n\"server library like paste_ or cherrypy_ and tell Bottle to use that instead \"\n\"of the single-threaded server::\"\nmsgstr \"最早的解决办法是让Bottle使用 paste_ 或 cherrypy_ 等多线程的服务器。\"\n\n#: ../../tutorial.rst:1040\nmsgid \"\"\n\"This, and many other deployment options are described in a separate article:\"\n\" :doc:`deployment`\"\nmsgstr \"在 :doc:`deployment` 章节中，会介绍更多部署的选择。\"\n\n#: ../../tutorial.rst:1048\nmsgid \"Glossary\"\nmsgstr \"词汇表\"\n\n#: ../../tutorial.rst:1051\nmsgid \"callback\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1053\nmsgid \"\"\n\"Programmer code that is to be called when some external action happens. In \"\n\"the context of web frameworks, the mapping between URL paths and application\"\n\" code is often achieved by specifying a callback function for each URL.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1057\nmsgid \"decorator\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1059\nmsgid \"\"\n\"A function returning another function, usually applied as a function \"\n\"transformation using the ``@decorator`` syntax. See `python documentation \"\n\"for function definition  \"\n\"<http://docs.python.org/reference/compound_stmts.html#function>`_ for more \"\n\"about decorators.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1060\nmsgid \"environ\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1062\nmsgid \"\"\n\"A structure where information about all documents under the root is saved, \"\n\"and used for cross-referencing.  The environment is pickled after the \"\n\"parsing stage, so that successive runs only need to read and parse new and \"\n\"changed documents.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1066\nmsgid \"handler function\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1068\nmsgid \"\"\n\"A function to handle some specific event or situation. In a web framework, \"\n\"the application is developed by attaching a handler function as callback for\"\n\" each specific URL comprising the application.\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1071\nmsgid \"source directory\"\nmsgstr \"\"\n\n#: ../../tutorial.rst:1073\nmsgid \"\"\n\"The directory which, including its subdirectories, contains all source files\"\n\" for one Sphinx project.\"\nmsgstr \"\"\n"
  },
  {
    "path": "docs/_locale/zh_CN/LC_MESSAGES/tutorial_app.po",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2009-2020, Marcel Hellkamp\n# This file is distributed under the same license as the Bottle package.\n# \n# Translators:\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: bottle\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-12-31 18:35+0100\\n\"\n\"PO-Revision-Date: 2020-12-31 17:35+0000\\n\"\n\"Last-Translator: Thiago Avelino <t@avelino.xxx>\\n\"\n\"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: zh_CN\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: ../../tutorial_app.rst:19\nmsgid \"Tutorial: Todo-List Application\"\nmsgstr \"Tutorial: Todo-List 应用\"\n\n#: ../../tutorial_app.rst:23\nmsgid \"\"\n\"This tutorial is a work in progress and written by `noisefloor \"\n\"<http://github.com/noisefloor>`_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:26\nmsgid \"\"\n\"This tutorial should give a brief introduction to the Bottle_ WSGI \"\n\"Framework. The main goal is to be able, after reading through this tutorial,\"\n\" to create a project using Bottle. Within this document, not all abilities \"\n\"will be shown, but at least the main and important ones like routing, \"\n\"utilizing the Bottle template abilities to format output and handling GET / \"\n\"POST parameters.\"\nmsgstr \"这份教程简单介绍了Bottle框架，目的是让你看完后能在项目中使用Bottle。它没有涵盖所有东西，但介绍了URL映射，模板，处理GET/POST请求等基础知识。\"\n\n#: ../../tutorial_app.rst:28\nmsgid \"\"\n\"To understand the content here, it is not necessary to have a basic \"\n\"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. \"\n\"You should have a fair understanding of the Python_ programming language. \"\n\"Furthermore, the example used in the tutorial retrieves and stores data in a\"\n\" SQL database, so a basic idea about SQL helps, but is not a must to \"\n\"understand the concepts of Bottle. Right here, SQLite_ is used. The output \"\n\"of Bottle sent to the browser is formatted in some examples by the help of \"\n\"HTML. Thus, a basic idea about the common HTML tags does help as well.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:30\nmsgid \"\"\n\"For the sake of introducing Bottle, the Python code \\\"in between\\\" is kept \"\n\"short, in order to keep the focus. Also all code within the tutorial is \"\n\"working fine, but you may not necessarily use it \\\"in the wild\\\", e.g. on a \"\n\"public web server. In order to do so, you may add e.g. more error handling, \"\n\"protect the database with a password, test and escape the input etc.\"\nmsgstr \"作为一份教程，我们的代码尽可能做到了简明扼要。尽管教程中的代码能够工作，但是我们还是不建议你在公共服务器中使用教程中的代码。如果你想要这样做，你应该添加足够的错误处理，并且加密你的数据库，处理用户的输入。\"\n\n#: ../../tutorial_app.rst:32\nmsgid \"Table of Contents\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:35\nmsgid \"Goals\"\nmsgstr \"目标\"\n\n#: ../../tutorial_app.rst:37\nmsgid \"\"\n\"At the end of this tutorial, we will have a simple, web-based ToDo list. The\"\n\" list contains a text (with max 100 characters) and a status (0 for closed, \"\n\"1 for open) for each item. Through the web-based user interface, open items \"\n\"can be view and edited and new items can be added.\"\nmsgstr \"在这份教程结束的时候，我们将完成一个简单的，基于Web的ToDo list(待办事项列表)。列表中的每一个待办事项都包含一条文本(最长100个字符)和一个状态(0表示关闭，1表示开启)。通过网页，已开启的待办事项可以被查看和编辑，可添加待办事项到列表中。\"\n\n#: ../../tutorial_app.rst:39\nmsgid \"\"\n\"During development, all pages will be available on ``localhost`` only, but \"\n\"later on it will be shown how to adapt the application for a \\\"real\\\" \"\n\"server, including how to use with Apache's mod_wsgi.\"\nmsgstr \"在开发过程中，所有的页面都只可以通过 ``localhost`` 来访问，完了会介绍如何将应用部署到\\\"真实\\\"服务器的服务器上面，包括使用mod_wsgi来部署到Apache服务器上面。\"\n\n#: ../../tutorial_app.rst:41\nmsgid \"\"\n\"Bottle will do the routing and format the output, with the help of \"\n\"templates. The items of the list will be stored inside a SQLite database. \"\n\"Reading and  writing the database will be done by Python code.\"\nmsgstr \"Bottle会负责URL映射，通过模板来输出页面。待办事项列表被存储在一个SQLite数据库中，通过Python代码来读写数据库。\"\n\n#: ../../tutorial_app.rst:43\nmsgid \"\"\n\"We will end up with an application with the following pages and \"\n\"functionality:\"\nmsgstr \"我们会完成以下页面和功能:\"\n\n#: ../../tutorial_app.rst:45\nmsgid \"start page ``http://localhost:8080/todo``\"\nmsgstr \"首页 ``http://localhost:8080/todo``\"\n\n#: ../../tutorial_app.rst:46\nmsgid \"adding new items to the list: ``http://localhost:8080/new``\"\nmsgstr \"添加待办事项: ``http://localhost:8080/new``\"\n\n#: ../../tutorial_app.rst:47\nmsgid \"page for editing items: ``http://localhost:8080/edit/<no:int>``\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:48\nmsgid \"catching errors\"\nmsgstr \"捕获错误\"\n\n#: ../../tutorial_app.rst:51\nmsgid \"Before We Start...\"\nmsgstr \"开始之前...\"\n\n#: ../../tutorial_app.rst:55\nmsgid \"Install Bottle\"\nmsgstr \"安装Bottle\"\n\n#: ../../tutorial_app.rst:56\nmsgid \"\"\n\"Assuming that you have a fairly new installation of Python (version 2.5 or \"\n\"higher), you only need to install Bottle in addition to that. Bottle has no \"\n\"other dependencies than Python itself.\"\nmsgstr \"假设你已经安装好了Python (2.5或更改版本)，接下来你只需要下载Bottle就行了。除了Python标准库，Bottle没有其他依赖。\"\n\n#: ../../tutorial_app.rst:58\nmsgid \"\"\n\"You can either manually install Bottle or use Python's easy_install: \"\n\"``easy_install bottle``\"\nmsgstr \"你可通过Python的esay_install命令来安装Bottle: ``easy_install bottle``\"\n\n#: ../../tutorial_app.rst:62\nmsgid \"Further Software Necessities\"\nmsgstr \"其它软件\"\n\n#: ../../tutorial_app.rst:63\nmsgid \"\"\n\"As we use SQLite3 as a database, make sure it is installed. On Linux \"\n\"systems, most distributions have SQLite3 installed by default. SQLite is \"\n\"available for Windows and MacOS X as well and the `sqlite3` module is part \"\n\"of the python standard library.\"\nmsgstr \"因为我们使用SQLite3来做数据库，请确保它已安装。如果是Linux系统，大多数的发行版已经默认安装了SQLite3。SQLite同时可工作在Windows系统和MacOS X系统上面。Pyhton标准库中，已经包含了 `sqlite3` 模块。\"\n\n#: ../../tutorial_app.rst:66\nmsgid \"Create An SQL Database\"\nmsgstr \"创建一个SQL数据库\"\n\n#: ../../tutorial_app.rst:67\nmsgid \"\"\n\"First, we need to create the database we use later on. To do so, save the \"\n\"following script in your project directory and run it with python. You can \"\n\"use the interactive interpreter too::\"\nmsgstr \"首先，我们需要先创建一个数据库，稍后会用到。在你的项目文件夹执行以下脚本即可，你也可以在Python解释器逐条执行。\"\n\n#: ../../tutorial_app.rst:78\nmsgid \"\"\n\"This generates a database-file `todo.db` with tables called ``todo`` and \"\n\"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for \"\n\"each row, which is used later on to reference the rows. The column ``task`` \"\n\"holds the text which describes the task, it can be max 100 characters long. \"\n\"Finally, the column ``status`` is used to mark a task as open (value 1) or \"\n\"closed (value 0).\"\nmsgstr \"现在，我们已经创建了一个名字为 `todo.db` 的数据库文件，数据库中有一张名为 ``todo`` 的表，表中有 ``id`` , ``task`` , 及 ``status`` 这三列。每一行的 ``id`` 都是唯一的，稍后会根据id来获取数据。 ``task`` 用于保存待办事项的文本，最大长度为100个字符。最后 ``status`` 用于标明待办事项的状态，0为开启，1为关闭。\"\n\n#: ../../tutorial_app.rst:81\nmsgid \"Using Bottle for a Web-Based ToDo List\"\nmsgstr \"基于Bottle的待办事项列表\"\n\n#: ../../tutorial_app.rst:83\nmsgid \"\"\n\"Now it is time to introduce Bottle in order to create a web-based \"\n\"application. But first, we need to look into a basic concept of Bottle: \"\n\"routes.\"\nmsgstr \"为了创建我们的Web应用，我们先来介绍一下Bottle框架。首先，我们需要了解Bottle中的route，即URL映射。\"\n\n#: ../../tutorial_app.rst:87\nmsgid \"Understanding routes\"\nmsgstr \"route URL映射\"\n\n#: ../../tutorial_app.rst:88\nmsgid \"\"\n\"Basically, each page visible in the browser is dynamically generated when \"\n\"the page address is called. Thus, there is no static content. That is \"\n\"exactly what is called a \\\"route\\\" within Bottle: a certain address on the \"\n\"server. So, for example, when the page ``http://localhost:8080/todo`` is \"\n\"called from the browser, Bottle \\\"grabs\\\" the call and checks if there is \"\n\"any (Python) function defined for the route \\\"todo\\\". If so, Bottle will \"\n\"execute the corresponding Python code and return its result.\"\nmsgstr \"基本上，浏览器访问的每一页面都是动态生成的。Bottle通过route，将浏览器访问的URL映射到具体的Python函数。例如，在我们访问  ``http://localhost:8080/todo`` 的时候，Bottle会查找 ``todo`` 这个route映射到了哪个函数上面，接着调用该函数来响应浏览器请求。\"\n\n#: ../../tutorial_app.rst:92\nmsgid \"First Step - Showing All Open Items\"\nmsgstr \"第一步 - 显示所有已开启的待办事项\"\n\n#: ../../tutorial_app.rst:93\nmsgid \"\"\n\"So, after understanding the concept of routes, let's create the first one. \"\n\"The goal is to see all open items from the ToDo list::\"\nmsgstr \"在我们了解什么是route后，让我们来试着写一个。访问它即可查看所有已开启的待办事项 ::\"\n\n#: ../../tutorial_app.rst:108\nmsgid \"\"\n\"Save the code a ``todo.py``, preferably in the same directory as the file \"\n\"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the \"\n\"``sqlite3.connect()`` statement.\"\nmsgstr \"将上面的代码保存为 ``todo.py`` ，放到 ``todo.db`` 文件所在的目录。如果你想将它们分开放，则需要在 ``sqlite3.connect()`` 函数中写上 ``todo.db`` 文件的路径。\"\n\n#: ../../tutorial_app.rst:110\nmsgid \"\"\n\"Let's have a look what we just did: We imported the necessary module \"\n\"``sqlite3`` to access to SQLite database and from Bottle we imported \"\n\"``route`` and ``run``. The ``run()`` statement simply starts the web server \"\n\"included in Bottle. By default, the web server serves the pages on localhost\"\n\" and port 8080. Furthermore, we imported ``route``, which is the function \"\n\"responsible for Bottle's routing. As you can see, we defined one function, \"\n\"``todo_list()``, with a few lines of code reading from the database. The \"\n\"important point is the `decorator statement`_ ``@route('/todo')`` right \"\n\"before the ``def todo_list()`` statement. By doing this, we bind this \"\n\"function to the route ``/todo``, so every time the browsers calls \"\n\"``http://localhost:8080/todo``, Bottle returns the result of the function \"\n\"``todo_list()``. That is how routing within bottle works.\"\nmsgstr \"来看看我们写的代码。导入了必须的 ``sqlite3`` 模块，从Bottle中导入 ``route`` 和 ``run`` 。``run()`` 函数启动了Bottle的内置开发服务器，默认情况下，开发服务器在监听本地的8080端口。``route`` 是Bottle实现URL映射功能的修饰器。你可以看到，我们定义了一个 ``todo_list()`` 函数，读取了数据库中的数据。然后我们使用 ``@route('/todo')`` 来将 ``todo_list()`` 函数和``todo`` 这个route绑定在一起。每一次浏览器访问 ``http://localhost:8080/todo`` 的时候，Bottle都会调用 ``todo_list()`` 函数来响应请求，并返回页面，这就是route的工作方式了。\"\n\n#: ../../tutorial_app.rst:112\nmsgid \"\"\n\"Actually you can bind more than one route to a function. So the following \"\n\"code::\"\nmsgstr \"事实上，你可以给一个函数添加多个route。\"\n\n#: ../../tutorial_app.rst:119\nmsgid \"\"\n\"will work fine, too. What will not work is to bind one route to more than \"\n\"one function.\"\nmsgstr \"这样是正确的。但是反过来，你不能将一个route和多个函数绑定在一起。\"\n\n#: ../../tutorial_app.rst:121\nmsgid \"\"\n\"What you will see in the browser is what is returned, thus the value given \"\n\"by the ``return`` statement. In this example, we need to convert ``result`` \"\n\"in to a string by ``str()``, as Bottle expects a string or a list of strings\"\n\" from the return statement. But here, the result of the database query is a \"\n\"list of tuples, which is the standard defined by the `Python DB API`_.\"\nmsgstr \"你在浏览器中看到的即是你在 ``todo_list()`` 函数中返回的页面。在这个例子中，我们通过 ``str()`` 函数将结果转换成字符串，因为Bottle期望函数的返回值是一个字符串或一个字符串的列表。但 `Python DB API`_ 中规定了，数据库查询的返回值是一个元组的列表。\"\n\n#: ../../tutorial_app.rst:123\nmsgid \"\"\n\"Now, after understanding the little script above, it is time to execute it \"\n\"and watch the result yourself. Remember that on Linux- / Unix-based systems \"\n\"the file ``todo.py`` needs to be executable first. Then, just run ``python \"\n\"todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. \"\n\"In case you made no mistake writing the script, the output should look like \"\n\"this::\"\nmsgstr \"现在，我们已经了解上面的代码是如何工作的，是时候运行它来看看效果了。记得在Linux或Unix系统中， ``todo.py`` 文件需要标记为可执行(译者注：没有必要)。然后，通过 ``python todo.py`` 命令来执行该脚本，接着用浏览器访问 ``http://localhost:8080/todo`` 来看看效果。如果代码没有写错，你应该会在页面看到以下输出 ::\"\n\n#: ../../tutorial_app.rst:127\nmsgid \"\"\n\"If so - congratulations! You are now a successful user of Bottle. In case it\"\n\" did not work and you need to make some changes to the script, remember to \"\n\"stop Bottle serving the page, otherwise the revised version will not be \"\n\"loaded.\"\nmsgstr \"如果是这样，那么恭喜你！如果出现错误，那么你需要检查代码时候写错，修改完后记得重启HTTP服务器，要不新的版本不会生效。\"\n\n#: ../../tutorial_app.rst:129\nmsgid \"\"\n\"Actually, the output is not really exciting nor nice to read. It is the raw \"\n\"result returned from the SQL query.\"\nmsgstr \"实际上，这个输出很难看，只是SQL查询的结果。\"\n\n#: ../../tutorial_app.rst:131\nmsgid \"\"\n\"So, in the next step we format the output in a nicer way. But before we do \"\n\"that, we make our life easier.\"\nmsgstr \"所以，下一步我们会把它变得更好看。\"\n\n#: ../../tutorial_app.rst:135\nmsgid \"Debugging and Auto-Reload\"\nmsgstr \"调试和自动加载\"\n\n#: ../../tutorial_app.rst:136\nmsgid \"\"\n\"Maybe you already noticed that Bottle sends a short error message to the \"\n\"browser in case something within the script is wrong, e.g. the connection to\"\n\" the database is not working. For debugging purposes it is quite helpful to \"\n\"get more details. This can be easily achieved by adding the following \"\n\"statement to the script::\"\nmsgstr \"或许你已经注意到了，如果代码出错的话，Bottle会在页面上显示一个简短的错误信息。例如，连接数据库失败。为了方便调试， 我们希望错误信息更加具体，可加上以下语句。\"\n\n#: ../../tutorial_app.rst:144\nmsgid \"\"\n\"By enabling \\\"debug\\\", you will get a full stacktrace of the Python \"\n\"interpreter, which usually contains useful information for finding bugs. \"\n\"Furthermore, templates (see below) are not cached, thus changes to templates\"\n\" will take effect without stopping the server.\"\nmsgstr \"开启调试模式后，出错时页面会打印出完整的Python运行栈。另外，在调试模式下，模板也不会被缓存，任何对模板的修改会马上生效，而不用重启服务器。\"\n\n#: ../../tutorial_app.rst:148\nmsgid \"\"\n\"That ``debug(True)`` is supposed to be used for development only, it should \"\n\"*not* be used in production environments.\"\nmsgstr \"``debug(True)`` 是为开发时的调试服务的， *不应* 在生产环境中开启调试模式。\"\n\n#: ../../tutorial_app.rst:152\nmsgid \"\"\n\"Another quite nice feature is auto-reloading, which is enabled by modifying \"\n\"the ``run()`` statement to\"\nmsgstr \"另外一个十分有用的功能是自动加载，可修改 ``run()`` 语句来开启。\"\n\n#: ../../tutorial_app.rst:158\nmsgid \"\"\n\"This will automatically detect changes to the script and reload the new \"\n\"version once it is called again, without the need to stop and start the \"\n\"server.\"\nmsgstr \"这样会自动检测对脚本的修改，并自动重启服务器来使其生效。\"\n\n#: ../../tutorial_app.rst:160\nmsgid \"\"\n\"Again, the feature is mainly supposed to be used while developing, not on \"\n\"production systems.\"\nmsgstr \"同上，这个功能并不建议在生产环境中使用。\"\n\n#: ../../tutorial_app.rst:164\nmsgid \"Bottle Template To Format The Output\"\nmsgstr \"使用模板来格式化输出\"\n\n#: ../../tutorial_app.rst:165\nmsgid \"\"\n\"Now let's have a look at casting the output of the script into a proper \"\n\"format.\"\nmsgstr \"现在我们试着格式化脚本的输出，使其更适合查看。\"\n\n#: ../../tutorial_app.rst:167\nmsgid \"\"\n\"Actually Bottle expects to receive a string or a list of strings from a \"\n\"function and returns them by the help of the built-in server to the browser.\"\n\" Bottle does not bother about the content of the string itself, so it can be\"\n\" text formatted with HTML markup, too.\"\nmsgstr \"实际上，Bottle期望route的回调函数返回一个字符串或一个字符串列表，通过内置的HTTP服务器将其返回给浏览器。Bottle不关心字符串的内容，所以我们可以将其格式化成HTML格式。\"\n\n#: ../../tutorial_app.rst:169\nmsgid \"\"\n\"Bottle brings its own easy-to-use template engine with it. Templates are \"\n\"stored as separate files having a ``.tpl`` extension. The template can be \"\n\"called then from within a function. Templates can contain any type of text \"\n\"(which will be most likely HTML-markup mixed with Python statements). \"\n\"Furthermore, templates can take arguments, e.g. the result set of a database\"\n\" query, which will be then formatted nicely within the template.\"\nmsgstr \"Bottle内置了独创的模板引擎。模板是后缀名为 ``.tpl`` 的文本文件。模板的内容混合着HTML标签和Python语句，模板也可以接受参数。例如数据库的查询结果，我们可以在模板内将其漂亮地格式化。\"\n\n#: ../../tutorial_app.rst:171\nmsgid \"\"\n\"Right here, we are going to cast the result of our query showing the open \"\n\"ToDo items into a simple table with two columns: the first column will \"\n\"contain the ID of the item, the second column the text. The result set is, \"\n\"as seen above, a list of tuples, each tuple contains one set of results.\"\nmsgstr \"接下来，我们要将数据库的查询结果格式化为一个两列的表格。表格的第一列为待办事项的ID，第二列为待办事项的内容。查询结果是一个元组的列表，列表中的每个元组后包含一个结果。\"\n\n#: ../../tutorial_app.rst:173\nmsgid \"To include the template in our example, just add the following lines::\"\nmsgstr \"在例子中使用模板，只需要添加以下代码。\"\n\n#: ../../tutorial_app.rst:183\nmsgid \"\"\n\"So we do here two things: first, we import ``template`` from Bottle in order\"\n\" to be able to use templates. Second, we assign the output of the template \"\n\"``make_table`` to the variable ``output``, which is then returned. In \"\n\"addition to calling the template, we assign ``result``, which we received \"\n\"from the database query, to the variable ``rows``, which is later on used \"\n\"within the template. If necessary, you can assign more than one variable / \"\n\"value to a template.\"\nmsgstr \"我们添加了两样东西。首先我们从Bottle中导入了 ``template`` 函数以使用模板功能，接着，我们渲染 ``make_table`` 这个模板(参数是rows=result)，把模板函数的返回值赋予 ``output`` 变量，并返回 ``output`` 。如有必要，我们可添加更多的参数。\"\n\n#: ../../tutorial_app.rst:185\nmsgid \"\"\n\"Templates always return a list of strings, thus there is no need to convert \"\n\"anything. We can save one line of code by writing ``return \"\n\"template('make_table', rows=result)``, which gives exactly the same result \"\n\"as above.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:187\nmsgid \"\"\n\"Now it is time to write the corresponding template, which looks like this::\"\nmsgstr \"对应的模板文件。\"\n\n#: ../../tutorial_app.rst:201\nmsgid \"\"\n\"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` \"\n\"is stored.\"\nmsgstr \"将上面的代码保存为 ``make_table.tpl`` 文件，和 ``todo.py`` 放在同一个目录。\"\n\n#: ../../tutorial_app.rst:203\nmsgid \"\"\n\"Let's have a look at the code: every line starting with % is interpreted as \"\n\"Python code. Because it is effectively Python, only valid Python statements \"\n\"are allowed. The template will raise exceptions, just as any other Python \"\n\"code would. The other lines are plain HTML markup.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:205\nmsgid \"\"\n\"As you can see, we use Python's ``for`` statement two times, in order to go \"\n\"through ``rows``. As seen above, ``rows`` is a variable which holds the \"\n\"result of the database query, so it is a list of tuples. The first ``for`` \"\n\"statement accesses the tuples within the list, the second one the items \"\n\"within the tuple, which are put each into a cell of the table. It is \"\n\"important that you close all ``for``, ``if``, ``while`` etc. statements with\"\n\" ``%end``, otherwise the output may not be what you expect.\"\nmsgstr \"如你所见，为了遍历 ``rows`` ，我们两次使用了Python的 ``for`` 语句。 ``rows``是持有查询结果的变量，一个元组的列表。第一个 ``for`` 语句遍历了列表中所有的元组，第二个 ``for`` 语句遍历了元组中的元素，将其放进表格中。 ``for`` , ``if`` , ``while`` 语句都需要通过 ``%end`` 来关闭，要不会得到不正确的结果。\"\n\n#: ../../tutorial_app.rst:207\nmsgid \"\"\n\"If you need to access a variable within a non-Python code line inside the \"\n\"template, you need to put it into double curly braces. This tells the \"\n\"template to insert the actual value of the variable right in place.\"\nmsgstr \"如果想要在不以%开头的行中访问变量，则需要把它放在两个大括号中间。这告诉模板，需要用变量的实际值将其替换掉。\"\n\n#: ../../tutorial_app.rst:209\nmsgid \"\"\n\"Run the script again and look at the output. Still not really nice, but at \"\n\"least more readable than the list of tuples. You can spice-up the very \"\n\"simple HTML markup above, e.g. by using in-line styles to get a better \"\n\"looking output.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:213\nmsgid \"Using GET and POST Values\"\nmsgstr \"使用GET和POST\"\n\n#: ../../tutorial_app.rst:214\nmsgid \"\"\n\"As we can review all open items properly, we move to the next step, which is\"\n\" adding new items to the ToDo list. The new item should be received from a \"\n\"regular HTML-based form, which sends its data by the GET method.\"\nmsgstr \"能够查看所有代码事项后，让我们进入到下一步，添加新的待办事项到列表中。新的待办事项应该在一个常规的HTML表单中，通过GET方式提交。\"\n\n#: ../../tutorial_app.rst:216\nmsgid \"\"\n\"To do so, we first add a new route to our script and tell the route that it \"\n\"should get GET data::\"\nmsgstr \"让我们先来添加一个接受GET请求的route。\"\n\n#: ../../tutorial_app.rst:239\nmsgid \"\"\n\"To access GET (or POST) data, we need to import ``request`` from Bottle. To \"\n\"assign the actual data to a variable, we use the statement \"\n\"``request.GET.task.strip()`` statement, where ``task`` is the name of the \"\n\"GET data we want to access. That's all. If your GET data has more than one \"\n\"variable, multiple ``request.GET.get()`` statements can be used and assigned\"\n\" to other variables.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:241\nmsgid \"\"\n\"The rest of this piece of code is just processing of the gained data: \"\n\"writing to the database, retrieve the corresponding id from the database and\"\n\" generate the output.\"\nmsgstr \"接下来是对数据的操作：写入数据库，获取返回的ID，生成页面。\"\n\n#: ../../tutorial_app.rst:243\nmsgid \"\"\n\"But where do we get the GET data from? Well, we can use a static HTML page \"\n\"holding the form. Or, what we do right now, is to use a template which is \"\n\"output when the route ``/new`` is called without GET data.\"\nmsgstr \"因为我们是从HTML表单中获取数据，所以现在让我们来创建这个表单吧。我们通过 ``/new`` 这个URL来添加待办事项。\"\n\n#: ../../tutorial_app.rst:245\nmsgid \"The code needs to be extended to::\"\nmsgstr \"代码需要扩展如下::\"\n\n#: ../../tutorial_app.rst:268\nmsgid \"``new_task.tpl`` looks like this::\"\nmsgstr \"对应的 ``new_task.tpl`` 模板如下。\"\n\n#: ../../tutorial_app.rst:276\nmsgid \"That's all. As you can see, the template is plain HTML this time.\"\nmsgstr \"如你所见，这个模板只是纯HTML的，不包含Python代码。\"\n\n#: ../../tutorial_app.rst:278\nmsgid \"Now we are able to extend our to do list.\"\nmsgstr \"这样，我们就完成了添加待办事项这个功能。\"\n\n#: ../../tutorial_app.rst:280\nmsgid \"\"\n\"By the way, if you prefer to use POST data: this works exactly the same way,\"\n\" just use ``request.POST.get()`` instead.\"\nmsgstr \"如果你想通过POST来获取数据，那么用 ``request.POST.get()`` 来代替 ``request.GET.get()`` 就行了。\"\n\n#: ../../tutorial_app.rst:284\nmsgid \"Editing Existing Items\"\nmsgstr \"修改已有待办事项\"\n\n#: ../../tutorial_app.rst:285\nmsgid \"The last point to do is to enable editing of existing items.\"\nmsgstr \"最后，我们需要做的是修改已有待办事项。\"\n\n#: ../../tutorial_app.rst:287\nmsgid \"\"\n\"By using only the routes we know so far it is possible, but may be quite \"\n\"tricky. But Bottle knows something called \\\"dynamic routes\\\", which makes \"\n\"this task quite easy.\"\nmsgstr \"仅使用我们当前了解到的route类型，是可以完成这个任务的，但太取巧了。Bottle还提供了一种 ``动态route`` ，可以更简单地实现。\"\n\n#: ../../tutorial_app.rst:289\nmsgid \"The basic statement for a dynamic route looks like this::\"\nmsgstr \"基本的动态route声明如下::\"\n\n#: ../../tutorial_app.rst:293\nmsgid \"\"\n\"This tells Bottle to accept for ``<something>`` any string up to the next \"\n\"slash. Furthermore, the value of ``something`` will be passed to the \"\n\"function assigned to that route, so the data can be processed within the \"\n\"function, like this::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:321\nmsgid \"\"\n\"It is basically pretty much the same what we already did above when adding \"\n\"new items, like using ``GET`` data etc. The main addition here is using the \"\n\"dynamic route ``<no:int>``, which here passes the number to the \"\n\"corresponding function. As you can see, ``no`` is integer ID and used within\"\n\" the function to access the right row of data within the database.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:324\nmsgid \"\"\n\"The template ``edit_task.tpl`` called within the function looks like this::\"\nmsgstr \"对应的 ``edit_task.tpl`` 模板如下。\"\n\n#: ../../tutorial_app.rst:339\nmsgid \"\"\n\"Again, this template is a mix of Python statements and HTML, as already \"\n\"explained above.\"\nmsgstr \"再一次，模板中混合了HTML代码和Python代码，之前已解释过。\"\n\n#: ../../tutorial_app.rst:341\nmsgid \"\"\n\"A last word on dynamic routes: you can even use a regular expression for a \"\n\"dynamic route, as demonstrated later.\"\nmsgstr \"你也可在动态route中使用正则表达式，稍后会提及。\"\n\n#: ../../tutorial_app.rst:345\nmsgid \"Validating Dynamic Routes\"\nmsgstr \"验证动态route\"\n\n#: ../../tutorial_app.rst:346\nmsgid \"\"\n\"Using dynamic routes is fine, but for many cases it makes sense to validate \"\n\"the dynamic part of the route. For example, we expect an integer number in \"\n\"our route for editing above. But if a float, characters or so are received, \"\n\"the Python interpreter throws an exception, which is not what we want.\"\nmsgstr \"在某些场景下，需要验证route中的可变部分。例如，在上面的例子中，我们的 ``no`` 需要是一个整形数，如果我们的输入是一个浮点数，或字符串，Python解释器将会抛出一个异常，这并不是我们想要的结果。\"\n\n#: ../../tutorial_app.rst:348\nmsgid \"\"\n\"For those cases, Bottle offers the ``<name:int>`` wildcard filter, which \"\n\"matches (signed) digits and converts the value to integer. In order to apply\"\n\" the wildcard filter, extend the code as follows::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:356\nmsgid \"\"\n\"Save the code and call the page again using incorrect value for \"\n\"``<no:int>``, e.g. a float. You will receive not an exception, but a \\\"404 \"\n\"Not Found\\\" error.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:360\nmsgid \"Dynamic Routes Using Regular Expressions\"\nmsgstr \"在动态route中使用正则表达式\"\n\n#: ../../tutorial_app.rst:361\nmsgid \"\"\n\"Bottle can also handle dynamic routes, where the \\\"dynamic part\\\" of the \"\n\"route can be a regular expression.\"\nmsgstr \"Bottle允许在动态route中使用正则表达式。\"\n\n#: ../../tutorial_app.rst:363\nmsgid \"\"\n\"So, just to demonstrate that, let's assume that all single items in our ToDo\"\n\" list should be accessible by their plain number, by a term like e.g. \"\n\"\\\"item1\\\". For obvious reasons, you do not want to create a route for every \"\n\"item. Furthermore, the simple dynamic routes do not work either, as part of \"\n\"the route, the term \\\"item\\\" is static.\"\nmsgstr \"我们假设需要通过 ``item1`` 这样的形式来访问数据库中id为1的待办事项。显然，我们不想为每个待办事项都创建一个route。鉴于route中的\\\"item\\\"部分是固定的，简单的route就无法满足需求了，我们需要在route中使用正则表达式。\"\n\n#: ../../tutorial_app.rst:365\nmsgid \"As said above, the solution is a regular expression::\"\nmsgstr \"使用正则表达式的解决方法如下。\"\n\n#: ../../tutorial_app.rst:380\nmsgid \"\"\n\"The line ``@route(/item<item:re:[0-9]+>)`` starts like a normal route, but \"\n\"the third part of the wildcard is interpreted as a regular expression, which\"\n\" is the dynamic part of the route. So in this case, we want to match any \"\n\"digit between 0 and 9. The following function \\\"show_item\\\" just checks \"\n\"whether the given item is present in the database or not. In case it is \"\n\"present, the corresponding text of the task is returned. As you can see, \"\n\"only the regular expression part of the route is passed forward. \"\n\"Furthermore, it is always forwarded as a string, even if it is a plain \"\n\"integer number, like in this case.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:384\nmsgid \"Returning Static Files\"\nmsgstr \"返回静态文件\"\n\n#: ../../tutorial_app.rst:385\nmsgid \"\"\n\"Sometimes it may become necessary to associate a route not to a Python \"\n\"function, but just return a static file. So if you have for example a help \"\n\"page for your application, you may want to return this page as plain HTML. \"\n\"This works as follows::\"\nmsgstr \"有时候，我们只是想返回已有的静态文件。例如我们的应用中有个静态的帮助页面help.html，我们不希望每次访问帮助页面的时候都动态生成。\"\n\n#: ../../tutorial_app.rst:393\nmsgid \"\"\n\"At first, we need to import the ``static_file`` function from Bottle. As you\"\n\" can see, the ``return static_file`` statement replaces the ``return`` \"\n\"statement. It takes at least two arguments: the name of the file to be \"\n\"returned and the path to the file. Even if the file is in the same directory\"\n\" as your application, the path needs to be stated. But in this case, you can\"\n\" use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file \"\n\"automatically, but in case you like to state it explicitly, add a third \"\n\"argument to ``static_file``, which would be here ``mimetype='text/html'``. \"\n\"``static_file`` works with any type of route, including the dynamic ones.\"\nmsgstr \"首先，我们需要从Bottle中导入 ``static_file`` 函数。它接受至少两个参数，一个是需要返回的文件的文件名，一个是该文件的路径。即使该文件和你的应用在同一个目录下，还是要指定文件路径(可以使用\\\".\\\")。Bottle会猜测文件的MIME类型，并自动设置。如果你想显式指定MIME类型，可以在static_file函数里面加上例如 ``mimetype='text/html'`` 这样的参数。 ``static_file`` 函数可和任何route配合使用，包括动态route。\"\n\n#: ../../tutorial_app.rst:397\nmsgid \"Returning JSON Data\"\nmsgstr \"返回JSON数据\"\n\n#: ../../tutorial_app.rst:398\nmsgid \"\"\n\"There may be cases where you do not want your application to generate the \"\n\"output directly, but return data to be processed further on, e.g. by \"\n\"JavaScript. For those cases, Bottle offers the possibility to return JSON \"\n\"objects, which is sort of standard for exchanging data between web \"\n\"applications. Furthermore, JSON can be processed by many programming \"\n\"languages, including Python\"\nmsgstr \"有时我们希望返回JSON，以便在客户端使用JavaScript来生成页面，Bottle直接支持返回JSON数据。JSON似乎已经是Web应用之间交换数据的标准格式了。更进一步，JSON可以被很多语言解析处理，包括Python。\"\n\n#: ../../tutorial_app.rst:400\nmsgid \"\"\n\"So, let's assume we want to return the data generated in the regular \"\n\"expression route example as a JSON object. The code looks like this::\"\nmsgstr \"我们假设现在需要返回JSON数据。\"\n\n#: ../../tutorial_app.rst:415\nmsgid \"\"\n\"As you can, that is fairly simple: just return a regular Python dictionary \"\n\"and Bottle will convert it automatically into a JSON object prior to \"\n\"sending. So if you e.g. call \\\"http://localhost/json1\\\" Bottle should in \"\n\"this case return the JSON object ``{\\\"task\\\": [\\\"Read A-byte-of-python to \"\n\"get a good introduction into Python\\\"]}``.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:420\nmsgid \"Catching Errors\"\nmsgstr \"捕获错误\"\n\n#: ../../tutorial_app.rst:421\nmsgid \"\"\n\"The next step may is to catch the error with Bottle itself, to keep away any\"\n\" type of error message from the user of your application. To do that, Bottle\"\n\" has an \\\"error-route\\\", which can be a assigned to a HTML-error.\"\nmsgstr \"为了避免用户看到出错信息，我们需要捕获应用运行时出现的错误，以提供更友好的错误提示。Bottle提供了专门用于捕获错误的route。\"\n\n#: ../../tutorial_app.rst:423\nmsgid \"In our case, we want to catch a 403 error. The code is as follows::\"\nmsgstr \"例如，我们想捕获403错误。\"\n\n#: ../../tutorial_app.rst:431\nmsgid \"\"\n\"So, at first we need to import ``error`` from Bottle and define a route by \"\n\"``error(403)``, which catches all \\\"403 forbidden\\\" errors. The function \"\n\"\\\"mistake\\\" is assigned to that. Please note that ``error()`` always passes \"\n\"the error-code to the function - even if you do not need it. Thus, the \"\n\"function always needs to accept one argument, otherwise it will not work.\"\nmsgstr \"首先，我们需要从Bottle中导入 ``error`` ，然后通过 ``error(403)`` 来定义创建一个route，用于捕获所有\\\"403 forbidden\\\"错误。注意，该route总是会将error-code传给 ``mistake()`` 函数，即使你不需要它。所以回调函数至少要接受一个参数，否则会失效。\"\n\n#: ../../tutorial_app.rst:433\nmsgid \"\"\n\"Again, you can assign more than one error-route to a function, or catch \"\n\"various errors with one function each. So this code::\"\nmsgstr \"一样的，同一个回调函数可以捕获多种错误。\"\n\n#: ../../tutorial_app.rst:440\nmsgid \"works fine, the following one as well::\"\nmsgstr \"效果和下面一样。\"\n\n#: ../../tutorial_app.rst:452\nmsgid \"Summary\"\nmsgstr \"总结\"\n\n#: ../../tutorial_app.rst:453\nmsgid \"\"\n\"After going through all the sections above, you should have a brief \"\n\"understanding how the Bottle WSGI framework works. Furthermore you have all \"\n\"the knowledge necessary to use Bottle for your applications.\"\nmsgstr \"通过以上章节，你应该对Bottle框架有了一个大致的了解，可以使用Bottle进行开发了。\"\n\n#: ../../tutorial_app.rst:455\nmsgid \"\"\n\"The following chapter give a short introduction how to adapt Bottle for \"\n\"larger projects. Furthermore, we will show how to operate Bottle with web \"\n\"servers which perform better on a higher load / more web traffic than the \"\n\"one we used so far.\"\nmsgstr \"接下来的章节会简单介绍一下，如何在大型项目中使用Bottle。此外，我们还会介绍如何将Bottle部署到更高性能的Web服务器上。\"\n\n#: ../../tutorial_app.rst:458\nmsgid \"Server Setup\"\nmsgstr \"安装服务器\"\n\n#: ../../tutorial_app.rst:460\nmsgid \"\"\n\"So far, we used the standard server used by Bottle, which is the `WSGI \"\n\"reference Server`_ shipped along with Python. Although this server is \"\n\"perfectly suitable for development purposes, it is not really suitable for \"\n\"larger applications. But before we have a look at the alternatives, let's \"\n\"have a look how to tweak the settings of the standard server first.\"\nmsgstr \"到目前为止，我们还是使用Bottle内置的，随Python一起发布的 `WSGI reference Server`_ 服务器。尽管该服务器十分适合用于开发环境，但是它确实不适用于大项目。在我们介绍其他服务器之前，我们先看看如何优化内置服务器的设置。\"\n\n#: ../../tutorial_app.rst:464\nmsgid \"Running Bottle on a different port and IP\"\nmsgstr \"更改服务器的端口和IP\"\n\n#: ../../tutorial_app.rst:465\nmsgid \"\"\n\"As standard, Bottle serves the pages on the IP address 127.0.0.1, also known\"\n\" as ``localhost``, and on port ``8080``. To modify the setting is pretty \"\n\"simple, as additional parameters can be passed to Bottle's ``run()`` \"\n\"function to change the port and the address.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:467\nmsgid \"\"\n\"To change the port, just add ``port=portnumber`` to the run command. So, for\"\n\" example::\"\nmsgstr \"如果要更改该设置，更改 ``run`` 函数的参数即可。\"\n\n#: ../../tutorial_app.rst:471\nmsgid \"would make Bottle listen to port 80.\"\nmsgstr \"更改端口，监听80端口\"\n\n#: ../../tutorial_app.rst:473\nmsgid \"To change the IP address where Bottle is listening::\"\nmsgstr \"更改监听的IP地址\"\n\n#: ../../tutorial_app.rst:477\nmsgid \"If needed, both parameters can be combined, like::\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:481\nmsgid \"\"\n\"The ``port`` and ``host`` parameter can also be applied when Bottle is \"\n\"running with a different server, as shown in the following section.\"\nmsgstr \"当Bottle运行在其他服务器上面时， ``port`` 和 ``host`` 参数依然适用，稍后会介绍。\"\n\n#: ../../tutorial_app.rst:485\nmsgid \"Running Bottle with a different server\"\nmsgstr \"在其他服务器上运行\"\n\n#: ../../tutorial_app.rst:486\nmsgid \"\"\n\"As said above, the standard server is perfectly suitable for development, \"\n\"personal use or a small group of people only using your application based on\"\n\" Bottle. For larger tasks, the standard server may become a bottleneck, as \"\n\"it is single-threaded, thus it can only serve one request at a time.\"\nmsgstr \"在大型项目上，Bottle自带的服务器会成为一个性能瓶颈，因为它是单线程的，一次只能响应一个请求。\"\n\n#: ../../tutorial_app.rst:488\nmsgid \"\"\n\"But Bottle has already various adapters to multi-threaded servers on board, \"\n\"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and \"\n\"Paste_.\"\nmsgstr \"\"\n\n#: ../../tutorial_app.rst:490\nmsgid \"\"\n\"If you want to run for example Bottle with the Paste server, use the \"\n\"following code::\"\nmsgstr \"如果想运行在Paste服务器上面，代码如下(译者注：需要先安装Paste)。\"\n\n#: ../../tutorial_app.rst:496\nmsgid \"\"\n\"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and \"\n\"``FapwsServer``.\"\nmsgstr \"其他服务器如 ``FlupServer``, ``CherryPyServer`` 和 ``FapwsServer`` 也类似。\"\n\n#: ../../tutorial_app.rst:500\nmsgid \"Running Bottle on Apache with mod_wsgi\"\nmsgstr \"使用 mod_wsgi_ 运行在Apache上\"\n\n#: ../../tutorial_app.rst:501\nmsgid \"\"\n\"Maybe you already have an Apache_ or you want to run a Bottle-based \"\n\"application large scale - then it is time to think about Apache with \"\n\"mod_wsgi_.\"\nmsgstr \"或许你已经有了一个 Apache_ 服务器，那么可以考虑使用 mod_wsgi_ 。\"\n\n#: ../../tutorial_app.rst:503\nmsgid \"\"\n\"We assume that your Apache server is up and running and mod_wsgi is working \"\n\"fine as well. On a lot of Linux distributions, mod_wsgi can be easily \"\n\"installed via whatever package management system is in use.\"\nmsgstr \"我们假设你的Apache已经能跑起来，且mod_wsgi也能工作了。在很多Linux发行版上，都能通过包管理软件简单地安装mod_wsgi。\"\n\n#: ../../tutorial_app.rst:505\nmsgid \"\"\n\"Bottle brings an adapter for mod_wsgi with it, so serving your application \"\n\"is an easy task.\"\nmsgstr \"Bottle已经自带用于mod_wsgi的适配器，所以让Bottle跑在mod_wsgi上面是很简单的。\"\n\n#: ../../tutorial_app.rst:507\nmsgid \"\"\n\"In the following example, we assume that you want to make your application \"\n\"\\\"ToDo list\\\" accessible through ``http://www.mypage.com/todo`` and your \"\n\"code, templates and SQLite database are stored in the path \"\n\"``/var/www/todo``.\"\nmsgstr \"接下来的例子里，我们假设你希望通过 ``http://www.mypage.com/todo`` 来访问\\\"ToDo list\\\"这个应用，且代码、模板、和SQLite数据库存放在 ``/var/www/todo`` 目录。\"\n\n#: ../../tutorial_app.rst:509\nmsgid \"\"\n\"When you run your application via mod_wsgi, it is imperative to remove the \"\n\"``run()`` statement from your code, otherwise it won't work here.\"\nmsgstr \"如果通过mod_wsgi来运行你应用，那么必须从代码中移除 ``run()`` 函数。\"\n\n#: ../../tutorial_app.rst:511\nmsgid \"\"\n\"After that, create a file called ``adapter.wsgi`` with the following \"\n\"content::\"\nmsgstr \"然后，创建一个 ``adapter.wsgi`` 文件，内容如下。\"\n\n#: ../../tutorial_app.rst:522\nmsgid \"\"\n\"and save it in the same path, ``/var/www/todo``. Actually the name of the \"\n\"file can be anything, as long as the extension is ``.wsgi``. The name is \"\n\"only used to reference the file from your virtual host.\"\nmsgstr \"将其保存到 ``/var/www/todo`` 目录下面。其实，可以给该文件起任何名字，只要后缀名为 ``.wsgi`` 即可。\"\n\n#: ../../tutorial_app.rst:524\nmsgid \"\"\n\"Finally, we need to add a virtual host to the Apache configuration, which \"\n\"looks like this::\"\nmsgstr \"最后，我们需要在Apache的配置中添加一个虚拟主机。\"\n\n#: ../../tutorial_app.rst:540\nmsgid \"\"\n\"After restarting the server, your ToDo list should be accessible at \"\n\"``http://www.mypage.com/todo``\"\nmsgstr \"重启Apache服务器后，即可通过 ``http://www.mypage.com/todo`` 来访问你的应用。\"\n\n#: ../../tutorial_app.rst:543\nmsgid \"Final Words\"\nmsgstr \"结语\"\n\n#: ../../tutorial_app.rst:545\nmsgid \"\"\n\"Now we are at the end of this introduction and tutorial to Bottle. We \"\n\"learned about the basic concepts of Bottle and wrote a first application \"\n\"using the Bottle framework. In addition to that, we saw how to adapt Bottle \"\n\"for large tasks and serve Bottle through an Apache web server with mod_wsgi.\"\nmsgstr \"现在，我们这个教程已经结束了。我们学习了Bottle的基础知识，然后使用Bottle来写了第一个应用。另外，我们还介绍了如何在大型项目中使用Bottle，以及使用mod_wsgi在Apache中运行Bottle应用。\"\n\n#: ../../tutorial_app.rst:547\nmsgid \"\"\n\"As said in the introduction, this tutorial is not showing all shades and \"\n\"possibilities of Bottle. What we skipped here is e.g. receiving file objects\"\n\" and streams and how to handle authentication data. Furthermore, we did not \"\n\"show how templates can be called from within another template. For an \"\n\"introduction into those points, please refer to the full `Bottle \"\n\"documentation`_ .\"\nmsgstr \"我们并没有在这份教程里介绍Bottle的方方面面。我们没有介绍如何上传文件，验证数据的可靠性。还有，我们也没介绍如何在模板中调用另一个模板。以上，可以在 `Bottle documentation`_ 中找到答案。\"\n\n#: ../../tutorial_app.rst:550\nmsgid \"Complete Example Listing\"\nmsgstr \"完整代码\"\n\n#: ../../tutorial_app.rst:552\nmsgid \"\"\n\"As the ToDo list example was developed piece by piece, here is the complete \"\n\"listing:\"\nmsgstr \"我们是一步一步地开发待办事项列表的，这里是完整的代码。\"\n\n#: ../../tutorial_app.rst:554\nmsgid \"Main code for the application ``todo.py``::\"\nmsgstr \"``todo.py``\"\n\n#: ../../tutorial_app.rst:675\nmsgid \"Template ``make_table.tpl``::\"\nmsgstr \"``make_table.tpl``模板\"\n\n#: ../../tutorial_app.rst:689\nmsgid \"Template ``edit_task.tpl``::\"\nmsgstr \" ``edit_task.tpl`` 模板\"\n\n#: ../../tutorial_app.rst:704\nmsgid \"Template ``new_task.tpl``::\"\nmsgstr \"``new_task.tpl`` 模板\"\n"
  },
  {
    "path": "docs/api.rst",
    "content": "==============================\nAPI Reference\n==============================\n\n.. module:: bottle\n   :platform: Unix, Windows\n   :synopsis: WSGI micro framework\n.. moduleauthor:: Marcel Hellkamp <marc@gsites.de>\n\nBottle prides itself on having source code that is easy to read and follow, so most questions about APIs or inner workings can be answered quickly by inspecting sources. Your IDE should give you the same information you'll find on this page, as most of it is auto-generates from docstrings and method signatures anyway. If you are new to bottle, you may find the :doc:`tutorial` more helpful as a starting point.\n\n\n\nGlobal functions\n================\n\nThe module defines several functions, constants, and an exception.\n\n.. function:: app()\n              default_app()\n\n    Return the current :ref:`default-app`. This is actually a callable instances of :class:`AppStack`.\n\n.. autofunction:: debug\n\n.. autofunction:: install\n\n.. autofunction:: uninstall\n\n.. autofunction:: run\n\n\nGlobal decorators\n=================\n\nBottle maintains a stack of :class:`Bottle` instances (see :func:`app` and :class:`AppStack`)\nand uses the top of the stack as a :ref:`default-app` for some of the module-level functions\nand decorators. All of those have a corresponding method on the :class:`Bottle` class.\n\n.. function:: route(path, method='GET', callback=None, **options)\n              get(...)\n              post(...)\n              put(...)\n              delete(...)\n              patch(...)\n\n   Decorator to install a route to the current default application. See :meth:`Bottle.route` for details.\n\n.. function:: error(...)\n\n   Decorator to install an error handler to the current default application. See :meth:`Bottle.error` for details.\n\n.. autofunction:: hook\n\n\n\nRequest Context\n===============\n\nThe global :data:`request` and :data:`response` instances are only valid from within an request handler function and represent the *current* HTTP request or response.\n\n.. autodata:: request\n\n.. autodata:: response\n\n\nHelper Functions\n================\n\n.. autofunction:: abort\n\n.. autofunction:: redirect\n\n.. autofunction:: static_file\n\n\nExceptions\n==========\n\n.. autoexception:: BottleException\n   :members:\n\n.. autoexception:: HTTPResponse\n   :members:\n\n.. autoexception:: HTTPError\n   :members:\n\n\nThe :class:`Bottle` Class\n=========================\n\n.. autoclass:: Bottle\n   :members:\n\n\nThe :class:`Request` Object\n===================================================\n\nThe :class:`Request` class wraps a WSGI environment and provides helpful methods to parse and access form data, cookies, file uploads and other metadata. Most of the attributes are read-only.\n\n.. autoclass:: Request\n   :members:\n\n.. autoclass:: BaseRequest\n   :members:\n   :special-members: __setattr__\n\n.. autoclass:: LocalRequest\n   :members:\n\n\nThe :class:`Response` Object\n============================\n\nThe :class:`Response` class stores the HTTP status code as well as headers and cookies that are to be sent to the client. Similar to :data:`bottle.request` there is a thread-local :data:`bottle.response` instance that can be used to adjust the `current` response. Moreover, you can instantiate :class:`Response` and return it from your request handler. In this case, the custom instance overrules the headers and cookies defined in the global one.\n\n.. autoclass:: Response\n   :members:\n\n.. autoclass:: BaseResponse\n   :members:\n\n.. autoclass:: LocalResponse\n   :members:\n\n\nData Structures\n===============\n\n.. autoclass:: AppStack\n   :members:\n\n   .. method:: pop()\n\n      Return the current default application and remove it from the stack.\n\n.. autoclass:: ConfigDict\n   :members:\n\n.. autoclass:: MultiDict\n   :members:\n\n.. autoclass:: WSGIHeaderDict\n   :members:\n\n.. autoclass:: HeaderDict\n   :members:\n\n.. autoclass:: FormsDict\n   :members:\n\n.. autoclass:: FileUpload\n   :members:\n\n\nRequest routing\n===============\n\n.. autoclass:: Router\n    :members:\n\n.. autoclass:: Route\n    :members:\n\n\nTemplating\n==========\n\nAll template engines supported by :mod:`bottle` implement the :class:`BaseTemplate` API. This way it is possible to switch and mix template engines without changing the application code at all.\n\n.. autoclass:: BaseTemplate\n   :members:\n\n.. autofunction:: view\n\n.. autofunction:: template\n\n.. autodata:: TEMPLATE_PATH\n\n   Global search path for templates.\n\n\nYou can write your own adapter for your favourite template engine or use one of the predefined adapters. Currently there are four fully supported template engines:\n\n========================   ==================================   ====================   ========================\nClass                      URL                                  Decorator              Render function\n========================   ==================================   ====================   ========================\n:class:`SimpleTemplate`    :doc:`stpl`                          :func:`view`           :func:`template`\n:class:`MakoTemplate`      https://www.makotemplates.org         :func:`mako_view`      :func:`mako_template`\n:class:`CheetahTemplate`   https://www.cheetahtemplate.org/      :func:`cheetah_view`   :func:`cheetah_template`\n:class:`Jinja2Template`    https://jinja.palletsprojects.com/   :func:`jinja2_view`    :func:`jinja2_template`\n========================   ==================================   ====================   ========================\n\nTo use :class:`MakoTemplate` as your default template engine, just import its specialised decorator and render function::\n\n  from bottle import mako_view as view, mako_template as template\n\nHTTP utilities\n==============\n\n.. autofunction:: parse_date\n\n.. autofunction:: parse_auth\n\n.. autofunction:: cookie_encode\n\n.. autofunction:: cookie_decode\n\n.. autofunction:: cookie_is_encoded\n\n.. autofunction:: path_shift\n\n.. autodata:: HTTP_CODES\n  :no-value:\n\nMisc utilities\n==============\n\n.. autoclass:: DictProperty\n\n.. autoclass:: cached_property\n\n.. autoclass:: lazy_attribute\n\n.. autofunction:: yieldroutes\n\n.. autofunction:: load\n\n.. autofunction:: load_app\n   "
  },
  {
    "path": "docs/async.rst",
    "content": "Asynchronous Applications\n=========================\n\nAsynchronous design patterns don't mix well with the synchronous nature of `WSGI <https://www.python.org/dev/peps/pep-3333/>`_. This is why most asynchronous frameworks (tornado, twisted, ...) implement a specialized API to expose their asynchronous features. Bottle is a WSGI framework and shares the synchronous nature of WSGI, but thanks to the awesome `gevent project <https://www.gevent.org/>`_, it is still possible to write asynchronous applications with bottle. This article documents the usage of Bottle with Asynchronous WSGI.\n\nThe Limits of Synchronous WSGI\n-------------------------------\n\nBriefly worded, the `WSGI specification (pep 3333) <https://www.python.org/dev/peps/pep-3333/>`_ defines a request/response circle as follows: The application callable is invoked once for each request and must return a body iterator. The server then iterates over the body and writes each chunk to the socket. As soon as the body iterator is exhausted, the client connection is closed.\n\nSimple enough, but there is a snag: All this happens synchronously. If your application needs to wait for data (IO, sockets, databases, ...), it must either yield empty strings (busy wait) or block the current thread. Both solutions occupy the handling thread and prevent it from answering new requests. There is consequently only one ongoing request per thread.\n\nMost servers limit the number of threads to avoid their relatively high overhead. Pools of 20 or less threads are common. As soon as all threads are occupied, any new connection is stalled. The server is effectively dead for everyone else. If you want to implement a chat that uses long-polling ajax requests to get real-time updates, you'd reach the limited at 20 concurrent connections. That's a pretty small chat.\n\nGreenlets to the rescue\n------------------------\n\nMost servers limit the size of their worker pools to a relatively low number of concurrent threads, due to the high overhead involved in switching between and creating new threads. While threads are cheap compared to processes (forks), they are still expensive to create for each new connection.\n\nThe `gevent <https://www.gevent.org/>`_ module adds *greenlets* to the mix. Greenlets behave similar to traditional threads, but are very cheap to create. A gevent-based server can spawn thousands of greenlets (one for each connection) with almost no overhead. Blocking individual greenlets has no impact on the servers ability to accept new requests. The number of concurrent connections is virtually unlimited.\n\nThis makes creating asynchronous applications incredibly easy, because they look and feel like synchronous applications. A gevent-based server is actually not asynchronous, but massively multi-threaded. Here is an example::\n\n    from gevent import monkey; monkey.patch_all()\n\n    from time import sleep\n    from bottle import route, run\n\n    @route('/stream')\n    def stream():\n        yield 'START'\n        sleep(3)\n        yield 'MIDDLE'\n        sleep(5)\n        yield 'END'\n\n    run(host='0.0.0.0', port=8080, server='gevent')\n\nThe first line is important. It causes gevent to monkey-patch most of Python's blocking APIs to not block the current thread, but pass the CPU to the next greenlet instead. It actually replaces Python's threading with gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` which would normally block the whole thread. If you don't feel comfortable with monkey-patching python built-ins, you can use the corresponding gevent functions (``gevent.sleep()`` in this case).\n\nIf you run this script and point your browser to ``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and `END` show up one by one (rather than waiting 8 seconds to see them all at once). It works exactly as with normal threads, but now your server can handle thousands of concurrent requests without any problems.\n\n.. note::\n\n    Some browsers buffer a certain amount of data before they start rendering a\n    page. You might need to yield more than a few bytes to see an effect in\n    these browsers. Additionally, many browsers have a limit of one concurrent\n    connection per URL. If this is the case, you can use a second browser or a\n    benchmark tool (e.g. `ab` or `httperf`) to measure performance.\n\nEvent Callbacks\n---------------\n\nA very common design pattern in asynchronous frameworks (including tornado, twisted, node.js and friends) is to use non-blocking APIs and bind callbacks to asynchronous events. The socket object is kept open until it is closed explicitly to allow callbacks to write to the socket at a later point. Here is an example based on the `tornado library <https://www.tornadoweb.org/documentation#non-blocking-asynchronous-requests>`_::\n\n    class MainHandler(tornado.web.RequestHandler):\n        @tornado.web.asynchronous\n        def get(self):\n            worker = SomeAsyncWorker()\n            worker.on_data(lambda chunk: self.write(chunk))\n            worker.on_finish(lambda: self.finish())\n\nThe main benefit is that the request handler terminates early. The handling thread can move on and accept new requests while the callbacks continue to write to sockets of previous requests. This is how these frameworks manage to process a lot of concurrent requests with only a small number of OS threads.\n\nWith Gevent+WSGI, things are different: First, terminating early has no benefit because we have an unlimited pool of (pseudo)threads to accept new connections. Second, we cannot terminate early because that would close the socket (as required by WSGI). Third, we must return an iterable to conform to WSGI.\n\nIn order to conform to the WSGI standard, all we have to do is to return a body iterable that we can write to asynchronously. With the help of `gevent.queue <https://www.gevent.org/gevent.queue.html>`_, we can *simulate* a detached socket and rewrite the previous example as follows::\n\n    @route('/fetch')\n    def fetch():\n        body = gevent.queue.Queue()\n        worker = SomeAsyncWorker()\n        worker.on_data(body.put)\n        worker.on_finish(lambda: body.put(StopIteration))\n        worker.start()\n        return body\n\nFrom the server perspective, the queue object is iterable. It blocks if empty and stops as soon as it reaches ``StopIteration``. This conforms to WSGI. On the application side, the queue object behaves like a non-blocking socket. You can write to it at any time, pass it around and even start a new (pseudo)thread that writes to it asynchronously. This is how long-polling is implemented most of the time.\n\n\nFinally: WebSockets\n-------------------\n\nLets forget about the low-level details for a while and speak about WebSockets. Since you are reading this article, you probably know what WebSockets are: A bidirectional communication channel between a browser (client) and a web application (server).\n\nThankfully the `gevent-websocket <https://pypi.python.org/pypi/gevent-websocket/>`_ package does all the hard work for us. Here is a simple WebSocket endpoint that receives messages and just sends them back to the client::\n\n    from bottle import request, Bottle, abort\n    app = Bottle()\n\n    @app.route('/websocket')\n    def handle_websocket():\n        wsock = request.environ.get('wsgi.websocket')\n        if not wsock:\n            abort(400, 'Expected WebSocket request.')\n\n        while True:\n            try:\n                message = wsock.receive()\n                wsock.send(\"Your message was: %r\" % message)\n            except WebSocketError:\n                break\n\n    from gevent.pywsgi import WSGIServer\n    from geventwebsocket import WebSocketError\n    from geventwebsocket.handler import WebSocketHandler\n    server = WSGIServer((\"0.0.0.0\", 8080), app,\n                        handler_class=WebSocketHandler)\n    server.serve_forever()\n\nThe while-loop runs until the client closes the connection. You get the idea :)\n\nThe client-site JavaScript API is really straight forward, too::\n\n    <!DOCTYPE html>\n    <html>\n    <head>\n      <script type=\"text/javascript\">\n        var ws = new WebSocket(\"ws://example.com:8080/websocket\");\n        ws.onopen = function() {\n            ws.send(\"Hello, world\");\n        };\n        ws.onmessage = function (evt) {\n            alert(evt.data);\n        };\n      </script>\n    </head>\n    </html>\n\n"
  },
  {
    "path": "docs/changelog.rst",
    "content": "﻿.. highlight:: python\n.. currentmodule:: bottle\n\n=============\nRelease Notes\n=============\n\nThis project loosly follows Semantic Versioning (``major.minor.patch``), with\nthe exception that changes are allowed in minor releases as long as the change\nis necessary to match documentation, specification or expectation. \nIn other words: Bugfixes do not count as backward incompatible changes, even if\nthey technically change something from *incorrect* to *correct* and may break\napplications that rely on *incorrect*, *undefined* or *undocumented* behavior.\n\nAs long as the major version is still ``0.x``, breaking API changes are also\nallowed in minor releases, but we try our best to provide fallbacks and emit\ndeprecation warnings for at least one minor release circle.\n\n.. rubric:: How to upgrade\n\n* Upgrade to the most recent patch release available for your current minor\n  release. (e.g. ``0.12.3`` to ``0.12.25``)\n* Read the release notes for the next minor release, run your tests and fix all\n  deprecation warnings.\n* Upgrade to the next minor release (e.g. ``0.12.25`` to ``0.13.2``), run test\n  again, fix all warnings and continue.\n\n.. rubric:: Support for old releases\n\nBugs and security issues are usually fixed in the latest minor release of the\ntwo most recent major releases (named stable and old-stable). With each new major\nrelease, stable becomes old-stable and the old old-stable will no longer receive\nregular updates. LTS releases (e.g. 0.12) are an exception. Those will continue\nto receive updates on a best-effort basis.\n\nRelease 0.14 (in development)\n=============================\n\n.. rubric:: Deprecated APIs or behavior\n\n* ``Route.get_undecorated_callback()`` was able to look into closure cells to guess the original function wrapped by a decorator, but this is too aggressive in some cases and may return the wrong function. To avoid this, we will depend on proper use of ``@functools.wraps(orig)`` or ``functools.update_wrapper(wrapper, orig)`` in decorators in the future.\n\n.. rubric:: Removed APIs\n\n* Dropped support for Python 2 (EOL: 2020-01-01) and removed workarounds or helpers that only make sense in a Python 2/3 dual codebase.\n* Dropped support for Python 3.8 (EOL: 2024-10-07).\n* Removed the ``RouteReset`` exception and associated logic.\n* Removed the `bottle.py` console script entrypoint in favour of the new `bottle` script. You can still execute `bottle.py` directly or via `python -m bottle`. The only change is that the command installed by pip or similar tools into the bin/Scripts folder of the (virtual) environment is now called `bottle` to avoid circular import errors.\n\n.. rubric:: Changes\n\n* Form values, query parameters, path elements and cookies are now always decoded as `utf8` with `errors='surrogateescape'`. This is the correct approach for almost all modern web applications, but still allows applications to recover the original byte sequence if needed. This also means that ``bottle.FormsDict`` no longer re-encodes PEP-3333 `latin1` strings to `utf8` on demand (via attribute access). The ``FormsDict.getunicode()`` and ``FormsDict.decode()`` methods are deprecated and do nothing, as all values are already transcoded to `utf8`.\n\n.. rubric:: New features\n\n* ``bottle.HTTPError`` raised on invalid JSON now include the underlying exception in the ``exception`` field.\n\n\nRelease 0.13\n==============\n\n.. warning:: This release contains breaking changers, please read the notes below\n\n.. rubric:: Dropped support for Python versions that reached their end-of-life.\n\nBottle up to 0.12 supported an absurd range of Python versions (2.5 to 3.12) and\nkeeping support for Python versions as ancient as 2.5 required a ton of workarounds\nand compromises, but served no real purpose. If you need support for older Python\nversions, you can stay on bottle 0.12. The updated list of tested and supported python\nreleases is as follows:\n\n * Python 2 >= 2.7.3\n * Python 3 >= 3.8\n\nSupport for Python 2.5 was marked as deprecated since 0.12. We decided to go a step further\nand also remove support for 2.6 and 3.1 to 3.7 even if it was never deprecated explicitly\nin bottle. This means that this release is *not* backwards compatible in Python <2.7.3 or\n<3.8 environments. Maintainers for distributions or systems that still use these old python\nversions should not update to Bottle 0.13 and stick with 0.12 instead.\n\n.. rubric:: Stabilized APIs\n\n* The documented API of the :class:`ConfigDict` class is now considered stable and ready to use.\n\n.. rubric:: Deprecated APIs\n\n* Python 2 support is now deprecated and will be dropped with the next release. This includes helpers and workarounds that only make sense in a Python 2/3 dual codebase (e.g. ``tonat()`` or the ``py3k`` flag). \n* The command line executable installed along with bottle will be renamed from `bottle.py` to just `bottle`. You can still execute bottle directly as a script (e.g. `./bottle.py` or `python3 bottle.py`) or as a module (via `python3 -m bottle`). Just the executable installed by your packaging tool (e.g. `pip`) into the `bin` folder of your (virtual) environment will change.\n* The old route syntax (``/hello/:name``) is deprecated in favor of the more readable and flexible ``/hello/<name>`` syntax.\n* :meth:`Bottle.mount` now recognizes Bottle instance and will warn about parameters that are not compatible with the new mounting behavior. The old behavior (mount applications as WSGI callable) still works and is used as a fallback automatically.\n* The undocumented :func:`local_property` helper is now deprecated.\n* The server adapter for google app engine is not useful anymore and marked as deprecated.\n* Bottle uses pickle to store arbitrary objects into signed cookies. This is safe, as long as the signature key remains a secret. Unfortunately, people tend to push code with signature keys to github all the time, so we decided to remove pickle-support from bottle. Signed cookies will now issue a deprecation warning if the value is not a string, and support for non-string values will be removed in 0.14. The global :func:`cookie_encode`, :func:`cookie_decode` and :func:`is_cookie_encoded` are now also deprecated. If you are using this feature, think about using json to serialize your objects before storing them into cookies, or switch to a session system that stores data server-side instead of client-side.\n\n.. rubric:: Removed APIs (deprecated since 0.12)\n\n* Plugins with the old API (``api=1`` or no api attribute) will no longer work.\n* Parameter order of :meth:`Bottle.mount` changed in 0.10. The old order will now result in an error instead of a warning.\n* The :class:`ConfigDict` class was introduced in 0.11 and changed during 0.12. These changes are now final.\n\n  * Attribute access and assignment was removed due to high overhead and limited usability.\n  * Namespaced sub-instance creation was removed. ``config[\"a\"][\"b\"]`` has a high overhead and little benefit over ``config[\"a.b\"]``.\n  * :class:`ConfigDict` instances are no longer callable. This was a shortcut for :meth:`ConfigDict.update`.\n  * :class:`ConfigDict` constructor no longer accepts any parameters. Use the `load_*` methods instead.\n\n* Bottle 0.12 changed some aspects of the Simple Template Engine. These changes are now final and the old syntax will now longer work.\n\n  * The magic ``{{rebase()}}`` call was replaced by a ``base`` variable. Example: ``{{base}}``\n  * In STPL Templates, the ``rebase`` and ``include`` keywords were replaced with functions in 0.12.\n  * PEP-263 encoding strings are no longer recognized. Templates are always utf-8.\n\n* The 'geventSocketIO' server adapter was removed without notice. It did not work anyway.\n\n.. rubric:: Changes\n\nThese changes might require special care when updating.\n\n* Signed cookies now use a stronger HMAC algorithm by default. This will result in old cookies to appear invalid after the update. Pass an explicit ``digestmod=hashlib.md5`` to :meth:`Request.get_cookie <BaseRequest.get_cookie>` and :meth:`Response.set_cookie <BaseResponse.set_cookie>` to get the old behavior.\n* Bottle now ships with its own multipart form data parser (borrowed from `multipart <https://pypi.org/project/multipart/>`_) and no longer relies on ``cgi.FieldStorage``, which was removed in Python 3.13. This may change the way broken (non-standard) form submissions are parsed. The new parser is more strict and correct than ohe old one.\n* Installing bottle with `pip` or similar tools will now install an additional command line executable named `bottle` into the `bin` folder of your (virtual) environment. This will replace the now deprecated `bottle.py` executable in a later release. See above.\n\n.. rubric:: Other Improvements\n\n* :class:`Bottle` instances are now context managers. If used in a with-statement, the default application changes to the specific instance and the shortcuts for many instance methods can be used.\n* Added support for ``PATCH`` requests and the :meth:`Bottle.patch` decorator.\n* Added `aiohttp <https://aiohttp.readthedocs.io/en/stable/>`_ and `uvloop <https://github.com/MagicStack/uvloop>`_ server adapters.\n* Added command-line arguments for config from json or ini files.\n* :meth:`Bottle.mount` now recognizes instances of :class:`Bottle` and mounts them with significantly less overhead than other WSGI applications.\n* The :attr:`Request.json <BaseRequest.json>` property now accepts ``application/json-rpc`` requests.\n* :func:`static_file` gained support for ``ETag`` headers. It will generate ETags and recognizes ``If-None-Match`` headers.\n* :func:`static_file` will now guess the mime type of ``*.gz`` and other compressed files correctly (e.g. ``application/gzip``) and NOT set the ``Content-Encoding`` header.\n* Jinja2 templates will produce better error messages than before.\n\n\n\nRelease 0.12\n==============\n\n* New SimpleTemplate parser implementation\n\n  * Support for multi-line code blocks (`<% ... %>`).\n  * The keywords `include` and `rebase` are functions now and can accept variable template names.\n\n* The new :attr:`Request.route <BaseRequest.route>` property returns the :class:`Route` that originally matched the request.\n* Removed the ``Request.MAX_PARAMS`` limit. The hash collision bug in CPythons dict() implementation was fixed over a year ago. If you are still using Python 2.5 in production, consider upgrading or at least make sure that you get security fixed from your distributor.\n* New :class:`ConfigDict` API (see :doc:`configuration`)\n\nMore information can be found in this `development blog post <https://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.\n\n\nRelease 0.11\n==============\n\n* Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.\n* Support for partial downloads (``Range`` header) in :func:`static_file`.\n* The new :class:`ResourceManager` interface helps locating files bundled with an application.\n* Added a server adapter for `waitress <https://docs.pylonsproject.org/projects/waitress/en/latest/>`_.\n* New :meth:`Bottle.merge` method to install all routes from one application into another.\n* New :attr:`Request.app <BaseRequest.app>` property to get the application object that handles a request.\n* Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by WTForms).\n* :class:`MultiDict` and subclasses are now pickle-able.\n\n.. rubric:: API Changes\n\n* :attr:`Response.status <BaseResponse.status>` is a read-write property that can be assigned either a numeric status code or a status string with a reason phrase (``200 OK``). The return value is now a string to better match existing APIs (WebOb, werkzeug). To be absolutely clear, you can use the read-only properties :attr:`Response.status_code <BaseResponse.status_code>` and :attr:`Response.status_line <BaseResponse.status_line>`.\n\n.. rubric:: API Deprecations\n\n* :class:`SimpleTALTemplate` is now deprecating. There seems to be no demand.\n\nRelease 0.10\n==============\n\n* Plugin API v2\n\n  * To use the new API, set :attr:`Plugin.api` to ``2``.\n  * :meth:`Plugin.apply` receives a :class:`Route` object instead of a context dictionary as second parameter. The new object offers some additional information and may be extended in the future.\n  * Plugin names are considered unique now. The topmost plugin with a given name on a given route is installed, all other plugins with the same name are silently ignored.\n\n* The Request/Response Objects\n\n  * Added :attr:`Request.json <BaseRequest.json>`, :attr:`Request.remote_route <BaseRequest.remote_route>`, :attr:`Request.remote_addr <BaseRequest.remote_addr>`, :attr:`Request.query <BaseRequest.query>` and :attr:`Request.script_name <BaseRequest.script_name>`.\n  * Added :attr:`Response.status_line <BaseResponse.status_line>` and :attr:`Response.status_code <BaseResponse.status_code>` attributes. In future releases, :attr:`Response.status <BaseResponse.status>` will return a string (e.g. ``200 OK``) instead of an integer to match the API of other common frameworks. To make the transition as smooth as possible, you should use the verbose attributes from now on.\n  * Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many places. The new dict implementation allows attribute access and handles unicode form values transparently.\n\n* Templates\n\n  * Added three new functions to the SimpleTemplate default namespace that handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and :func:`stpl.setdefault`.\n  * The default escape function for SimpleTemplate now additionally escapes single and double quotes.\n\n* Routing\n\n  * A new route syntax (e.g. ``/object/<id:int>``) and support for route wildcard filters.\n  * Four new wildcard filters: `int`, `float`, `path` and `re`.\n\n* Other changes\n\n  * Added command line interface to load applications and start servers.\n  * Introduced a :class:`ConfigDict` that makes accessing configuration a lot easier (attribute access and auto-expanding namespaces).\n  * Added support for raw WSGI applications to :meth:`Bottle.mount`.\n  * :meth:`Bottle.mount` parameter order changed.\n  * :meth:`Bottle.route` now accepts an import string for the ``callback`` parameter.\n  * Dropped Gunicorn 0.8 support. Current supported version is 0.13.\n  * Added custom options to Gunicorn server.\n  * Finally dropped support for type filters. Replace with a custom plugin of needed.\n\n\nRelease 0.9\n============\n\n.. rubric:: Whats new?\n\n* A brand new plugin-API. See :doc:`plugins/index` and :doc:`plugins/dev` for details.\n* The :func:`route` decorator got a lot of new features. See :meth:`Bottle.route` for details.\n* New server adapters for `gevent <https://www.gevent.org/>`_, `meinheld <https://meinheld.org/>`_ and `bjoern <https://github.com/jonashaag/bjoern>`_.\n* Support for SimpleTAL templates.\n* Better runtime exception handling for mako templates in debug mode.\n* Lots of documentation, fixes and small improvements.\n* A new :data:`Request.urlparts <BaseRequest.urlparts>` property.\n\n.. rubric:: Performance improvements\n\n* The :class:`Router` now special-cases ``wsgi.run_once`` environments to speed up CGI.\n* Reduced module load time by ~30% and optimized template parser. See `8ccb2d </commit/8ccb2d>`_, `f72a7c </commit/f72a7c>`_ and `b14b9a </commit/b14b9a>`_ for details.\n* Support for \"App Caching\" on Google App Engine. See `af93ec </commit/af93ec>`_.\n* Some of the rarely used or deprecated features are now plugins that avoid overhead if the feature is not used.\n\n.. rubric:: API changes\n\nThis release is mostly backward compatible, but some APIs are marked deprecated now and will be removed for the next release. Most noteworthy:\n\n* The ``static`` route parameter is deprecated. You can escape wild-cards with a backslash.\n* Type-based output filters are deprecated. They can easily be replaced with plugins.\n\n\nRelease 0.8\n============\n\n.. rubric:: API changes\n\nThese changes may break compatibility with previous versions.\n\n* The built-in Key/Value database is not available anymore. It is marked deprecated since 0.6.4\n* The Route syntax and behaviour changed.\n\n  * Regular expressions must be encapsulated with ``#``. In 0.6 all non-alphanumeric characters not present in the regular expression were allowed.\n  * Regular expressions not part of a route wildcard are escaped automatically. You don't have to escape dots or other regular control characters anymore. In 0.6 the whole URL was interpreted as a regular expression. You can use anonymous wildcards (``/index:#(\\.html)?#``) to achieve a similar behaviour.\n\n* The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead.\n* The :class:`SimpleTemplate` engine escapes HTML special characters in ``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` syntax to get old behaviour (no escaping).\n* The :class:`SimpleTemplate` engine returns unicode strings instead of lists of byte strings.\n* ``bottle.optimize()`` and the automatic route optimization is obsolete.\n* Some functions and attributes were renamed:\n\n  * :attr:`Request._environ <BaseRequest._environ>` is now :attr:`Request.environ <BaseRequest.environ>`\n  * :attr:`Response.header <BaseResponse.header>` is now :attr:`Response.headers <BaseResponse.headers>`\n  * :func:`default_app` is obsolete. Use :func:`app` instead.\n\n* The default :func:`redirect` code changed from 307 to 303.\n* Removed support for ``@default``. Use ``@error(404)`` instead.\n\n.. rubric:: New features\n\n\nThis is an incomplete list of new features and improved functionality.\n\n* The :class:`Request` object got new properties: :attr:`Request.body <BaseRequest.body>`, :attr:`Request.auth <BaseRequest.auth>`, :attr:`Request.url <BaseRequest.url>`, :attr:`Request.header <BaseRequest.header>`, :attr:`Request.forms <BaseRequest.forms>`, :attr:`Request.files <BaseRequest.files>`.\n* The :meth:`Response.set_cookie <BaseResponse.set_cookie>` and :meth:`Request.get_cookie <BaseRequest.get_cookie>` methods are now able to encode and decode python objects. This is called a *secure cookie* because the encoded values are signed and protected from changes on client side. All pickle-able data structures are allowed.\n* The new :class:`Router` class drastically improves performance for setups with lots of dynamic routes and supports named routes (named route + dict = URL string).\n* It is now possible (and recommended) to return :exc:`HTTPError` and :exc:`HTTPResponse` instances or other exception objects instead of raising them.\n* The new function :func:`static_file` equals :func:`send_file` but returns a :exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. :func:`send_file` is deprecated.\n* New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.\n* The :class:`SimpleTemplate` engine got full unicode support.\n* Lots of non-critical bugfixes.\n\n"
  },
  {
    "path": "docs/conf.py",
    "content": "# -*- coding: utf-8 -*-\nimport sys\nimport os\nimport time\n\n# Use the matching bottle version, not a globally installed one.\nbottle_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))\nsys.path.insert(0, bottle_dir)\nimport bottle\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx',\n              'sphinx.ext.viewcode']\nmaster_doc = 'index'\nproject = u'Bottle'\ncopyright = u'2009-%s, %s' % (time.strftime('%Y'), bottle.__author__)\nversion = \".\".join(bottle.__version__.split(\".\")[:2])\nrelease = bottle.__version__\nadd_function_parentheses = True\nadd_module_names = False\nautodoc_member_order = 'bysource'\nautodoc_class_signature = 'separated'\npygments_style = 'sphinx'\nintersphinx_mapping = {'python': ('https://docs.python.org/3', None),\n                       'werkzeug': ('https://werkzeug.palletsprojects.com/en/3.0.x', None)}\n\nlocale_dirs = ['_locale/']\ngettext_compact = False\n\n\n"
  },
  {
    "path": "docs/configuration.rst",
    "content": "=============\nConfiguration\n=============\n\n.. currentmodule:: bottle\n\nBottle applications can store their configuration in :attr:`Bottle.config`, a dict-like object and central place for application specific settings. This dictionary controls many aspects of the framework, tells (newer) plugins what to do, and can be used to store your own configuration as well.\n\nConfiguration Basics\n====================\n\nThe :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. All the common dict methods work as expected. Let us start with some examples::\n\n    import bottle\n    app = bottle.default_app()             # or bottle.Bottle() if you prefer\n\n    app.config['autojson']    = False      # Turns off the \"autojson\" feature\n    app.config['sqlite.db']   = ':memory:' # Tells the sqlite plugin which db to use\n    app.config['myapp.param'] = 'value'    # Example for a custom config value.\n\n    # Change many values at once\n    app.config.update({\n        'autojson': False,\n        'sqlite.db': ':memory:',\n        'myapp.param': 'value'\n    })\n\n    # Add default values\n    app.config.setdefault('myapp.param2', 'some default')\n\n    # Receive values\n    param  = app.config['myapp.param']\n    param2 = app.config.get('myapp.param2', 'fallback value')\n\n    # An example route using configuration values\n    @app.route('/about', view='about.rst')\n    def about():\n        email = app.config.get('my.email', 'nomail@example.com')\n        return {'email': email}\n\nHelper functions can rely on :attr:`Request.app <BaseRequest.app>` to get the application\nand configuration associated with the *current* request::\n\n    from bottle import request\n    def is_admin(user):\n        return user == request.app.config['myapp.admin_user']\n\nNaming Convention\n=================\n\nTo make life easier, plugins and applications should follow some simple rules when it comes to config parameter names:\n\n- All keys should be lowercase strings and follow the rules for python identifiers (no special characters but the underscore).\n- Namespaces are separated by dots (e.g. ``namespace.field`` or ``namespace.subnamespace.field``).\n- Bottle uses the root namespace for its own configuration. Plugins should store all their variables in their own namespace (e.g. ``sqlite.db`` or ``werkzeug.use_debugger``).\n- Your own application should use a separate namespace (e.g. ``myapp.*``).\n\n\nLoad configuration from a File\n=================================\n\n.. versionadded 0.12\n\nConfiguration files are useful if you want to enable non-programmers to configure your application,\nor just don't want to hack python module files just to change the database port. A very common syntax for configuration files is shown here:\n\n.. code-block:: ini\n\n    [sqlite]\n    db = /tmp/test.db\n    commit = auto\n \n    [myapp]\n    admin_user = defnull\n\nWith :meth:`ConfigDict.load_config` you can load these ``*.ini`` style configuration\nfiles from disk and import their values into your existing configuration::\n\n    app.config.load_config('/etc/myapp.conf')\n\n\nLoad configuration from a python module\n==========================================\n\n.. versionadded 0.13\n\nLoading configuration from a Python module is a common pattern for Python\nprograms and frameworks. :meth:`ConfigDict.load_module` imports a python\nmodule by name and adds all upper-case variables to configuration.\n\n.. code-block:: python\n\n     DEBUG = True\n     SQLITE = {\"db\": \":memory:\"}\n\n.. code-block::\n\n   >>> c = ConfigDict()\n   >>> c.load_module('config')\n   {'debug': True, 'sqlite.db': 'memory'}\n   >>> c.load_module(\"config\", squash=False)\n   {'debug': True, 'sqlite': {'db': 'memory'}}\n\nConfiguration is flattened by default, similar to the behavior of :meth:`ConfigDict.load_dict`. You can prevent that by passing ``squash=False`` as a parameter.\n\n\nLoading configuration from a :class:`dict`\n==========================================\n\n.. versionadded 0.12\n\nAnother useful method is :meth:`ConfigDict.load_dict`. This method takes\nan entire structure of nested dictionaries and turns it into a flat list\nof keys and values with namespaced keys::\n\n    # Load an entire dict structure\n    app.config.load_dict({\n        'autojson': False,\n        'sqlite': { 'db': ':memory:' },\n        'myapp': {\n            'param': 'value',\n            'param2': 'value2'\n        }\n    })\n    \n    assert app.config['myapp.param'] == 'value'\n\n    # Load configuration from a json file\n    with open('/etc/myapp.json') as fp:\n        app.config.load_dict(json.load(fp))\n\n.. _conf-hook:\n\nListening to configuration changes\n==================================\n\n.. versionadded 0.12\n\nBottle triggers the ``config`` application hook each time a value in :attr:`Bottle.config` is about to be changed.\nThis hook can be used to dynamically re-configure plugins or parts of your application once configuration changes at runtime.\nFor example:\n\n  * Enable or disable maintenance or debug mode.\n  * Reconnect to a new database.\n  * Change the settings on a plugin or background service.\n  * Resize worker thread pools.\n  \nThe hook callback receives two arguments (key, new_value) and is called before the value is actually changed in the dictionary.\nRaising an exception from this callback will prevent the change and preserve the old value.\n\n::\n\n  @app.hook('config')\n  def on_config_change(key, value):\n    if key == 'debug':\n        switch_own_debug_mode_to(value)\n\nThe hook callbacks cannot *change* the value that is to be stored to the dictionary. That is what filters are for.\n\n\n.. _conf-meta:\n\nFilters and other Meta Data\n===========================\n\n.. versionadded 0.12\n\n:class:`ConfigDict` allows you to store meta data along with configuration keys. Two meta fields are currently defined:\n\n``help``\n    A help or description string. May be used by debugging, introspection or\n    admin tools to help the site maintainer configuring their application.\n``filter``\n    A callable that accepts and returns a single value. If a filter is defined for a key, any new value stored to that key is first passed through the filter callback. The filter can be used to cast the value to a different type, check for invalid values (throw a ValueError) or trigger side effects.\n\nThis feature is most useful for plugins. They can validate their config parameters or trigger side effects using filters and document their configuration via ``help`` fields::\n\n    class SomePlugin(object):\n        def setup(app):\n            app.config.meta_set('some.int', 'filter', int)\n            app.config.meta_set('some.list', 'filter',\n                lambda val: str(val).split(';'))\n            app.config.meta_set('some.list', 'help',\n                'A semicolon separated list.')\n\n        def apply(self, callback, route):\n            ...\n\n    import bottle\n    app = bottle.default_app()\n    app.install(SomePlugin())\n\n    app.config['some.list'] = 'a;b;c'     # Actually stores ['a', 'b', 'c']\n    app.config['some.int'] = 'not an int' # raises ValueError\n\n\nAPI Documentation\n=================\n\n.. versionadded 0.12\n\n.. autoclass:: ConfigDict\n   :members:\n   :no-index:"
  },
  {
    "path": "docs/contributors.rst",
    "content": "============\nContributors\n============\n\n.. include:: ../AUTHORS"
  },
  {
    "path": "docs/deployment.rst",
    "content": ".. highlight:: python\n.. currentmodule:: bottle\n\n.. _flup: https://pypi.org/project/flup/\n.. _gae: https://code.google.com/appengine/docs/python/overview.html\n.. _wsgiref: https://docs.python.org/library/wsgiref.html\n.. _cherrypy: https://cherrypy.dev/\n.. _paste: https://pythonpaste.readthedocs.io/\n.. _gunicorn: https://pypi.python.org/pypi/gunicorn\n.. _tornado: https://www.tornadoweb.org/\n.. _twisted: https://twistedmatrix.com/\n.. _diesel: https://dieselweb.org/\n.. _meinheld: https://pypi.python.org/pypi/meinheld\n.. _bjoern: https://pypi.python.org/pypi/bjoern\n.. _gevent: https://www.gevent.org/\n.. _eventlet: https://eventlet.net/\n.. _waitress: https://readthedocs.org/docs/waitress/en/latest/\n.. _apache: https://httpd.apache.org/\n.. _mod_wsgi: https://code.google.com/p/modwsgi/\n.. _pound: https://www.apsis.ch/pound\n.. _nginx: https://nginx.org/\n.. _lighttpd: https://www.lighttpd.net/\n.. _cherokee: https://cherokee-project.com/\n.. _uWSGI: https://uwsgi-docs.readthedocs.io/en/latest/\n.. _cheroot: https://cheroot.cherrypy.dev/\n\n.. _tutorial-deployment:\n\n================================================================================\nDeployment\n================================================================================\n\nThe bottle :func:`run` function, when called without any parameters, starts a local development server on port 8080. You can access and test your application via http://localhost:8080/ if you are on the same host.\n\nTo get your application available to the outside world, specify the IP the server should listen to (e.g. ``run(host='192.168.0.1')``) or let the server listen to all interfaces at once (e.g. ``run(host='0.0.0.0')``). The listening port can be changed in a similar way, but you need root or admin rights to choose a port below 1024. Port 80 is the standard for HTTP servers::\n\n  # Listen to HTTP on all interfaces\n  if __name__ == '__main__':\n      run(host='0.0.0.0', port=80)\n\nScaling for Production\n================================================================================\n\nThe built-in development server is base on `wsgiref WSGIServer <https://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_, which is a very simple non-threading HTTP server implementation. This is perfectly fine for development, but may become a performance bottleneck when server load increases.\n\nThe easiest way to increase performance is to install a multi-threaded server library like cheroot_ or gunicorn_ and tell Bottle to use that instead of the single-threaded wsgiref server::\n\n    run(server='cheroot', ...)   # Pure Python, runs everywhere\n    run(server='gunicorn', ...)  # High performance\n\nOr using the ``bottle`` command line interface:\n\n.. code-block:: sh\n\n    python3 -m bottle --server gunicorn [...] mymodule:app\n\nFor production deployments gunicorn_ is a really good choice. It comes with its own command line utility that supports a lot more options than bottle. Since :class:`Bottle` instances are WSGI applications, you can tell gunicorn_ (or any other WSGI server) to load your app instead of calling :func:`run` yourself:\n\n.. code-block:: sh\n\n    gunicorn -w 4 mymodule:app\n\nThis will start your application with 4 gunicorn workers and sane default settings. For more details and more complete examples, check out `Gunicorn Documentation <https://docs.gunicorn.org/>`_.\n\nServer adapters\n------------------------------------------------------------------------------\n\nBottle ships with a bunch of ready-to-use adapters for the most common WSGI servers so you can try out different server backends easily. You can select a server backend via `run(server='NAME')` or `python3 -m bottle --server NAME`. Here is an incomplete list:\n\n========  ============  ======================================================\nName      Homepage      Description\n========  ============  ======================================================\ncgi                     Run as CGI script\nflup      flup_         Run as FastCGI process\ngae       gae_          Helper for Google App Engine deployments\nwsgiref   wsgiref_      Single-threaded default server\ncherrypy  cherrypy_     Multi-threaded (deprectated))\ncheroot   cheroot_      Successor of cheerypy\npaste     paste_        Multi-threaded, stable, tried and tested\nwaitress  waitress_     Multi-threaded, poweres Pyramid\ngunicorn  gunicorn_     Pre-forked, partly written in C\neventlet  eventlet_     Asynchronous framework with WSGI support.\ngevent    gevent_       Asynchronous (greenlets)\ndiesel    diesel_       Asynchronous (greenlets)\ntornado   tornado_      Asynchronous, powers some parts of Facebook\ntwisted   twisted_      Asynchronous, well tested but... twisted\nmeinheld  meinheld_     Asynchronous, partly written in C\nbjoern    bjoern_       Asynchronous, very fast and written in C\nauto                    Automatically selects the first available server adapter\n========  ============  ======================================================\n\nThose adapters are very basic and just for convenience, though. If you need more control over your deployment, refer to the server backend documentation and mount your Bottle application just like any other WSGI application.\n\n\nWSGI Deployment\n------------------------------------------------------------------------------\n\nIf there is no adapter for your favorite server or if you need more control over the server setup, you may want to start the server manually. Refer to the server documentation on how to run WSGI applications. Here is an example for cheroot_::\n\n    import cheroot.wsgi\n    import mymodule.app\n\n    wsgi_server = cheroot.wsgi.Server(\n        bind_addr=('0.0.0.0', 80),\n        wsgi_app=mymodule.app\n    )\n\n    try:\n        wsgi_server.start()\n    finally:\n        wsgi_server.stop()\n\n"
  },
  {
    "path": "docs/development.rst",
    "content": "Developer Notes\n=================\n\nThis document is intended for developers and package maintainers interested in the bottle development and release workflow. If you want to contribute, you are just right!\n\n\nGet involved\n------------\n\nThere are several ways to join the community and stay up to date. Here are some of them:\n\n* **Mailing list**: Join our mailing list by sending an email to `bottlepy+subscribe@googlegroups.com <mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required).\n* **IRC**: Join `#bottlepy on irc.libera.chat <irc://irc.libera.chat/bottlepy>`_ or use the `web chat interface <https://web.libera.chat/#bottlepy>`_.\n\n\nGet the Sources\n---------------\n\nThe bottle `development repository <https://github.com/bottlepy/bottle>`_ and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan to contribute, it is a good idea to create an account there and fork the main repository. This way your changes and ideas are visible to other developers and can be discussed openly. Even without an account, you can clone the repository or just download the latest development version as a source archive.\n\n* **git:** ``git clone git://github.com/bottlepy/bottle.git``\n* **git/https:** ``git clone https://github.com/bottlepy/bottle.git``\n* **Download:** Development branch as `tar archive <https://github.com/bottlepy/bottle/tarball/master>`_ or `zip file <https://github.com/bottlepy/bottle/zipball/master>`_.\n\n\nReleases and Updates\n--------------------\n\nBottle is released at irregular intervals and distributed through `PyPI <https://pypi.python.org/pypi/bottle>`_. Release candidates are only available from the git repository mentioned above. Debian and many other Linux distributions offer packages.\n\nThe Bottle version number splits into three parts (**major.minor.patch**) but does not follow the rules of `SemVer <https://semver.org/>`_. Instead, you can usually rely on the following rules:\n\nMajor Release (x.0)\n    The major release number is increased on important milestones that change the design of core parts of the framework and break backward compatibility in some fundamental way. You probably have to change parts of your application to use a new major release. These releases are very rare, through.\n\nMinor Release (x.y)\n    The minor release number is increased whenever APIs or behavior changes in some backwards incompatible way or major features or new APIs are added. You might get some depreciation warnings any may have to tweak some configuration settings to restore the old behavior, but in most cases these changes are designed to be backward compatible for at least one minor release. You should update to stay up do date, but don't have to.\n\nPatches (x.y.z)\n    The patch number is increased on bug-fixes and other patches that do not change APIs or behaviour. You can safely update without editing your application code. In fact, you really should as soon as possible, because important security fixes are released this way.\n\nPre-Release Versions\n    Release candidates are marked by an ``rc`` in their revision number. These are API stable most of the time and open for testing, but not officially released yet. You should not use these for production.\n\n\nRepository Structure\n--------------------\n\nThe source repository is structured as follows:\n\n``master`` branch\n  This is the integration, testing and development branch. All changes that are planned to be part of the next release are merged and tested here.\n\n``release-x.y`` branches\n  As soon as the master branch is (almost) ready for a new release, it is branched into a new release branch. This \"release candidate\" is feature-frozen but may receive bug-fixes and last-minute changes until it is considered production ready and officially released. From that point on it is called a \"maintenance branch\" and still receives bug-fixes, but only important ones. The patch number is increased on each push to these branches, so you can keep up with important changes.\n\nFeature branches\n  All other branches are feature branches. These are based on the master branch and only live as long as they are still active and not merged back into ``master``.\n\n\n.. rubric:: What does this mean for a developer?\n\nIf you want to add a feature, create a new feature branch from ``master``. If you want to fix a bug, branch off of ``release-x.y`` for each affected release. Please use a separate branch for each feature or bug to make integration as easy as possible.\n\n.. rubric:: What does this mean for a maintainer ?\n\nWatch the tags (and the mailing list) for bug-fixes and new releases. If you want to fetch a specific release from the git repository, trust the tags, not the branches. A branch may contain changes that are not released yet, but a tag marks the exact commit which changed the version number.\n\n\nSubmitting Patches\n------------------\n\nThe best way to get your changes integrated into the main development branch is to fork the main repository at github, create a new feature-branch, apply your changes and send a pull-request. Further down this page is a small collection of git workflow examples that may guide you. Submitting git-compatible patches to the mailing list is fine too. In any case, please follow some basic rules:\n\n* **Documentation:** Tell us what your patch does. Comment your code. If you introduced a new feature, add to the documentation so others can learn about it.\n* **Test:** Write tests to prove that your code works as expected and does not break anything. If you fixed a bug, write at least one test-case that triggers the bug. Make sure that all tests pass before you submit a patch.\n* **One patch at a time:** Only fix one bug or add one feature at a time. Design your patches so that they can be applied as a whole. Keep your patches clean, small and focused. \n* **Sync with upstream:** If the ``upstream/master`` branch changed while you were working on your patch, rebase or pull to make sure that your patch still applies without conflicts.\n\n\n\n\n\n\n\n"
  },
  {
    "path": "docs/faq.rst",
    "content": ".. currentmodule:: bottle\n\n.. _beaker: https://beaker.readthedocs.io/en/latest/\n.. _mod_python: https://www.modpython.org/\n.. _mod_wsgi: https://code.google.com/p/modwsgi/\n.. _paste: https://pythonpaste.readthedocs.io/\n.. _pylons: https://pylonsproject.org/\n.. _gevent: https://www.gevent.org/\n.. _heroku: https://heroku.com\n.. _django: https://www.djangoproject.com/\n.. _werkzeug: https://werkzeug.palletsprojects.com/en/3.0.x/\n\n==================\nF.A.Q.\n==================\n\nThis is a loosely ordered collection of frequently asked questions, solutions for common problems, tips and other bits of knowledge. \n\nGeneral questions\n===========================\n\nIs bottle suitable for complex applications?\n---------------------------------------------\n\nBottle is first and foremost a *micro* framework. It is small, fast, easy to learn, stays out of your way and provides just enough functionality to get you started. This is perfect for prototyping, weekend projects, small applications, REST APIs or micro services, but you'll have to get your hands dirty at some point. If there is no :doc:`plugin <plugins/list>` available for the feature you need, you'll have to write some glue code yourself. But that's not as bad as it sounds. Bottle is small and straight forward. Unlike most other frameworks, you can actually find answers by reading its code. If you want to really understand and fully gasp your tech stack, then bottle is for you. But if you have tight deadlines and do not want to deal with any details, a more complete full-stack framework like django_ may be a better choice.\n\nWhat about Flask?\n---------------------------------------------\n\nFlask was heavily inspired by Bottle (`* <https://github.com/bottlepy/bottle/issues/1158#issuecomment-526602488>`_) and looks very similar on the surface, but took some very different design decisions. Most importantly, Flask is built on top of other libraries (e.g. Werkzeug, Jinja, Click and many more) which makes Flask itself small, but the actual code required to serve a single request is huge in comparison. I would not call it a *micro* framework at this point, but that's just my personal opinion. If you prefer Flask, go for it.\n\n\nCommon errors and pitfalls\n==========================\n\n\"Template Not Found\" in mod_wsgi/mod_python\n--------------------------------------------------------------------------------\n\nBottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ or mod_wsgi_ environment, the working directory (``./``) depends on your Apache settings. You should add an absolute path to the template search path::\n\n    bottle.TEMPLATE_PATH.insert(0,'/absolut/path/to/templates/')\n\nso bottle searches the right paths.\n\nDynamic Routes and Slashes\n--------------------------------------------------------------------------------\n\nIn :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder token (``<name>``) matches everything up to the next slash. This equals to ``[^/]+`` in regular expression syntax. To accept slashes too, you have to add a custom regular pattern to the placeholder. An example: ``/images/<filepath:path>`` would match ``/images/icons/error.png`` but ``/images/<filename>`` won't.\n\nProblems with reverse proxies\n--------------------------------------------------------------------------------\n\nRedirects and url-building only works if bottle knows the public address and location of your application. If you run bottle locally behind a reverse proxy or load balancer, some information might get lost along the way. For example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect the local request by your proxy, not the real request by the client. Here is a small WSGI middleware snippet that helps to fix these values::\n\n  def fix_environ_middleware(app):\n    def fixed_app(environ, start_response):\n      environ['wsgi.url_scheme'] = 'https'\n      environ['HTTP_X_FORWARDED_HOST'] = 'example.com'\n      return app(environ, start_response)\n    return fixed_app\n\n  app = bottle.default_app()    \n  app.wsgi = fix_environ_middleware(app.wsgi)\n  \n\n\nRecipes for common tasks\n============================\n\n\nThis is a collection of code snippets and examples for common use cases. \n\nKeeping track of Sessions\n----------------------------\n\nThere is no built-in support for sessions because there is no *right* way to do it (in a micro framework). Depending on requirements and environment you could use beaker_ middleware with a fitting backend or implement it yourself. Here is an example for beaker sessions with a file-based backend::\n\n    from bottle import Bottle, request\n    from beaker.middleware import SessionMiddleware\n\n    app = Bottle()\n\n    session_opts = {\n        'session.type': 'file',\n        'session.cookie_expires': 300,\n        'session.data_dir': './data',\n        'session.auto': True\n    }\n    app = SessionMiddleware(app, session_opts)\n\n    @app.route('/test')\n    def test():\n      s = request['beaker.session']\n      s['test'] = s.get('test',0) + 1\n      s.save()\n      return 'Test counter: %d' % s['test']\n\n    app.run()\n\nWARNING: Beaker's SessionMiddleware is not thread safe.  If two concurrent requests modify the same session at the same time, one of the updates might get lost. For this reason, sessions should only be populated once and treated as a read-only store after that. If you find yourself updating sessions regularly, and don't want to risk losing any updates, think about using a real database instead or seek alternative session middleware libraries.\n\n\nDebugging with Style: Debugging Middleware\n--------------------------------------------------------------------------------\n\nBottle catches all Exceptions raised in your app code to prevent your WSGI server from crashing. If the built-in :func:`debug` mode is not enough and you need exceptions to propagate to a debugging middleware, you can turn off this behaviour::\n\n    import bottle\n    app = bottle.Bottle() \n    app.catchall = False  # Now most exceptions are re-raised within bottle.\n    myapp = DebuggingMiddleware(app) #Replace this with a middleware of your choice (see below)\n    bottle.run(app=myapp)\n\nNow, bottle only catches its own exceptions (:exc:`HTTPError`, :exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can handle the rest.\n\nThe werkzeug_ and paste_ libraries both ship with very powerful debugging WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for paste_. They both allow you do inspect the stack and even execute python code within the stack context, so **do not use these in production**!\n\n\nUnit-Testing Bottle Applications\n--------------------------------------------------------------------------------\n\nUnit-testing is usually performed against methods defined in your web application without running a WSGI environment.\n\nA simple example::\n\n    import bottle\n    \n    @bottle.route('/')\n    def index():\n        return 'Hi!'\n\n    if __name__ == '__main__':\n        bottle.run()\n\nTest script::\n\n    import mywebapp\n    \n    def test_webapp_index():\n        assert mywebapp.index() == 'Hi!'\n\nIn the example the Bottle route() method is never executed - only index() is tested.\n\nIf the code being tested requires access to ``bottle.request`` you can mock it using `Boddle <https://github.com/keredson/boddle>`_::\n\n    import bottle\n    \n    @bottle.route('/')\n    def index():\n        return 'Hi %s!' % bottle.request.params['name']\n\nTest script::\n\n    import mywebapp\n    from boddle import boddle\n    \n    def test_webapp_index():\n        with boddle(params={'name':'Derek'}):\n            assert mywebapp.index() == 'Hi Derek!'\n\n\nFunctional Testing Bottle Applications\n--------------------------------------------------------------------------------\n\nAny HTTP-based testing system can be used with a running WSGI server, but some testing frameworks work more intimately with WSGI, and provide the ability the call WSGI applications in a controlled environment, with tracebacks and full use of debugging tools.\n\nExample using `WebTest <https://docs.pylonsproject.org/projects/webtest/en/latest/index.html>`_::\n\n    from webtest import TestApp\n    import myapp\n\n    def test_functional_login_logout():\n        app = TestApp(myapp.app)\n\n        app.post('/login', {'user': 'foo', 'pass': 'bar'}) # log in and get a cookie\n\n        assert app.get('/admin').status == '200 OK'        # fetch a page successfully\n\n        assert app.get('/logout').status_code == 200        # log out\n        app.reset()                                        # drop the cookie\n\n        # fetch the same page, unsuccessfully\n        assert app.get('/admin', expect_errors=True).status == '401 Unauthorized'\n\n\nIgnore trailing slashes\n--------------------------------------------------------------------------------\n\nFor Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To treat both URLs the same you can add two ``@route`` decorators::\n\n    @route('/test')\n    @route('/test/')\n    def test(): return 'Slash? no?'\n\nadd a WSGI middleware that strips trailing slashes from all URLs::\n\n    class StripPathMiddleware(object):\n      def __init__(self, app):\n        self.app = app\n      def __call__(self, e, h):\n        e['PATH_INFO'] = e['PATH_INFO'].rstrip('/')\n        return self.app(e,h)\n    \n    app = bottle.app()\n    myapp = StripPathMiddleware(app)\n    bottle.run(app=myapp)\n\nor add a ``before_request`` hook to strip the trailing slashes::\n\n    @hook('before_request')\n    def strip_path():\n        request['PATH_INFO'] = request['PATH_INFO'].rstrip('/')\n\n.. rubric:: Footnotes\n\n.. [1] Because they are. See <https://www.ietf.org/rfc/rfc3986.txt>\n\n\nKeep-alive requests\n-------------------\n\n.. note::\n\n    For a more detailed explanation, see :doc:`async`.\n\nSeveral \"push\" mechanisms like XHR multipart need the ability to write response data without closing the connection in conjunction with the response header \"Connection: keep-alive\". WSGI does not easily lend itself to this behavior, but it is still possible to do so in Bottle by using the gevent_ async framework. Here is a sample that works with either the gevent_ HTTP server or the paste_ HTTP server (it may work with others, but I have not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the paste_ server::\n\n    from gevent import monkey; monkey.patch_all()\n\n    import gevent\n    from bottle import route, run\n    \n    @route('/stream')\n    def stream():\n        yield 'START'\n        gevent.sleep(3)\n        yield 'MIDDLE'\n        gevent.sleep(5)\n        yield 'END'\n    \n    run(host='0.0.0.0', port=8080, server='gevent')\n\nIf you browse to ``http://localhost:8080/stream``, you should see 'START', 'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to see them all at once).\n\nGzip Compression in Bottle\n--------------------------\n\nA common feature request is for Bottle to support Gzip compression, which speeds up sites by compressing static resources (like CSS and JS files) during a request.\n\nSupporting Gzip compression is not a straightforward proposition, due to a number of corner cases that crop up frequently. A proper Gzip implementation must:\n\n* Compress on the fly and be fast doing so.\n* Do not compress for browsers that don't support it.\n* Do not compress files that are compressed already (images, videos).\n* Do not compress dynamic files.\n* Support two differed compression algorithms (gzip and deflate).\n* Cache compressed files that don't change often.\n* De-validate the cache if one of the files changed anyway.\n* Make sure the cache does not get to big.\n* Do not cache small files because a disk seek would take longer than on-the-fly compression.\n\nBecause of these requirements, it is the recommendation of the Bottle project that Gzip compression is best handled by the WSGI server Bottle runs on top of. WSGI servers and reverse proxies often provide built-in features that allow transparent compression without changing the application itself.\n\n\nUsing hooks to handle CORS\n--------------------------\n\nHooks are useful to unconditionally do something before or after each\nrequest. For example, if you want to allow Cross-Origin requests for your\nentire application, instead of writing a :doc:`plugin <plugins/dev>` you can\nuse hooks to add the appropiate headers::\n\n    from bottle import hook, response, HTTPResponse\n\n    cors_headers = {\n        'Access-Control-Allow-Origin': '*',\n        'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',\n        # 'Access-Control-Allow-Headers': 'X-Token, ...',\n        # 'Access-Control-Expose-Headers': 'X-My-Custom-Header, ...',\n        # 'Access-Control-Max-Age': '86400',\n        # 'Access-Control-Allow-Credentials': 'true',\n    }\n\n    @hook('before_request')\n    def handle_options():\n        if request.method == 'OPTIONS':\n            # Bypass request routing and immediately return a response\n            raise HTTPResponse(headers=cors_headers)\n\n    @hook('after_request')\n    def enable_cors():\n        for key, value in cors_headers.items():\n           response.set_header(key, value)\n\n\nUsing Bottle with Heroku\n------------------------\n\nHeroku_, a popular cloud application platform now provides support\nfor running Python applications on their infrastructure. \n\nThis recipe is based upon the `Heroku Quickstart \n<https://devcenter.heroku.com/articles/quickstart>`_, \nwith Bottle specific code replacing the \n`Write Your App <https://devcenter.heroku.com/articles/python#write_your_app>`_ \nsection of the `Getting Started with Python on Heroku/Cedar \n<https://devcenter.heroku.com/articles/python>`_ guide::\n\n    import os\n    from bottle import route, run\n\n    @route(\"/\")\n    def hello_world():\n        return \"Hello World!\"\n\n    run(host=\"0.0.0.0\", port=int(os.environ.get(\"PORT\", 5000)))\n\nHeroku's app stack passes the port that the application needs to\nlisten on for requests, using the `os.environ` dictionary.\n"
  },
  {
    "path": "docs/index.rst",
    "content": ".. highlight:: python\n.. currentmodule:: bottle\n\n.. _mako: https://www.makotemplates.org/\n.. _cheetah: https://www.cheetahtemplate.org/\n.. _jinja2: https://jinja.palletsprojects.com/\n.. _paste: https://pythonpaste.readthedocs.io/\n.. _bjoern: https://github.com/jonashaag/bjoern\n.. _flup: https://trac.saddi.com/flup\n.. _gunicorn: https://gunicorn.org/\n.. _cheroot: https://cheroot.cherrypy.dev/\n.. _WSGI: https://peps.python.org/pep-3333/\n.. _Python: https://python.org/\n.. _testing: https://github.com/bottlepy/bottle/raw/master/bottle.py\n.. _issue_tracker: https://github.com/bottlepy/bottle/issues\n.. _PyPI: https://pypi.python.org/pypi/bottle\n.. _gae: https://developers.google.com/appengine/\n\n============================\nBottle: Python Web Framework\n============================\n\nBottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_. It is distributed as a single file module and has no dependencies other than the `Python Standard Library <https://docs.python.org/library/>`_.\n\n\n* **Routing:** Requests to function-call mapping with support for clean and dynamic URLs.\n* **Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-templates>` and support for mako_, jinja2_ and cheetah_ templates.\n* **Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP features.\n* **Server:** Built-in HTTP development server and support for a wide range of WSGI_ capable HTTP server (e.g. gunicorn_, paste_ or cheroot_).\n\n.. rubric:: Example: \"Hello World\" in a bottle\n\n::\n\n  from bottle import route, run, template\n\n  @route('/hello/<name>')\n  def index(name):\n      return template('<b>Hello {{name}}</b>!', name=name)\n\n  run(host='localhost', port=8080)\n\nRun this script or paste it into a Python console, then point your browser to `<http://localhost:8080/hello/world>`_. That's it.\n\nDownload and Install\n====================\n\n.. __: https://github.com/bottlepy/bottle/raw/master/bottle.py\n\nInstall the latest stable release with ``pip install bottle`` or download `bottle.py`__ (unstable) into your project directory. There are no hard [1]_ dependencies other than the Python standard library.\n\nDead Snakes\n===========\n\nBottle up to version 0.12 supported an absurd range of Python versions, some of which reached their end-of-life well over a decade ago. Starting with Bottle 0.13 we ensure backwards compatibility with `maintained versions of Python <https://devguide.python.org/versions/>`_ only. Outdated Python versions may still work, but are no longer tested for compatibility.\n\nIf you are in the unfortunate position to have to rely on \"dead snakes\" for production, just stick with Bottle 0.12 (LTS) or whichever release of Bottle still supports it. Everyone else should upgrade regularly to benefit from new features and improvements.\n\n.. list-table:: Python Support Matrix\n   :widths: 50 25 25\n   :header-rows: 1\n\n   * - Bottle Release\n     - Python 2\n     - Python 3\n   * - 0.12\n     - 2.5 - 2.7\n     - 3.2 - 3.12\n   * - 0.13\n     - 2.7\n     - >=3.8 [2]_\n   * - 0.14 (planned)\n     - *dropped*\n     - >=3.9 [2]_\n\n\n\nDocumentation\n=============\n\n.. toctree::\n   :maxdepth: 2\n   :caption: Getting Started\n\n   tutorial\n   api\n   changelog\n   faq\n\n.. toctree::\n   :maxdepth: 2\n   :caption: Advanced Topics\n\n   routing\n   configuration\n   stpl\n   deployment\n   async\n\n.. toctree::\n   :maxdepth: 2\n   :caption: Plugins\n\n   plugins/index\n   plugins/dev\n   plugins/list\n\n.. toctree::\n   :maxdepth: 2\n   :caption: Additional Notes\n\n   tutorial_app\n\n.. toctree::\n   :maxdepth: 2\n   :caption: Development\n\n   development\n   contributors\n\n\nLicense\n==================\n\nCode and documentation are available according to the MIT License:\n\n.. include:: ../LICENSE\n  :literal:\n\nThe Bottle logo however is *NOT* covered by that license. It is allowed to\nuse the logo as a link to the bottle homepage or in direct context with\nthe unmodified library. In all other cases please ask first.\n\n.. rubric:: Footnotes\n\n.. [1] Usage of the template or server adapter classes requires the corresponding template or server modules.\n.. [2] Bottle often still works with recently discontinued Python 3.x versions. We will not intentionally break compatibility, but also no longer test against those versions. Use at your own risk.\n"
  },
  {
    "path": "docs/plugins/dev.rst",
    "content": "\n.. currentmodule:: bottle\n\n.. _plugindev:\n\n===============\nWriting Plugins\n===============\n\nThis guide explains the plugin API and how to write custom plugins. I suggest reading :ref:`plugin-basics` first if you have not done so already. You might also want to have a look at the :doc:`/plugins/index` for some practical examples.\n\nPlugin API\n==========\n\nAny callable that accepts a function and returns a function is a valid plugin. This simple approach has its limits, though. Plugins that need more context and control can implement the extended :class:`Plugin` interface and hook into advanced features. Note that this is not a real class you can import from :mod:`bottle`, just a contract that plugins must implement to be recognized as extended plugins.\n\n.. class:: Plugin\n\n    Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is defined, it is always preferred over calling the plugin directly. All other methods and attributes are optional.\n\n    .. attribute:: name\n\n        Both :meth:`Bottle.uninstall` and the `skip` parameter of :meth:`Bottle.route()` accept a name string to refer to a plugin or plugin type. This works only for plugins that have a name attribute.\n\n    .. attribute:: api\n\n        The Plugin API is still evolving. This integer attribute tells bottle which version to use. If it is missing, bottle defaults to the first version. The current version is ``2``. See :ref:`plugin-changelog` for details.\n\n    .. method:: setup(self, app: Bottle)\n\n        Called as soon as the plugin is installed to an application via :meth:`Bottle.install`. The only parameter is the application object the plugin is installed to. This method is *not* called for plugins that were applied to routes via `apply`, but only for plugins installed to an application.\n\n    .. method:: __call__(self, callback)\n\n        As long as :meth:`apply` is not defined, the plugin itself is used as a decorator and applied directly to each route callback. The only parameter is the callback to be decorated. Whatever is returned by this method replaces the original callback. If there is no need to wrap or replace a given callback, just return the unmodified callback parameter.\n\n    .. method:: apply(self, callback, route: Route)\n\n        If defined, this method is used in favor of :meth:`__call__` to decorate route callbacks. The additional `route` parameter is an instance of :class:`Route` and provides a lot of context and meta-information and about the route to be decorated. See :ref:`route-context` for details.\n\n    .. method:: close(self)\n\n        Called as soon as the plugin is uninstalled or the application is closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`). This method is *not* called for plugins that were applied to routes via `apply`, but only for plugins installed to an application.\n\n\n.. _plugin-changelog:\n\nPlugin API Versions\n-------------------\n\nThe Plugin API is still evolving and changed with Bottle 0.10 to address certain issues with the route context dictionary. To ensure backwards compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` attribute to tell bottle which API to use. The API differences are summarized here.\n\n* **Bottle 0.9 API 1** (:attr:`Plugin.api` not present)\n\n  * Original Plugin API as described in the 0.9 docs.\n\n* **Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)\n\n  * The `context` parameter of the :meth:`Plugin.apply` method is now an instance of :class:`Route` instead of a context dictionary.\n\n\n.. _route-context:\n\nThe Route Context\n=================\n\nThe :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed information about the to-be-decorated route, the original route callback and route specific configuration.\n\nKeep in mind that :attr:`Route.config` is local to the route, but shared between all plugins. It is always a good idea to add a unique prefix or, if your plugin needs a lot of configuration, store it in a separate namespace within the `config` dictionary. This helps to avoid naming collisions between plugins.\n\nWhile some :class:`Route` attributes are mutable, changes may have unwanted effects on other plugins and also only affect plugins that were not applied yet. If you need to make changes to the route that are recognized by all plugins, call :meth:`Route.reset` afterwards. This will clear the route cache and apply all plugins again next time the route is called, giving all plugins a chance to adapt to the new config. The router is not updated, however. Changes to `rule` or `method` values have no effect on the router, only on plugins. This may change in the future.\n\n\nRuntime optimizations\n=====================\n\nOnce all plugins are applied to a route, the wrapped route callback is cached to speed up subsequent requests. If the behavior of your plugin depends on configuration, and you want to be able to change that configuration at runtime, you need to read the configuration on each request. Easy enough.\n\nFor performance reasons however, it might be worthwhile to return a different wrapper based on current needs, work with closures, or enable or disable a plugin at runtime. Let's take the built-in ``HooksPlugin`` as an example: If no hooks are installed, the plugin removes itself from all routes and has virtually no overhead. As soon as you install the first hook, the plugin activates itself and takes effect again.\n\nTo achieve this, you need control over the callback cache: :meth:`Route.reset` clears the cache for a single route and :meth:`Bottle.reset` clears all caches for all routes of an application at once. On the next request, all plugins are re-applied to the route as if it were requested for the first time.\n\n\nCommon patterns\n===============\n\n.. rubric:: Dependency or resource injection\n\nPlugins may checks if the callback accepts a specific keyboard parameter and only apply themselves if that parameter is present. For example, route callbacks that expect a ``db`` keyword argument need a database connection. Routes that do not expect such a parameter can be skipped and not decorated. The paramneter name should be configurable to avoid conflicts with other plugins or route parameters.\n\n.. rubric:: Request context properties\n\nPlugins may add new request-local properties to the current :data:`request`, for example ``request.session`` for a durable session or ``request.user`` for logged in users. See :class:`Request.__setattr__ <BaseRequest.__setattr__>`.\n\n.. rubric:: Response type mapping\n\nPlugins may check the return value of the wrapped callback and transform or serialize the output to a new type. The bundled :class:`JsonPlugin` does exactly that.\n\n.. rubric:: Zero overhead plugins\n\nPlugins that are not needed on a specific route should return the callback unchanged. If they want to remove themselves from a route at runtime, they can call :meth:`Route.reset` and skip the route the next time it is triggered.\n\n.. rubric:: Before / after each request\n\nPlugins can be a convenient alternative to ``before_request`` or ``after_request`` hooks (see :meth:`Bottle.add_hook`), especially if both are needed. \n\n\nPlugin Example: SQLitePlugin\n============================\n\nThis plugin provides an sqlite3 database connection handle as an additional keyword argument to wrapped callbacks, but only if the callback expects it. If not, the route is ignored and no overhead is added. The wrapper does not affect the return value, but handles plugin-related exceptions properly. :meth:`Plugin.setup` is used to inspect the application and search for conflicting plugins.\n\n::\n\n    import sqlite3\n    import inspect\n\n    class SQLitePlugin:\n\n        name = 'sqlite'\n        api = 2\n\n        def __init__(self,\n                     dbfile=':memory:',\n                     autocommit=True,\n                     dictrows=True,\n                     keyword='db'):\n             self.dbfile = dbfile\n             self.autocommit = autocommit\n             self.dictrows = dictrows\n             self.keyword = keyword\n\n        def setup(self, app):\n            ''' Make sure that other installed plugins don't affect the same\n                keyword argument.'''\n            for other in app.plugins:\n                if not isinstance(other, SQLitePlugin): continue\n                if other.keyword == self.keyword:\n                    raise PluginError(\"Found another sqlite plugin with \"\\\n                    \"conflicting settings (non-unique keyword).\")\n\n        def apply(self, callback, route):\n            # Override global configuration with route-specific values.\n            conf = route.config.get('sqlite') or {}\n            dbfile = conf.get('dbfile', self.dbfile)\n            autocommit = conf.get('autocommit', self.autocommit)\n            dictrows = conf.get('dictrows', self.dictrows)\n            keyword = conf.get('keyword', self.keyword)\n\n            # Test if the original callback accepts a 'db' keyword.\n            # Ignore it if it does not need a database handle.\n            args = inspect.getargspec(route.callback)[0]\n            if keyword not in args:\n                return callback\n\n            def wrapper(*args, **kwargs):\n                # Connect to the database\n                db = sqlite3.connect(dbfile)\n                # This enables column access by name: row['column_name']\n                if dictrows: db.row_factory = sqlite3.Row\n                # Add the connection handle as a keyword argument.\n                kwargs[keyword] = db\n\n                try:\n                    rv = callback(*args, **kwargs)\n                    if autocommit: db.commit()\n                except sqlite3.IntegrityError, e:\n                    db.rollback()\n                    raise HTTPError(500, \"Database Error\", e)\n                finally:\n                    db.close()\n                return rv\n\n            # Replace the route callback with the wrapped one.\n            return wrapper\n\nThis plugin is just an example, but actually usable::\n\n    sqlite = SQLitePlugin(dbfile='/tmp/test.db')\n    bottle.install(sqlite)\n\n    @route('/show/<page>')\n    def show(page, db):\n        row = db.execute('SELECT * from pages where name=?', page).fetchone()\n        if row:\n            return template('showpage', page=row)\n        return HTTPError(404, \"Page not found\")\n\n    @route('/static/<fname:path>')\n    def static(fname):\n        return static_file(fname, root='/some/path')\n\n    @route('/admin/set/<db:re:[a-zA-Z]+>', skip=[sqlite])\n    def change_dbfile(db):\n        sqlite.dbfile = '/tmp/%s.db' % db\n        return \"Switched DB to %s.db\" % db\n\nThe first route needs a database connection and tells the plugin to create a handle by accepting a ``db`` keyword argument. The second route does not need a database and is therefore ignored by the plugin. The third route does expect a 'db' keyword argument, but explicitly skips the sqlite plugin. This way the argument is not overruled by the plugin and still contains the value of the same-named url argument.\n\n"
  },
  {
    "path": "docs/plugins/index.rst",
    "content": ".. currentmodule:: bottle\n\n.. _plugins:\n\n=============\nUsing Plugins\n=============\n\n.. versionadded:: 0.9\n\nBottle's core features cover most common use-cases, but as a micro-framework it has its limits. This is where \"Plugins\" come into play. Plugins add missing functionality to the framework, integrate third party libraries, or just automate some repetitive work.\n\nWe have a growing list of :doc:`/plugins/list` and most plugins are designed to be portable and re-usable across applications. Maybe your problem has already been solved and a ready-to-use plugin exists. If not, write your own. See :doc:`/plugins/dev` for details.\n\n.. _plugin-basics:\n\nPlugin Basics\n=============\n\nBottles Plugin system builds on the concept of `decorators <https://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, a plugin is a decorator applied to all route callback in an application. Plugins can do more than just decorating route callbacks, but it is still a good starting point to understand the concept. Lets have a look at a practical example::\n\n    from bottle import response\n\n    def stopwatch(callback):\n        def wrapper(*args, **kwargs):\n            start = time.time()\n            result = callback(*args, **kwargs)\n            end = time.time()\n            response.headers['X-Exec-Time'] = str(end - start)\n            return result\n        return wrapper\n\nThis \"stopwatch\" decorator measures the execution time of the wrapped function and then writes the result in the non-standard ``X-Exec-Time`` response header. You could just manually apply this decorator to all your route callbacks and call it a day::\n    \n    from bottle import route\n\n    @route(\"/timed\")\n    @stopwatch  # <-- This works, but do not do this\n    def timed():\n        time.sleep(1)\n        return \"DONE\"\n\nBut we wouldn't be talking about a plugin system if there wasn't a better way to do this!\n\nManaging Plugins\n================\n\nExplicitly applying decorators to every single route in a growing application quickly becomes tedious and error-prone. If you really want to apply something to *all* routes, there is a simpler way::\n\n    from bottle import route, install\n\n    install(stopwatch)\n\n    @route(\"/timed\")\n    def timed():\n        ...\n\nThe :func:`install` method registries a plugin to be automatically applied to all routes in an application. It does not matter if you call :func:`install` before or after binding routes, all plugins are always applied to all routes. The order of :func:`install` calls is important though. If there are multiple plugins, they are applied in the same order the were installed.\n\nAny callable object that works as a route callback decorator is a valid plugin. This includes normal decorators, classes, callables instances, but also plugins that implement the extended :class:`Plugin` API. See :ref:`plugindev` for details. \n\nYou can also :func:`uninstall` a previously installed plugin by name, class or instance::\n\n    sqlite_plugin = SQLitePlugin(dbfile='/tmp/test.db')\n    install(sqlite_plugin)\n\n    uninstall(sqlite_plugin) # uninstall a specific plugin\n    uninstall(SQLitePlugin)  # uninstall all plugins of that type\n    uninstall('sqlite')      # uninstall all plugins with that name\n    uninstall(True)          # uninstall all plugins at once\n\nPlugins can be installed and also removed at any time, even at runtime while serving requests. They are applied on-demand, that is, as soon as the route is requested for the first time. This enables some neat tricks (e.g. installing slow debugging or profiling plugins only when needed) but should not be overused. Each time the list of plugins changes, the route cache is flushed and all plugins need to be re-applied.\n\n.. note::\n    The module-level :func:`install` and :func:`uninstall` functions affect the :ref:`default application <default-app>`. To manage plugins for a specific application, use the corresponding methods on a :class:`Bottle` instance.\n\nSelectively apply or skip Plugins\n---------------------------------\n\nMost plugins are smart enough to ignore routes that do not need their functionality and do not add any overhead to those routes, but you can also apply or skip specific plugins per route if you need to.\n\nTo apply a decorator or plugin to just a single route, do not :func:`install` it, but use the ``apply`` keyword of the :func:`route` decorator instead::\n\n    @route('/timed', apply=[stopwatch])\n    def timed():\n        ...\n\nRoute-level plugins are applied first (before application-wide plugins) but handled exactly like normal plugins otherwise.\n\nYou can also explicitly disable an installed plugin for a number of routes. The :func:`route` decorator has a ``skip`` parameter for this purpose::\n\n    install(stopwatch)\n\n    @route('/notime', skip=[stopwatch])\n    def no_time():\n        pass\n\nThe ``skip`` parameter accepts a single value or a list of values. You can use a plugin name, class or instance to identify the plugin that should be skipped. Set ``skip=True`` to skip all plugins at once.\n\n\nPlugins and :meth:`Bottle.mount`\n--------------------------------\n\nMost plugins are specific to the application they were installed to and should not affect sub-applications mounted with :meth:`Bottle.mount`. Here is an example::\n\n    root = Bottle()\n    root.install(plugins.WTForms())\n    root.mount('/blog', apps.blog)\n\n    @root.route('/contact')\n    def contact():\n        return template('contact', email='contact@example.com')\n\nWhen mounting an application, Bottle creates a proxy-route on the mounting application that forwards all requests to the mounted application. Plugins are disabled for this kind of proxy-route by default. Our (fictional) ``WTForms`` plugin affects the ``/contact`` route, but does not affect the routes of the ``/blog`` sub-application.\n\nThis behavior is intended as a sane default, but can be overridden. The following example re-activates all plugins for a specific proxy-route::\n\n    root.mount('/blog', apps.blog, skip=None)\n\nNote that a plugin sees the whole sub-application as a single route, namely the proxy-route mentioned above. To wrap each individual route of the sub-application, you have to install the plugin to the mounted application directly.\n\nConfiguring Plugins\n===================\n\nMost plugins accept configuration as parameters passed to their constructor. This is the easiest and most obvious way to configure a plugin, e.g. to tell a database plugin which database to connect to::\n\n    install(SQLitePlugin(dbfile='/tmp/test.db', ...))\n\nNewer plugins may also read values from :attr:`Bottle.config` (see :doc:`../configuration`). This is useful for configuration that should be easy to change or override for a specific deployment. This pattern even supports runtime changes using :ref:`config hooks <conf-hook>`::\n\n    app.config[\"sqlite.db\"] = '/tmp/test.db'\n    app.install(SQLitePlugin())\n\nPlugins can also inspect the routes they are applied to and change their behavior for individual routes. Plugin authors have full access to the undecorated route callback as well as parameters passed to the :meth:`route` decorator, including custom parameters that are otherwise ignored by bottle. This allows for a great level of flexibility. Common patterns include:\n\n* A database plugin may automatically start a transaction if the route callback accepts a ``db`` keyword.\n* A forms plugin may ignore routes that do not listen to ``POST`` requests.\n* An access control plugin may check for a custom ``roles_allowed`` parameter passed to the :meth:`route` decorator.\n\nIn any case, check the plugin documentation for details. If you want to write your own plugins, check out :doc:`dev`."
  },
  {
    "path": "docs/plugins/list.rst",
    "content": ".. currentmodule:: bottle\n\n=========================\n3rd Party Plugins\n=========================\n\nThis is a list of third-party plugins that add extend Bottles core functionality or integrate other libraries with the Bottle framework.\n\nHave a look at :ref:`plugins` for general questions about plugins (installation, usage). If you plan to develop a new plugin, the :ref:`plugindev` may help you.\n\n`Bottle-Beaker <https://pypi.python.org/pypi/bottle-beaker/>`_\n    Beaker to session and caching library with WSGI Middleware\n\n`Bottle-Cork <https://pypi.org/project/bottle-cork/>`_\n\tCork provides a simple set of methods to implement Authentication and Authorization in web applications based on Bottle.\n\n`Bottle-Cors-plugin <https://pypi.org/project/bottle-cors-plugin/>`_\n\tCors-plugin is the easiest way to implement cors on your bottle web application\n\n`Bottle-Extras <https://pypi.python.org/pypi/bottle-extras/>`_\n\tMeta package to install the bottle plugin collection.\n\n`Bottle-Flash <https://pypi.python.org/pypi/bottle-flash/>`_\n\tflash plugin for bottle\n\n`Bottle-Hotqueue <https://pypi.python.org/pypi/bottle-hotqueue/>`_\n\tFIFO Queue for Bottle built upon redis\n\n`Macaron <https://nobrin.github.com/macaron/webapp.html>`_\n\tMacaron is an object-relational mapper (ORM) for SQLite.\n\n`Bottle-Memcache <https://pypi.python.org/pypi/bottle-memcache/>`_\n\tMemcache integration for Bottle.\n\n`Bottle-Mongo <https://pypi.python.org/pypi/bottle-mongo/>`_\n\tMongoDB integration for Bottle\n\n`Bottle-OAuthlib <https://pypi.python.org/pypi/bottle-oauthlib/>`_\n\tAdapter for oauthlib - create your own OAuth2.0 implementation\n\n`Bottle-Redis <https://pypi.python.org/pypi/bottle-redis/>`_\n\tRedis integration for Bottle.\n\n`Bottle-Renderer <https://pypi.python.org/pypi/bottle-renderer/>`_\n\tRenderer plugin for bottle\n\n`Bottle-Servefiles <https://pypi.python.org/pypi/bottle-servefiles/>`_\n\tA reusable app that serves static files for bottle apps\n\n`Bottle-Sqlalchemy <https://pypi.python.org/pypi/bottle-sqlalchemy/>`_\n\tSQLAlchemy integration for Bottle.\n\n`Bottle-Sqlite <https://pypi.python.org/pypi/bottle-sqlite/>`_\n\tSQLite3 database integration for Bottle.\n\n`Bottle-Web2pydal <https://pypi.python.org/pypi/bottle-web2pydal/>`_\n\tWeb2py Dal integration for Bottle.\n\n`Bottle-Werkzeug <https://pypi.python.org/pypi/bottle-werkzeug/>`_\n\tIntegrates the `werkzeug` library (alternative request and response objects, advanced debugging middleware and more).\n\n`bottle-smart-filters <https://github.com/agile4you/bottle-smart-filters/>`_\n\tBottle Querystring smart guessing.\n\n`bottle-jwt <https://github.com/agile4you/bottle-jwt/>`_\n\tJSON Web Token authentication plugin for bottle.py\n\n`bottlejwt <https://github.com/agalera/bottlejwt>`_\n\tJWT integration for bottle\n\n`canister <https://github.com/dagnelies/canister>`_\n\ta bottle wrapper to provide logging, sessions and authentication\n\n`bottle-cerberus <https://github.com/agalera/bottle-cerberus>`_\n\tCerberus integration for bottle\n\n`Bottle-errorsrest <https://github.com/agalera/bottle-errorsrest>`_\n\tAll errors generated from bottle are returned in json\n\n`Bottle-tools <https://github.com/theSage21/bottle-tools>`_\n\tDecorators that auto-supply function arguments using POST/query string data.\n\n\nPlugins listed here are not part of Bottle or the Bottle project, but developed and maintained by third parties.\n"
  },
  {
    "path": "docs/routing.rst",
    "content": ".. currentmodule:: bottle\r\n\r\n================================================================================\r\nRequest Routing\r\n================================================================================\r\n\r\nBottle uses a powerful routing engine to find the right callback for each request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This document covers advanced techniques and rule mechanics in detail.\r\n\r\nRule Syntax\r\n--------------------------------------------------------------------------------\r\n\r\nThe :class:`Router` distinguishes between two basic types of routes: **static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. ``/hello/<name>``). A route that contains one or more *wildcards* it is considered dynamic. All other routes are static.\r\n\r\n.. versionchanged:: 0.10\r\n\r\nThe simplest form of a wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``). The name should be unique for a given route and form a valid python identifier (alphanumeric, starting with a letter). This is because wildcards are used as keyword arguments for the request callback later.\r\n\r\nEach wildcard matches one or more characters, but stops at the first slash (``/``). This equals a regular expression of ``[^/]+`` and ensures that only one path segment is matched and routes with more than one wildcard stay unambiguous.\r\n\r\nThe rule ``/<action>/<item>`` matches as follows:\r\n\r\n============ =========================================\r\nPath         Result\r\n============ =========================================\r\n/save/123    ``{'action': 'save', 'item': '123'}``\r\n/save/123/   `No Match`\r\n/save/       `No Match`\r\n//123        `No Match`\r\n============ =========================================\r\n\r\nIt is possible to escape characters like colon ``:`` with a backslash ``\\``. This will prevent to trigger the old syntax in case you need to use ``:``.\r\nFor example: the rule ``/<action>/item:<id>`` triggers the old syntax, (see below) but ``/action/item\\:<id>`` works as intended with the new syntax. \r\n\r\n\r\nYou can change the exact behaviour in many ways using filters. This is described in the next section.\r\n\r\nWildcard Filters\r\n--------------------------------------------------------------------------------\r\n\r\n.. versionadded:: 0.10\r\n\r\nFilters are used to define more specific wildcards, and/or transform the matched part of the URL before it is passed to the callback. A filtered wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The syntax for the optional config part depends on the filter used.\r\n\r\nThe following standard filters are implemented:\r\n\r\n* **:int** matches (signed) digits and converts the value to integer.\r\n* **:float** similar to :int but for decimal numbers.\r\n* **:path** matches all characters including the slash character in a non-greedy way and may be used to match more than one path segment.\r\n* **:re[:exp]** allows you to specify a custom regular expression in the config field. The matched value is not modified.\r\n\r\nYou can add your own filters to the router. All you need is a function that returns three elements: A regular expression string, a callable to convert the URL fragment to a python value, and a callable that does the opposite. The filter function is called with the configuration string as the only parameter and may parse it as needed::\r\n\r\n    app = Bottle()\r\n\r\n    def list_filter(config):\r\n        ''' Matches a comma separated list of numbers. '''\r\n        delimiter = config or ','\r\n        regexp = r'\\d+(%s\\d)*' % re.escape(delimiter)\r\n\r\n        def to_python(match):\r\n            return map(int, match.split(delimiter))\r\n        \r\n        def to_url(numbers):\r\n            return delimiter.join(map(str, numbers))\r\n        \r\n        return regexp, to_python, to_url\r\n\r\n    app.router.add_filter('list', list_filter)\r\n\r\n    @app.route('/follow/<ids:list>')\r\n    def follow_users(ids):\r\n        for id in ids:\r\n            ...\r\n\r\n\r\nLegacy Syntax\r\n--------------------------------------------------------------------------------\r\n\r\n.. versionchanged:: 0.10\r\n\r\nThe new rule syntax was introduced in **Bottle 0.10** to simplify some common use cases, but the old syntax still works and you can find lot of code examples still using it. The differences are best described by example:\r\n\r\n=================== ====================\r\nOld Syntax          New Syntax\r\n=================== ====================\r\n``:name``           ``<name>``\r\n``:name#regexp#``   ``<name:re:regexp>``\r\n``:#regexp#``       ``<:re:regexp>``\r\n``:##``             ``<:re>``\r\n=================== ====================\r\n\r\nTry to avoid the old syntax in future projects if you can. It is not currently deprecated, but will be eventually.\r\n\r\n\r\n\r\nExplicit routing configuration\r\n--------------------------------------------------------------------------------\r\n\r\nRoute decorator can also be directly called as method. This way provides flexibility in complex setups, allowing you to directly control, when and how routing configuration done.\r\n\r\nHere is a basic example of explicit routing configuration for default bottle application::\r\n\r\n    def setup_routing():\r\n        bottle.route('/', 'GET', index)\r\n        bottle.route('/edit', ['GET', 'POST'], edit)\r\n\r\nIn fact, any :class:`Bottle` instance routing can be configured same way::\r\n\r\n    def setup_routing(app):\r\n        app.route('/new', ['GET', 'POST'], form_new)\r\n        app.route('/edit', ['GET', 'POST'], form_edit)\r\n\r\n    app = Bottle()\r\n    setup_routing(app)\r\n\r\n"
  },
  {
    "path": "docs/stpl.rst",
    "content": "==============\nSimpleTemplate\n==============\n\n.. currentmodule:: bottle\n\nBottle comes with a fast, powerful and easy to learn built-in template engine called *SimpleTemplate* or *stpl* for short. It is the default engine used by the :func:`view` and :func:`template` helpers but can be used as a stand-alone general purpose template engine too. This document explains the template syntax and shows examples for common use cases.\n\n.. rubric:: Basic API Usage:\n\n:class:`SimpleTemplate` implements the :class:`BaseTemplate` API::\n\n   >>> from bottle import SimpleTemplate\n   >>> tpl = SimpleTemplate('Hello {{name}}!')\n   >>> tpl.render(name='World')\n   u'Hello World!'\n\nIn this document we use the :func:`template` helper in examples for the sake of simplicity::\n\n   >>> from bottle import template\n   >>> template('Hello {{name}}!', name='World')\n   u'Hello World!'\n\nYou can also pass a dictionary into the template using keyword arguments::\n\n   >>> from bottle import template\n   >>> my_dict={'number': '123', 'street': 'Fake St.', 'city': 'Fakeville'}\n   >>> template('I live at {{number}} {{street}}, {{city}}', **my_dict)\n   u'I live at 123 Fake St., Fakeville'\n\nJust keep in mind that compiling and rendering templates are two different actions, even if the :func:`template` helper hides this fact. Templates are usually compiled only once and cached internally, but rendered many times with different keyword arguments.\n\n:class:`SimpleTemplate` Syntax\n==============================\n\nPython is a very powerful language but its whitespace-aware syntax makes it difficult to use as a template language. SimpleTemplate removes some of these restrictions and allows you to write clean, readable and maintainable templates while preserving full access to the features, libraries and speed of the Python language.\n\n.. warning::\n\n   The :class:`SimpleTemplate` syntax compiles directly to python bytecode and is executed on each :meth:`SimpleTemplate.render` call. Do not render untrusted templates! They may contain and execute harmful python code.\n\nInline Expressions\n------------------\n\nYou already learned the use of the ``{{...}}`` syntax from the \"Hello World!\" example above, but there is more: any python expression is allowed within the curly brackets as long as it evaluates to a string or something that has a string representation::\n\n  >>> template('Hello {{name}}!', name='World')\n  u'Hello World!'\n  >>> template('Hello {{name.title() if name else \"stranger\"}}!', name=None)\n  u'Hello stranger!'\n  >>> template('Hello {{name.title() if name else \"stranger\"}}!', name='mArC')\n  u'Hello Marc!'\n\nThe contained python expression is executed at render-time and has access to all keyword arguments passed to the :meth:`SimpleTemplate.render` method. HTML special characters are escaped automatically to prevent `XSS <https://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start the expression with an exclamation mark to disable escaping for that expression::\n\n  >>> template('Hello {{name}}!', name='<b>World</b>')\n  u'Hello &lt;b&gt;World&lt;/b&gt;!'\n  >>> template('Hello {{!name}}!', name='<b>World</b>')\n  u'Hello <b>World</b>!'\n\nEmbedded python code\n--------------------\n\n.. highlight:: html+django\n\nThe template engine allows you to embed lines or blocks of python code within your template. Code lines start with ``%`` and code blocks are surrounded by ``<%`` and ``%>`` tokens:\n\n .. code-block:: text\n\n  % name = \"Bob\"  # a line of python code\n  <p>Some plain text in between</p>\n  <%\n    # A block of python code\n    name = name.title().strip()\n  %>\n  <p>More plain text</p>\n\nEmbedded python code follows regular python syntax, but with two additional syntax rules:\n\n* **Indentation is ignored.** You can put as much whitespace in front of statements as you want. This allows you to align your code with the surrounding markup and can greatly improve readability.\n* Blocks that are normally indented now have to be closed explicitly with an ``end`` keyword.\n\n .. code-block:: text\n\n  <ul>\n    % for item in basket:\n      <li>{{item}}</li>\n    % end\n  </ul>\n\nBoth the ``%`` and the ``<%`` tokens are only recognized if they are the first non-whitespace characters in a line. You don't have to escape them if they appear mid-text in your template markup. Only if a line of text starts with one of these tokens, you have to escape it with a backslash. In the rare case where the backslash + token combination appears in your markup at the beginning of a line, you can always help yourself with a string literal in an inline expression:\n\n .. code-block:: text\n\n  This line contains % and <% but no python code.\n  \\% This text-line starts with the '%' token.\n  \\<% Another line that starts with a token but is rendered as text.\n  {{'\\\\%'}} this line starts with an escaped token.\n\n\nWhitespace Control\n-----------------------\n\nCode blocks and code lines always span the whole line. Whitespace in front of after a code segment is stripped away. You won't see empty lines or dangling whitespace in your template because of embedded code::\n\n  <div>\n   % if True:\n    <span>content</span>\n   % end\n  </div>\n\nThis snippet renders to clean and compact html::\n\n  <div>\n    <span>content</span>\n  </div>\n\nBut embedding code still requires you to start a new line, which may not what you want to see in your rendered template. To skip the newline in front of a code segment, end the text line with a double-backslash::\n\n  <div>\\\\\n   %if True:\n  <span>content</span>\\\\\n   %end\n  </div>\n\nThis time the rendered template looks like this::\n\n  <div><span>content</span></div>\n\nThis only works directly in front of code segments. In all other places you can control the whitespace yourself and don't need any special syntax.\n\nTemplate Functions\n==================\n\nEach template is preloaded with a bunch of functions that help with the most common use cases. These functions are always available. You don't have to import or provide them yourself. For everything not covered here there are probably good python libraries available. Remember that you can ``import`` anything you want within your templates. They are python programs after all.\n\n.. currentmodule:: stpl\n\n.. versionchanged:: 0.12\n   Prior to this release, :func:`include` and :func:`rebase` were syntax keywords, not functions.\n\n.. function:: include(sub_template, **variables)\n\n  Render a sub-template with the specified variables and insert the resulting text into the current template. The function returns a dictionary containing the local variables passed to or defined within the sub-template::\n\n    % include('header.tpl', title='Page Title')\n    Page Content\n    % include('footer.tpl')\n\n.. function:: rebase(name, **variables)\n\n  Mark the current template to be later included into a different template. After the current template is rendered, its resulting text is stored in a variable named ``base`` and passed to the base-template, which is then rendered. This can be used to `wrap` a template with surrounding text, or simulate the inheritance feature found in other template engines::\n\n    % rebase('base.tpl', title='Page Title')\n    <p>Page Content ...</p>\n\n  This can be combined with the following ``base.tpl``:\n\n  .. code-block:: html\n\n    <html>\n    <head>\n      <title>{{title or 'No title'}}</title>\n    </head>\n    <body>\n      {{!base}}\n    </body>\n    </html>\n\n\nAccessing undefined variables in a template raises :exc:`NameError` and\nstops rendering immediately. This is standard python behavior and nothing new,\nbut vanilla python lacks an easy way to check the availability of a variable.\nThis quickly gets annoying if you want to support flexible inputs or use the\nsame template in different situations. These functions may help:\n\n.. function:: defined(name)\n\n    Return True if the variable is defined in the current template namespace,\n    False otherwise.\n\n.. function:: get(name, default=None)\n\n    Return the variable, or a default value.\n\n.. function:: setdefault(name, default)\n\n    If the variable is not defined, create it with the given default value.\n    Return the variable.\n\nHere is an example that uses all three functions to implement optional template\nvariables in different ways::\n\n    % setdefault('text', 'No Text')\n    <h1>{{get('title', 'No Title')}}</h1>\n    <p> {{ text }} </p>\n    % if defined('author'):\n      <p>By {{ author }}</p>\n    % end\n\n.. currentmodule:: bottle\n\n\n:class:`SimpleTemplate` API\n==============================\n\n.. autoclass:: SimpleTemplate\n   :members:\n"
  },
  {
    "path": "docs/tutorial.rst",
    "content": ".. currentmodule:: bottle\n\n\n\n===============\nUser's Guide\n===============\n\nThis guide introduces you to the concepts and features of the Bottle web framework and covers basic and advanced topics alike. You can read it from start to end, or use it as a reference later on. The automatically generated :doc:`api` may be interesting for you, too. It covers more details, but explains less than this tutorial. Solutions for the most common questions can be found in our :doc:`faq` collection or on the :doc:`faq` page. If you need any help, join our `mailing list <mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel <https://webchat.freenode.net/?channels=bottlepy>`_.\n\n.. _installation:\n\nInstallation\n==============================================================================\n\nBottle does not depend on any external libraries. You can just download `bottle.py </bottle.py>`_ into your project directory and start coding:\n\n.. code-block:: bash\n\n    $ wget https://bottlepy.org/bottle.py\n\nThis will get you the latest development snapshot that includes all the new features. If you prefer a more stable environment, you should stick with the stable releases. These are available on `PyPI <https://pypi.python.org/pypi/bottle>`_ and can be installed via :command:`pip` (recommended) or your package manager:\n\n.. code-block:: bash\n\n    $ pip install --user bottle            # better use a venv, see below\n    $ sudo apt-get install python-bottle   # works for debian, ubuntu, ...\n\nIt is usually a better idea to create a `virtualenv <https://docs.python.org/3/library/venv.html>`_ per project and use that to install packages:\n\n.. code-block:: bash\n\n    $ python3 -m venv venv         # Create virtual environment\n    $ source venv/bin/activate     # Change default python to virtual one\n    (venv)$ pip install -U bottle  # Install bottle to virtual environment\n\n\n\nHello World!\n==============================================================================\n\nThis tutorial assumes you have Bottle either :ref:`installed <installation>` or copied into your project directory. Let's start with a very basic \"Hello World\" example::\n\n    from bottle import route, run\n\n    @route('/hello')\n    def hello():\n        return \"Hello World!\"\n\n    if __name__ == '__main__':\n        run(host='localhost', port=8080, debug=True)\n\nThis is it. Run this script, visit http://localhost:8080/hello and you will see \"Hello World!\" in your browser. Here is how it works:\n\nThe :func:`route` decorator binds a piece of code to an URL path. In this case, we link the ``/hello`` path to the ``hello()`` function. This is called a `route` (hence the decorator name) and is the most important concept of this framework. You can define as many routes as you want. Whenever a browser requests a URL, the associated function is called and the return value is sent back to the browser. It's as simple as that.\n\nThe :func:`run` call in the last line starts a built-in development server. It runs on ``localhost`` port ``8080`` and serves requests until you hit :kbd:`Control-c`. You can switch the server backend later (see :doc:`/deployment`), but for now a development server is all we need. It requires no setup at all and is an incredibly painless way to get your application up and running for local tests.\n\n:ref:`Debug Mode <tutorial-debugging>` is very helpful during early development, but should be switched off for public applications. Keep that in mind.\n\nThis is just a demonstration of the basic concept of how applications are built with Bottle. Continue reading and you'll see what else is possible.\n\n\n.. _tutorial-default:\n\nThe Application Object\n==============================================================================\n\nFor the sake of simplicity, most examples in this tutorial use a module-level :func:`route` and other decorators to define routes. Those refer to a global \"default application\", an instance of :class:`Bottle` that is automatically created the first time you call :func:`route` or its friends. If you prefer a more explicit approach and don't mind the extra typing, you can create a separate application object and use that instead of the global one::\n\n    from bottle import Bottle, run\n\n    app = Bottle()\n\n    @app.route('/hello')\n    def hello():\n        return \"Hello World!\"\n\n    if __name__ == '__main__':\n        app.run(host='localhost', port=8080)\n\nThe object-oriented approach is further described in the :ref:`default-app` section. Just keep in mind that you have a choice.\n\n\n.. _tutorial-debugging:\n\nDebug Mode\n==============================================================================\n\nDuring early development, the debug mode can be very helpful.\n\n::\n\n    # Enable debug at runtime\n    bottle.debug(True)\n    # or during startup\n    run(..., debug=True)\n\nIn this mode, Bottle is much more verbose and provides helpful debugging information whenever an error occurs. It also disables some optimisations that might get in your way and adds some checks that warn you about possible misconfiguration. Here is an incomplete list of things that change in debug mode:\n\n* The default error page shows a traceback.\n* Templates are not cached.\n* Plugins are applied immediately.\n\nJust make sure not to use the debug mode on a production server.\n\nAuto Reloading\n--------------\n\nTired of restarting the server every time you change your code?\nThe auto reloader can do this for you. Every time you edit a module\nfile, the reloader restarts the server process and loads the newest\nversion of your code.\n\n::\n\n    run(..., debug=True, reloader=True)\n\nHow it works: the main process will not start a server, but spawn a new\nchild process using the same command line arguments used to start the\nmain process. All module-level code is executed at least twice! Be\ncareful.\n\nThe child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True``\nand start as a normal non-reloading app server. As soon as any of the\nloaded modules changes, the child process terminates and is re-spawned by\nthe main process. Changes in template files will not trigger a reload.\nPlease use debug mode to deactivate template caching.\n\n\n\n.. _tutorial-cli:\n\nCommand Line Interface\n==============================================================================\n\nBottle is not only a module, but also a command line executable that can be used to start your app instead of calling :func:`run` programmatically. If you installed bottle via `pip` or similar tools, there will also be a handy `bottle` command on your path. Try one of the following:\n\n.. code-block:: console\n\n    bottle --help\n    python3 -m bottle --help\n    ./path/to/bottle.py --help\n\nHere is a quick example:\n\n.. code-block:: console\n\n    $ bottle --debug --reload mymodule\n    Bottle v0.13-dev server starting up (using WSGIRefServer())...\n    Listening on http://localhost:8080/\n    Hit Ctrl-C to quit.\n\n.. versionchanged:: 0.13\n\n    The executable script installed into (virtual) environments was named ``bottle.py``, which could result in circular imports. The old name is now deprecated and the new executable ist named just ``bottle``.\n\n\n.. _tutorial-routing:\n\nRequest Routing\n==============================================================================\n\nIn the last chapter we built a very simple web application with only a single route. Here is the routing part of the \"Hello World\" example again::\n\n    @route('/hello')\n    def hello():\n        return \"Hello World!\"\n\nThe :func:`route` decorator links an URL path to a callback function, and adds a new route to the :ref:`default application <tutorial-default>`. An application with just one route is kind of boring, though. Let's add some more (don't forget ``from bottle import template``)::\n\n    @route('/')\n    @route('/hello/<name>')\n    def greet(name='Stranger'):\n        return template('Hello {{name}}, how are you?', name=name)\n\nThis example demonstrates two things: You can bind more than one route to a single callback, and you can add wildcards to URLs and access them via keyword arguments.\n\n\n\n.. _tutorial-dynamic-routes:\n\nDynamic Routes\n-------------------------------------------------------------------------------\n\nRoutes that contain wildcards are called `dynamic routes` (as opposed to `static routes`) and match more than one URL at the same time. A simple wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and accepts one or more characters up to the next slash (``/``). For example, the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``.\n\nEach wildcard passes the covered part of the URL as a keyword argument to the request callback. You can use them right away and implement RESTful, nice-looking and meaningful URLs with ease. Here are some other examples along with the URLs they'd match::\n\n    @route('/wiki/<pagename>')            # matches /wiki/Learning_Python\n    def show_wiki_page(pagename):\n        ...\n\n    @route('/<action>/<user>')            # matches /follow/defnull\n    def user_api(action, user):\n        ...\n\nFilters can be used to define more specific wildcards, and/or transform the covered part of the URL before it is passed to the callback. A filtered wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The syntax for the optional config part depends on the filter used.\n\nThe following filters are implemented by default and more may be added:\n\n* **:int** matches (signed) digits only and converts the value to integer.\n* **:float** similar to :int but for decimal numbers.\n* **:path** matches all characters including the slash character in a non-greedy way and can be used to match more than one path segment.\n* **:re** allows you to specify a custom regular expression in the config field. The matched value is not modified.\n\nLet's have a look at some practical examples::\n\n    @route('/object/<id:int>')\n    def callback(id):\n        assert isinstance(id, int)\n\n    @route('/show/<name:re:[a-z]+>')\n    def callback(name):\n        assert name.isalpha()\n\n    @route('/static/<path:path>')\n    def callback(path):\n        return static_file(path, ...)\n\nYou can add your own filters as well. See :doc:`routing` for details.\n\n\nHTTP Request Methods\n------------------------------------------------------------------------------\n\nThe HTTP protocol defines several `request methods <https://www.rfc-editor.org/rfc/rfc9110.html#name-methods>`_ (sometimes referred to as \"verbs\") for different tasks. GET is the default for all routes with no other method specified. These routes will match GET requests only. To handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` keyword argument to the :func:`route` decorator or use one of the five alternative decorators: :func:`get`, :func:`post`, :func:`put`, :func:`delete` or :func:`patch`.\n\nThe POST method is commonly used for HTML form submission. This example shows how to handle a login form using POST::\n\n    from bottle import get, post, request # or route\n\n    @get('/login') # or @route('/login')\n    def login():\n        return '''\n            <form action=\"/login\" method=\"POST\">\n                Username: <input name=\"username\" type=\"text\" />\n                Password: <input name=\"password\" type=\"password\" />\n                <input value=\"Login\" type=\"submit\" />\n            </form>\n        '''\n\n    @post('/login') # or @route('/login', method='POST')\n    def do_login():\n        username = request.forms.username\n        password = request.forms.password\n        if check_login(username, password):\n            return \"<p>Your login information was correct.</p>\"\n        else:\n            return \"<p>Login failed.</p>\"\n\nIn this example the ``/login`` URL is linked to two distinct callbacks, one for GET requests and another for POST requests. The first one displays a HTML form to the user. The second callback is invoked on a form submission and checks the login credentials the user entered into the form. The use of :attr:`Request.forms <BaseRequest.forms> is further described in the :ref:`tutorial-request` section.\n\n.. rubric:: Special Methods: HEAD and ANY\n\nThe HEAD method is used to ask for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information about a resource without having to download the entire document. Bottle handles these requests automatically by falling back to the corresponding GET route and cutting off the request body, if present. You don't have to specify any HEAD routes yourself.\n\nAdditionally, the non-standard ANY method works as a low priority fallback: Routes that listen to ANY will match requests regardless of their HTTP method but only if no other more specific route is defined. This is helpful for *proxy-routes* that redirect requests to more specific sub-applications.\n\nTo sum it up: HEAD requests fall back to GET routes and all requests fall back to ANY routes, but only if there is no matching route for the original request method. It's as simple as that.\n\n\n.. _tutorial-static-files:\n\nServing Assets\n==================================================================================\n\nStatic files or assets such as images or CSS files are not served automatically. You have to add a route and a callback to control which files get served and where to find them. Bottle comes with a handy :func:`static_file` function that does most of the work and serves files in a safe and convenient way::\n\n  from bottle import static_file\n  @route('/static/<filepath:path>')\n  def server_static(filepath):\n      return static_file(filepath, root='/path/to/your/static/files')\n\nNote that we used the ``:path`` route filter here to allow slash characters in ``filepath`` and serve files from sub-directories, too.\n\nThe :func:`static_file` helper function has a lot of benefits compared to handling files manually. Most importantly it prevents `directory traversal attacks <https://owasp.org/www-community/attacks/Path_Traversal>`_ (e.g. ``GET /static/../../../../etc/secrets``) by restricting file access to the specified ``root`` directory. Make sure to use an absolut path for ``root``, though. Relative paths (staring with ``./``) are resolved against the current work directory which may not always be the same as your project directory.\n\nThe :func:`static_file` function returns :class:`HTTPResponse` or :class:`HTTPError`, which can be raised as an exception if you need to.\n\n.. rubric:: File downloads\n\nMost browsers try to open downloaded files with the associated application if the MIME type is known (e.g. PDF files). If this is not what you want, you can force a download dialog and even suggest a filename to the user::\n\n    @route('/download/<filename>')\n    def download(filename):\n        return static_file(filename, root='/path/to/static/files', download=f\"download-{filename}\")\n\nIf the ``download`` parameter is just ``True``, the original filename is used.\n\n\n.. _tutorial-output:\n\nGenerating content\n==============================================================================\n\nWe already learned that route callbacks can return strings as content, but there is more: Bottle supports a bunch of other data types and even adds ``Content-Length`` and other headers if possible, so you don't have to. Here is a list of data types you may return from your application callbacks and a short description of how these are handled by the framework:\n\nDictionaries\n    Python dictionaries (or subclasses thereof) are automatically transformed into JSON strings and returned to the browser with the ``Content-Type`` header set to ``application/json``. This makes it easy to implement JSON-based APIs and is actually implemented by the :class:`JsonPlugin` which is applied to all routes automatically. You can configure and disable JSON handling if you need to.\n\nEmpty Strings, ``False``, ``None`` or other non-true values:\n    These will produce an empty response.\n\nLists of strings\n    Lists of byte or unicode strings are joined into a single string then processed as usual (see blow).\n\nUnicode strings\n    Unicode strings are automatically encoded with the codec specified in the ``Content-Type`` header (``utf8`` by default) and then processed as byte strings (see below).\n\nByte strings\n    Raw byte strings are written to the response as-is.\n\nInstances of :exc:`HTTPError` or :exc:`HTTPResponse`\n    Raising or returning an instance of :exc:`HTTPResponse` will overwrite any changes made to the global :data:`request` object and then continue as usual. In case of an :exc:`HTTPError`, error handler are applied first. See :ref:`tutorial-errorhandling` for details.\n\nFiles or file-like objects\n    Anything that has a ``.read()`` method is treated as a file or file-like object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI server framework. Some WSGI server implementations can make use of optimized system calls (e.g. sendfile) to transmit files more efficiently. In other cases this just iterates over chunks that fit into memory. Optional headers such as ``Content-Length`` or ``Content-Type`` are *not* set automatically. For security and other reasons you should always prefer :func:`static_file` over returning raw files, though. See :ref:`tutorial-static-files` for details.\n\nIterables or generators\n    You can ``yield`` either byte- or unicode strings (not both) from your route callback and bottle will write those to the response in a streaming fashion. The ``Content-Length`` header is not set in this case, because the final response size is not known. Nested iterables are not supported, sorry. Please note that HTTP status code and headers are sent to the browser as soon as the iterable yields its first non-empty value. Changing these later has no effect. If the first element of the iterable is either :exc:`HTTPError` or :exc:`HTTPResponse`, the rest of the iterator is ignored.\n\nThe ordering of this list is significant. You may for example return a subclass of :class:`str` with a ``read()`` method. It is still treated as a string instead of a file, because strings are handled first.\n\n.. rubric:: Changing the Default Encoding\n\nBottle uses the `charset` parameter of the ``Content-Type`` header to decide how to encode unicode strings. This header defaults to ``text/html; charset=UTF8`` and can be changed using the :attr:`Response.content_type <BaseResponse.content_type>` attribute or by setting the :attr:`Response.charset <BaseResponse.charset>` attribute directly. (The :class:`Response` object is described in the section :ref:`tutorial-response`.)\n\n::\n\n    from bottle import response\n    @route('/iso')\n    def get_iso():\n        response.charset = 'ISO-8859-15'\n        return u'This will be sent with ISO-8859-15 encoding.'\n\n    @route('/latin9')\n    def get_latin():\n        response.content_type = 'text/html; charset=latin9'\n        return u'ISO-8859-15 is also known as latin9.'\n\nIn some rare cases the Python encoding names differ from the names supported by the HTTP specification. Then, you have to do both: first set the :attr:`Response.content_type <BaseResponse.content_type>` header (which is sent to the client unchanged) and then set the :attr:`Response.charset <BaseResponse.charset>` attribute (which is used to encode unicode).\n\n\n.. _tutorial-errorhandling:\n\nError handling\n==============================================\n\nIf anything goes wrong, Bottle displays an informative but fairly plain error page. It contains a stacktrace if :func:`debug` mode is on. You can override the default error page and register an error handler for a specific HTTP status code with the :func:`error` decorator::\n\n  from bottle import error\n\n  @error(404)\n  def error404(error):\n      return 'Nothing here, sorry'\n\nFrom now on, ``404`` (File not found) errors will display a custom error page to the user. The only parameter passed to the error-handler is an instance of :exc:`HTTPError`. Apart from that, an error-handler is quite similar to a regular request callback. You can read from :data:`request`, write to :data:`response` and return any supported data-type except for :exc:`HTTPError` instances.\n\nError handlers are used only if your application returns or raises an :exc:`HTTPError` exception (:func:`abort` does just that). Setting :attr:`Response.status <BaseResponse.status>` to an error code or returning :exc:`HTTPResponse` won't trigger error handlers.\n\n.. rubric:: Triggering errors with :func:`abort`\n\nThe :func:`abort` function is a shortcut for triggering HTTP errors.\n\n::\n\n    from bottle import route, abort\n    @route('/restricted')\n    def restricted():\n        abort(401, \"Sorry, access denied.\")\n\nYou do not need to return anything when using :func:`abort`. It raises an :exc:`HTTPError` exception.\n\n.. rubric:: Other Exceptions\n\nAll exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will result in a ``500 Internal Server Error`` response, so they won't crash your WSGI server. You can turn off this behavior to handle exceptions in your middleware by setting ``bottle.app().catchall`` to ``False``.\n\n\n\n.. _tutorial-response:\n\nThe :data:`response` Object\n--------------------------------------------------------------------------------\n\nResponse metadata such as the HTTP status code, response headers and cookies are stored in an object called :data:`response` up to the point where they are transmitted to the browser. You can manipulate these metadata directly or use the predefined helper methods to do so. The full API and feature list is described in the API section (see :class:`BaseResponse`), but the most common use cases and features are covered here, too.\n\n.. rubric:: Status Code\n\nThe HTTP status code controls the behavior of the browser and defaults to ``200 OK``. In most scenarios you won't need to set the :attr:`Response.status <BaseResponse.status>` attribute manually, but use the :func:`abort` helper or return an :exc:`HTTPResponse` instance with the appropriate status code. Any integer is allowed, but codes other than the ones defined by the `HTTP specification <https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes>`_ will only confuse the browser and break standards.\n\n.. rubric:: Response Headers\n\nResponse headers such as ``Cache-Control`` or ``Location`` are defined via :meth:`Response.set_header <BaseResponse.set_header>`. This method takes two parameters, a header name and a value. The name part is case-insensitive::\n\n  @route('/wiki/<page>')\n  def wiki(page):\n      response.set_header('Content-Language', 'en')\n      ...\n\nMost headers are unique, meaning that only one header per name is send to the client. Some special headers however are allowed to appear more than once in a response. To add an additional header, use :meth:`Response.add_header <BaseResponse.add_header>` instead of :meth:`Response.set_header <BaseResponse.set_header>`::\n\n    response.set_header('Set-Cookie', 'name=value')\n    response.add_header('Set-Cookie', 'name=value2')\n\nPlease note that this is just an example. If you want to work with cookies, read :ref:`ahead <tutorial-cookies>`.\n\n.. rubric:: Redirects\n\nTo redirect a client to a different URL, you can send a ``303 See Other`` response with the ``Location`` header set to the new URL. :func:`redirect` does that for you::\n\n    from bottle import route, redirect\n    @route('/wrong/url')\n    def wrong():\n        redirect(\"/right/url\")\n\n\n.. _tutorial-cookies:\n\nCookies\n-------------------------------------------------------------------------------\n\nA cookie is a named piece of text stored in the user's browser profile. You can access previously defined cookies via :meth:`Request.get_cookie <BaseRequest.get_cookie>` and set new cookies with :meth:`Response.set_cookie <BaseResponse.set_cookie>`::\n\n    @route('/hello')\n    def hello_again():\n        if request.get_cookie(\"visited\"):\n            return \"Welcome back! Nice to see you again\"\n        else:\n            response.set_cookie(\"visited\", \"yes\")\n            return \"Hello there! Nice to meet you\"\n\nThe :meth:`Response.set_cookie <BaseResponse.set_cookie>` method accepts a number of additional keyword arguments that control the cookies lifetime and behavior. Some of the most common settings are described here:\n\n* **max_age:**    Maximum age in seconds. (default: ``None``)\n* **expires:**    A datetime object or UNIX timestamp. (default: ``None``)\n* **domain:**     The domain that is allowed to read the cookie. (default: current domain)\n* **path:**       Limit the cookie to a given path (default: ``/``)\n* **secure:**     Limit the cookie to HTTPS connections (default: off).\n* **httponly:**   Prevent client-side javascript to read this cookie (default: off, requires Python 2.7 or newer).\n* **samesite:**   Disables third-party use for a cookie. Allowed attributes: `lax` and `strict`. In strict mode the cookie will never be sent. In lax mode the cookie is only sent with a top-level GET request.\n\nIf neither `expires` nor `max_age` is set, the cookie expires at the end of the browser session or as soon as the browser window is closed. There are some other gotchas you should consider when using cookies:\n\n* Cookies are limited to 4 KB of text in most browsers.\n* Some users configure their browsers to not accept cookies at all. Most search engines ignore cookies too. Make sure that your application still works without cookies.\n* Cookies are stored at client side and are not encrypted in any way. Whatever you store in a cookie, the user can read it. Worse than that, an attacker might be able to steal a user's cookies through `XSS <https://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_ vulnerabilities on your side. Some viruses are known to read the browser cookies, too. Thus, never store confidential information in cookies.\n* Cookies are easily forged by malicious clients. Do not trust cookies.\n\n.. _tutorial-signed-cookies:\n\n.. rubric:: Signed Cookies\n\nAs mentioned above, cookies are easily forged by malicious clients. Bottle can cryptographically sign your cookies to prevent this kind of manipulation. All you have to do is to provide a signature key via the `secret` keyword argument whenever you read or set a cookie and keep that key a secret. As a result, :meth:`Request.get_cookie <BaseRequest.get_cookie>` will return ``None`` if the cookie is not signed or the signature keys don't match::\n\n    @route('/login')\n    def do_login():\n        username = request.forms.get('username')\n        password = request.forms.get('password')\n        if check_login(username, password):\n            response.set_cookie(\"account\", username, secret='some-secret-key')\n            return template(\"<p>Welcome {{name}}! You are now logged in.</p>\", name=username)\n        else:\n            return \"<p>Login failed.</p>\"\n\n    @route('/restricted')\n    def restricted_area():\n        username = request.get_cookie(\"account\", secret='some-secret-key')\n        if username:\n            return template(\"Hello {{name}}. Welcome back.\", name=username)\n        else:\n            return \"You are not logged in. Access denied.\"\n\nIn addition, Bottle automatically pickles and unpickles any data stored to signed cookies. This allows you to store any pickle-able object (not only strings) to cookies, as long as the pickled data does not exceed the 4 KB limit.\n\n.. warning:: Signed cookies are not encrypted (the client can still see the content) and not copy-protected (the client can restore an old cookie). The main intention is to make pickling and unpickling safe and prevent manipulation, not to store secret information at client side.\n\n\n\n\n\n\n\n\n\n.. _tutorial-request:\n\nRequest Data\n==============================================================================\n\nCookies, HTTP header, form data and other request data is available through the global :data:`request` object. This special object always refers to the *current* request, even in multi-threaded environments where multiple client connections are handled at the same time::\n\n  from bottle import request, route, template\n\n  @route('/hello')\n  def hello():\n      name = request.cookies.username or 'Guest'\n      return template('Hello {{name}}', name=name)\n\nThe :data:`request` object is a subclass of :class:`BaseRequest` and has a very rich API to access data. We only cover the most commonly used features here, but it should be enough to get started.\n\n\nHTTP Headers\n--------------------------------------------------------------------------------\n\nAll HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or ``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible through the :attr:`Request.headers <BaseRequest.headers>` attribute. A :class:`WSGIHeaderDict` is basically a dictionary with case-insensitive keys::\n\n  from bottle import route, request\n  @route('/is_ajax')\n  def is_ajax():\n      if request.headers.get('X-Requested-With') == 'XMLHttpRequest':\n          return 'This is an AJAX request'\n      else:\n          return 'This is a normal request'\n\n\nCookies\n--------------------------------------------------------------------------------\n\nCookies are small pieces of text stored in the clients browser and sent back to the server with each request. They are useful to keep some state around for more than one request (HTTP itself is stateless), but should not be used for security related stuff. They can be easily forged by the client.\n\nAll cookies sent by the client are available through :attr:`Request.cookies <BaseRequest.cookies>` (a :class:`FormsDict`). This example shows a simple cookie-based view counter::\n\n  from bottle import route, request, response\n  @route('/counter')\n  def counter():\n      count = int( request.cookies.get('counter', '0') )\n      count += 1\n      response.set_cookie('counter', str(count))\n      return 'You visited this page %d times' % count\n\nThe :meth:`Request.get_cookie <BaseRequest.get_cookie>` method is a different way do access cookies. It supports decoding :ref:`signed cookies <tutorial-signed-cookies>` as described in a separate section.\n\n\nQuery parameters, Forms and File uploads\n---------------------------------------------\n\nQuery and form data is parsed on demand and accessible via :data:`request` properties and methods. Some of those properties combine values from different sources for easier access. Have a look at the following table for a quick overview.\n\n============================================   ==============================================================\nProperty                                       Data source\n============================================   ==============================================================\n:attr:`Request.GET <BaseRequest.GET>`          Query parameters\n:attr:`Request.query <BaseRequest.query>`      Alias for :attr:`Request.GET <BaseRequest.GET>`\n:attr:`Request.POST <BaseRequest.POST>`        orm fields and file uploads combined\n:attr:`Request.forms <BaseRequest.forms>`      orm fields\n:attr:`Request.files <BaseRequest.files>`      File uploads or very large form fields\n:attr:`Request.params <BaseRequest.params>`    Query parameters and form fields combined\n============================================   ==============================================================\n\n.. rubric:: Introducing :class:`FormsDict`\n\nBottle uses a special type of dictionary to store those parameters. :class:`FormsDict` behaves like a normal dictionary, but has some additional features to make your life easier.\n\nFirst of all, :class:`FormsDict` is a subclass of :class:`MultiDict` and can store more than one value per key. Only the first value is returned by default, but :meth:`MultiDict.getall` can be used to get a (possibly empty) list of all values for a specific key::\n\n  for choice in request.forms.getall('multiple_choice'):\n      do_something(choice)\n\nAttribute-like access is also supported, returning empty strings for missing values. This simplifies code a lot whend ealing with lots of optional attributes::\n\n  name = request.query.name    # may be an empty string\n\n.. rubric:: A word on unicode and character encodings\n\nUnicode characters in the request path, query parameters or cookies are a bit tricky. HTTP is a very old byte-based protocol that predates unicode and lacks explicit encoding information. This is why WSGI servers have to fall back on `ISO-8859-1` (aka `latin1`, a reversible input encoding) for those estrings. Modern browsers default to `utf8`, though. It's a bit much to ask application developers to translate every single user input string to the correct encoding manually. Bottle makes this easy and just assumes `utf8` for everything. All strings returned by Bottle APIs support the full range of unicode characters, as long as the webpage or HTTP client follows best practices and does not break with established standards.\n\nQuery Parameters\n--------------------------------------------------------------------------------\n\nThe query string (as in ``/forum?id=1&page=5``) is commonly used to transmit a small number of key/value pairs to the server. You can use the :attr:`Request.query <BaseRequest.query>` attribute (a :class:`FormsDict`) to access these values and the :attr:`Request.query_string <BaseRequest.query_string>` attribute to get the whole string.\n\n::\n\n  from bottle import route, request, response, template\n  @route('/forum')\n  def display_forum():\n      forum_id = request.query.id\n      page = request.query.page or '1'\n      return template('Forum ID: {{id}} (page {{page}})', id=forum_id, page=page)\n\n\nHTML `<form>` Handling\n----------------------\n\nLet us start from the beginning. In HTML, a typical ``<form>`` looks something like this:\n\n.. code-block:: html\n\n    <form action=\"/login\" method=\"post\">\n        Username: <input name=\"username\" type=\"text\" />\n        Password: <input name=\"password\" type=\"password\" />\n        <input value=\"Login\" type=\"submit\" />\n    </form>\n\nThe ``action`` attribute specifies the URL that will receive the form data. ``method`` defines the HTTP method to use (``GET`` or ``POST``). With ``method=\"get\"`` the form values are appended to the URL and available through :attr:`Request.query <BaseRequest.query>` as described above. This is sometimes considered insecure and has other limitations, so we use ``method=\"post\"`` here. If in doubt, use ``POST`` forms.\n\nForm fields transmitted via ``POST`` are stored in :attr:`Request.forms <BaseRequest.forms>` as a :class:`FormsDict`. The server side code may look like this::\n\n    from bottle import route, request\n\n    @route('/login')\n    def login():\n        return '''\n            <form action=\"/login\" method=\"post\">\n                Username: <input name=\"username\" type=\"text\" />\n                Password: <input name=\"password\" type=\"password\" />\n                <input value=\"Login\" type=\"submit\" />\n            </form>\n        '''\n\n    @route('/login', method='POST')\n    def do_login():\n        username = request.forms.username\n        password = request.forms.password\n        if check_login(username, password):\n            return \"<p>Your login information was correct.</p>\"\n        else:\n            return \"<p>Login failed.</p>\"\n\n\nFile Uploads\n------------\n\nTo support file uploads, we have to change the ``<form>`` tag a bit. First, we tell the browser to encode the form data in a different way by adding an ``enctype=\"multipart/form-data\"`` attribute to the ``<form>`` tag. Then, we add ``<input type=\"file\" />`` tags to allow the user to select a file. Here is an example:\n\n.. code-block:: html\n\n    <form action=\"/upload\" method=\"post\" enctype=\"multipart/form-data\">\n      Category:      <input type=\"text\" name=\"category\" />\n      Select a file: <input type=\"file\" name=\"upload\" />\n      <input type=\"submit\" value=\"Start upload\" />\n    </form>\n\nBottle stores file uploads in :attr:`Request.files <BaseRequest.files>` as :class:`FileUpload` instances, along with some metadata about the upload. Let us assume you just want to save the file to disk::\n\n    @route('/upload', method='POST')\n    def do_upload():\n        category   = request.forms.category\n        upload     = request.files.get('upload')\n        name, ext = os.path.splitext(upload.filename)\n        if ext not in ('.png','.jpg','.jpeg'):\n            return 'File extension not allowed.'\n\n        save_path = get_save_path_for_category(category)\n        upload.save(save_path) # appends upload.filename automatically\n        return 'OK'\n\n:attr:`FileUpload.filename` contains the name of the file on the clients file system, but is cleaned up and normalized to prevent bugs caused by unsupported characters or path segments in the filename. If you need the unmodified name as sent by the client, have a look at :attr:`FileUpload.raw_filename`.\n\nThe :attr:`FileUpload.save` method is highly recommended if you want to store the file to disk. It prevents some common errors (e.g. it does not overwrite existing files unless you tell it to) and stores the file in a memory efficient way. You can access the file object directly via :attr:`FileUpload.file`. Just be careful.\n\n\nJSON\n--------------------\n\nFor JavaScript and REST APIs it is very common to send ``application/json`` to the server instead of from data.\nThe :attr:`Request.json <BaseRequest.json>` attribute contains the parsed data structure if available, or ``None`` for empty\nrequests or those that did not contain ``application/json`` data. Parsing errors trigger an appropiate :exc:`HTTPError`.\n\n\nRaw Request Data\n--------------------\n\nYou can access the raw body data as a file-like object via :attr:`Request.body <BaseRequest.body>`. This is a :class:`io.BytesIO` buffer or a temporary file depending on the content length and :attr:`Request.MEMFILE_MAX <BaseRequest.MEMFILE_MAX>` setting. In both cases the body is completely buffered before you can access the attribute. If you expect huge amounts of data and want to get direct unbuffered access to the stream, have a look at ``request['wsgi.input']``.\n\n\nWSGI Environment\n--------------------------------------------------------------------------------\n\nEach :class:`BaseRequest` instance wraps a WSGI environment dictionary which is stored in :attr:`Request.environ <BaseRequest.environ>`. Most of the interesting information is also exposed through special methods or properties, but if you want to access the raw `WSGI environ <https://peps.python.org/pep-3333/>`_ directly, you can do so::\n\n  @route('/my_ip')\n  def show_ip():\n      ip = request.environ.get('REMOTE_ADDR')\n      # or ip = request.get('REMOTE_ADDR')\n      # or ip = request['REMOTE_ADDR']\n      return template(\"Your IP is: {{ip}}\", ip=ip)\n\n\n\n\n\n\n\n.. _tutorial-templates:\n\nTemplates\n================================================================================\n\nBottle comes with a fast and powerful built-in template engine called :doc:`stpl`. To render a template you can use the :func:`template` function or the :func:`view` decorator. All you have to do is to provide the name of the template and the variables you want to pass to the template as keyword arguments. Here’s a simple example of how to render a template::\n\n    @route('/hello')\n    @route('/hello/<name>')\n    def hello(name='World'):\n        return template('hello_template', name=name)\n\nThis will load the template file ``hello_template.tpl`` and render it with the ``name`` variable set. Bottle will look for templates in the ``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` list.\n\nThe :func:`view` decorator allows you to return a dictionary with the template variables instead of calling :func:`template`::\n\n    @route('/hello')\n    @route('/hello/<name>')\n    @view('hello_template')\n    def hello(name='World'):\n        return dict(name=name)\n\n.. rubric:: Syntax\n\nThe template syntax is a very thin layer around the Python language. Its main purpose is to ensure correct indentation of blocks, so you can format your template without worrying about indentation. Follow the link for a full syntax description: :doc:`stpl`\nHere is an example template:\n\n.. code-block:: html+django\n\n    %if name == 'World':\n        <h1>Hello {{name}}!</h1>\n        <p>This is a test.</p>\n    %else:\n        <h1>Hello {{name.title()}}!</h1>\n        <p>How are you?</p>\n    %end\n\n.. rubric:: Caching\n\nTemplates are cached in memory after compilation. Modifications made to the template files will have no affect until you clear the template cache. Call ``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode.\n\n\n.. _default-app:\n\nStructuring Applications\n================================================================================\n\nBottle maintains a global stack of :class:`Bottle` instances and uses the top of the stack as a default for some of the module-level functions and decorators. The :func:`route` decorator or `run()` function for example are shortcuts for :meth:`Bottle.route` or :meth:`Bottle.run` on the default application::\n\n    @route('/')\n    def hello():\n        return 'Hello World'\n\n    if __name__ == '__main__':\n        run()\n\nThis is very convenient for small applications and saves you some typing, but also means that, as soon as your module is imported, routes are installed to the global default application. To avoid this kind of import side-effects, Bottle offers a second, more explicit way to build applications::\n\n    app = Bottle()\n\n    @app.route('/')\n    def hello():\n        return 'Hello World'\n\n    app.run()\n\nSeparating the application object improves re-usability a lot, too. Other developers can safely import the ``app`` object from your module and use :meth:`Bottle.mount` to merge applications together.\n\n\n.. versionadded:: 0.13\n\nStarting with bottle-0.13 you can use :class:`Bottle` instances as context managers::\n\n    app = Bottle()\n\n    with app:\n\n        # Our application object is now the default\n        # for all shortcut functions and decorators\n\n        assert my_app is default_app()\n\n        @route('/')\n        def hello():\n            return 'Hello World'\n\n        # Also useful to capture routes defined in other modules\n        import some_package.more_routes\n\n\n.. _tutorial-glossary:\n\nGlossary\n========\n\n.. glossary::\n\n   callback\n      Programmer code that is to be called when some external action happens.\n      In the context of web frameworks, the mapping between URL paths and\n      application code is often achieved by specifying a callback function\n      for each URL.\n\n   decorator\n      A function returning another function, usually applied as a function transformation using the ``@decorator`` syntax. See `python documentation for function definition  <https://docs.python.org/reference/compound_stmts.html#function>`_ for more about decorators.\n\n   environ\n      A structure where information about all documents under the root is\n      saved, and used for cross-referencing.  The environment is pickled\n      after the parsing stage, so that successive runs only need to read\n      and parse new and changed documents.\n\n   handler function\n      A function to handle some specific event or situation. In a web\n      framework, the application is developed by attaching a handler function\n      as callback for each specific URL comprising the application.\n\n   source directory\n      The directory which, including its subdirectories, contains all\n      source files for one Sphinx project.\n\n"
  },
  {
    "path": "docs/tutorial_app.rst",
    "content": ".. _Bottle: https://bottlepy.org\n.. _WSGI: https://peps.python.org/pep-3333/\n.. _Python: https://www.python.org\n.. _SQLite: https://www.sqlite.org\n.. _`SQLite module`: https://docs.python.org/3/library/sqlite3.html#module-sqlite3\n.. _`HTML tutorial`: https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Structuring_content\n.. _venv: https://docs.python.org/3/library/venv.html\n.. _`decorator function`: https://docs.python.org/glossary.html#term-decorator\n.. _`Python DB API`: https://www.python.org/dev/peps/pep-0249/\n.. _`WSGI reference Server`: https://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server\n.. _`Bottle documentation`: https://bottlepy.org/docs/dev/tutorial.html\n.. _JSON: https://www.json.org\n.. _`match statement`: https://peps.python.org/pep-0634/\n.. _f-strings: https://docs.python.org/3/library/string.html#format-string-syntax\n.. _`Bottle class`: https://bottlepy.org/docs/dev/api.html#the-bottle-class\n.. _`Zen of Python`: https://peps.python.org/pep-0020/\n.. _`dynamic routes`: https://bottlepy.org/docs/dev/tutorial.html#dynamic-routes\n.. _`RegEx module`: https://docs.python.org/3/library/re.html\n.. _pathlib: https://docs.python.org/3/library/pathlib.html\n.. _`static_file documentation`: https://bottlepy.org/docs/dev/api.html#bottle.static_file\n.. _`server adapters`: https://bottlepy.org/docs/dev/deployment.html#server-adapters\n.. _`Waitress`: https://docs.pylonsproject.org/projects/waitress/en/latest/\n\n\n=========================\nToDo Application Example\n=========================\n\nThis tutorial gives a brief introduction to the Bottle_ WSGI_ Framework. The main goal this tutorial is, after finishing working yourself through, to be able to create a project using Bottle. Within this document, by far not all features are shown, but at least the main and important ones like request routing, utilizing the Bottle template engine to format output as well as handling GET and POST request are featured. The last section gives a brief introduction how to serve a Bottle application by a WSGI application server.\n\nTo understand the content of this tutorial, it is not really necessary to have a basic knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway as much as possible. A fair bit of understanding of the Python_ programming language is of course required. Furthermore, the example application created in this tutorial retrieves and stores data in a SQL database, so (very) basic knowledge on SQL helps, but is not a must to understand the concepts of Bottle. Right here, SQLite_ is used. As Bottle is a framework for web-based application, most of output send to the Browser is HTML. Thus, a basic idea about the common HTML tags certainly helps as well. In case HTML basic still need to be learned, a good starting point is the `HTML tutorial`_ on the Mozilla Developer Network website.\n\nFor the sake of introducing Bottle, the Python code \"in between\" is kept short, in order to keep the focus. Although all code within the tutorial works fine, it may not necessarily be used as-is \"in the wild\", e.g. on a publically accessible server. To do so, e.g. input validtion, better database protection, better error handling and other things need to be added.\n\n.. contents:: Table of Contents\n\nGoals\n======\n\nAt the end of this tutorial, a ready-to-use, simple, web-based ToDo application is going to be programmed. The app takes tasks, each one consisting of a text (with max 100 characters) and a status (0 for closed, 1 for open). Through the web-based user interface, open task can be view and edited and new tasks can be added.\n\nDuring development, all pages will be available under the address ``127.0.0.1`` (aka: ``localhost``) in a web browser running on the same machine as the Bottle application code. Later on it will be shown how to adapt the application for a \"real\" server.\n\nBottle will do the routing and format the output with the help of templates. The tasks will be stored inside a SQLite database. Reading and writing the database will be done by Python code.\n\nThe result of this tutorial is going to be an application with the following pages and functionality:\n\n * start page ``http://127.0.0.1:8080/todo``\n * adding a new task to the list: ``http://127.0.0.1:8080/new``\n * page for editing a task: ``http://127.0.0.1:8080/edit/<number:int>``\n * show details about a task: ``http://127.0.0.1:8080/details/<number:int>``\n * show a task formated as JSON: ``http://127.0.0.1:8080/as_json/<number:int>``\n * redirect ``http://127.0.0.1:8080/`` to ``http://127.0.0.1:8080/todo``\n * catching errors\n\n\nPrior to Starting ...\n======================\n\n.. rubric:: A Note on Python Versions\n\nBottle supports a wide range of Python version. Bottle 0.13 supports Python 3.8 and newer as well as Python 2 starting with 2.7.3, although Python 2 support will be dropped with Bottle 0.14. As Python 2 support was dropped by the Python core developers on Jan 1st 2020 already, it is highly encourage to use a recent Python 3 release.\n\nThis tutorial requires at least Python 3.10, as at one point the `match statement`_ is going to be used, which was introduced with Python 3.10. In case Python 3.8 or 3.9 is going to be used, the match statement needs to be replaced with an if-elif-else cascade, all other sections will work just fine. If really Python 2.7.x must be used, additionally the f-strings_ used at some places needs to be replaced with the string formatting methods available in Python 2.7.x.\n\nAnd, finally, ``python`` will be used in this tutorial to run Python 3.10 and newer. On some platforms it may be necessary to type ``python3`` instead to run the installed Python 3 interpreter.\n\n\n.. rubric:: Install Bottle\n\nAssuming that a fairly new installation of Python (version 3.10 or higher) is used, only Bottle needs to be installed in addition to that. Bottle has no other dependencies than Python itself. Following the recommended best-pratice for Python and installing Python modules, let's create a venv_ first and install Bottle inside the venv. Open the directory of choice where the venv should be created and execute the following commands:\n\n.. code::\n\n    python -m venv bottle_venv\n    cd bottle_venv\n    #for Linux & MacOS\n    source bin/activate\n    #for Windows\n    .\\Scripts\\activate\n    pip3 install bottle\n\n\n.. rubric:: SQLite\n\nThis tutorial uses _SQLite as the database. The standard release of Python has SQlite already on board and have `SQLite module`_ included to interact with the database. So no further installation is required here.\n\n.. rubric:: Create An SQL Database\n\nPrior to starting to work on the ToDo application, the database to be used later on needs to be created. To do so, save the following script in the project directory and run it with python. Alternatively, the lines of code can be executed in the interactive Python interpreter, too::\n\n    import sqlite3\n    connection = sqlite3.connect('todo.db') # Warning: This file is created in the current directory\n    cursor = connection.cursor()\n    cursor.execute(\"CREATE TABLE todo (id INTEGER PRIMARY KEY, task char(100) NOT NULL, status bool NOT NULL)\")\n    cursor.execute(\"INSERT INTO todo (task,status) VALUES ('Read the Python tutorial to get a good introduction into Python',0)\")\n    cursor.execute(\"INSERT INTO todo (task,status) VALUES ('Visit the Python website',1)\")\n    cursor.execute(\"INSERT INTO todo (task,status) VALUES ('Test various editors for and check the syntax highlighting',1)\")\n    cursor.execute(\"INSERT INTO todo (task,status) VALUES ('Choose your favorite WSGI-Framework',0)\")\n    connection.commit()\n\nThese commands generate a database-file named `todo.db` with a table called ``todo``. The table has three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for each row, which is used later to reference rows of data. The column ``task`` holds the text which describes the task, it is limited to max 100 characters. Finally, the column ``status`` is used to mark a task as open (represented by the value 1) or closed (represented by the value 0).\n\n\nWriting a Web-Based ToDo Application with Bottle\n=================================================\n\nLet's dive into Bottle and create the web-based ToDo application. But first, let's look into a basic concept of Bottle: routes.\n\n\n.. rubric:: Understanding routes\n\nBasically, each page visible in the browser is dynamically generated when the page address is called. Thus, there is no static content. That is exactly what is called a \"route\" within Bottle: a certain address on the server. So, for example, opening the URL ``http://127.0.0.1:8080/todo`` from the browser, Bottle \"grabs\" the call on the server-side and checks if there is any (Python) function defined for the route \"todo\". If so, Bottle executes the corresponding Python code and returns its result. So, what Bottle (as well as other Python WSGI frameworks) does: it binds an URL to a function.\n\n\n.. rubric:: Bottle basic by a \"Hello World\" example\n\nBefore finally starting the ToDo app, let's create a very basic \"Hello World\" example:\n\n.. code-block:: python\n\n    from bottle import Bottle\n\n\n    app = Bottle()\n\n    @app.route('/')\n    def index():\n        return 'Hello from Bottle'\n\n    if __name__ == '__main__':\n        app.run(host='127.0.0.1', port=8080)\n\n\nSave the file under a name of choice, e.g. ``hello_bottle.py`` and execute the file ``python hello_bottle.py``. Then open the browser and enter ``http://127.0.0.1:8080`` in the address bar. The browser window should now show the text \"Hello from Bottle\".\n\nSo, what happens here? Let's dissect line by line:\n\n- ``from bottle import Bottle`` imports the ``Bottle`` class from the Bottle module. Each instance derived from the class\n  represents a single, distinct web application.\n- ``app = Bottle()`` creates an instance of ``Bottle``. ``app`` is the web application object.\n- ``@app.route('/')``  creates a new route bond to ``/`` for the app.\n- ``def index()`` defines a function which is \"linked\" to the route ``/``, as the ``index`` function is decorated with\n  the ``app.route`` decorator (more on that below).\n- ``return 'Hello from Bottle'`` \"Hello from Bottle\" is the plain text send to the browser when the route is called.\n- ``if __name__ == '__main__':``: The following code is only execute when the file holding the code is directly executed\n  by the Python interpreter. In case e.g. a WSGI server is serving the code (more on that later), the following code\n  is not executed.\n- ``app.run(host='127.0.0.1', port=8080)`` starts the build-in development server, listing on the address ``127.0.0.1``\n  and port ``8080``.\n\n\n.. rubric:: First Step - Showing All Open Items\n\nSo, after understanding the concept of routes and the basics of Bottle, let's create the first real route for the ToDo application. The goal is to see all open items from the ToDo list:\n\n.. code-block:: python\n\n    import sqlite3\n    from bottle import Bottle\n\n\n    app = Bottle()\n\n    @app.route('/todo')\n    def todo_list():\n        with sqlite3.connect('todo.db') as connection:\n            cursor = connection.cursor()\n            cursor.execute(\"SELECT id, task, status FROM todo WHERE status LIKE '1'\")\n            result = cursor.fetchall()\n            return str(result)\n\n    if __name__ == '__main__':\n        app.run(host='127.0.0.1', port=8080)\n\n\nSave the code as ``todo.py``, preferably in the same directory as the database file ``todo.db``. Otherwise, the path to ``todo.db`` must be added in the ``sqlite3.connect()`` statement.\n\nLet's have a look what happens here: the required module ``sqlite3`` is imported to access to SQLite database, and from Bottle the ``Bottle`` class is imported. One function is defined, ``todo_list()``, with a few lines of code reading from the database. The important point here is the `decorator function`_ ``@route('/todo')`` right before the ``def todo_list()`` statement. By doing this, this function is bound to the route ``/todo``, so every time the browsers calls ``http://127.0.0.1:8080/todo``, Bottle returns the result of the function ``todo_list()``. That is how routing within bottle works.\n\nActually, more than one route can be bound to a function. The following code:\n\n.. code-block:: python\n\n    @route('/todo')\n    @route('/my_todo_list')\n    def todo_list():\n        ...\n\nworks fine, too. What will not work is to bind one route to more than one function.\n\nWhat the browser displays is what is returned, thus the value given by the ``return`` statement. In this example, it is necessary to convert ``result`` in to a string by ``str()``, as Bottle expects a string or a list of strings from the return statement. But here, the result of the database query is a list of tuples, which is the standard defined by the `Python DB API`_.\n\nNow, after understanding the little script above, it is time to execute it and watch the result. Just run ``python todo.py`` and open the URL ``http://127.0.0.1:8080/todo`` in the browser. In case no mistake was made writing the code, the output should look like this::\n\n    [(2, 'Visit the Python website', 1), (3, 'Test various editors for and check the syntax highlighting', 1)]\n\nIf so - congratulations! Bottle is successful used. In case it did not work, and changes need to be made, remember to stop Bottle serving the page, otherwise the revised version will not be loaded.\n\nThe output is not really exciting nor nice to read. It is the raw result returned from the SQL query. In the next step the output is formated in a nicer way. But before that, let's make life a bit easier while developing the app.\n\n\n.. rubric:: Debugging and Auto-Reloading\n\nMaybe it was already noticed that Bottle sends a short error message to the browser in case something within the script went wrong, e.g. the connection to the database is not working. For debugging purposes, it is quite helpful to get more details. This can be easily achieved by adding the following to the script:\n\n.. code-block:: python\n\n    from bottle import Bottle\n    ...\n    if __name__ == '__main__':\n        app.run(host='127.0.0.1', port=8080, debug=True)\n\n\nBy enabling \"debug\", a full stacktrace of the Python interpreter will be received in case of an error, which usually contains useful information, helping to find the error. Furthermore, templates (see below) are not cached, thus changes to templates will take effect without stopping and restarting the server.\n\n.. warning::\n\n    ``debug=True`` is supposed to be used for development only, it should *not* be used in production environments.\n\n\nAnother nice feature while developing is auto-reloading, which is enabled by modifying the ``app.run()`` statement to\n\n.. code:: python\n\n    app.run(host='127.0.0.1', port=8080, reloader=True)\n\n\nThis will automatically detect changes to the script and reload the new version once it is called again, without the need to stop and start the server.\n\nAgain, the feature is mainly supposed to be used while developing, not on production systems.\n\n\n.. rubric:: Bottle's SimpleTemplate To Format The Output\n\nNow let's have a look at casting the output of the script into a proper format. Actually, Bottle expects to receive a string or a list of strings from a function and returns them to the browser. Bottle does not bother about the content of the string itself, so it can be e.g. text formatted with HTML markup.\n\nBottle has its own easy-to-use, build-in template engine called \"SimpleTemplate\". Templates are stored as separate files having a ``.tpl`` extension. And by default, they are expected to be in a directory called ``views`` below the directory where the Python code of the application is located. A template can be called from within a function. Templates can contain any type of text (which will be most likely HTML-markup mixed with Python statements). Furthermore, templates can take arguments, e.g. the result set of a database query, which will be then formatted nicely within the template.\n\nRight here, the result of the query showing the open ToDo tasks is cast into a simple HTML table with two columns: the first column will contain the ID of the item, the second column the text. The result is, as seen above, a list of tuples, each tuple contains one set of results.\n\nTo include the template in the example, just add the following lines:\n\n.. code-block:: python\n\n    from bottle import Bottle, template\n    ...\n        result = cursor.fetchall()\n    output = template('show_tasks', rows=result)\n    return output\n    ...\n\n\nTwo things are done here: first, ``template`` additionally imported from bottle in order to be able to use templates. Second, the output of the template ``show_tasks`` is assigned to the variable ``output``, which then is returned. In addition to calling the template, ``result`` is assigned, which is received from the database query, to the variable ``rows``, which passed to the template to be used within the template later on. If necessary, more than one variable / value can be passed to a template.\n\nTemplates always return a list of strings, thus there is no need to convert anything. One line of code can be saved by writing ``return template('show_tasks', rows=result)``, which gives exactly the same result as above.\n\nNow it is time to write the corresponding template, which looks like this:\n\n.. code-block:: html\n\n    %#template to generate a HTML table from a list of tuples (or list of lists, or tuple of tuples or ...)\n    <p>The open items are as follows:</p>\n    <table border=\"1\">\n    %for row in rows:\n      <tr>\n      %for col in row:\n        <td>{{col}}</td>\n      %end\n      </tr>\n    %end\n    </table>\n\nSave the code as ``show_tasks.tpl`` in the ``views`` directory.\n\nLet's have a look at the code: every line starting with % is interpreted as Python code. Because it is effectively Python, only valid Python statements are allowed. The template will raise exceptions, just as any other Python code would, in case of wrong code. The other lines are plain HTML markup.\n\nAs can be seen, Python's ``for`` statement is used two times, to go through ``rows``. As seen above, ``rows`` is a variable which holds the result of the database query, so it is a list of tuples. The first ``for`` statement accesses the tuples within the list, the second one the items within the tuple, which are put each into a cell of the table. It is important that all ``for``, ``if``, ``while`` etc. statements are closed with ``%end``, otherwise the output will not be as expected.\n\nIf a variable within a non-Python code line needs to be accessed inside the template, put it into double curly braces, like ``{{ col  }}`` in the example above. This tells the template to insert the actual value of the variable right at this place.\n\nRun the script again and look at the output. Still not really nice and not complete HTML, but at least more readable than the list of tuples.\n\n\n.. rubric:: Adding a Base Template\n\nBottle's SimpleTempate allows, like other template engines, nesting templates. This is pretty handy, as it allows to define a base template holding e.g. the HTML doctype definition, the head and the body section, which is then used as the base for all other templates generating the actual output. The base template looks like this:\n\n.. code-block:: html\n\n    <!doctype html>\n    <html lang=\"en-US\">\n    <head>\n    <meta charset=\"utf-8\" />\n    <title>ToDo App powered by Bottle</title>\n    </head>\n    <body>\n    {{!base}}\n    </body>\n    </html>\n\n\nSave this template with the name ``base.tpl`` in the ``views`` folder.\n\nAs can be seen, the template holds a basic HTML skeleton for a typically website. The ``{{!base}}`` inserts the content of the other template using the base template.\n\nTo use the base template from another template like e.g. ``shows_task.tpl``, just add the following line at the beginning of this template:\n\n.. code::\n\n    % rebase('base.tpl')\n    ...\n\n\nThis tells the template to rebase its content into the template ``base.tpl``.\n\nReload ``http://127.0.0.1:8000/todo`` and the output is now valid HTML. Of couse the base template can extended as required, e.g. by loading a CSS style sheet or defining own styles in a ``<style>...</style>`` section in the header.\n\n\n.. rubric:: Using GET Parameters\n\nThe app has its first route showing task, but so far it only shows the open tasks. Let's modify this functionality and add an (optional) GET parameter to the route which lets the user choose whether to show open tasks only (which is at the same time the default), only closed tasks or all tasks stored in the database. This should be achieved by checking for a key named ``show``, which can have one of the following three values: ``open``, ``closed``  or ``all``. So e.g. opening the URL ``http://127.0.0.1:8080?show=all`` should make the application show all tasks from the database.\n\nThe updated route and corresponding function look like this:\n\n.. code-block:: python\n\n    ...\n    from bottle import request\n    ...\n    @app.get('/todo')\n    def todo_list():\n        show  = request.query.show or 'open'\n        match show:\n            case 'open':\n                db_query = \"SELECT id, task FROM todo WHERE status LIKE '1'\"\n            case 'closed':\n                db_query = \"SELECT id, task FROM todo WHERE status LIKE '0'\"\n            case 'all':\n                db_query = \"SELECT id, task FROM todo\"\n            case _:\n                return template('message.tpl',\n                    message = 'Wrong query parameter: show must be either open, closed or all.')\n        with sqlite3.connect('todo.db') as connection:\n            cursor = connection.cursor()\n            cursor.execute(db_query)\n            result = cursor.fetchall()\n        output = template('show_tasks.tpl', rows=result)\n        return output\n    ...\n\n\nAt first, ``request`` is added to the imports from Bottle. The ``request`` object of Bottle holds all data from a request sent to the application. Additionally, the route is change to ``@app.get(...)`` to explicitly state that this route only excepts GET requests only.\n\n.. note::\n\n    This change is not strictly necessary, as ``app.route()`` accepts implicitly GET request only, too. However, following the `Zen of Python`_ : \"Explicit is better than implicit.\"\n\nThe line ``show_all  = request.query.show or 'open'`` does the following: ``query`` is the attribute of the ``request`` object holding the data from a GET request. So ``request.query.show`` returns the value of the key ``show`` from the request. If ``show`` is not present, the value ``open`` is assigned to the ``show`` variable. This also implies that any other key in the GET request is ignored.\n\nThe following ``match`` statement assigns a SQL query to the variable ``db_query`` depending on the value of ``show``, respectively shows an error message if ``show`` is neither ``open`` nor ``closed`` nor ``all``. The remaining code of the ``todo_list()`` function remains unchanged.\n\nWhile working on this route, let's make one addition to the ``show_tasks`` template. Add the line\n\n.. code-block:: html\n\n    <p><a href=\"/new\">Add a new task</a></p>\n\n\nat the end of the template to add a link for adding a new task to the database. The corresponding route and function will be created in the following section.\n\nAnd, finally, the new template ``message.tpl`` used in the code about, looks like this:\n\n.. code-block:: html\n\n    % rebase('base.tpl')\n    <p>{{ message }}</p>\n    <p><a href=\"/todo\">Back to main page</p>\n\n\n.. rubric:: Using Forms and POST Data\n\nAs all tasks now can be viewed properly, let's move to the next step and add the functionality to add a new task to the ToDo list. The new task should be received from a regular HTML form, sending its data by a POST request.\n\nTo do so, first a new route is added to the code. The route should accept GET and POST requests:\n\n.. code-block:: python\n\n    @app.route('/new', method=['GET', 'POST'])\n    def new_task():\n        if request.POST:\n            new_task = request.forms.task.strip()\n            with sqlite3.connect('todo.db') as connection:\n                cursor = connection.cursor()\n                cursor.execute(\"INSERT INTO todo (task,status) VALUES (?,?)\", (new_task, 1))\n                new_id = cursor.lastrowid\n            return template('message.tpl',\n                message=f'The new task was inserted into the database, the ID is {new_id}')\n        else:\n            return template('new_task.tpl')\n\n\nA new route is created, assigned to ``/new``, which accepts GET as well as POST requests. Inside the function ``new_task`` assigned to this route, the ``request`` object introduced in the previous section is checked to see whether a GET or a POST request was received:\n\n.. code-block:: python\n\n    ...\n    if request.POST:\n        #The code here is only executed if POST data, e.g. from a\n        #HTML form, is inside the request.\n    else:\n        #the code here is only executed if no POST data was received.\n    ...\n\n\n``request.forms`` is the attribute which holds data submitted by an HTML from. ``request.forms.task`` holds the data from the field ``task`` of the form. As ``task`` is a string, the ``strip`` method is additionally applied to remove any white spaces before or after the string.\n\nThen the new task is written to the database, and the ID of the new task is return. If no POST data was received, the template ``new_task`` is send. This template holds the HTML form to enter a new task. The template looks like this:\n\n.. code-block:: html\n\n    %#template of the form for a new task\n    % rebase('base.tpl')\n    <p>Add a new task to the ToDo list:</p>\n    <form action=\"/new\" method=\"post\">\n      <p><input type=\"text\" size=\"100\" maxlength=\"100\" name=\"task\"></p>\n      <p><input type=\"submit\" name=\"save\" value=\"save\"></p>\n    </form>\n\n\n.. rubric:: Editing Existing Items\n\nThe last piece missing to complete the simple ToDo app is the functionality to edit existing tasks in the database. Either to change their status or to update the text of a task.\n\nBy using only the routes introduced so far it is possible, but will be quite tricky. To make things easier, let's use Bottle's feature called `dynamic routes`_ , which makes this coding task quite easy.\n\nThe basic statement for a dynamic route looks like this::\n\n.. code-block:: python\n\n    @app.route('some_route/<something>')\n\n``<something>`` is called a \"wildcard\". Furthermore, the value of the wildcard ``something`` is be passed to the function assigned to this route, so the data can be processed within the function. Optionally, a filter can be applied to the wildcard. The filter does one thing: it checks whether the wildcard matches a certain type of data, e.g. an integer value or a regular expression. If not, an error is raised.\n\nThe ``int`` filter is used for this route, which checks at first if the wildcard matches an integer value and. If yes, the wildcard string is converted to a Python integer object.\n\nThe complete route for editing a task looks like this:\n\n.. code-block:: python\n\n    @app.route('/edit/<number:int>', method=['GET', 'POST'])\n    def edit_task(number):\n        if request.POST:\n            new_data = request.forms.task.strip()\n            status = request.forms.status.strip()\n            if status == 'open':\n                status = 1\n            else:\n                status = 0\n            with sqlite3.connect('todo.db') as connection:\n                cursor = connection.cursor()\n                cursor.execute(\"UPDATE todo SET task = ?, status = ? WHERE id LIKE ?\", (new_data, status, number))\n            return template('message.tpl',\n                message=f'The task number {number} was successfully updated')\n        else:\n            with sqlite3.connect('todo.db') as connection:\n                cursor = connection.cursor()\n                cursor.execute(\"SELECT task FROM todo WHERE id LIKE ?\", (number,))\n                current_data = cursor.fetchone()\n            return template('edit_task', current_data=current_data, number=number)\n\n\nA lot of the code's logic is pretty similat to the ``/new`` route and the corresponding ``new_task`` function: the route accepts GET and POST requests and, depending on the request, either sends the template ``edit_task`` or updates a task in the database according to the form data received.\n\nWhat's new here is the dynamic routing ``@app.route('/edit/<number:int>' ...)`` which accepts one wildcard, supposed to be an integer value. The wildcard is assigned to the variable ``number``, which is also expected by the function ``edit_task``. So e.g. opening the URL ``http:/127.0.0.1:8080/edit/2`` would open the task with the ID for editing. In case no number is passed, either because of omitting the parameter or passing a string which is not an integer only, an error will be raised.\n\nThe template ``edit_task.tpl`` called within the function looks like this:\n\n.. code-block:: html\n\n    %#template for editing a task\n    %#the template expects to receive a value for \"number\" as well a \"old\", the text of the selected ToDo item\n    % rebase('base.tpl')\n    <p>Edit the task with ID = {{number}}</p>\n    <form action=\"/edit/{{number}}\" method=\"post\">\n      <p>\n      <input type=\"text\" name=\"task\" value=\"{{current_data[0]}}\" size=\"100\" maxlength=\"100\">\n      <select name=\"status\">\n        <option>open</option>\n        <option>closed</option>\n      </select>\n      </p>\n      <p><input type=\"submit\" name=\"save\" value=\"save\"></p>\n    </form>\n\n\nThe next section \"Returning JSON Data\" shows another example of a dynamic route using a filter.\n\n\n.. rubric:: Returning JSON Data\n\nA nice feature of Bottle is that it automatically generates a response with content type JSON_ is a Python dictionary is passed to the return statement of a route. Which makes it very easy to build web-based APIs with Bottle. Let's build a route for the ToDo app application which returns a task from the database as JSON. This is pretty straight forward; the code looks like this:\n\n.. code-block:: python\n\n    @app.route('/as_json/<number:re:[0-9]+>')\n    def task_as_json(number):\n        with sqlite3.connect('todo.db') as connection:\n            cursor = connection.cursor()\n            cursor.execute(\"SELECT id, task, status FROM todo WHERE id LIKE ?\", (number,))\n            result = cursor.fetchone()\n        if not result:\n            return {'task': 'This task ID number does not exist!'}\n        else:\n            return {'id': result[0], 'task': result[1], 'status': result[2]}\n\n\nAs can be seen, the only difference is the dictionary returned. Either resulting in a JSON object with the three keys \"id\", \"task\" and \"status\" or with one key named \"task\" only, having the error message as the value.\n\nAdditionally, the ``re`` filter applying a RegEx is used for the wildcard ``number`` of this route. Of course the ``int`` filter as used for the `/edit`` route could be used here, too (and would be probably more appropriate), but the RegEx filter is used just to showcase it here. The filter can basically handle any regular expression Python's `RegEx module`_ can handle.\n\n\n.. rubric:: Returning Static Files\n\nSometimes it may become necessary to associate a route not to a Python function but just return a static file. A static file could be e.g. a JPG or PNG graphics, a PDF file or a static HTML file instead of a template. In any case, another import needs to be added first\n\n.. code:: python\n\n    from bottle import static_file\n\n\nto the code to import Bottle's function ``static_file``, which handles sending static files. Let's assume all the static files are located in a subdirectory named ``static`` relativ to the application. The code to serve static files from there looks as follows:\n\n.. code-block:: python\n\n    ...\n    from pathlib import Path\n\n    ABSOLUTE_APPLICATION_PATH = Path(__file__).parent[0]\n    ...\n\n    @app.route('/static/<filepath:path>')\n    def send_static_file(filepath):\n        ROOT_PATH = ABSOLUTE_APPLICATION_PATH / 'static'\n        return static_file(filepath,\n                           root=ROOT_PATH)\n\n\nThe ``Path`` class of Python's pathlib_ module is imported and then used to determine the absolute path where the application is located. This is necessary, as the ``static_file`` method requires an absolute path to the static content. Of course, the path could be hard coded into the code, but using pathlib is more elegant.\n\nThe route ``/static/<filepath:path>`` makes use of Bottle's build-in ``path`` filter and the wildcard holding the name of the file to be served is assigned to the ``filepath``. As can be seen from the code, the ``static_file`` function requires the name of the file to be served as well as the root path to the directory where the file is located.\n\nBottle guesses the MIME-type of the file automatically. But it can also be stated explicitly by adding a third argument to ``static_file``, e.g. ``mimetype='text/html'`` for serving a static HTML file. More information on ``static_file`` can be found in the `static_file documentation`_ .\n\n\n.. rubric:: Catching Errors\n\nWhen trying to open a webpage which doesn't exist, a \"404 Not Found\" error message is displayed in the browser. Bottle offers an option to catch these errors and return a customized error message instead. This works as follows:\n\n.. code-block:: python\n\n    @app.error(404)\n    def error_404(error):\n        return 'Sorry, this page does not exist!'\n\n\nIn the event a 404 Not Found error occurs, the function decorated with ``app.error(404)`` is run and returns the customized error message of choice. The ``error`` argument passed to the function holds a tuple with two elements: the first element is the actual error code and the second element the actual error message. This tuple can be used within the function but does not have to. Of course, if is also possible, like for all routes, to assign more than one error / route to a function, like e.g.:\n\n.. code-block:: python\n\n    @app.error(404)\n    @error(403)\n    def something_went_wrong(error):\n        return f'{error}: There is something wrong!'\n\n\n.. rubric:: Create a Redirect (Bonus Section)\n\nAlthough the ToDo application works just fine, it still has one little flaw: When trying to open ``127.0.01:8080`` in the browser, the root route, a 404 error will occur, as no route is established for ```/``.  Which is not too much of a problem, but at least a little bit unexpected. Of course this could be changed by modifiying the route ``app.route('/todo')`` to ``app.route('/')``. Or, if the /todo route should be kept, a redirect can be added to the code. Again, this is pretty straight forward:\n\n.. code-block:: python\n\n    ...\n    from bottle import redirect\n    ...\n\n    @app.route('/')\n    def index():\n        redirect('/todo')\n\n\nAt first, the (so far) missing route ``app.route('/')`` is added, decorating the ``index()`` function. It has only one line of code, redirecting the browser to the todo route. When opening the URL ``127.0.0.1:8080``, the browser will be automatically redirect to ``http://127.0.0.1:8080/todo``.\n\n\n.. rubric:: Summary\n\nAfter going through all the sections above, a brief understanding on how Bottle works is hopefully achieved so new Bottle-based web applications can be written.\n\nThe following chapter will be show how to serve Bottle with web servers with perform better on a higher load / more web traffic than the one used so far.\n\n\nDeployment\n===========\n\nSo far, the built-in development server of Bottle was used, which based on the `WSGI reference Server`_ included in Python. Although this server is perfectly fine and very handy for development purposes, it is not really suitable to serve \"real world\" applications. But before looking at the alternatives, let's have a look how to tweak the settings of the build-in server first.\n\n\n.. rubric:: Running Bottle on a different port and IP\n\nAs a standard, Bottle serves on the IP address 127.0.0.1, also known as ``localhost``, and on port ``8080``. To modify the setting is pretty simple, as additional parameters can be passed to Bottle's ``run()`` function to change the port and the address.\n\nIn the very first \"Hello World\" example, the server is started with ``app.run(host='127.0.0.1', port=8080)``. To change the port, just pass a different port number to the ``port`` argument. To change the IP address which Bottle is listening on, just pass a different IP address to the ``host`` argument.\n\n.. warning::\n\n    It is highly recommended *not* to run an application based on Bottle - or any web application - with Root / administrator rights! The whole code is excuted with elevated rights, which gives a (much) higher risk to harm the system in case of programming mistakes. Plus, in case an outside person can capture the application, e.g. by utilizes a bug in the code, this person may be able to work with elevated rights on the server. It is highly recommended to run Bottle with user rights, probably in case of a real application, by a dedicated user specifically set-up for this. In case the application should listen on a privileged port like 80 and / or 443, it is a common and a well-established practice to serve Bottle - or any WSGI-based application - with an WSGI application server with user rights on an unprivileged port locally and use a reverse proxy web server in front of the WSGI application server. More on this below.\n\n\n.. rubric:: Running Bottle with a different server\n\nAs said above, the build-in server is perfectly suitable for local development, personal use or a very small group of people within an internal network. For everything else, the development server may become a bottleneck, as it is single-threaded, thus it can only serve one request at a time. Plus, it may not be robust enough in general.\n\nBottle comes with a range of `server adapters`_ . To run the Bottle application with a different server than the build-in development server, simple pass the ``server`` argument to the run function. For the following example, the Waitress_ WSGI application server from the Pylons project is used. Waitress works equally good on Linux, MacOS and Windows.\n\n.. note::\n\n    Although Bottle comes with a variety of server adapters, each server except the build-in server must be installed separately. The servers are *not* installed as a dependency of Bottle!\n\nTo install Waitress, go the venv in which Bottle is installed and run:\n\n.. code:: shell\n\n    pip3 install waitress\n\n\nTo server the application via Waitress, just use Bottle's server adapter for Waitress by changing the ``app.run`` to:\n\n.. code:: python\n\n    app.run(host='127.0.0.1', port=8080, server='waitress')\n\n\nAfter starting the application with ``python todo.py``, a line in the output like ``Bottle v0.13.2 server starting up (using WaitressServer())...`` should be printed. Which confirms that the Waitress server instead of the WSGIRefServer is used.\n\nThis works exactly the same way with other servers supported by Bottle. However, there is one potential downside with this: it is not possible to pass any extra arguments to the server. Which may be necessary in many \"real world\" scenarios. A solution to that is shown in the next section.\n\n\n.. rubric:: Serving a Bottle App with a WSGI Application Server\n\nLike any other Python WSGI framework, an application written with a Bottle has a so-called entry point, which can be passed to a WSGI Application server, which then serves the web application. In case of Bottle, the entry points is the ``app`` instance created with the code line ``app = Bottle()``.\n\nSticking to Waitress (as used already in the previous section), serving the application works as follows:\n\n.. code:: shell\n\n    waitress-serve todo:app\n\n\nwhereas ``todo`` is the name of the file holding the Bottle application and ``app`` is the entry point, the instance of Bottle. Calling the WSGI application server directly allows to pass as many arguments to the server as need, e.g.\n\n.. code:: shell\n\n    waitress-serve --listen:127.0.0.1:8080 --threads=2 todo:app\n\n\nFinal Words\n============\n\nThis is the end of this tutorial for Bottle. The basic concepts of Bottle are shown and a first application utilizin the Bottle WSGI framework was written. Additionally, it was shown how to serve a Bottle application for real applications with a WSGI application server.\n\nAs said in the introduction, this tutorial is not showing all possibilities Bottle offers. What was skipped here is e.g. receiving file objects and streams and how to handle authentication data. For a complete overview of all features of Bottle, please refer to the full `Bottle documentation`_ .\n\n\nComplete Example Listing\n=========================\n\nAs the ToDo list example was developed piece by piece, here is the complete listing and the templates:\n\nMain code for the application ``todo.py``:\n\n.. code-block:: python\n\n    import sqlite3\n    from pathlib import Path\n    from bottle import Bottle, template, request, redirect\n\n\n    ABSOLUTE_APPLICATION_PATH = Path(__file__).parents[0]\n    app = Bottle()\n\n    @app.route('/')\n    def index():\n        redirect('/todo')\n\n\n    @app.get('/todo')\n    def todo_list():\n        show  = request.query.show or 'open'\n        match show:\n            case 'open':\n                db_query = \"SELECT id, task, status FROM todo WHERE status LIKE '1'\"\n            case 'closed':\n                db_query = \"SELECT id, task, status FROM todo WHERE status LIKE '0'\"\n            case 'all':\n                db_query = \"SELECT id, task, status FROM todo\"\n            case _:\n                return template('message.tpl',\n                    message = 'Wrong query parameter: show must be either open, closed or all.')\n        with sqlite3.connect('todo.db') as connection:\n            cursor = connection.cursor()\n            cursor.execute(db_query)\n            result = cursor.fetchall()\n        output = template('show_tasks.tpl', rows=result)\n        return output\n\n\n    @app.route('/new', method=['GET', 'POST'])\n    def new_task():\n        if request.POST:\n            new_task = request.forms.task.strip()\n            with sqlite3.connect('todo.db') as connection:\n                cursor = connection.cursor()\n                cursor.execute(\"INSERT INTO todo (task,status) VALUES (?,?)\", (new_task, 1))\n                new_id = cursor.lastrowid\n            return template('message.tpl',\n                message=f'The new task was inserted into the database, the ID is {new_id}')\n        else:\n            return template('new_task.tpl')\n\n\n    @app.route('/edit/<number:int>', method=['GET', 'POST'])\n    def edit_task(number):\n        if request.POST:\n            new_data = request.forms.task.strip()\n            status = request.forms.status.strip()\n            if status == 'open':\n                status = 1\n            else:\n                status = 0\n            with sqlite3.connect('todo.db') as connection:\n                cursor = connection.cursor()\n                cursor.execute(\"UPDATE todo SET task = ?, status = ? WHERE id LIKE ?\", (new_data, status, number))\n            return template('message.tpl',\n                message=f'The task number {number} was successfully updated')\n        else:\n            with sqlite3.connect('todo.db') as connection:\n                cursor = connection.cursor()\n                cursor.execute(\"SELECT task FROM todo WHERE id LIKE ?\", (number,))\n                current_data = cursor.fetchone()\n            return template('edit_task', current_data=current_data, number=number)\n\n\n    @app.route('/details/<task:re:[0-9]+>')\n    def show_item(task):\n            with sqlite3.connect('todo.db') as connection:\n                cursor = connection.cursor()\n                cursor.execute(\"SELECT task, status FROM todo WHERE id LIKE ?\", (task,))\n                result = cursor.fetchone()\n            if not result:\n                return template('message.tpl',\n                message = f'The task number {item} does not exist!')\n            else:\n                return template('message.tpl',\n                message = f'Task: {result[0]}, status: {result[1]}')\n\n\n    @app.route('/as_json/<number:re:[0-9]+>')\n    def task_as_json(number):\n        with sqlite3.connect('todo.db') as connection:\n            cursor = connection.cursor()\n            cursor.execute(\"SELECT id, task, status FROM todo WHERE id LIKE ?\", (number,))\n            result = cursor.fetchone()\n        if not result:\n            return {'task': 'This task IF number does not exist!'}\n        else:\n            return {'id': result[0], 'task': result[1], 'status': result[2]}\n\n\n    @app.route('/static/<filepath:path>')\n    def send_static_file(filepath):\n        ROOT_PATH = ABSOLUTE_APPLICATION_PATH / 'static'\n        return static_file(filepath, root= ROOT_PATH)\n\n\n    @app.error(404)\n    def mistake404(error):\n        return 'Sorry, this page does not exist!'\n\n\n    if __name__ == '__main__':\n        app.run(host='127.0.0.1', port=8080, debug=True, reloader=True)\n        # remember to remove reloader=True and debug=True when moving\n        # the application from development to a productive environment\n\n\nTemplate ``base.tpl``:\n\n.. code-block:: html\n\n    <!doctype html>\n    <html lang=\"en-US\">\n      <head>\n        <meta charset=\"utf-8\" />\n        <title>ToDo App powered by Bottle</title>\n      </head>\n      <body>\n        {{!base}}\n      </body>\n    </html>\n\n\nTemplate ``show_tasks.tpl``:\n\n.. code-block:: html\n\n    %#template to generate a HTML table from a list of tuples (or list of lists, or tuple of tuples or ...)\n    % rebase('base.tpl')\n    <p>The open ToDo tasks are as follows:</p>\n    <table border=\"1\">\n    %for row in rows:\n      <tr>\n      %for col in row:\n        <td>{{col}}</td>\n      %end\n      </tr>\n    %end\n    </table>\n    <p><a href=\"/new\">Add a new task</a></p>\n\n\nTemplate ``message.tpl``:\n\n.. code-block:: html\n\n    % rebase('base.tpl')\n    <p>{{ message }}</p>\n    <p><a href=\"/todo\">Back to main page</p>\n\n\nTemplate ``new_task.tpl``:\n\n.. code-block:: html\n\n    %#template of the form for a new task\n    % rebase('base.tpl')\n    <p>Add a new task to the ToDo list:</p>\n    <form action=\"/new\" method=\"post\">\n      <p><input type=\"text\" size=\"100\" maxlength=\"100\" name=\"task\"></p>\n      <p><input type=\"submit\" name=\"save\" value=\"save\"></p>\n    </form>\n\n\nTemplate ``edit_task.tpl``:\n\n.. code-block:: html\n\n    %#template for editing a task\n    %#the template expects to receive a value for \"number\" as well a \"old\", the text of the selected ToDo item\n    % rebase('base.tpl')\n    <p>Edit the task with ID = {{number}}</p>\n    <form action=\"/edit/{{number}}\" method=\"post\">\n      <p>\n      <input type=\"text\" name=\"task\" value=\"{{current_data[0]}}\" size=\"100\" maxlength=\"100\">\n      <select name=\"status\">\n        <option>open</option>\n        <option>closed</option>\n      </select>\n      </p>\n      <p><input type=\"submit\" name=\"save\" value=\"save\"></p>\n    </form>\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[build-system]\nrequires = [\"flit_core >=3.9,<4\"]\nbuild-backend = \"flit_core.buildapi\"\n\n[project]\nname = \"bottle\"\ndynamic = [\"version\"]\nrequires-python = \">=3.9\"\nlicense = {file = \"LICENSE\"}\ndescription = \"Fast and simple WSGI-framework for small web-applications.\"\nreadme = \"README.rst\"\nkeywords = [\"bottle\", \"wsgi\", \"microframework\"]\nauthors = [\n  {name = \"Marcel Hellkamp\", email = \"marc@gsites.de\"},\n]\nclassifiers = [\n    \"Development Status :: 6 - Mature\",\n    \"Intended Audience :: Developers\",\n    \"License :: OSI Approved :: MIT License\",\n    \"Operating System :: OS Independent\",\n    \"Framework :: Bottle\",\n    \"Topic :: Internet :: WWW/HTTP\",\n    \"Topic :: Internet :: WWW/HTTP :: Dynamic Content\",\n    \"Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries\",\n    \"Topic :: Internet :: WWW/HTTP :: WSGI\",\n    \"Topic :: Internet :: WWW/HTTP :: WSGI :: Application\",\n    \"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware\",\n    \"Topic :: Internet :: WWW/HTTP :: WSGI :: Server\",\n    \"Topic :: Software Development :: Libraries :: Application Frameworks\",\n    \"Programming Language :: Python :: 3\",\n]\n\n[project.optional-dependencies]\ndev = [\n    \"pytest\",\n    \"pytest-cov\",\n    \"build\",\n    \"twine\",\n]\ndocs = [\n    \"sphinx\",\n    \"sphinx-autobuild\",\n    \"sphinx-intl\",\n]\n\n[project.urls]\nHomepage = \"https://bottlepy.org\"\nDocumentation = \"https://bottlepy.org\"\nRepository = \"https://github.com/bottlepy/bottle.git\"\nIssues = \"https://github.com/bottlepy/bottle/issues\"\nChangelog = \"https://bottlepy.org/docs/dev/changelog.html\"\n\n[project.scripts]\n\"bottle\" = \"bottle:main\"\n\n[tool.flit.sdist]\ninclude = [\n  \"test/*.py\",\n  \"test/views/*.tpl\",\n  \"AUTHORS\"\n]\n\n[tool.pytest.ini_options]\naddopts = \"-ra\"\ntestpaths = [ \"test\" ]"
  },
  {
    "path": "test/.coveragerc",
    "content": "[run]\nbranch = True\nparallel = True\ndata_file = ../build/.coverage\n\n[html]\ndirectory = build/coverage\n"
  },
  {
    "path": "test/__init__.py",
    "content": "from __future__ import with_statement\nfrom .tools import chdir\nimport unittest\nimport sys, os\n\ntry:\n    import coverage\n    coverage.process_startup()\nexcept ImportError:\n    pass\n\nimport bottle\nbottle.debug(True)\n\n"
  },
  {
    "path": "test/build_python.sh",
    "content": "#!/bin/bash -e\n# This script builds a specific python release to a prefix directory\n\n# Stop on any errors\ntrap exit ERR\n\nVERSION=$1\nPREFIX=$2\n\ntest -d $PREFIX || mkdir -p $PREFIX || die \"ERROR: Could not find/create $PREFIX\"\nPREFIX=`cd $PREFIX; pwd`\n\nPATH=\"$PREFIX/bin:$PATH\"\n\n# Add ubuntus special lib and include dirs so python can find them.\nexport arch=$(dpkg-architecture -qDEB_HOST_MULTIARCH)\nexport LDFLAGS=\"-L/usr/lib/$arch -L/lib/$arch\"\nexport CFLAGS=\"-I/usr/include/$arch\"\nexport CPPFLAGS=\"-I/usr/include/$arch\"\n\nif [ -x $PREFIX/bin/python$VERSION ]; then\n    echo \"Found Python executable. Skipping build\"\n    exit 0\nfi\n\npushd $PREFIX || exit 1\n  echo \"Downloading source ...\"\n  wget -N https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz || exit 1\n\n  echo \"Extracting source ...\"\n  tar -xzf Python-$VERSION.tgz || exit 1\n\n  pushd Python-$VERSION || exit 1\n    echo \"Running ./configure --prefix=$PREFIX ...\"\n    ./configure --prefix=$PREFIX || exit 1\n\n    echo \"Running make && make install ...\"\n    (make -j8 && make install) || exit 1\n\n    echo \"Installing distribute and pip...\"\n    hash -r\n\n  popd\n\n  echo \"Cleaning up...\"\n  rm -rf $VERSION.tar.gz distribute_setup.py cpython-$VERSION\npopd\n\n\n\n"
  },
  {
    "path": "test/example_settings.py",
    "content": "A = {\n    \"B\": {\n        \"C\": 3\n    }\n}"
  },
  {
    "path": "test/test_app.py",
    "content": "# -*- coding: utf-8 -*-\n\"\"\" Tests for the functionality of the application object.\n\n    TODO: Move other tests here.\n\"\"\" \n\nimport unittest\nfrom bottle import Bottle\n\nclass TestApplicationObject(unittest.TestCase):\n    \n    def test_setattr(self):\n        \"\"\" Attributed can be assigned, but only once. \"\"\"\n        app = Bottle()\n        app.test = 5\n        self.assertEqual(5, app.test)\n        self.assertRaises(AttributeError, setattr, app, 'test', 6) \n        del app.test\n        app.test = 6\n        self.assertEqual(6, app.test)\n"
  },
  {
    "path": "test/test_auth.py",
    "content": "# -*- coding: utf-8 -*-\nimport bottle\nfrom .tools import ServerTestBase\n\nclass TestBasicAuth(ServerTestBase):\n\n    def test__header(self):\n        @bottle.route('/')\n        @bottle.auth_basic(lambda x, y: False)\n        def test(): return {}\n        self.assertStatus(401)\n        self.assertHeader('Www-Authenticate', 'Basic realm=\"private\"')\n"
  },
  {
    "path": "test/test_config.py",
    "content": "import os\nimport tempfile\nimport unittest\nfrom bottle import ConfigDict\n\n\nclass TestConfDict(unittest.TestCase):\n    def test_isadict(self):\n        \"\"\" ConfigDict should behaves like a normal dict. \"\"\"\n        # It is a dict-subclass, so this kind of pointless, but it doen't hurt.\n        d, m = dict(), ConfigDict()\n        d['key'], m['key'] = 'value', 'value'\n        d['k2'], m['k2'] = 'v1', 'v1'\n        d['k2'], m['k2'] = 'v2', 'v2'\n        self.assertEqual(d.keys(), m.keys())\n        self.assertEqual(list(d.values()), list(m.values()))\n        self.assertEqual(d.get('key'), m.get('key'))\n        self.assertEqual(d.get('cay'), m.get('cay'))\n        self.assertEqual(list(iter(d)), list(iter(m)))\n        self.assertEqual([k for k in d], [k for k in m])\n        self.assertEqual(len(d), len(m))\n        self.assertEqual('key' in d, 'key' in m)\n        self.assertEqual('cay' in d, 'cay' in m)\n        self.assertRaises(KeyError, lambda: m['cay'])\n        self.assertEqual(d.setdefault('key', \"Val2\"), m.setdefault('key', \"Val2\"))\n        self.assertEqual(d.setdefault('key', \"Val3\"), m.setdefault('key', \"Val3\"))\n        self.assertEqual(d.get('key'), m.get('key'))\n        with self.assertRaises(KeyError):\n            del m['No key']\n\n    def test_write(self):\n        c = ConfigDict()\n        c['key'] = 'value'\n        self.assertEqual(c['key'], 'value')\n        self.assertTrue('key' in c)\n        c['key'] = 'value2'\n        self.assertEqual(c['key'], 'value2')\n\n    def test_update(self):\n        c = ConfigDict()\n        c['key'] = 'value'\n        c.update(key='value2', key2='value3')\n        self.assertEqual(c['key'], 'value2')\n        self.assertEqual(c['key2'], 'value3')\n\n    def test_string_save_keys(self):\n        c = ConfigDict()\n        with self.assertRaises(TypeError):\n            c[5] = 'value'\n        with self.assertRaises(TypeError):\n            c.load_dict({5: 'value'})\n\n    def test_namespaces(self):\n        c = ConfigDict()\n        c.update('a.b', key='value')\n        self.assertEqual(c['a.b.key'], 'value')\n\n    def test_meta(self):\n        c = ConfigDict()\n        c.meta_set('bool', 'filter', bool)\n        c.meta_set('int', 'filter', int)\n        c['bool'] = 'I am so true!'\n        c['int'] = '6'\n        self.assertTrue(c['bool'] is True)\n        self.assertEqual(c['int'], 6)\n        self.assertRaises(ValueError, lambda: c.update(int='not an int'))\n\n    def test_load_dict(self):\n        c = ConfigDict()\n        d = dict(a=dict(b=dict(foo=5, bar=6), baz=7))\n        c.load_dict(d)\n        self.assertEqual(c['a.b.foo'], 5)\n        self.assertEqual(c['a.b.bar'], 6)\n        self.assertEqual(c['a.baz'], 7)\n        # unicode keys (see issue #720)\n        try:\n            key = unichr(12354)\n        except NameError:\n            key = chr(12354)\n        c = ConfigDict()\n        c.load_dict({key: 'value'})\n        self.assertEqual('value', c[key])\n        c = ConfigDict()\n        c.load_dict({key: {'subkey': 'value'}})\n        self.assertEqual('value', c[key + '.subkey'])\n\n    def test_load_module(self):\n        c = ConfigDict()\n        c.load_module('test.example_settings', True)\n        self.assertEqual(c['A.B.C'], 3)\n\n        c = ConfigDict()\n        c.load_module('test.example_settings', False)\n        self.assertEqual(c['A']['B']['C'], 3)\n\n    def test_overlay(self):\n        source = ConfigDict()\n        source['key'] = 'source'\n        intermediate = source._make_overlay()\n        overlay = intermediate._make_overlay()\n\n        # Overlay contains values from source\n        self.assertEqual(overlay['key'], 'source')\n        self.assertEqual(overlay.get('key'), 'source')\n        self.assertTrue('key' in overlay)\n\n        # Overlay is updated with source\n        source['key'] = 'source2'\n        self.assertEqual(source['key'], 'source2')\n        self.assertEqual(overlay['key'], 'source2')\n\n        # Overlay 'overlays' source (hence the name)\n        overlay['key'] = 'overlay'\n        self.assertEqual(source['key'], 'source2')\n        self.assertEqual(intermediate['key'], 'source2')\n        self.assertEqual(overlay['key'], 'overlay')\n\n        # Deleting an overlayed key restores the value from source\n        del overlay['key']\n        self.assertEqual(source['key'], 'source2')\n        self.assertEqual(overlay['key'], 'source2')\n\n        # Deleting a virtual key is actually not possible.\n        with self.assertRaises(KeyError):\n            del overlay['key']\n\n        # Deleting a key in the source also removes it from overlays.\n        del source['key']\n        self.assertTrue('key' not in overlay)\n        self.assertTrue('key' not in intermediate)\n        self.assertTrue('key' not in source)\n\n        # New keys in source are copied to overlay\n        source['key2'] = 'source'\n        self.assertEqual(source['key2'], 'source')\n        self.assertEqual(intermediate['key2'], 'source')\n        self.assertEqual(overlay['key2'], 'source')\n\n        # New keys in overlay do not change the source\n        overlay['key3'] = 'overlay'\n        self.assertEqual(overlay['key3'], 'overlay')\n        self.assertTrue('key3' not in intermediate)\n        self.assertTrue('key3' not in source)\n\n        # Setting the same key in the source does not affect the overlay\n        # because it already has this key.\n        source['key3'] = 'source'\n        self.assertEqual(source['key3'], 'source')\n        self.assertEqual(intermediate['key3'], 'source')\n        self.assertEqual(overlay['key3'], 'overlay')\n\n        # But as soon as the overlayed key is deleted, it gets the\n        # copy from the source\n        del overlay['key3']\n        self.assertEqual(source['key3'], 'source')\n        self.assertEqual(overlay['key3'], 'source')\n\n    def test_gc_overlays(self):\n        root = ConfigDict()\n        overlay = root._make_overlay()\n        del overlay\n        import gc; gc.collect()\n        root._make_overlay()  # This triggers the weakref-collect\n        self.assertEqual(len(root._overlays), 1)\n\n\nclass TestINIConfigLoader(unittest.TestCase):\n    @classmethod\n    def setUpClass(self):\n        self.config_file = tempfile.NamedTemporaryFile(suffix='.example.ini',\n                                                       delete=False)\n        self.config_file.write(b'[DEFAULT]\\n'\n                               b'default: 45\\n'\n                               b'[bottle]\\n'\n                               b'port = 8080\\n'\n                               b'[ROOT]\\n'\n                               b'namespace.key = test\\n'\n                               b'[NameSpace.Section]\\n'\n                               b'sub.namespace.key = test2\\n'\n                               b'default = otherDefault\\n'\n                               b'[compression]\\n'\n                               b'status=single\\n')\n        self.config_file.flush()\n\n    @classmethod\n    def tearDownClass(self):\n        self.config_file.close()\n        os.unlink(self.config_file.name)\n\n    def test_load_config(self):\n        c = ConfigDict()\n        c.load_config(self.config_file.name)\n        self.assertDictEqual({\n            'compression.default': '45',\n            'compression.status': 'single',\n            'default': '45',\n            'namespace.key': 'test',\n            'namespace.section.default': 'otherDefault',\n            'namespace.section.sub.namespace.key': 'test2',\n            'port': '8080'}, c)\n"
  },
  {
    "path": "test/test_contextlocals.py",
    "content": "# -*- coding: utf-8 -*-\n'''\nSome objects are context-local, meaning that they have different values depending on the context they are accessed from. A context is currently defined as a thread.\n'''\n\nimport unittest\nimport bottle\nimport threading\n\n\ndef run_thread(func):\n    t = threading.Thread(target=func)\n    t.start()\n    t.join()\n\nclass TestThreadLocals(unittest.TestCase):\n    def test_request(self):\n        e1 = {'PATH_INFO': '/t1'}\n        e2 = {'PATH_INFO': '/t2'}\n\n        def run():\n            bottle.request.bind(e2)\n            self.assertEqual(bottle.request.path, '/t2')\n\n        bottle.request.bind(e1)\n        self.assertEqual(bottle.request.path, '/t1')\n        run_thread(run)\n        self.assertEqual(bottle.request.path, '/t1')\n\n    def test_response(self):\n\n        def run():\n            bottle.response.bind()\n            bottle.response.content_type='test/thread'\n            self.assertEqual(bottle.response.headers['Content-Type'], 'test/thread')\n\n        bottle.response.bind()\n        bottle.response.content_type='test/main'\n        self.assertEqual(bottle.response.headers['Content-Type'], 'test/main')\n        run_thread(run)\n        self.assertEqual(bottle.response.headers['Content-Type'], 'test/main')\n"
  },
  {
    "path": "test/test_environ.py",
    "content": "# -*- coding: utf-8 -*-\n''' Tests for the BaseRequest and BaseResponse objects and their subclasses. '''\n\nimport unittest\nimport sys\n\nimport itertools\n\nimport bottle\nfrom bottle import request, tob, touni, json_dumps, HTTPError, parse_date, CookieError\nfrom . import tools\nimport wsgiref.util\nimport base64\n\nfrom bottle import BaseRequest, BaseResponse, LocalRequest\n\n\nclass TestRequest(unittest.TestCase):\n\n    def test_app_property(self):\n        e = {}\n        r = BaseRequest(e)\n        self.assertRaises(RuntimeError, lambda: r.app)\n        e.update({'bottle.app': 5})\n        self.assertEqual(r.app, 5)\n\n    def test_route_property(self):\n        e = {'bottle.route': 5}\n        r = BaseRequest(e)\n        self.assertEqual(r.route, 5)\n\n    def test_url_for_property(self):\n        e = {}\n        r = BaseRequest(e)\n        self.assertRaises(RuntimeError, lambda: r.url_args)\n        e.update({'route.url_args': {'a': 5}})\n        self.assertEqual(r.url_args, {'a': 5})\n\n    def test_path(self):\n        \"\"\" PATH_INFO normalization. \"\"\"\n        # Legal paths\n        tests = [('', '/'), ('x','/x'), ('x/', '/x/'), ('/x', '/x'), ('/x/', '/x/')]\n        for raw, norm in tests:\n            self.assertEqual(norm, BaseRequest({'PATH_INFO': raw}).path)\n        # Strange paths\n        tests = [('///', '/'), ('//x','/x')]\n        for raw, norm in tests:\n            self.assertEqual(norm, BaseRequest({'PATH_INFO': raw}).path)\n        # No path at all\n        self.assertEqual('/', BaseRequest({}).path)\n\n    def test_method(self):\n        self.assertEqual(BaseRequest({}).method, 'GET')\n        self.assertEqual(BaseRequest({'REQUEST_METHOD':'GET'}).method, 'GET')\n        self.assertEqual(BaseRequest({'REQUEST_METHOD':'GeT'}).method, 'GET')\n        self.assertEqual(BaseRequest({'REQUEST_METHOD':'get'}).method, 'GET')\n        self.assertEqual(BaseRequest({'REQUEST_METHOD':'POst'}).method, 'POST')\n        self.assertEqual(BaseRequest({'REQUEST_METHOD':'FanTASY'}).method, 'FANTASY')\n\n    def test_script_name(self):\n        \"\"\" SCRIPT_NAME normalization. \"\"\"\n        # Legal paths\n        tests = [('', '/'), ('x','/x/'), ('x/', '/x/'), ('/x', '/x/'), ('/x/', '/x/')]\n        for raw, norm in tests:\n            self.assertEqual(norm, BaseRequest({'SCRIPT_NAME': raw}).script_name)\n        # Strange paths\n        tests = [('///', '/'), ('///x///','/x/')]\n        for raw, norm in tests:\n            self.assertEqual(norm, BaseRequest({'SCRIPT_NAME': raw}).script_name)\n        # No path at all\n        self.assertEqual('/', BaseRequest({}).script_name)\n\n    def test_pathshift(self):\n        \"\"\" Request.path_shift() \"\"\"\n        def test_shift(s, p, c):\n            request = BaseRequest({'SCRIPT_NAME': s, 'PATH_INFO': p})\n            request.path_shift(c)\n            return [request['SCRIPT_NAME'], request.path]\n        self.assertEqual(['/a/b', '/c/d'], test_shift('/a/b', '/c/d', 0))\n        self.assertEqual(['/a/b', '/c/d/'], test_shift('/a/b', '/c/d/', 0))\n        self.assertEqual(['/a/b/c', '/d'], test_shift('/a/b', '/c/d', 1))\n        self.assertEqual(['/a', '/b/c/d'], test_shift('/a/b', '/c/d', -1))\n        self.assertEqual(['/a/b/c', '/d/'], test_shift('/a/b', '/c/d/', 1))\n        self.assertEqual(['/a', '/b/c/d/'], test_shift('/a/b', '/c/d/', -1))\n        self.assertEqual(['/a/b/c', '/d/'], test_shift('/a/b/', '/c/d/', 1))\n        self.assertEqual(['/a', '/b/c/d/'], test_shift('/a/b/', '/c/d/', -1))\n        self.assertEqual(['/a/b/c/d', '/'], test_shift('/', '/a/b/c/d', 4))\n        self.assertEqual(['/', '/a/b/c/d/'], test_shift('/a/b/c/d', '/', -4))\n        self.assertRaises(AssertionError, test_shift, '/a/b', '/c/d', 3)\n        self.assertRaises(AssertionError, test_shift, '/a/b', '/c/d', -3)\n\n    def test_url(self):\n        \"\"\" Environ: URL building \"\"\"\n        request = BaseRequest({'HTTP_HOST':'example.com'})\n        self.assertEqual('http://example.com/', request.url)\n        request = BaseRequest({'SERVER_NAME':'example.com'})\n        self.assertEqual('http://example.com/', request.url)\n        request = BaseRequest({'SERVER_NAME':'example.com', 'SERVER_PORT':'81'})\n        self.assertEqual('http://example.com:81/', request.url)\n        request = BaseRequest({'wsgi.url_scheme':'https', 'SERVER_NAME':'example.com'})\n        self.assertEqual('https://example.com/', request.url)\n        request = BaseRequest({'HTTP_HOST':'example.com', 'PATH_INFO':'/path',\n                               'QUERY_STRING':'1=b&c=d', 'SCRIPT_NAME':'/sp'})\n        self.assertEqual('http://example.com/sp/path?1=b&c=d', request.url)\n        request = BaseRequest({'HTTP_HOST':'example.com', 'PATH_INFO':'/pa th',\n                               'SCRIPT_NAME':'/s p'})\n        self.assertEqual('http://example.com/s%20p/pa%20th', request.url)\n\n    def test_dict_access(self):\n        \"\"\" Environ: request objects are environment dicts \"\"\"\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        request = BaseRequest(e)\n        self.assertEqual(list(request), list(e.keys()))\n        self.assertEqual(len(request), len(e))\n        for k, v in e.items():\n            self.assertTrue(k in request)\n            self.assertEqual(request[k], v)\n            request[k] = 'test'\n            self.assertEqual(request[k], 'test')\n        del request['PATH_INFO']\n        self.assertTrue('PATH_INFO' not in request)\n\n    def test_readonly_environ(self):\n        request = BaseRequest({'bottle.request.readonly':True})\n        def test(): request['x']='y'\n        self.assertRaises(KeyError, test)\n\n    def test_header_access(self):\n        \"\"\" Environ: Request objects decode headers \"\"\"\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['HTTP_SOME_HEADER'] = 'some value'\n        request = BaseRequest(e)\n        request['HTTP_SOME_OTHER_HEADER'] = 'some other value'\n        self.assertTrue('Some-Header' in request.headers)\n        self.assertTrue(request.headers['Some-Header'] == 'some value')\n        self.assertTrue(request.headers['Some-Other-Header'] == 'some other value')\n\n    def test_header_access_special(self):\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        request = BaseRequest(e)\n        request['CONTENT_TYPE'] = 'test'\n        request['CONTENT_LENGTH'] = '123'\n        self.assertEqual(request.headers['Content-Type'], 'test')\n        self.assertEqual(request.headers['Content-Length'], '123')\n\n    def test_cookie_dict(self):\n        \"\"\" Environ: Cookie dict \"\"\"\n        t = dict()\n        t['a=a']      = {'a': 'a'}\n        t['a=a; b=b'] = {'a': 'a', 'b':'b'}\n        t['a=a; a=b'] = {'a': 'b'}\n        for k, v in t.items():\n            request = BaseRequest({'HTTP_COOKIE': k})\n            for n in v:\n                self.assertEqual(v[n], request.cookies[n])\n                self.assertEqual(v[n], request.get_cookie(n))\n\n    def test_get(self):\n        \"\"\" Environ: GET data \"\"\"\n        qs = touni(tob('a=a&a=1&b=b&c=c&cn=%e7%93%b6'), 'latin1')\n        request = BaseRequest({'QUERY_STRING':qs})\n        self.assertTrue('a' in request.query)\n        self.assertTrue('b' in request.query)\n        self.assertEqual(['a','1'], request.query.getall('a'))\n        self.assertEqual(['b'], request.query.getall('b'))\n        self.assertEqual('1', request.query['a'])\n        self.assertEqual('b', request.query['b'])\n        self.assertEqual('瓶', request.query['cn'])\n        self.assertEqual('瓶', request.query.cn)\n\n    def test_post(self):\n        \"\"\" Environ: POST data \"\"\"\n        sq = tob('a=a&a=1&b=b&c=&d&cn=%e7%93%b6')\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(sq)\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = str(len(sq))\n        e['REQUEST_METHOD'] = \"POST\"\n        request = BaseRequest(e)\n        self.assertTrue('a' in request.POST)\n        self.assertTrue('b' in request.POST)\n        self.assertEqual(['a','1'], request.POST.getall('a'))\n        self.assertEqual(['b'], request.POST.getall('b'))\n        self.assertEqual('1', request.POST['a'])\n        self.assertEqual('b', request.POST['b'])\n        self.assertEqual('', request.POST['c'])\n        self.assertEqual('', request.POST['d'])\n        self.assertEqual('瓶', request.POST['cn'])\n        self.assertEqual('瓶', request.POST.cn)\n\n    def test_bodypost(self):\n        sq = tob('foobar')\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(sq)\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = str(len(sq))\n        e['REQUEST_METHOD'] = \"POST\"\n        request = BaseRequest(e)\n        self.assertEqual('', request.POST['foobar'])\n\n    def test_body_noclose(self):\n        \"\"\" Test that the body file handler is not closed after request.POST \"\"\"\n        sq = tob('a=a&a=1&b=b&c=&d')\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(sq)\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = str(len(sq))\n        e['REQUEST_METHOD'] = \"POST\"\n        request = BaseRequest(e)\n        self.assertEqual(sq, request.body.read())\n        request.POST # This caused a body.close() with Python 3.x\n        self.assertEqual(sq, request.body.read())\n\n    def test_params(self):\n        \"\"\" Environ: GET and POST are combined in request.param \"\"\"\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(tob('b=b&c=p'))\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = '7'\n        e['QUERY_STRING'] = 'a=a&c=g'\n        e['REQUEST_METHOD'] = \"POST\"\n        request = BaseRequest(e)\n        self.assertEqual(['a','b','c'], sorted(request.params.keys()))\n        self.assertEqual('p', request.params['c'])\n\n    def test_getpostleak(self):\n        \"\"\" Environ: GET and POST should not leak into each other \"\"\"\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(tob('b=b'))\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = '3'\n        e['QUERY_STRING'] = 'a=a'\n        e['REQUEST_METHOD'] = \"POST\"\n        request = BaseRequest(e)\n        self.assertEqual(['a'], list(request.GET.keys()))\n        self.assertEqual(['b'], list(request.POST.keys()))\n\n    def test_body(self):\n        \"\"\" Environ: Request.body should behave like a file object factory \"\"\"\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(tob('abc'))\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = str(3)\n        request = BaseRequest(e)\n        self.assertEqual(tob('abc'), request.body.read())\n        self.assertEqual(tob('abc'), request.body.read(3))\n        self.assertEqual(tob('abc'), request.body.readline())\n        self.assertEqual(tob('abc'), request.body.readline(3))\n\n    def test_bigbody(self):\n        \"\"\" Environ: Request.body should handle big uploads using files \"\"\"\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(tob('x')*1024*1000)\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = str(1024*1000)\n        request = BaseRequest(e)\n        self.assertTrue(hasattr(request.body, 'fileno'))\n        self.assertEqual(1024*1000, len(request.body.read()))\n        self.assertEqual(1024, len(request.body.read(1024)))\n        self.assertEqual(1024*1000, len(request.body.readline()))\n        self.assertEqual(1024, len(request.body.readline(1024)))\n\n    def test_tobigbody(self):\n        \"\"\" Environ: Request.body should truncate to Content-Length bytes \"\"\"\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(tob('x')*1024)\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = '42'\n        request = BaseRequest(e)\n        self.assertEqual(42, len(request.body.read()))\n        self.assertEqual(42, len(request.body.read(1024)))\n        self.assertEqual(42, len(request.body.readline()))\n        self.assertEqual(42, len(request.body.readline(1024)))\n\n    def _test_chunked(self, body, expect):\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(tob(body))\n        e['wsgi.input'].seek(0)\n        e['HTTP_TRANSFER_ENCODING'] = 'chunked'\n        if isinstance(expect, str):\n            self.assertEqual(tob(expect), BaseRequest(e).body.read())\n        else:\n            self.assertRaises(expect, lambda: BaseRequest(e).body)\n\n    def test_chunked(self):\n        self._test_chunked('1\\r\\nx\\r\\nff\\r\\n' + 'y'*255 + '\\r\\n0\\r\\n',\n                           'x' + 'y'*255)\n        self._test_chunked('8\\r\\nxxxxxxxx\\r\\n0\\r\\n','xxxxxxxx')\n        self._test_chunked('0\\r\\n', '')\n\n    def test_chunked_meta_fields(self):\n        self._test_chunked('8 ; foo\\r\\nxxxxxxxx\\r\\n0\\r\\n','xxxxxxxx')\n        self._test_chunked('8;foo\\r\\nxxxxxxxx\\r\\n0\\r\\n','xxxxxxxx')\n        self._test_chunked('8;foo=bar\\r\\nxxxxxxxx\\r\\n0\\r\\n','xxxxxxxx')\n\n    def test_chunked_not_terminated(self):\n        self._test_chunked('1\\r\\nx\\r\\n', HTTPError)\n\n    def test_chunked_wrong_size(self):\n        self._test_chunked('2\\r\\nx\\r\\n', HTTPError)\n\n    def test_chunked_illegal_size(self):\n        self._test_chunked('x\\r\\nx\\r\\n', HTTPError)\n\n    def test_chunked_not_chunked_at_all(self):\n        self._test_chunked('abcdef', HTTPError)\n\n    def test_multipart(self):\n        \"\"\" Environ: POST (multipart files and multible values per key) \"\"\"\n        fields = [('field1','value1'), ('field2','value2'), ('field2','万难')]\n        files = [('file1','filename1.txt','content1'), ('万难','万难foo.py', 'ä\\nö\\rü')]\n        e = tools.multipart_environ(fields=fields, files=files)\n        request = BaseRequest(e)\n        # File content\n        self.assertTrue('file1' in request.POST)\n        self.assertTrue('file1' in request.files)\n        self.assertTrue('file1' not in request.forms)\n        cmp = tob('content1') if sys.version_info >= (3,2,0) else 'content1'\n        self.assertEqual(cmp, request.POST['file1'].file.read())\n        # File name and meta data\n        self.assertTrue('万难' in request.POST)\n        self.assertTrue('万难' in request.files)\n        self.assertTrue('万难' not in request.forms)\n        self.assertEqual('foo.py', request.POST['万难'].filename)\n        self.assertTrue(request.files['万难'])\n        self.assertFalse(request.files.file77)\n        # UTF-8 files\n        x = request.POST['万难'].file.read()\n        if (3,2,0) > sys.version_info >= (3,0,0):\n            x = x.encode('utf8')\n        self.assertEqual(tob('ä\\nö\\rü'), x)\n        # No file\n        self.assertTrue('file3' not in request.POST)\n        self.assertTrue('file3' not in request.files)\n        self.assertTrue('file3' not in request.forms)\n        # Field (single)\n        self.assertEqual('value1', request.POST['field1'])\n        self.assertTrue('field1' not in request.files)\n        self.assertEqual('value1', request.forms['field1'])\n        self.assertEqual('万难', request.forms['field2'])\n        self.assertEqual(touni('万难'), request.forms.field2)\n        # Field (multi)\n        self.assertEqual(2, len(request.POST.getall('field2')))\n        self.assertEqual(['value2', '万难'], request.POST.getall('field2'))\n        self.assertEqual(['value2', '万难'], request.forms.getall('field2'))\n        self.assertTrue('field2' not in request.files)\n\n    def test_json_empty(self):\n        \"\"\" Environ: Request.json property with empty body. \"\"\"\n        self.assertEqual(BaseRequest({}).json, None)\n\n    def test_json_noheader(self):\n        \"\"\" Environ: Request.json property with missing content-type header. \"\"\"\n        test = dict(a=5, b='test', c=[1,2,3])\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(tob(json_dumps(test)))\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = str(len(json_dumps(test)))\n        self.assertEqual(BaseRequest(e).json, None)\n\n    def test_json_tobig(self):\n        \"\"\" Environ: Request.json property with huge body. \"\"\"\n        test = dict(a=5, tobig='x' * bottle.BaseRequest.MEMFILE_MAX)\n        e = {'CONTENT_TYPE': 'application/json'}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(tob(json_dumps(test)))\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = str(len(json_dumps(test)))\n        self.assertRaises(HTTPError, lambda: BaseRequest(e).json)\n\n    def test_json_valid(self):\n        \"\"\" Environ: Request.json property. \"\"\"\n        test = dict(a=5, b='test', c=[1,2,3])\n        e = {'CONTENT_TYPE': 'application/json; charset=UTF-8'}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(tob(json_dumps(test)))\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = str(len(json_dumps(test)))\n        self.assertEqual(BaseRequest(e).json, test)\n\n    def test_json_forged_header_issue616(self):\n        test = dict(a=5, b='test', c=[1,2,3])\n        e = {'CONTENT_TYPE': 'text/plain;application/json'}\n        wsgiref.util.setup_testing_defaults(e)\n        e['wsgi.input'].write(tob(json_dumps(test)))\n        e['wsgi.input'].seek(0)\n        e['CONTENT_LENGTH'] = str(len(json_dumps(test)))\n        self.assertEqual(BaseRequest(e).json, None)\n\n    def test_json_header_empty_body(self):\n        \"\"\"Request Content-Type is application/json but body is empty\"\"\"\n        e = {'CONTENT_TYPE': 'application/json'}\n        wsgiref.util.setup_testing_defaults(e)\n        wsgiref.util.setup_testing_defaults(e)\n        e['CONTENT_LENGTH'] = \"0\"\n        self.assertEqual(BaseRequest(e).json, None)\n\n    def test_isajax(self):\n        e = {}\n        wsgiref.util.setup_testing_defaults(e)\n        self.assertFalse(BaseRequest(e.copy()).is_ajax)\n        e['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'\n        self.assertTrue(BaseRequest(e.copy()).is_ajax)\n\n    def test_auth(self):\n        user, pwd = 'marc', 'secret'\n        basic = touni(base64.b64encode(tob('%s:%s' % (user, pwd))))\n        r = BaseRequest({})\n        self.assertEqual(r.auth, None)\n        r.environ['HTTP_AUTHORIZATION'] = 'basic %s' % basic\n        self.assertEqual(r.auth, (user, pwd))\n        r.environ['REMOTE_USER'] = user\n        self.assertEqual(r.auth, (user, pwd))\n        del r.environ['HTTP_AUTHORIZATION']\n        self.assertEqual(r.auth, (user, None))\n\n    def test_remote_route(self):\n        ips = ['1.2.3.4', '2.3.4.5', '3.4.5.6']\n        r = BaseRequest({})\n        self.assertEqual(r.remote_route, [])\n        r.environ['HTTP_X_FORWARDED_FOR'] = ', '.join(ips)\n        self.assertEqual(r.remote_route, ips)\n        r.environ['REMOTE_ADDR'] = ips[1]\n        self.assertEqual(r.remote_route, ips)\n        del r.environ['HTTP_X_FORWARDED_FOR']\n        self.assertEqual(r.remote_route, [ips[1]])\n\n    def test_remote_addr(self):\n        ips = ['1.2.3.4', '2.3.4.5', '3.4.5.6']\n        r = BaseRequest({})\n        self.assertEqual(r.remote_addr, None)\n        r.environ['HTTP_X_FORWARDED_FOR'] = ', '.join(ips)\n        self.assertEqual(r.remote_addr, ips[0])\n        r.environ['REMOTE_ADDR'] = ips[1]\n        self.assertEqual(r.remote_addr, ips[0])\n        del r.environ['HTTP_X_FORWARDED_FOR']\n        self.assertEqual(r.remote_addr, ips[1])\n\n    def test_user_defined_attributes(self):\n        for cls in (BaseRequest, LocalRequest):\n            r = cls()\n\n            # New attributes go to the environ dict.\n            r.foo = 'somevalue'\n            self.assertEqual(r.foo, 'somevalue')\n            self.assertTrue('somevalue' in r.environ.values())\n\n            # Attributes are read-only once set.\n            self.assertRaises(AttributeError, setattr, r, 'foo', 'x')\n\n            # Properties raise AttributeError.\n            self.assertRaises(AttributeError, setattr, r, 'body', 'x')\n\n            # Unknown attributes raise AttributeError.\n            self.assertRaises(AttributeError, getattr, r, 'somevalue')\n\n\nclass TestResponse(unittest.TestCase):\n\n    def test_constructor_body(self):\n        self.assertEqual('',\n            BaseResponse('').body)\n\n        self.assertEqual('YAY',\n            BaseResponse('YAY').body)\n\n    def test_constructor_status(self):\n        self.assertEqual(200,\n            BaseResponse('YAY', 200).status_code)\n\n        self.assertEqual('200 OK',\n            BaseResponse('YAY', 200).status_line)\n\n        self.assertEqual('200 YAY',\n            BaseResponse('YAY', '200 YAY').status_line)\n\n        self.assertEqual('200 YAY',\n            BaseResponse('YAY', '200 YAY').status_line)\n\n    def test_constructor_headerlist(self):\n        from functools import partial\n        make_res = partial(BaseResponse, '', 200)\n\n        self.assertEqual('yay', make_res(x_test='yay')['x-test'])\n\n    def test_wsgi_header_values(self):\n        def cmp(app, wire):\n            rs = BaseResponse()\n            rs.set_header('x-test', app)\n            result = [v for (h, v) in rs.headerlist if h.lower()=='x-test'][0]\n            self.assertEqual(wire, result)\n\n        cmp(1, touni('1', 'latin1'))\n        cmp('öäü', 'öäü'.encode('utf8').decode('latin1'))\n        # Dropped byte header support in Python 3:\n        #cmp(tob('äöü'), 'äöü'.encode('utf8').decode('latin1'))\n\n\n    def test_set_status(self):\n        rs = BaseResponse()\n\n        rs.status = 200\n        self.assertEqual(rs.status, rs.status_line)\n        self.assertEqual(rs.status_code, 200)\n        self.assertEqual(rs.status_line, '200 OK')\n\n        rs.status = 999\n        self.assertEqual(rs.status, rs.status_line)\n        self.assertEqual(rs.status_code, 999)\n        self.assertEqual(rs.status_line, '999 Unknown')\n\n        rs.status = 404\n        self.assertEqual(rs.status, rs.status_line)\n        self.assertEqual(rs.status_code, 404)\n        self.assertEqual(rs.status_line, '404 Not Found')\n\n        def test(): rs.status = -200\n        self.assertRaises(ValueError, test)\n        self.assertEqual(rs.status, rs.status_line) # last value\n        self.assertEqual(rs.status_code, 404) # last value\n        self.assertEqual(rs.status_line, '404 Not Found') # last value\n\n        def test(): rs.status = 5\n        self.assertRaises(ValueError, test)\n        self.assertEqual(rs.status, rs.status_line) # last value\n        self.assertEqual(rs.status_code, 404) # last value\n        self.assertEqual(rs.status_line, '404 Not Found') # last value\n\n        rs.status = '999 Who knows?' # Illegal, but acceptable three digit code\n        self.assertEqual(rs.status, rs.status_line)\n        self.assertEqual(rs.status_code, 999)\n        self.assertEqual(rs.status_line, '999 Who knows?')\n\n        rs.status = 555 # Strange code\n        self.assertEqual(rs.status, rs.status_line)\n        self.assertEqual(rs.status_code, 555)\n        self.assertEqual(rs.status_line, '555 Unknown')\n\n        rs.status = '404 Brain not Found' # Custom reason\n        self.assertEqual(rs.status, rs.status_line)\n        self.assertEqual(rs.status_code, 404)\n        self.assertEqual(rs.status_line, '404 Brain not Found')\n\n        def test(): rs.status = '5 Illegal Code'\n        self.assertRaises(ValueError, test)\n        self.assertEqual(rs.status, rs.status_line) # last value\n        self.assertEqual(rs.status_code, 404) # last value\n        self.assertEqual(rs.status_line, '404 Brain not Found') # last value\n\n        def test(): rs.status = '-99 Illegal Code'\n        self.assertRaises(ValueError, test)\n        self.assertEqual(rs.status, rs.status_line) # last value\n        self.assertEqual(rs.status_code, 404) # last value\n        self.assertEqual(rs.status_line, '404 Brain not Found') # last value\n\n        def test(): rs.status = '1000 Illegal Code'\n        self.assertRaises(ValueError, test)\n        self.assertEqual(rs.status, rs.status_line) # last value\n        self.assertEqual(rs.status_code, 404) # last value\n        self.assertEqual(rs.status_line, '404 Brain not Found') # last value\n\n        def test(): rs.status = '555' # No reason\n        self.assertRaises(ValueError, test)\n        self.assertEqual(rs.status, rs.status_line) # last value\n        self.assertEqual(rs.status_code, 404) # last value\n        self.assertEqual(rs.status_line, '404 Brain not Found') # last value\n\n        # Unicode in status line (thanks RFC7230 :/)\n        rs.status = '400 Non-ASÎÎ'\n        self.assertEqual(rs.status, rs.status_line)\n        self.assertEqual(rs.status_code, 400)\n        wire = rs._wsgi_status_line().encode('latin1')\n        self.assertEqual(rs.status, wire.decode('utf8'))\n\n    def test_content_type(self):\n        rs = BaseResponse()\n        rs.content_type = 'test/some'\n        self.assertEqual('test/some', rs.headers.get('Content-Type'))\n\n    def test_charset(self):\n        rs = BaseResponse()\n        self.assertEqual(rs.charset, 'UTF-8')\n        rs.content_type = 'text/html; charset=latin9'\n        self.assertEqual(rs.charset, 'latin9')\n        rs.content_type = 'text/html'\n        self.assertEqual(rs.charset, 'UTF-8')\n\n    def test_set_cookie(self):\n        r = BaseResponse()\n        r.set_cookie('name1', 'value', max_age=5)\n        r.set_cookie('name2', 'value 2', path='/foo')\n        cookies = [value for name, value in r.headerlist\n                   if name.title() == 'Set-Cookie']\n        cookies.sort()\n        self.assertEqual(cookies[0], 'name1=value; Max-Age=5')\n        self.assertEqual(cookies[1], 'name2=\"value 2\"; Path=/foo')\n\n    def test_set_cookie_value_long_string(self):\n        r = BaseResponse()\n        self.assertRaises(ValueError, r.set_cookie, name='test', value='x' * 4097)\n\n    def test_set_cookie_name_long_string(self):\n        r = BaseResponse()\n        self.assertRaises(ValueError, r.set_cookie, name='x' * 4097, value='simple_value')\n\n    def test_set_cookie_maxage(self):\n        import datetime\n        r = BaseResponse()\n        r.set_cookie('name1', 'value', max_age=5)\n        r.set_cookie('name2', 'value', max_age=datetime.timedelta(days=1))\n        cookies = sorted([value for name, value in r.headerlist\n                   if name.title() == 'Set-Cookie'])\n        self.assertEqual(cookies[0], 'name1=value; Max-Age=5')\n        self.assertEqual(cookies[1], 'name2=value; Max-Age=86400')\n\n    def test_set_cookie_expires(self):\n        import datetime\n        r = BaseResponse()\n        r.set_cookie('name1', 'value', expires=42)\n        r.set_cookie('name2', 'value', expires=datetime.datetime(1970,1,1,0,0,43))\n        cookies = sorted([value for name, value in r.headerlist\n                   if name.title() == 'Set-Cookie'])\n        self.assertEqual(cookies[0], 'name1=value; expires=Thu, 01 Jan 1970 00:00:42 GMT')\n        self.assertEqual(cookies[1], 'name2=value; expires=Thu, 01 Jan 1970 00:00:43 GMT')\n\n    def test_set_cookie_secure(self):\n        r = BaseResponse()\n        r.set_cookie('name1', 'value', secure=True)\n        r.set_cookie('name2', 'value', secure=False)\n        cookies = sorted([value for name, value in r.headerlist\n                   if name.title() == 'Set-Cookie'])\n        self.assertEqual(cookies[0].lower(), 'name1=value; secure')\n        self.assertEqual(cookies[1], 'name2=value')\n\n    def test_set_cookie_httponly(self):\n        if sys.version_info < (2,6,0):\n            return\n        r = BaseResponse()\n        r.set_cookie('name1', 'value', httponly=True)\n        r.set_cookie('name2', 'value', httponly=False)\n        cookies = sorted([value for name, value in r.headerlist\n                   if name.title() == 'Set-Cookie'])\n        self.assertEqual('name1=value; httponly', cookies[0].lower())\n        self.assertEqual('name2=value', cookies[1])\n\n    def test_set_cookie_samesite(self):\n        r = BaseResponse()\n        r.set_cookie('name1', 'value', same_site=\"lax\")\n        r.set_cookie('name2', 'value', same_site=\"strict\")\n\n        try:\n            r.set_cookie('name3', 'value', same_site='invalid')\n            self.fail(\"Should raise CookieError\")\n        except CookieError:\n            pass\n\n        cookies = sorted([value for name, value in r.headerlist\n                   if name.title() == 'Set-Cookie'])\n        self.assertEqual('name1=value; samesite=lax', cookies[0].lower())\n        self.assertEqual('name2=value; samesite=strict', cookies[1].lower())\n\n    def test_clone_cookie(self):\n        r = BaseResponse()\n        r.set_cookie('name1', 'value', same_site=\"strict\")\n        r2 = r.copy(BaseResponse)\n        cookies = sorted([value for name, value in r2.headerlist\n                   if name.title() == 'Set-Cookie'])\n        self.assertEqual('name1=value; samesite=strict', cookies[0].lower())\n\n    def test_delete_cookie(self):\n        response = BaseResponse()\n        response.set_cookie('name', 'value')\n        response.delete_cookie('name')\n        cookies = [value for name, value in response.headerlist\n                   if name.title() == 'Set-Cookie']\n        self.assertTrue('Max-Age=-1' in cookies[0])\n\n    def test_set_header(self):\n        response = BaseResponse()\n        response['x-test'] = 'foo'\n        headers = [value for name, value in response.headerlist\n                   if name.title() == 'X-Test']\n        self.assertEqual(['foo'], headers)\n        self.assertEqual('foo', response['x-test'])\n\n        response['X-Test'] = 'bar'\n        headers = [value for name, value in response.headerlist\n                   if name.title() == 'X-Test']\n        self.assertEqual(['bar'], headers)\n        self.assertEqual('bar', response['x-test'])\n\n    def test_append_header(self):\n        response = BaseResponse()\n        response.set_header('x-test', 'foo')\n        headers = [value for name, value in response.headerlist\n                   if name.title() == 'X-Test']\n        self.assertEqual(['foo'], headers)\n        self.assertEqual('foo', response['x-test'])\n\n        response.add_header('X-Test', 'bar')\n        headers = [value for name, value in response.headerlist\n                   if name.title() == 'X-Test']\n        self.assertEqual(['foo', 'bar'], headers)\n        self.assertEqual('bar', response['x-test'])\n\n    def test_delete_header(self):\n        response = BaseResponse()\n        response['x-test'] = 'foo'\n        self.assertEqual('foo', response['x-test'])\n        del response['X-tESt']\n        self.assertRaises(KeyError, lambda: response['x-test'])\n\n    def test_non_string_header(self):\n        response = BaseResponse()\n        response['x-test'] = 5\n        self.assertEqual('5', response['x-test'])\n        response['x-test'] = None\n        self.assertEqual('', response['x-test'])\n        response['x-test'] = touni('瓶')\n        self.assertEqual(touni('瓶'), response['x-test'])\n\n    def test_prevent_control_characters_in_headers(self):\n        masks = '{}test', 'test{}', 'te{}st'\n        tests = '\\n', '\\r', '\\n\\r', '\\0'\n\n        # Test HeaderDict\n        apis = 'append', 'replace', '__setitem__', 'setdefault'\n        for api, mask, test in itertools.product(apis, masks, tests):\n            hd = bottle.HeaderDict()\n            func = getattr(hd, api)\n            value = mask.replace(\"{}\", test)\n            self.assertRaises(ValueError, func, value, \"test-value\")\n            self.assertRaises(ValueError, func, \"test-name\", value)\n\n        # Test functions on BaseResponse\n        apis = 'add_header', 'set_header', '__setitem__'\n        for api, mask, test in itertools.product(apis, masks, tests):\n            rs = bottle.BaseResponse()\n            func = getattr(rs, api)\n            value = mask.replace(\"{}\", test)\n            self.assertRaises(ValueError, func, value, \"test-value\")\n            self.assertRaises(ValueError, func, \"test-name\", value)\n\n    def test_expires_header(self):\n        import datetime\n        from bottle import UTC\n        response = BaseResponse()\n        now = datetime.datetime.now(UTC)\n        response.expires = now\n\n        def seconds(a, b):\n            td = max(a,b) - min(a,b)\n            return td.days*360*24 + td.seconds\n\n        self.assertEqual(0, seconds(response.expires, now))\n        now2 = datetime.datetime.fromtimestamp(\n            parse_date(response.headers['Expires']), tz=UTC)\n        self.assertEqual(0, seconds(now, now2))\n\n\nclass TestRedirect(unittest.TestCase):\n\n    def assertRedirect(self, target, result, query=None, status=303, **args):\n        env = {'SERVER_PROTOCOL': 'HTTP/1.1'}\n        for key in list(args):\n            if key.startswith('wsgi'):\n                args[key.replace('_', '.', 1)] = args[key]\n                del args[key]\n        env.update(args)\n        request.bind(env)\n        bottle.response.bind()\n        try:\n            bottle.redirect(target, **(query or {}))\n        except bottle.HTTPResponse as E:\n            self.assertEqual(status, E.status_code)\n            self.assertTrue(E.headers)\n            self.assertEqual(result, E.headers['Location'])\n\n    def test_absolute_path(self):\n        self.assertRedirect('/', 'http://127.0.0.1/')\n        self.assertRedirect('/test.html', 'http://127.0.0.1/test.html')\n        self.assertRedirect('/test.html', 'http://127.0.0.1/test.html',\n                            PATH_INFO='/some/sub/path/')\n        self.assertRedirect('/test.html', 'http://127.0.0.1/test.html',\n                            PATH_INFO='/some/sub/file.html')\n        self.assertRedirect('/test.html', 'http://127.0.0.1/test.html',\n                            SCRIPT_NAME='/some/sub/path/')\n        self.assertRedirect('/foo/test.html', 'http://127.0.0.1/foo/test.html')\n        self.assertRedirect('/foo/test.html', 'http://127.0.0.1/foo/test.html',\n                            PATH_INFO='/some/sub/file.html')\n\n    def test_relative_path(self):\n        self.assertRedirect('./', 'http://127.0.0.1/')\n        self.assertRedirect('./test.html', 'http://127.0.0.1/test.html')\n        self.assertRedirect('./test.html', 'http://127.0.0.1/foo/test.html',\n                            PATH_INFO='/foo/')\n        self.assertRedirect('./test.html', 'http://127.0.0.1/foo/test.html',\n                            PATH_INFO='/foo/bar.html')\n        self.assertRedirect('./test.html', 'http://127.0.0.1/foo/test.html',\n                            SCRIPT_NAME='/foo/')\n        self.assertRedirect('./test.html', 'http://127.0.0.1/foo/bar/test.html',\n                            SCRIPT_NAME='/foo/', PATH_INFO='/bar/baz.html')\n        self.assertRedirect('./foo/test.html', 'http://127.0.0.1/foo/test.html')\n        self.assertRedirect('./foo/test.html', 'http://127.0.0.1/bar/foo/test.html',\n                            PATH_INFO='/bar/file.html')\n        self.assertRedirect('../test.html', 'http://127.0.0.1/test.html',\n                            PATH_INFO='/foo/')\n        self.assertRedirect('../test.html', 'http://127.0.0.1/foo/test.html',\n                            PATH_INFO='/foo/bar/')\n        self.assertRedirect('../test.html', 'http://127.0.0.1/test.html',\n                            PATH_INFO='/foo/bar.html')\n        self.assertRedirect('../test.html', 'http://127.0.0.1/test.html',\n                            SCRIPT_NAME='/foo/')\n        self.assertRedirect('../test.html', 'http://127.0.0.1/foo/test.html',\n                            SCRIPT_NAME='/foo/', PATH_INFO='/bar/baz.html')\n        self.assertRedirect('../baz/../test.html', 'http://127.0.0.1/foo/test.html',\n                            PATH_INFO='/foo/bar/')\n\n    def test_sheme(self):\n        self.assertRedirect('./test.html', 'https://127.0.0.1/test.html',\n                            wsgi_url_scheme='https')\n        self.assertRedirect('./test.html', 'https://127.0.0.1:80/test.html',\n                            wsgi_url_scheme='https', SERVER_PORT='80')\n\n    def test_host_http_1_0(self):\n        # No HTTP_HOST, just SERVER_NAME and SERVER_PORT.\n        self.assertRedirect('./test.html', 'http://example.com/test.html',\n                            SERVER_NAME='example.com',\n                            SERVER_PROTOCOL='HTTP/1.0', status=302)\n        self.assertRedirect('./test.html', 'http://127.0.0.1:81/test.html',\n                            SERVER_PORT='81',\n                            SERVER_PROTOCOL='HTTP/1.0', status=302)\n\n    def test_host_http_1_1(self):\n        self.assertRedirect('./test.html', 'http://example.com/test.html',\n                            HTTP_HOST='example.com')\n        self.assertRedirect('./test.html', 'http://example.com:81/test.html',\n                            HTTP_HOST='example.com:81')\n        # Trust HTTP_HOST over SERVER_NAME and PORT.\n        self.assertRedirect('./test.html', 'http://example.com:81/test.html',\n                            HTTP_HOST='example.com:81', SERVER_NAME='foobar')\n        self.assertRedirect('./test.html', 'http://example.com:81/test.html',\n                            HTTP_HOST='example.com:81', SERVER_PORT='80')\n\n    def test_host_http_proxy(self):\n        # Trust proxy headers over original header.\n        self.assertRedirect('./test.html', 'http://example.com/test.html',\n                            HTTP_X_FORWARDED_HOST='example.com',\n                            HTTP_HOST='127.0.0.1')\n\n    def test_specialchars(self):\n        ''' The target URL is not quoted automatically. '''\n        self.assertRedirect('./te st.html',\n                            'http://example.com/a%20a/b%20b/te st.html',\n                            HTTP_HOST='example.com', SCRIPT_NAME='/a a/', PATH_INFO='/b b/')\n\n    def test_redirect_preserve_cookies(self):\n        env = {'SERVER_PROTOCOL':'HTTP/1.1'}\n        request.bind(env)\n        bottle.response.bind()\n        try:\n            bottle.response.set_cookie('xxx', 'yyy')\n            bottle.redirect('...')\n        except bottle.HTTPResponse as E:\n            h = [v for (k, v) in E.headerlist if k == 'Set-Cookie']\n            self.assertEqual(h, ['xxx=yyy'])\n\nclass TestWSGIHeaderDict(unittest.TestCase):\n    def setUp(self):\n        self.env = {}\n        self.headers = bottle.WSGIHeaderDict(self.env)\n\n    def test_empty(self):\n        self.assertEqual(0, len(bottle.WSGIHeaderDict({})))\n\n    def test_native(self):\n        self.env['HTTP_TEST_HEADER'] = 'foobar'\n        self.assertEqual(self.headers['Test-header'], 'foobar')\n\n    def test_unicode(self):\n        self.env['HTTP_TEST_HEADER'] = touni('foobar')\n        self.assertEqual(self.headers['Test-Header'], 'foobar')\n\n    def test_dict(self):\n        for key in 'foo-bar Foo-Bar foo-Bar FOO-BAR'.split():\n            self.assertTrue(key not in self.headers)\n            self.assertEqual(self.headers.get(key), None)\n            self.assertEqual(self.headers.get(key, 5), 5)\n            self.assertRaises(KeyError, lambda x: self.headers[x], key)\n        self.env['HTTP_FOO_BAR'] = 'test'\n        for key in 'foo-bar Foo-Bar foo-Bar FOO-BAR'.split():\n            self.assertTrue(key in self.headers)\n            self.assertEqual(self.headers.get(key), 'test')\n            self.assertEqual(self.headers.get(key, 5), 'test')\n"
  },
  {
    "path": "test/test_exc.py",
    "content": "import bottle\nfrom .tools import ServerTestBase\n\nclass SomeError(Exception):\n    pass\n\nclass TestAppException(ServerTestBase):\n\n    def test_no_exc(self):\n        @bottle.route('/')\n        def test(): return 'test'\n        self.assertBody('test', '/')\n\n    def test_memory_error(self):\n        @bottle.route('/')\n        def test(): raise MemoryError\n        with self.assertRaises(MemoryError):\n            self.urlopen(\"/\")\n\n    def test_system_Exit(self):\n        @bottle.route('/')\n        def test(): raise SystemExit\n        with self.assertRaises(SystemExit):\n            self.urlopen(\"/\")\n\n    def test_other_error(self):\n        @bottle.route('/')\n        def test(): raise SomeError\n        self.assertStatus(500, '/')\n        self.assertInBody('SomeError')\n\n    def test_noncatched_error(self):\n        @bottle.route('/')\n        def test(): raise SomeError\n        bottle.request.environ['exc_info'] = None\n        self.app.catchall = False\n        with self.assertRaises(SomeError):\n            self.urlopen(\"/\")\n        self.app.catchall = True\n        self.assertStatus(500, '/')\n        self.assertInBody('SomeError')\n"
  },
  {
    "path": "test/test_fileupload.py",
    "content": "# -*- coding: utf-8 -*-\n''' Tests for the FileUpload wrapper. '''\n\nimport unittest\nimport sys, os.path\nimport bottle\nfrom bottle import FileUpload, BytesIO, tob\nimport tempfile\n\nclass TestFileUpload(unittest.TestCase):\n    def test_name(self):\n        self.assertEqual(FileUpload(None, 'abc', None).name, 'abc')\n\n    def test_raw_filename(self):\n        self.assertEqual(FileUpload(None, None, 'x/x').raw_filename, 'x/x')\n\n    def test_content_type(self):\n        fu = FileUpload(None, None, None, {\"Content-type\": \"text/plain\"})\n        self.assertEqual(fu.content_type, 'text/plain')\n\n    def assertFilename(self, bad, good):\n        fu = FileUpload(None, None, bad)\n        self.assertEqual(fu.filename, good)\n        \n    def test_filename(self):\n        self.assertFilename('with space', 'with-space')\n        self.assertFilename('with more  \\t\\n\\r space', 'with-more-space')\n        self.assertFilename('with/path', 'path')\n        self.assertFilename('../path', 'path')\n        self.assertFilename('..\\\\path', 'path')\n        self.assertFilename('..', 'empty')\n        self.assertFilename('.name.', 'name')\n        self.assertFilename('.name.cfg', 'name.cfg')\n        self.assertFilename(' . na me . ', 'na-me')\n        self.assertFilename('path/', 'empty')\n        self.assertFilename('ümläüts$', 'umlauts')\n        self.assertFilename('', 'empty')\n        self.assertFilename('a'+'b'*1337+'c', 'a'+'b'*254)\n\n    def test_preserve_case_issue_582(self):\n        self.assertFilename('UpperCase', 'UpperCase')\n\n    def test_save_buffer(self):\n        fu = FileUpload(open(__file__, 'rb'), 'testfile', __file__)\n        buff = BytesIO()\n        fu.save(buff)\n        buff.seek(0)\n        self.assertEqual(fu.file.read(), buff.read())\n\n    def test_save_file(self):\n        fu = FileUpload(open(__file__, 'rb'), 'testfile', __file__)\n        buff = tempfile.TemporaryFile()\n        fu.save(buff)\n        buff.seek(0)\n        self.assertEqual(fu.file.read(), buff.read())\n\n    def test_save_overwrite_lock(self):\n        fu = FileUpload(open(__file__, 'rb'), 'testfile', __file__)\n        self.assertRaises(IOError, fu.save, __file__)\n\n    def test_save_dir(self):\n        fu = FileUpload(open(__file__, 'rb'), 'testfile', __file__)\n        dirpath = tempfile.mkdtemp()\n        filepath = os.path.join(dirpath, fu.filename)\n        fu.save(dirpath)\n        self.assertEqual(fu.file.read(), open(filepath, 'rb').read())\n        os.unlink(filepath)\n        os.rmdir(dirpath)\n"
  },
  {
    "path": "test/test_formsdict.py",
    "content": "# -*- coding: utf-8 -*-\n# '瓶' means \"Bottle\"\n\nimport unittest\nfrom bottle import FormsDict, touni, tob\n\nclass TestFormsDict(unittest.TestCase):\n    def test_attr_access(self):\n        \"\"\" FomsDict.attribute returs string values as unicode. \"\"\"\n        d = FormsDict(py3='瓶')\n        self.assertEqual('瓶', d.py3)\n        self.assertEqual('瓶', d[\"py3\"])\n\n    def test_attr_missing(self):\n        \"\"\" FomsDict.attribute returs u'' on missing keys. \"\"\"\n        d = FormsDict()\n        self.assertEqual('', d.missing)\n"
  },
  {
    "path": "test/test_html_helper.py",
    "content": "import unittest\n\nfrom bottle import _parse_http_header\n\n\nclass TestHttpUtils(unittest.TestCase):\n\n    # TODO: Move more of the low level http stuff here.\n\n    def test_accept_header(self):\n        self.assertEqual(_parse_http_header(\n                'text/xml, text/whitespace ,'\n                'application/params;param=value; ws = lots ;\"quote\"=\"mid\\\\\"quote\",'\n                '\"more\\\\\"quotes\\\\\"\",'\n                'I\\'m in space!!!'),\n\n                [('text/xml', {}),\n                 ('text/whitespace', {}),\n                 ('application/params', {'param': 'value', 'ws': 'lots', 'quote': 'mid\"quote'}),\n                 ('more\"quotes\"', {}),\n                 ('I\\'m in space!!!', {})]\n        )\n\n"
  },
  {
    "path": "test/test_importhook.py",
    "content": "# -*- coding: utf-8 -*-\nimport unittest\nimport sys, os\nimport bottle\n\nclass TestImportHooks(unittest.TestCase):\n\n    def make_module(self, name, **args):\n        mod = sys.modules.setdefault(name, bottle.new_module(name))\n        mod.__file__ = '<virtual %s>' % name\n        mod.__dict__.update(**args)\n        return mod\n\n    def test_direkt_import(self):\n        mod = self.make_module('bottle_test')\n        import bottle.ext.test\n        self.assertEqual(bottle.ext.test, mod)\n\n    def test_from_import(self):\n        mod = self.make_module('bottle_test')\n        from bottle.ext import test\n        self.assertEqual(test, mod)\n\n    def test_data_import(self):\n        mod = self.make_module('bottle_test', item='value')\n        from bottle.ext.test import item\n        self.assertEqual(item, 'value')\n\n    def test_import_fail(self):\n        ''' Test a simple static page with this server adapter. '''\n        def test():\n            import bottle.ext.doesnotexist\n        self.assertRaises(ImportError, test)\n\n    def test_ext_isfile(self):\n        ''' The virtual module needs a valid __file__ attribute.\n            If not, the Google app engine development server crashes on windows.\n        '''\n        from bottle import ext\n        self.assertTrue(os.path.isfile(ext.__file__))\n"
  },
  {
    "path": "test/test_jinja2.py",
    "content": "# -*- coding: utf-8 -*-\nimport unittest\nfrom bottle import Jinja2Template, jinja2_template, jinja2_view, touni\nfrom .tools import warn, chdir\n\n\n\nclass TestJinja2Template(unittest.TestCase):\n\n    def test_string(self):\n        \"\"\" Templates: Jinja2 string\"\"\"\n        t = Jinja2Template('start {{var}} end').render(var='var')\n        self.assertEqual('start var end', ''.join(t))\n\n    def test_file(self):\n        \"\"\" Templates: Jinja2 file\"\"\"\n        with chdir(__file__):\n            t = Jinja2Template(name='./views/jinja2_simple.tpl', lookup=['.']).render(var='var')\n            self.assertEqual('start var end', ''.join(t))\n\n    def test_name(self):\n        \"\"\" Templates: Jinja2 lookup by name \"\"\"\n        with chdir(__file__):\n            t = Jinja2Template(name='jinja2_simple', lookup=['./views/']).render(var='var')\n            self.assertEqual('start var end', ''.join(t))\n\n    def test_notfound(self):\n        \"\"\" Templates: Unavailable templates\"\"\"\n        self.assertRaises(Exception, Jinja2Template, name=\"abcdef\", lookup=['./views/'])\n\n    def test_error(self):\n        \"\"\" Templates: Exceptions\"\"\"\n        self.assertRaises(Exception, Jinja2Template, '{% for badsyntax')\n\n    def test_inherit(self):\n        \"\"\" Templates: Jinja2 lookup and inherience \"\"\"\n        with chdir(__file__):\n            t = Jinja2Template(name='jinja2_inherit', lookup=['./views/']).render()\n            self.assertEqual('begin abc end', ''.join(t))\n\n    def test_custom_filters(self):\n        \"\"\"Templates: jinja2 custom filters \"\"\"\n        from bottle import jinja2_template as template\n        settings = dict(filters = {\"star\": lambda var: touni(\"\").join((touni('*'), var, touni('*')))})\n        t = Jinja2Template(\"start {{var|star}} end\", **settings)\n        self.assertEqual(\"start *var* end\", t.render(var=\"var\"))\n\n    def test_custom_tests(self):\n        \"\"\"Templates: jinja2 custom tests \"\"\"\n        from bottle import jinja2_template as template\n        TEMPL = touni(\"{% if var is even %}gerade{% else %}ungerade{% endif %}\")\n        settings = dict(tests={\"even\": lambda x: False if x % 2 else True})\n        t = Jinja2Template(TEMPL, **settings)\n        self.assertEqual(\"gerade\", t.render(var=2))\n        self.assertEqual(\"ungerade\", t.render(var=1))\n\n    def test_template_shortcut(self):\n        result = jinja2_template('start {{var}} end', var='middle')\n        self.assertEqual(touni('start middle end'), result)\n\n    def test_view_decorator(self):\n        @jinja2_view('start {{var}} end')\n        def test():\n            return dict(var='middle')\n        self.assertEqual(touni('start middle end'), test())\n\n\ntry:\n  import jinja2\nexcept ImportError:\n  warn(\"No Jinja2 template support. Skipping tests.\")\n  del TestJinja2Template\n\n"
  },
  {
    "path": "test/test_mako.py",
    "content": "from __future__ import with_statement\nimport unittest\nfrom .tools import warn, chdir\nfrom bottle import MakoTemplate, mako_template, mako_view, touni\n\nclass TestMakoTemplate(unittest.TestCase):\n    def test_string(self):\n        \"\"\" Templates: Mako string\"\"\"\n        t = MakoTemplate('start ${var} end').render(var='var')\n        self.assertEqual('start var end', t)\n\n    def test_file(self):\n        \"\"\" Templates: Mako file\"\"\"\n        with chdir(__file__):\n            t = MakoTemplate(name='./views/mako_simple.tpl', lookup=['.']).render(var='var')\n            self.assertEqual('start var end\\n', t)\n\n    def test_name(self):\n        \"\"\" Templates: Mako lookup by name \"\"\"\n        with chdir(__file__):\n            t = MakoTemplate(name='mako_simple', lookup=['./views/']).render(var='var')\n            self.assertEqual('start var end\\n', t)\n\n    def test_notfound(self):\n        \"\"\" Templates: Unavailable templates\"\"\"\n        self.assertRaises(Exception, MakoTemplate, lookup=['./views/'], name=\"abcdef\")\n\n    def test_error(self):\n        \"\"\" Templates: Exceptions\"\"\"\n        self.assertRaises(Exception, MakoTemplate, '%for badsyntax')\n\n    def test_inherit(self):\n        \"\"\" Templates: Mako lookup and inherience \"\"\"\n        with chdir(__file__):\n            t = MakoTemplate(name='mako_inherit', lookup=['./views/']).render(var='v')\n            self.assertEqual('o\\ncvc\\no\\n', t)\n            t = MakoTemplate('<%inherit file=\"mako_base.tpl\"/>\\nc${var}c\\n', lookup=['./views/']).render(var='v')\n            self.assertEqual('o\\ncvc\\no\\n', t)\n            t = MakoTemplate('<%inherit file=\"views/mako_base.tpl\"/>\\nc${var}c\\n', lookup=['./']).render(var='v')\n            self.assertEqual('o\\ncvc\\no\\n', t)\n\n    def test_template_shortcut(self):\n        result = mako_template('start ${var} end', var='middle')\n        self.assertEqual(touni('start middle end'), result)\n\n    def test_view_decorator(self):\n        @mako_view('start ${var} end')\n        def test():\n            return dict(var='middle')\n        self.assertEqual(touni('start middle end'), test())\n\n\ntry:\n  import mako\nexcept ImportError:\n  warn(\"No Mako template support. Skipping tests.\")\n  del TestMakoTemplate\n"
  },
  {
    "path": "test/test_mdict.py",
    "content": "import unittest\nfrom bottle import MultiDict, HeaderDict\n\nclass TestMultiDict(unittest.TestCase):\n    def test_isadict(self):\n        \"\"\" MultiDict should behaves like a normal dict \"\"\"\n        d, m = dict(a=5), MultiDict(a=5)\n        d['key'], m['key'] = 'value', 'value'\n        d['k2'], m['k2'] = 'v1', 'v1'\n        d['k2'], m['k2'] = 'v2', 'v2'\n        self.assertEqual(list(d.keys()), list(m.keys()))\n        self.assertEqual(list(d.values()), list(m.values()))\n        self.assertEqual(list(d.keys()), list(m.iterkeys()))\n        self.assertEqual(list(d.values()), list(m.itervalues()))\n        self.assertEqual(d.get('key'), m.get('key'))\n        self.assertEqual(d.get('cay'), m.get('cay'))\n        self.assertEqual(list(iter(d)), list(iter(m)))\n        self.assertEqual([k for k in d], [k for k in m])\n        self.assertEqual(len(d), len(m))\n        self.assertEqual('key' in d, 'key' in m)\n        self.assertEqual('cay' in d, 'cay' in m)\n        self.assertRaises(KeyError, lambda: m['cay'])\n       \n    def test_ismulti(self):\n        \"\"\" MultiDict has some special features \"\"\"\n        m = MultiDict(a=5)\n        m['a'] = 6\n        self.assertEqual([5, 6], m.getall('a'))\n        self.assertEqual([], m.getall('b'))\n        self.assertEqual([('a', 5), ('a', 6)], list(m.iterallitems()))\n   \n    def test_isheader(self):\n        \"\"\" HeaderDict replaces by default and title()s its keys \"\"\"\n        m = HeaderDict(abc_def=5)\n        m['abc_def'] = 6\n        self.assertEqual(['6'], m.getall('abc_def'))\n        m.append('abc_def', 7)\n        self.assertEqual(['6', '7'], m.getall('abc_def'))\n        self.assertEqual([('Abc-Def', '6'), ('Abc-Def', '7')], list(m.iterallitems()))\n    \n    def test_headergetbug(self):\n        ''' Assure HeaderDict.get() to be case insensitive '''\n        d = HeaderDict()\n        d['UPPER'] = 'UPPER'\n        d['lower'] = 'lower'\n        self.assertEqual(d.get('upper'), 'UPPER')\n        self.assertEqual(d.get('LOWER'), 'lower')\n"
  },
  {
    "path": "test/test_mount.py",
    "content": "# -*- coding: utf-8 -*-\nimport bottle\nfrom .tools import ServerTestBase, api\nfrom bottle import response\n\nclass TestAppMounting(ServerTestBase):\n    def setUp(self):\n        ServerTestBase.setUp(self)\n        self.subapp = bottle.Bottle()\n\n        @self.subapp.route('/')\n        @self.subapp.route('/test/<test>')\n        def test(test='foo'):\n            return test\n\n    def test_mount_unicode_path_bug602(self):\n        self.app.mount('/mount/', self.subapp)\n        self.assertBody('äöü', '/mount/test/äöü')\n        self.app.route('/route/<param>', callback=lambda param: param)\n        self.assertBody('äöü', '/route/äöü')\n\n    def test_mount_order_bug581(self):\n        self.app.mount('/test/', self.subapp)\n\n        # This should not match\n        self.app.route('/<test:path>', callback=lambda test: test)\n\n        self.assertStatus(200, '/test/')\n        self.assertBody('foo', '/test/')\n\n    def test_mount(self):\n        self.app.mount('/test/', self.subapp)\n        self.assertStatus(404, '/')\n        self.assertStatus(404, '/test')\n        self.assertStatus(200, '/test/')\n        self.assertBody('foo', '/test/')\n        self.assertStatus(200, '/test/test/bar')\n        self.assertBody('bar', '/test/test/bar')\n\n    def test_mount_meta(self):\n        self.app.mount('/test/', self.subapp)\n        self.assertEqual(\n            self.subapp.config['_mount.prefix'], '/test/')\n        self.assertEqual(\n            self.subapp.config['_mount.app'], self.app)\n\n    @api('0.9', '0.13')\n    def test_no_slash_prefix(self):\n        self.app.mount('/test', self.subapp)\n        self.assertStatus(404, '/')\n        self.assertStatus(200, '/test')\n        self.assertBody('foo', '/test')\n        self.assertStatus(200, '/test/')\n        self.assertBody('foo', '/test/')\n        self.assertStatus(200, '/test/test/bar')\n        self.assertBody('bar', '/test/test/bar')\n\n    def test_mount_no_plugins(self):\n        def plugin(func):\n            def wrapper(*a, **ka):\n                return 'Plugin'\n            return wrapper\n        self.app.install(plugin)\n        self.app.route('/foo', callback=lambda: 'baz')\n        self.app.mount('/test/', self.subapp)\n        self.assertBody('Plugin', '/foo')\n        self.assertBody('foo', '/test/')\n\n    def test_mount_wsgi(self):\n        status = {}\n        def app(environ, start_response):\n            start_response('200 OK', [('X-Test', 'WSGI')])\n            return 'WSGI ' + environ['PATH_INFO']\n        self.app.mount('/test', app)\n        self.assertStatus(200, '/test/')\n        self.assertBody('WSGI /', '/test')\n        self.assertBody('WSGI /', '/test/')\n        self.assertHeader('X-Test', 'WSGI', '/test/')\n        self.assertBody('WSGI /test/bar', '/test/test/bar')\n            \n    def test_mount_cookie(self):\n        @self.subapp.route('/cookie')\n        def test_cookie():\n            response.set_cookie('a', 'a')\n            response.set_cookie('b', 'b')\n        self.app.mount('/test/', self.subapp)\n        c = self.urlopen('/test/cookie')['header']['Set-Cookie']\n        self.assertEqual(['a=a', 'b=b'], list(sorted(c.split(', '))))\n\n    def test_mount_wsgi_ctype_bug(self):\n        status = {}\n        def app(environ, start_response):\n            start_response('200 OK', [('Content-Type', 'test/test')])\n            return 'WSGI ' + environ['PATH_INFO']\n        self.app.mount('/test', app)\n        self.assertHeader('Content-Type', 'test/test', '/test/')\n\n    def test_mount_json_bug(self):\n        @self.subapp.route('/json')\n        def route():\n            return {'a': 5}\n        self.app.mount('/test/', self.subapp)\n        self.assertHeader('Content-Type', 'application/json', '/test/json')\n\n    def test_mount_get_url(self):\n        @self.subapp.route('/test', name=\"test\")\n        def route():\n            return bottle.url(\"test\")\n\n        self.app.mount('/test/', self.subapp)\n        self.assertBody('/test/test', '/test/test')\n\n\nclass TestAppMerging(ServerTestBase):\n    def setUp(self):\n        ServerTestBase.setUp(self)\n        self.subapp = bottle.Bottle()\n        @self.subapp.route('/')\n        @self.subapp.route('/test/<test>')\n        def test(test='foo'):\n            return test\n\n    def test_merge(self):\n        self.app.merge(self.subapp)\n        self.assertStatus(200, '/')\n        self.assertBody('foo', '/')\n        self.assertStatus(200, '/test/bar')\n        self.assertBody('bar', '/test/bar')\n"
  },
  {
    "path": "test/test_multipart.py",
    "content": "# -*- coding: utf-8 -*-\nimport unittest\nimport base64\nimport sys, os.path, tempfile\nfrom io import BytesIO\n\nimport bottle\n\nclass BaseMultipartTest(unittest.TestCase):\n    def setUp(self):\n        self.reset()\n\n    def reset(self):\n        self.data = BytesIO()\n        self.parts = None\n\n    def write(self, *lines):\n        for line in lines:\n            self.data.write(bottle.tob(line))\n\n    def parse(self, ctype=None, clen=-1, **kwargs):\n        self.data.seek(0)\n        ctype, options = bottle._parse_http_header(ctype or \"multipart/form-data; boundary=foo\")[0]\n        charset = options.get(\"charset\", \"utf8\")\n        boundary = options.get(\"boundary\")\n        parser = bottle._MultipartParser(self.data, boundary=boundary, content_length=clen, charset=charset, **kwargs)\n        self.parts = list(parser.parse())\n        return self.parts\n\n    def assertFile(self, name, filename, ctype, data):\n        for part in self.parts or []:\n            if part.name != name: continue\n            self.assertEqual(part.filename, filename)\n            self.assertEqual(part.content_type, ctype)\n            self.assertEqual(part.raw, bottle.tob(data))\n            break\n        else:\n            self.fail(\"Field %s not found\" % name)\n    \n    def assertForm(self, name, data):\n        for part in self.parts or []:\n            if part.name != name: continue\n            self.assertEqual(part.filename, None)\n            self.assertEqual(part.content_type, None)\n            self.assertEqual(part.charset, \"utf8\")\n            self.assertEqual(part.value, data)\n            break\n        else:\n            self.fail(\"Field %s not found\" % name)\n\n\nclass TestHeaderParser(BaseMultipartTest):\n\n    def test_options_parser(self):\n        parse = bottle._parse_http_header\n        self.assertEqual(\n            parse('form-data; name=\"Test\"; filename=\"Test.txt\"'),\n            [('form-data', {\"name\": \"Test\", \"filename\": \"Test.txt\"})])\n        self.assertEqual(parse('form-data; name=\"Test\"; FileName=\"Te\\\\\"st.txt\"'),\n        [('form-data', {\"name\": \"Test\", \"filename\": \"Te\\\"st.txt\"})])\n        self.assertEqual(parse('form-data; name=\"Test\"; filename=\"C:\\\\test\\\\bla.txt\"'),\n        [('form-data', {\"name\": \"Test\", \"filename\": \"C:\\\\test\\\\bla.txt\"})])\n        self.assertEqual(parse('form-data; name=\"Test\"; filename=\"\\\\\\\\test\\\\bla.txt\"'),\n        [('form-data', {\"name\": \"Test\", \"filename\": \"\\\\\\\\test\\\\bla.txt\"})])\n\n\nclass TestMultipartParser(BaseMultipartTest):\n\n    def assertIterline(self, data, *expected, **options):\n        self.assertEqual(\n            list(bottle._MultipartParser(BytesIO(bottle.tob(data)), 'foo', **options)._lineiter()),\n            [(bottle.tob(l), bottle.tob(nl)) for l,nl in expected])\n\n    def test_iterlines(self):\n        self.assertIterline('abc\\ndef\\r\\nghi', ('abc\\ndef','\\r\\n'), ('ghi', ''))\n\n    def test_iterlines_limit(self):\n        self.assertIterline('abc\\ndef\\r\\nghi', ('abc\\ndef','\\r\\n'), ('g', ''), content_length=10)\n        self.assertIterline('abc\\ndef\\r\\nghi', ('abc\\ndef\\r',''), content_length=8)\n\n    def test_fuzzy_lineiter(self):\n        \"\"\" Test all possible buffer sizes \"\"\"\n        minbuflen = 9 # boundary size of '--foo--\\r\\n'\n        data = b'data\\rdata\\ndata\\r\\ndata\\n\\rdata\\r\\n'.replace(b'data', b'X'*minbuflen*2)\n        lines = data.split(b\"\\r\\n\")[:-1]\n        for tail in (b\"\", b\"tail\"):\n            for buffer_size in range(minbuflen, len(data+tail)+1):\n                splits = list(bottle._MultipartParser(\n                    BytesIO(data+tail), 'foo',\n                    buffer_size=buffer_size)._lineiter())\n                partial = b\"\"\n                merged = []\n                for part, nl in splits:\n                    self.assertTrue(nl in (b\"\", b\"\\r\\n\"))\n                    self.assertTrue(len(part) >= buffer_size or nl or part == tail)\n                    partial += part\n                    if nl:\n                        merged.append(partial)\n                        partial = b\"\"\n                self.assertEqual(merged, lines)\n                self.assertEqual(tail, partial)\n\n    def test_big_file(self):\n        ''' If the size of an uploaded part exceeds memfile_limit,\n            it is written to disk. '''\n        test_file = 'abc'*1024\n        boundary = '---------------------------186454651713519341951581030105'\n        request = BytesIO(bottle.tob('\\r\\n').join(map(bottle.tob,[\n        '--' + boundary,\n        'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"',\n        'Content-Type: image/png', '', test_file, '--' + boundary,\n        'Content-Disposition: form-data; name=\"file2\"; filename=\"random.png\"',\n        'Content-Type: image/png', '', test_file + 'a', '--' + boundary,\n        'Content-Disposition: form-data; name=\"file3\"; filename=\"random.png\"',\n        'Content-Type: image/png', '', test_file*2, '--'+boundary+'--',''])))\n        parts = list(bottle._MultipartParser(request, boundary, memfile_limit=len(test_file)).parse())\n        p = {p.name: p for p in parts}\n        try:\n            self.assertEqual(p.get('file1').file.read(), bottle.tob(test_file))\n            self.assertTrue(p.get('file1').is_buffered())\n            self.assertEqual(p.get('file2').file.read(), bottle.tob(test_file + 'a'))\n            self.assertFalse(p.get('file2').is_buffered())\n            self.assertEqual(p.get('file3').file.read(), bottle.tob(test_file*2))\n            self.assertFalse(p.get('file3').is_buffered())\n        finally:\n            for part in parts:\n                part.close()\n\n    def test_file_seek(self):\n        ''' The file object should be readable withoud a seek(0). '''\n        test_file = 'abc'*1024\n        boundary = '---------------------------186454651713519341951581030105'\n        request = BytesIO(bottle.tob('\\r\\n').join(map(bottle.tob,[\n        '--' + boundary,\n        'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"',\n        'Content-Type: image/png', '', test_file, '--' + boundary + '--',''])))\n        p = list(bottle._MultipartParser(request, boundary).parse())\n        self.assertEqual(p[0].file.read(), bottle.tob(test_file))\n        self.assertEqual(p[0].value, test_file)\n\n    def test_unicode_value(self):\n        ''' The .value property always returns unicode '''\n        test_file = 'abc'*1024\n        boundary = '---------------------------186454651713519341951581030105'\n        request = BytesIO(bottle.tob('\\r\\n').join(map(bottle.tob,[\n        '--' + boundary,\n        'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"',\n        'Content-Type: image/png', '', test_file, '--' + boundary + '--',''])))\n        p = list(bottle._MultipartParser(request, boundary).parse())\n        self.assertEqual(p[0].file.read(), bottle.tob(test_file))\n        self.assertEqual(p[0].value, test_file)\n        self.assertTrue(hasattr(p[0].value, 'encode'))\n\n    def test_multiline_header(self):\n        ''' HTTP allows headers to be multiline. '''\n        test_file = bottle.tob('abc'*1024)\n        test_text = u'Test text\\n with\\r\\n ümläuts!'\n        boundary = '---------------------------186454651713519341951581030105'\n        request = BytesIO(bottle.tob('\\r\\n').join(map(bottle.tob,[\n        '--' + boundary,\n        'Content-Disposition: form-data;',\n        '\\tname=\"file1\"; filename=\"random.png\"',\n        'Content-Type: image/png', '', test_file, '--' + boundary,\n        'Content-Disposition: form-data;',\n        ' name=\"text\"', '', test_text,\n        '--' + boundary + '--',''])))\n        p = list(bottle._MultipartParser(request, boundary, charset='utf8').parse())\n        self.assertEqual(p[0].name, \"file1\")\n        self.assertEqual(p[0].file.read(), test_file)\n        self.assertEqual(p[0].filename, 'random.png')\n        self.assertEqual(p[1].name, \"text\")\n        self.assertEqual(p[1].value, test_text)\n\n\nclass TestBrokenMultipart(BaseMultipartTest):\n\n    def assertMPError(self, **ka):\n        self.assertRaises(bottle.MultipartError, self.parse, **ka)\n\n    def test_big_boundary(self):\n        self.assertMPError(buffer_size=1024*3)\n\n    def test_missing_content_type(self):\n        self.assertMPError(ctype=\"\")\n\n    def test_unsupported_content_type(self):\n        self.assertMPError(ctype='multipart/fantasy')\n\n    def test_missing_boundary(self):\n        self.assertMPError(ctype=\"multipart/form-data\")\n\n    def test_no_terminator(self):\n        self.write('--foo\\r\\n',\n                   'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n', '\\r\\n', 'abc')\n        self.assertMPError()\n\n    def test_no_newline_after_content(self):\n        self.write('--foo\\r\\n',\n                   'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n', '\\r\\n', 'abc', '--foo--')\n        self.assertMPError()\n\n    def test_no_newline_after_middle_content(self):\n        self.write('--foo\\r\\n',\n                   'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n', '\\r\\n', 'abc', '--foo\\r\\n'\n                   'Content-Disposition: form-data; name=\"file2\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n', '\\r\\n', 'abc\\r\\n', '--foo--')\n        parts = self.parse()\n        self.assertEqual(len(parts), 1)\n        self.assertTrue('name=\"file2\"' in parts[0].value)\n\n    def test_preamble_before_start_boundary(self):\n        parts = self.write('Preamble\\r\\n', '--foo\\r\\n'\n                   'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n', '\\r\\n', 'abc\\r\\n', '--foo--')\n        parts = self.parse()\n        self.assertEqual(parts[0].file.read(), bottle.tob('abc'))\n        self.assertEqual(parts[0].filename, 'random.png')\n        self.assertEqual(parts[0].name, 'file1')\n        self.assertEqual(parts[0].content_type, 'image/png')\n\n    def test_no_start_boundary(self):\n        self.write('--bar\\r\\n','--nonsense\\r\\n'\n                   'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n', '\\r\\n', 'abc\\r\\n', '--nonsense--')\n        self.assertMPError()\n\n    def test_disk_limit(self):\n        self.write('--foo\\r\\n',\n                   'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n', '\\r\\n', 'abc'*1024+'\\r\\n', '--foo--')\n        self.assertMPError(memfile_limit=0, disk_limit=1024)\n\n    def test_mem_limit(self):\n        self.write('--foo\\r\\n',\n                   'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n', '\\r\\n', 'abc'*1024+'\\r\\n', '--foo\\r\\n',\n                   'Content-Disposition: form-data; name=\"file2\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n', '\\r\\n', 'abc'*1024+'\\r\\n', '--foo--')\n        self.assertMPError(mem_limit=1024*3)\n\n    def test_invalid_header(self):\n        self.write('--foo\\r\\n',\n                   'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n',\n                   'Bad header\\r\\n', '\\r\\n', 'abc'*1024+'\\r\\n', '--foo--')\n        self.assertMPError()\n\n    def test_content_length_to_small(self):\n        self.write('--foo\\r\\n',\n                   'Content-Disposition: form-data; name=\"file1\"; filename=\"random.png\"\\r\\n',\n                   'Content-Type: image/png\\r\\n',\n                   'Content-Length: 111\\r\\n', '\\r\\n', 'abc'*1024+'\\r\\n', '--foo--')\n        self.assertMPError()\n\n    def test_no_disposition_header(self):\n        self.write('--foo\\r\\n',\n                   'Content-Type: image/png\\r\\n', '\\r\\n', 'abc'*1024+'\\r\\n', '--foo--')\n        self.assertMPError()\n\n''' The files used by the following test were taken from the werkzeug library\n    test suite and are therefore partly copyrighted by the Werkzeug Team\n    under BSD licence. See https://werkzeug.pocoo.org/ '''\n\nb64d=base64.b64decode\nbrowser_test_cases = {}\nbrowser_test_cases[\"firefox3-2png1txt\"] = {\n    \"data\": b64d(\n        \"\"\"\nLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0xODY0NTQ2NTE3MTM1MTkzNDE5NTE1ODEwMzAx\nMDUNCkNvbnRlbnQtRGlzcG9zaXRpb246IGZvcm0tZGF0YTsgbmFtZT0iZmlsZTEiOyBmaWxlbmFt\nZT0iYW5jaG9yLnBuZyINCkNvbnRlbnQtVHlwZTogaW1hZ2UvcG5nDQoNColQTkcNChoKAAAADUlI\nRFIAAAAQAAAAEAgGAAAAH/P/YQAAAARnQU1BAACvyDcFiukAAAAZdEVYdFNvZnR3YXJlAEFkb2Jl\nIEltYWdlUmVhZHlxyWU8AAABnUlEQVQ4y6VTMWvCQBS+qwEFB10KGaS1P6FDpw7SrVvzAwRRx04V\nCk4K6iAoDhLXdhFcW9qhZCk4FQoW0gp2U4lQRDAUS4hJmn5Xgg2lsQ198PHu3b3vu5d3L9S2bfIf\n47wOer1ewzTNtGEYBP48kUjkfsrb8BIAMb1cLovwRfi07wrYzcCr4/1/Am4FzzhzBGZeefR7E7vd\n7j0Iu4wYjUYDBMfD0dBiMUQfstns3toKkHgF6EgmqqruW6bFiHcsxr70awVu63Q6NiOmUinquwfM\ndF1f28CVgCRJx0jMAQ1BEFquRn7CbYVCYZVbr9dbnJMohoIh9kViu90WEW9nMpmxu4JyubyF/VEs\nFiNcgCPyoyxiu7XhCPBzdU4s652VnUccbDabPLyN2C6VSmwdhFgel5DB84AJb64mEUlvmqadTKcv\n40gkUkUsg1DjeZ7iRsrWgByP71T7/afxYrHIYry/eoBD9mxsaK4VRamFw2EBQknMAWGvRClNTpQJ\nAfkCxFNgBmiez1ipVA4hdgQcOD/TLfylKIo3vubgL/YBnIw+ioOMLtwAAAAASUVORK5CYIINCi0t\nLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tMTg2NDU0NjUxNzEzNTE5MzQxOTUxNTgxMDMwMTA1\nDQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9ImZpbGUyIjsgZmlsZW5hbWU9\nImFwcGxpY2F0aW9uX2VkaXQucG5nIg0KQ29udGVudC1UeXBlOiBpbWFnZS9wbmcNCg0KiVBORw0K\nGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdh\ncmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJRSURBVBgZpcHda81xHMDx9+d3fudYzuYw2RaZ5yTW\nolEiuZpCSjGJFEktUUr8A6ZxQZGHmDtqdrGUXHgoeZqSp1F2bLFWjtkOB8PZzvmd7+djv5XaBRfL\n6yVmxv+QjQeu7l25uuZYJmtxM0AVU8Wpw9RQU8w51AxzDqfKhFjwq6Mjdbj1RN0Zv2ZFzaloUdwr\nL2Is4r+y7hRwxs8G5mUzPxmrwcA8hvnmjIZtcxmr3Y09hHwzJZQvOAwwNZyCYqgaThVXMFzBCD7f\nJfv8MpHiKvaV3ePV2f07fMwIiSeIGeYJJoao4HmCiIeIQzPXifY+paJqO4lZi/nWPZ/krabjvlNH\nyANMBAQiBiqgakQMCunbxHJviM9bQeZdBzHJUzKhguLJlQnf1BghAmZ4gImAgAjk++8jP56QmL2G\nXG8zsfFCz8skA1mQXKbaU3X8ISIgQsgDcun7FL7cJjFnLUMfLyLRr0SLS4hbhiup5Szd19rpFYKA\nESKICCERoS95neyHmyTmbmAodQ4vGpAfmEn6YTtTahv4ODiRkGdOCUUAAUSE/uQNfqTaKFu4jvyn\nJiIxIzcwg/SjF1RsOk9R+QJMlZCvqvwhQFdbM4XvrynIVHpfn2ZSWYyhzHS+PUtSueUC0cQ0QmpG\nyE9197TUnwzq1DnUKbXSxOb6S7xtPkjngzbGVVbzvS/FjaGt9DU8xlRRJdTCMDEzRjuyZ1FwaFe9\nj+d4eecaPd1dPxNTSlfWHm1v5y/EzBitblXp4JLZ5f6yBbOwaK5tsD+9c33jq/f8w2+mRSjOllPh\nkAAAAABJRU5ErkJggg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0xODY0NTQ2NTE3MTM1\nMTkzNDE5NTE1ODEwMzAxMDUNCkNvbnRlbnQtRGlzcG9zaXRpb246IGZvcm0tZGF0YTsgbmFtZT0i\ndGV4dCINCg0KZXhhbXBsZSB0ZXh0DQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTE4NjQ1\nNDY1MTcxMzUxOTM0MTk1MTU4MTAzMDEwNS0tDQo=\"\"\"\n    ),\n    \"boundary\": \"---------------------------186454651713519341951581030105\",\n    \"files\": {\n        \"file1\": (\n            \"anchor.png\",\n            \"image/png\",\n            b64d(\n                \"\"\"\niVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0\nU29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGdSURBVDjLpVMxa8JAFL6rAQUHXQoZpLU/\noUOnDtKtW/MDBFHHThUKTgrqICgOEtd2EVxb2qFkKTgVChbSCnZTiVBEMBRLiEmafleCDaWxDX3w\n8e7dve+7l3cv1LZt8h/jvA56vV7DNM20YRgE/jyRSOR+ytvwEgAxvVwui/BF+LTvCtjNwKvj/X8C\nbgXPOHMEZl559HsTu93uPQi7jBiNRgMEx8PR0GIxRB+y2eze2gqQeAXoSCaqqu5bpsWIdyzGvvRr\nBW7rdDo2I6ZSKeq7B8x0XV/bwJWAJEnHSMwBDUEQWq5GfsJthUJhlVuv11uckyiGgiH2RWK73RYR\nb2cymbG7gnK5vIX9USwWI1yAI/KjLGK7teEI8HN1TizrnZWdRxxsNps8vI3YLpVKbB2EWB6XkMHz\ngAlvriYRSW+app1Mpy/jSCRSRSyDUON5nuJGytaAHI/vVPv9p/FischivL96gEP2bGxorhVFqYXD\nYQFCScwBYa9EKU1OlAkB+QLEU2AGaJ7PWKlUDiF2BBw4P9Mt/KUoije+5uAv9gGcjD6Kg4wu3AAA\nAABJRU5ErkJggg==\"\"\"\n            ),\n        ),\n        \"file2\": (\n            \"application_edit.png\",\n            \"image/png\",\n            b64d(\n                \"\"\"\niVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0\nU29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJRSURBVBgZpcHda81xHMDx9+d3fudYzuYw\n2RaZ5yTWolEiuZpCSjGJFEktUUr8A6ZxQZGHmDtqdrGUXHgoeZqSp1F2bLFWjtkOB8PZzvmd7+dj\nv5XaBRfL6yVmxv+QjQeu7l25uuZYJmtxM0AVU8Wpw9RQU8w51AxzDqfKhFjwq6Mjdbj1RN0Zv2ZF\nzaloUdwrL2Is4r+y7hRwxs8G5mUzPxmrwcA8hvnmjIZtcxmr3Y09hHwzJZQvOAwwNZyCYqgaThVX\nMFzBCD7fJfv8MpHiKvaV3ePV2f07fMwIiSeIGeYJJoao4HmCiIeIQzPXifY+paJqO4lZi/nWPZ/k\nrabjvlNHyANMBAQiBiqgakQMCunbxHJviM9bQeZdBzHJUzKhguLJlQnf1BghAmZ4gImAgAjk++8j\nP56QmL2GXG8zsfFCz8skA1mQXKbaU3X8ISIgQsgDcun7FL7cJjFnLUMfLyLRr0SLS4hbhiup5Szd\n19rpFYKAESKICCERoS95neyHmyTmbmAodQ4vGpAfmEn6YTtTahv4ODiRkGdOCUUAAUSE/uQNfqTa\nKFu4jvynJiIxIzcwg/SjF1RsOk9R+QJMlZCvqvwhQFdbM4XvrynIVHpfn2ZSWYyhzHS+PUtSueUC\n0cQ0QmpGyE9197TUnwzq1DnUKbXSxOb6S7xtPkjngzbGVVbzvS/FjaGt9DU8xlRRJdTCMDEzRjuy\nZ1FwaFe9j+d4eecaPd1dPxNTSlfWHm1v5y/EzBitblXp4JLZ5f6yBbOwaK5tsD+9c33jq/f8w2+m\nRSjOllPhkAAAAABJRU5ErkJggg==\"\"\"\n            ),\n        ),\n    },\n    \"forms\": {\"text\": u\"example text\"},\n}\n\nbrowser_test_cases[\"firefox3-2pnglongtext\"] = {\n    \"data\": b64d(\n        \"\"\"\nLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0xNDkwNDA0NDczOTc4NzE5MTAzMTc1NDcxMTc0\nOA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlMSI7IGZpbGVuYW1l\nPSJhY2NlcHQucG5nIg0KQ29udGVudC1UeXBlOiBpbWFnZS9wbmcNCg0KiVBORw0KGgoAAAANSUhE\nUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUg\nSW1hZ2VSZWFkeXHJZTwAAAKfSURBVDjLpZPrS1NhHMf9O3bOdmwDCWREIYKEUHsVJBI7mg3FvCxL\n09290jZj2EyLMnJexkgpLbPUanNOberU5taUMnHZUULMvelCtWF0sW/n7MVMEiN64AsPD8/n83uu\ncQDi/id/DBT4Dolypw/qsz0pTMbj/WHpiDgsdSUyUmeiPt2+V7SrIM+bSss8ySGdR4abQQv6lrui\n6VxsRonrGCS9VEjSQ9E7CtiqdOZ4UuTqnBHO1X7YXl6Daa4yGq7vWO1D40wVDtj4kWQbn94myPGk\nCDPdSesczE2sCZShwl8CzcwZ6NiUs6n2nYX99T1cnKqA2EKui6+TwphA5k4yqMayopU5mANV3lNQ\nTBdCMVUA9VQh3GuDMHiVcLCS3J4jSLhCGmKCjBEx0xlshjXYhApfMZRP5CyYD+UkG08+xt+4wLVQ\nZA1tzxthm2tEfD3JxARH7QkbD1ZuozaggdZbxK5kAIsf5qGaKMTY2lAU/rH5HW3PLsEwUYy+YCcE\nRmIjJpDcpzb6l7th9KtQ69fi09ePUej9l7cx2DJbD7UrG3r3afQHOyCo+V3QQzE35pvQvnAZukk5\nzL5qRL59jsKbPzdheXoBZc4saFhBS6AO7V4zqCpiawuptwQG+UAa7Ct3UT0hh9p9EnXT5Vh6t4C2\n2QaUDh6HwnECOmcO7K+6kW49DKqS2DrEZCtfuI+9GrNHg4fMHVSO5kE7nAPVkAxKBxcOzsajpS4Y\nh4ohUPPWKTUh3PaQEptIOr6BiJjcZXCwktaAGfrRIpwblqOV3YKdhfXOIvBLeREWpnd8ynsaSJoy\nESFphwTtfjN6X1jRO2+FxWtCWksqBApeiFIR9K6fiTpPiigDoadqCEag5YUFKl6Yrciw0VOlhOiv\nv/Ff8wtn0KzlebrUYwAAAABJRU5ErkJggg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0x\nNDkwNDA0NDczOTc4NzE5MTAzMTc1NDcxMTc0OA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1k\nYXRhOyBuYW1lPSJmaWxlMiI7IGZpbGVuYW1lPSJhZGQucG5nIg0KQ29udGVudC1UeXBlOiBpbWFn\nZS9wbmcNCg0KiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK\n6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJvSURBVDjLpZPrS5NhGIf9\nW7YvBYOkhlkoqCklWChv2WyKik7blnNris72bi6dus0DLZ0TDxW1odtopDs4D8MDZuLU0kXq61Ci\njSIIasOvv94VTUfLiB74fXngup7nvrnvJABJ/5PfLnTTdcwOj4RsdYmo5glBWP6iOtzwvIKSWstI\n0Wgx80SBblpKtE9KQs/We7EaWoT/8wbWP61gMmCH0lMDvokT4j25TiQU/ITFkek9Ow6+7WH2gwsm\nahCPdwyw75uw9HEO2gUZSkfyI9zBPCJOoJ2SMmg46N61YO/rNoa39Xi41oFuXysMfh36/Fp0b7bA\nfWAH6RGi0HglWNCbzYgJaFjRv6zGuy+b9It96N3SQvNKiV9HvSaDfFEIxXItnPs23BzJQd6DDEVM\n0OKsoVwBG/1VMzpXVWhbkUM2K4oJBDYuGmbKIJ0qxsAbHfRLzbjcnUbFBIpx/qH3vQv9b3U03IQ/\nHfFkERTzfFj8w8jSpR7GBE123uFEYAzaDRIqX/2JAtJbDat/COkd7CNBva2cMvq0MGxp0PRSCPF8\nBXjWG3FgNHc9XPT71Ojy3sMFdfJRCeKxEsVtKwFHwALZfCUk3tIfNR8XiJwc1LmL4dg141JPKtj3\nWUdNFJqLGFVPC4OkR4BxajTWsChY64wmCnMxsWPCHcutKBxMVp5mxA1S+aMComToaqTRUQknLTH6\n2kHOVEE+VQnjahscNCy0cMBWsSI0TCQcZc5ALkEYckL5A5noWSBhfm2AecMAjbcRWV0pUTh0HE64\nTNf0mczcnnQyu/MilaFJCae1nw2fbz1DnVOxyGTlKeZft/Ff8x1BRssfACjTwQAAAABJRU5ErkJg\ngg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0xNDkwNDA0NDczOTc4NzE5MTAzMTc1NDcx\nMTc0OA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJ0ZXh0Ig0KDQotLWxv\nbmcgdGV4dA0KLS13aXRoIGJvdW5kYXJ5DQotLWxvb2thbGlrZXMtLQ0KLS0tLS0tLS0tLS0tLS0t\nLS0tLS0tLS0tLS0tLS0xNDkwNDA0NDczOTc4NzE5MTAzMTc1NDcxMTc0OC0tDQo=\"\"\"\n    ),\n    \"boundary\": \"---------------------------14904044739787191031754711748\",\n    \"files\": {\n        \"file1\": (\n            \"accept.png\",\n            \"image/png\",\n            b64d(\n                \"\"\"\niVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0\nU29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAKfSURBVDjLpZPrS1NhHMf9O3bOdmwDCWRE\nIYKEUHsVJBI7mg3FvCxL09290jZj2EyLMnJexkgpLbPUanNOberU5taUMnHZUULMvelCtWF0sW/n\n7MVMEiN64AsPD8/n83uucQDi/id/DBT4Dolypw/qsz0pTMbj/WHpiDgsdSUyUmeiPt2+V7SrIM+b\nSss8ySGdR4abQQv6lrui6VxsRonrGCS9VEjSQ9E7CtiqdOZ4UuTqnBHO1X7YXl6Daa4yGq7vWO1D\n40wVDtj4kWQbn94myPGkCDPdSesczE2sCZShwl8CzcwZ6NiUs6n2nYX99T1cnKqA2EKui6+TwphA\n5k4yqMayopU5mANV3lNQTBdCMVUA9VQh3GuDMHiVcLCS3J4jSLhCGmKCjBEx0xlshjXYhApfMZRP\n5CyYD+UkG08+xt+4wLVQZA1tzxthm2tEfD3JxARH7QkbD1ZuozaggdZbxK5kAIsf5qGaKMTY2lAU\n/rH5HW3PLsEwUYy+YCcERmIjJpDcpzb6l7th9KtQ69fi09ePUej9l7cx2DJbD7UrG3r3afQHOyCo\n+V3QQzE35pvQvnAZukk5zL5qRL59jsKbPzdheXoBZc4saFhBS6AO7V4zqCpiawuptwQG+UAa7Ct3\nUT0hh9p9EnXT5Vh6t4C22QaUDh6HwnECOmcO7K+6kW49DKqS2DrEZCtfuI+9GrNHg4fMHVSO5kE7\nnAPVkAxKBxcOzsajpS4Yh4ohUPPWKTUh3PaQEptIOr6BiJjcZXCwktaAGfrRIpwblqOV3YKdhfXO\nIvBLeREWpnd8ynsaSJoyESFphwTtfjN6X1jRO2+FxWtCWksqBApeiFIR9K6fiTpPiigDoadqCEag\n5YUFKl6Yrciw0VOlhOivv/Ff8wtn0KzlebrUYwAAAABJRU5ErkJggg==\"\"\"\n            ),\n        ),\n        \"file2\": (\n            \"add.png\",\n            \"image/png\",\n            b64d(\n                \"\"\"\niVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0\nU29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJvSURBVDjLpZPrS5NhGIf9W7YvBYOkhlko\nqCklWChv2WyKik7blnNris72bi6dus0DLZ0TDxW1odtopDs4D8MDZuLU0kXq61CijSIIasOvv94V\nTUfLiB74fXngup7nvrnvJABJ/5PfLnTTdcwOj4RsdYmo5glBWP6iOtzwvIKSWstI0Wgx80SBblpK\ntE9KQs/We7EaWoT/8wbWP61gMmCH0lMDvokT4j25TiQU/ITFkek9Ow6+7WH2gwsmahCPdwyw75uw\n9HEO2gUZSkfyI9zBPCJOoJ2SMmg46N61YO/rNoa39Xi41oFuXysMfh36/Fp0b7bAfWAH6RGi0Hgl\nWNCbzYgJaFjRv6zGuy+b9It96N3SQvNKiV9HvSaDfFEIxXItnPs23BzJQd6DDEVM0OKsoVwBG/1V\nMzpXVWhbkUM2K4oJBDYuGmbKIJ0qxsAbHfRLzbjcnUbFBIpx/qH3vQv9b3U03IQ/HfFkERTzfFj8\nw8jSpR7GBE123uFEYAzaDRIqX/2JAtJbDat/COkd7CNBva2cMvq0MGxp0PRSCPF8BXjWG3FgNHc9\nXPT71Ojy3sMFdfJRCeKxEsVtKwFHwALZfCUk3tIfNR8XiJwc1LmL4dg141JPKtj3WUdNFJqLGFVP\nC4OkR4BxajTWsChY64wmCnMxsWPCHcutKBxMVp5mxA1S+aMComToaqTRUQknLTH62kHOVEE+VQnj\nahscNCy0cMBWsSI0TCQcZc5ALkEYckL5A5noWSBhfm2AecMAjbcRWV0pUTh0HE64TNf0mczcnnQy\nu/MilaFJCae1nw2fbz1DnVOxyGTlKeZft/Ff8x1BRssfACjTwQAAAABJRU5ErkJggg==\"\"\"\n            ),\n        ),\n    },\n    \"forms\": {\"text\": u\"--long text\\r\\n--with boundary\\r\\n--lookalikes--\"},\n}\n\nbrowser_test_cases[\"opera8-2png1txt\"] = {\n    \"data\": b64d(\n        \"\"\"\nLS0tLS0tLS0tLS0tekVPOWpRS21MYzJDcTg4YzIzRHgxOQ0KQ29udGVudC1EaXNwb3NpdGlvbjog\nZm9ybS1kYXRhOyBuYW1lPSJmaWxlMSI7IGZpbGVuYW1lPSJhcnJvd19icmFuY2gucG5nIg0KQ29u\ndGVudC1UeXBlOiBpbWFnZS9wbmcNCg0KiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9h\nAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHY\nSURBVDjLlVLPS1RxHJynpVu7KEn0Vt+2l6IO5qGCIsIwCPwD6hTUaSk6REoUHeoQ0qVAMrp0COpY\n0SUIPVRgSl7ScCUTst6zIoqg0y7lvpnPt8MWKuuu29w+hxnmx8dzzmE5+l7mxk1u/a3Dd/ejDjSs\nII/m3vjJ9MF0yt93ZuTkdD0CnnMO/WOnmsxsJp3yd2zfvA3mHOa+zuHTjy/zojrvHX1YqunAZE9M\nlpUcZAaZQBNIZUg9XdPBP5wePuEO7eyGQXg29QL3jz3y1oqwbvkhCuYEOQMp/HeJohCbICMUVwr0\nDvZcOnK9u7GmQNmBQLJCgORxkneqRmAs0BFmDi0bW9E72PPda/BikwWi0OEHkNR14MrewsTAZF+l\nAAWZEH6LUCwUkUlntrS1tiG5IYlEc6LcjYjSYuncngtdhakbM5dXlhgTNEMYLqB9q49MKgsPjTBX\nntVgkDNIgmI1VY2Q7QzgJ9rx++ci3ofziBYiiELQEUAyhB/D29M3Zy+uIkDIhGYvgeKvIkbHxz6T\nevzq6ut+ANh9fldetMn80OzZVVdgLFjBQ0tpEz68jcB4ifx3pQeictVXIEETnBPCKMLEwBIZAPJD\n767V/ETGwsjzYYiC6vzEP9asLo3SGuQvAAAAAElFTkSuQmCCDQotLS0tLS0tLS0tLS16RU85alFL\nbUxjMkNxODhjMjNEeDE5DQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9ImZp\nbGUyIjsgZmlsZW5hbWU9ImF3YXJkX3N0YXJfYnJvbnplXzEucG5nIg0KQ29udGVudC1UeXBlOiBp\nbWFnZS9wbmcNCg0KiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/I\nNwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJvSURBVDjLhZNNSFRR\nFIC/N++9eWMzhkl/ZJqFMQMRFvTvImkXSdKiVRAURBRRW1eZA9EqaNOiFlZEtQxKyrJwUS0K+qEQ\nzaTE/AtLHR3HmffuvafFNINDWGdz7z2c7+Nyzr2WiFAIffaMBDW1+B0diAgYgxiDiCDG4DU1QfcL\nos+fWAXGYUGIUsXiAliUFER+sBAhVCIIVB7QGtEat1oTbcwVz2LMfwR+gPg+oY0bEa3x6sHdUoVd\nniMUj0M2i/j+PwVJa2QUu7YWp34D7mqNWdNApD6Ks24dpvcL4gfJRQXevbutjI4lGRzCS9iYukPo\n5dvxVqWQvn6k/2uyoudd60LGEhG43VBGyI4j2ADZ7vDJ8DZ9Img4hw4cvO/3UZ1vH3p7lrWRLwGV\nneD4y6G84NaOYSoTVYIFIiAGvXI3OWctJv0TW03jZb5gZSfzl9YBpMcIzUwdzQsuVR9EyR3TeCqm\n6w5jZiZQMz8xsxOYzDTi50AMVngJNgrnUweRbwMPiLpHrOJDOl9Vh6HD7GyO52qa0VPj6MwUJpNC\n5mYQS/DUJLH3zzRp1cqN8YulTUyODBBzt4X6Ou870z2I8ZHsHJLLYNQ8jusQ6+2exJf9BfivKdAy\nmKZiaVdodhBRAagAjIbgzxp20lwb6Vp0jADYkQO6IpHfuoqInSJUVoE2HrpyRQ1tic2LC9p3lSHW\nPh2rJfL1MeVP2weWvHp8s3ziNZ49i1q6HrR1YHGBNnt1dG2Z++gC4TdvrqNkK1eHj7ljQ/ujHx6N\nyPw8BFIiKPmNpKar7P7xb/zyT9P+o7OYvzzYSUt8U+TzxytodixEfgN3CFlQMNAcMgAAAABJRU5E\nrkJggg0KLS0tLS0tLS0tLS0tekVPOWpRS21MYzJDcTg4YzIzRHgxOQ0KQ29udGVudC1EaXNwb3Np\ndGlvbjogZm9ybS1kYXRhOyBuYW1lPSJ0ZXh0Ig0KDQpibGFmYXNlbCDDtsOkw7wNCi0tLS0tLS0t\nLS0tLXpFTzlqUUttTGMyQ3E4OGMyM0R4MTktLQ0K\"\"\"\n    ),\n    \"boundary\": \"----------zEO9jQKmLc2Cq88c23Dx19\",\n    \"files\": {\n        \"file1\": (\n            \"arrow_branch.png\",\n            \"image/png\",\n            b64d(\n                \"\"\"\niVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0\nU29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHYSURBVDjLlVLPS1RxHJynpVu7KEn0Vt+2\nl6IO5qGCIsIwCPwD6hTUaSk6REoUHeoQ0qVAMrp0COpY0SUIPVRgSl7ScCUTst6zIoqg0y7lvpnP\nt8MWKuuu29w+hxnmx8dzzmE5+l7mxk1u/a3Dd/ejDjSsII/m3vjJ9MF0yt93ZuTkdD0CnnMO/WOn\nmsxsJp3yd2zfvA3mHOa+zuHTjy/zojrvHX1YqunAZE9MlpUcZAaZQBNIZUg9XdPBP5wePuEO7eyG\nQXg29QL3jz3y1oqwbvkhCuYEOQMp/HeJohCbICMUVwr0DvZcOnK9u7GmQNmBQLJCgORxkneqRmAs\n0BFmDi0bW9E72PPda/BikwWi0OEHkNR14MrewsTAZF+lAAWZEH6LUCwUkUlntrS1tiG5IYlEc6Lc\njYjSYuncngtdhakbM5dXlhgTNEMYLqB9q49MKgsPjTBXntVgkDNIgmI1VY2Q7QzgJ9rx++ci3ofz\niBYiiELQEUAyhB/D29M3Zy+uIkDIhGYvgeKvIkbHxz6Tevzq6ut+ANh9fldetMn80OzZVVdgLFjB\nQ0tpEz68jcB4ifx3pQeictVXIEETnBPCKMLEwBIZAPJD767V/ETGwsjzYYiC6vzEP9asLo3SGuQv\nAAAAAElFTkSuQmCC\"\"\"\n            ),\n        ),\n        \"file2\": (\n            \"award_star_bronze_1.png\",\n            \"image/png\",\n            b64d(\n                \"\"\"\niVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0\nU29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJvSURBVDjLhZNNSFRRFIC/N++9eWMzhkl/\nZJqFMQMRFvTvImkXSdKiVRAURBRRW1eZA9EqaNOiFlZEtQxKyrJwUS0K+qEQzaTE/AtLHR3Hmffu\nvafFNINDWGdz7z2c7+Nyzr2WiFAIffaMBDW1+B0diAgYgxiDiCDG4DU1QfcLos+fWAXGYUGIUsXi\nAliUFER+sBAhVCIIVB7QGtEat1oTbcwVz2LMfwR+gPg+oY0bEa3x6sHdUoVdniMUj0M2i/j+PwVJ\na2QUu7YWp34D7mqNWdNApD6Ks24dpvcL4gfJRQXevbutjI4lGRzCS9iYukPo5dvxVqWQvn6k/2uy\noudd60LGEhG43VBGyI4j2ADZ7vDJ8DZ9Img4hw4cvO/3UZ1vH3p7lrWRLwGVneD4y6G84NaOYSoT\nVYIFIiAGvXI3OWctJv0TW03jZb5gZSfzl9YBpMcIzUwdzQsuVR9EyR3TeCqm6w5jZiZQMz8xsxOY\nzDTi50AMVngJNgrnUweRbwMPiLpHrOJDOl9Vh6HD7GyO52qa0VPj6MwUJpNC5mYQS/DUJLH3zzRp\n1cqN8YulTUyODBBzt4X6Ou870z2I8ZHsHJLLYNQ8jusQ6+2exJf9BfivKdAymKZiaVdodhBRAagA\njIbgzxp20lwb6Vp0jADYkQO6IpHfuoqInSJUVoE2HrpyRQ1tic2LC9p3lSHWPh2rJfL1MeVP2weW\nvHp8s3ziNZ49i1q6HrR1YHGBNnt1dG2Z++gC4TdvrqNkK1eHj7ljQ/ujHx6NyPw8BFIiKPmNpKar\n7P7xb/zyT9P+o7OYvzzYSUt8U+TzxytodixEfgN3CFlQMNAcMgAAAABJRU5ErkJggg==\"\"\"\n            ),\n        ),\n    },\n    \"forms\": {\"text\": u\"blafasel öäü\"},\n}\n\nbrowser_test_cases[\"webkit3-2png1txt\"] = {\n    \"data\": b64d(\n        \"\"\"\nLS0tLS0tV2ViS2l0Rm9ybUJvdW5kYXJ5amRTRmhjQVJrOGZ5R055Ng0KQ29udGVudC1EaXNwb3Np\ndGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlMSI7IGZpbGVuYW1lPSJndGstYXBwbHkucG5nIg0K\nQ29udGVudC1UeXBlOiBpbWFnZS9wbmcNCg0KiVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACN\niR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUA\nd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANnSURBVDiNldJ9aJVVHAfw7znPuS/PvW4405WbLWfbsBuN\nbramq5Tp7mLqIFPXINlwpAitaCAPjWKgBdXzR2TBpEZoadAyCVGndttCFNxqLXORK7x3y704NlzX\nzfs8d89znuf0R/fKk03xHvjCOZxzPpzzO4cIIZBuC6nsGYmRrwFMWVw0hxV+PDVH0gVDKvNSRgZf\nrm5+QCISOi58pY1MXhm1uHg+rPDfabqnoxJpKQ2snf/gwgKY3ut4pfodX/lTGwokRt4AgLTAkMoK\n3cz7enVJg/fyTCdGE/3gwsTo+LBu2+J82qDE6IEXyrd7YvYwbpgjyPOtQHTikvhz+NKgsNGWFhhS\nWU3uwqWPBx9aRwfjPTCFgXx5JY50tumWKbaFFS7uGQypLINKZH/tukb/kN6DSSOCFfO3oqu/3biZ\niH0ZVvjF1Np7AiVG31sdXO/P8GfhqtaLbE8BqOlBZ++xuMXFbudaljxBDnNJHbZlFwF407bFh6kr\nhFRW7Jcztlc9Uee5HD+DaWsCTy/YgbaOvZpl2Y1hhU87QVLxvpQpMfpzfeXuZfmLA/Rw1wdaZOS3\nPm7aNQDGJUZ/qatqKs5etIj03TiKQv8aaFOWOHRm30+nm4zS229DmVs6Ulm6OW/50iD9G1Hsqnrb\nt2lNwyoXYwMAPnk4N1D4aO4qEtW6wagHeZ4SfNP1mW6Zdt1c5WEE8Lll5qKCQbdiGIh/h+JlK6Wi\nxcHM4z2fb9tUtkOO6hdw3Yzi2axdON33xaxuzLSGFf7HXCA1Dav+5Nn2Kyd7DyYK5bXw0QWIJM4j\n7rqGmvKd8gwZw5D+I3K8jyGhmzj366lpi4uWOz0gEUIgpDKPxGjr/VlLanZubJknXLMYiH8Pjccw\nK26C27Oouu8tfHysWbs6HnkxrPATdwVTLaSyzW63+8BLzzX6H1lSSrtjBzFpRPBkZi0mrk3Z7Z2t\nP5xqMiruhP0PTKL5EqMnSgKr87eUvSqPGf3Ipsux53CDpie0QFjhf90NhBDiVlJ1LaqmcqXq2l/7\naU7826E94rWjQb3iXbYXgAzAC8ADwI1//zF1OkQIAUIIBSAlc6tfpkjr52XTj4SFi937eP3MmDAB\n2I5YyaT63AmyuVDHmAAQt0FOzARg/aeGhBCS3EjnCBygMwKAnXL+AdDkiZ/xYgR3AAAAAElFTkSu\nQmCCDQotLS0tLS1XZWJLaXRGb3JtQm91bmRhcnlqZFNGaGNBUms4ZnlHTnk2DQpDb250ZW50LURp\nc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9ImZpbGUyIjsgZmlsZW5hbWU9Imd0ay1uby5wbmci\nDQpDb250ZW50LVR5cGU6IGltYWdlL3BuZw0KDQqJUE5HDQoaCgAAAA1JSERSAAAAFAAAABQIBgAA\nAI2JHQ0AAAAEc0JJVAgICAh8CGSIAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAGXRFWHRTb2Z0d2Fy\nZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAzVJREFUOI2tlM9rG0cUxz8zu7OzsqhtyTIONDG2g9ue\nUnIwFEqCwYUeTC+99u5T/4FAKKUEeuh/4FPvOZXiWw3GpRRcGjW0h1KwLLe4juOspJUlS95frwft\nCkdJbh347o95bz+8mfedVSLC/zncNwUeKnVfw4YD6yncBXCgnsJeBruPRPZf952arPCBUhUL216p\ntLm0vGxmq1X3rbk5AC6CgE67nTQbjTgaDHauYOtrkfYbgV8o9SHw/crKytR7d+5YDXhzc2hjEBGy\nOCZutciU4s+nT68ajcYl8MlXIj+9AnygVMXA4draWqVWqaBLJcz09ChLBBGBXHEYImlK0G5zcHDQ\njuF2UakuyBa2l27dmqqWywxOTpAkIWq1iILgFWVxzOXREZVymaXFxSkL2wVHFw0w1m6urq7asF7H\nsZa01SINAiQIyIp7q0XaapEEAcp1CZ884Z3VVWus3Xyo1P1xlzVsvL2wYJLTUwhDdBiiHAedL1EV\n+yxCJoJkGTpJkDAkOj3l5o0b5vD4eAPYd3M7rM+WSq7qdLCAOjtD+z46y1DXgJkIZNmIHUWj3E6H\nmelp14H1cYUZ3J31fZyTE1zA7fVw+n0cERSg8v2RUS5pPqeArNtlZmGBwqtjY+skwYig80lXBCff\n5OvANFeSxzIRojge5+j8Uu9dXOD5Pt6o41jAz1W69uznMQ8wgOf79LpdNNTHwBT22r1ebDwPt0h8\nDbQAFTADGGvp9PtxCntjYAa7zW43wVpca3HyZZsJaAF0C/k+4vs0wzDJYHcMfCSyHyfJzq/n50NT\nraKVwhl1H3cCpAsphVut8tvz58M4SXaKn8X4pFzB1lG/P2gOBuhaDYxBJhqR5e8Yg56f53gwoNHr\nDa9gq+CMz7JSauoz+HgFvr1trX+vXPZKUYSbJCMTA+K6xMYw8Dx+7Pfjw+Fw+Dt8/h38ALwQkeg6\ncAaoLcLyp/BlVam1dz3PWdDaqbkjdwVpymmaZn9FUXouUn8M3zyDJvAC+PclYA6dBmpA5SO4dxM+\nmIf3fVgCGMLfz+CPf+CXPfgZCIFz4ExEkpeWfH0opZzcKYUsI38nIy5D4BK4kgnAfwLblOaQdQsS\nAAAAAElFTkSuQmCCDQotLS0tLS1XZWJLaXRGb3JtQm91bmRhcnlqZFNGaGNBUms4ZnlHTnk2DQpD\nb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9InRleHQiDQoNCnRoaXMgaXMgYW5v\ndGhlciB0ZXh0IHdpdGggw7xtbMOkw7x0cw0KLS0tLS0tV2ViS2l0Rm9ybUJvdW5kYXJ5amRTRmhj\nQVJrOGZ5R055Ni0tDQo=\"\"\"\n    ),\n    \"boundary\": \"----WebKitFormBoundaryjdSFhcARk8fyGNy6\",\n    \"files\": {\n        \"file1\": (\n            \"gtk-apply.png\",\n            \"image/png\",\n            b64d(\n                \"\"\"\niVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANnSURB\nVDiNldJ9aJVVHAfw7znPuS/PvW4405WbLWfbsBuNbramq5Tp7mLqIFPXINlwpAitaCAPjWKgBdXz\nR2TBpEZoadAyCVGndttCFNxqLXORK7x3y704NlzXzfs8d89znuf0R/fKk03xHvjCOZxzPpzzO4cI\nIZBuC6nsGYmRrwFMWVw0hxV+PDVH0gVDKvNSRgZfrm5+QCISOi58pY1MXhm1uHg+rPDfabqnoxJp\nKQ2snf/gwgKY3ut4pfodX/lTGwokRt4AgLTAkMoK3cz7enVJg/fyTCdGE/3gwsTo+LBu2+J82qDE\n6IEXyrd7YvYwbpgjyPOtQHTikvhz+NKgsNGWFhhSWU3uwqWPBx9aRwfjPTCFgXx5JY50tumWKbaF\nFS7uGQypLINKZH/tukb/kN6DSSOCFfO3oqu/3biZiH0ZVvjF1Np7AiVG31sdXO/P8GfhqtaLbE8B\nqOlBZ++xuMXFbudaljxBDnNJHbZlFwF407bFh6krhFRW7Jcztlc9Uee5HD+DaWsCTy/YgbaOvZpl\n2Y1hhU87QVLxvpQpMfpzfeXuZfmLA/Rw1wdaZOS3Pm7aNQDGJUZ/qatqKs5etIj03TiKQv8aaFOW\nOHRm30+nm4zS229DmVs6Ulm6OW/50iD9G1Hsqnrbt2lNwyoXYwMAPnk4N1D4aO4qEtW6wagHeZ4S\nfNP1mW6Zdt1c5WEE8Lll5qKCQbdiGIh/h+JlK6WixcHM4z2fb9tUtkOO6hdw3Yzi2axdON33xaxu\nzLSGFf7HXCA1Dav+5Nn2Kyd7DyYK5bXw0QWIJM4j7rqGmvKd8gwZw5D+I3K8jyGhmzj366lpi4uW\nOz0gEUIgpDKPxGjr/VlLanZubJknXLMYiH8PjccwK26C27Oouu8tfHysWbs6HnkxrPATdwVTLaSy\nzW63+8BLzzX6H1lSSrtjBzFpRPBkZi0mrk3Z7Z2tP5xqMiruhP0PTKL5EqMnSgKr87eUvSqPGf3I\npsux53CDpie0QFjhf90NhBDiVlJ1LaqmcqXq2l/7aU7826E94rWjQb3iXbYXgAzAC8ADwI1//zF1\nOkQIAUIIBSAlc6tfpkjr52XTj4SFi937eP3MmDAB2I5YyaT63AmyuVDHmAAQt0FOzARg/aeGhBCS\n3EjnCBygMwKAnXL+AdDkiZ/xYgR3AAAAAElFTkSuQmCC\"\"\"\n            ),\n        ),\n        \"file2\": (\n            \"gtk-no.png\",\n            \"image/png\",\n            b64d(\n                \"\"\"\niVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAM1SURB\nVDiNrZTPaxtHFMc/M7uzs7KobckyDjQxtoPbnlJyMBRKgsGFHkwvvfbuU/+BQCilBHrof+BT7zmV\n4lsNxqUUXBo1tIdSsCy3uI7jrKSVJUveX68H7QpHSW4d+O6PeW8/vJn3nVUiwv853DcFHip1X8OG\nA+sp3AVwoJ7CXga7j0T2X/edmqzwgVIVC9teqbS5tLxsZqtV9625OQAugoBOu500G404Ggx2rmDr\na5H2G4FfKPUh8P3KysrUe3fuWA14c3NoYxARsjgmbrXIlOLPp0+vGo3GJfDJVyI/vQJ8oFTFwOHa\n2lqlVqmgSyXM9PQoSwQRgVxxGCJpStBuc3Bw0I7hdlGpLsgWtpdu3ZqqlssMTk6QJCFqtYiC4BVl\ncczl0RGVcpmlxcUpC9sFRxcNMNZurq6u2rBex7GWtNUiDQIkCMiKe6tF2mqRBAHKdQmfPOGd1VVr\nrN18qNT9cZc1bLy9sGCS01MIQ3QYohwHnS9RFfssQiaCZBk6SZAwJDo95eaNG+bw+HgD2HdzO6zP\nlkqu6nSwgDo7Q/s+OstQ14CZCGTZiB1Fo9xOh5npadeB9XGFGdyd9X2ckxNcwO31cPp9HBEUoPL9\nkVEuaT6ngKzbZWZhgcKrY2PrJMGIoPNJVwQn3+TrwDRXkscyEaI4Hufo/FLvXVzg+T7eqONYwM9V\nuvbs5zEPMIDn+/S6XTTUx8AU9tq9Xmw8D7dIfA20ABUwAxhr6fT7cQp7Y2AGu81uN8FaXGtx8mWb\nCWgBdAv5PuL7NMMwyWB3DHwksh8nyc6v5+dDU62ilcIZdR93AqQLKYVbrfLb8+fDOEl2ip/F+KRc\nwdZRvz9oDgboWg2MQSYakeXvGIOen+d4MKDR6w2vYKvgjM+yUmrqM/h4Bb69ba1/r1z2SlGEmyQj\nEwPiusTGMPA8fuz348PhcPg7fP4d/AC8EJHoOnAGqC3C8qfwZVWptXc9z1nQ2qm5I3cFacppmmZ/\nRVF6LlJ/DN88gybwAvj3JWAOnQZqQOUjuHcTPpiH931YAhjC38/gj3/glz34GQiBc+BMRJKXlnx9\nKKWc3CmFLCN/JyMuQ+ASuJIJwH8C25TmkHULEgAAAABJRU5ErkJggg==\"\"\"\n            ),\n        ),\n    },\n    \"forms\": {\"text\": u\"this is another text with ümläüts\"},\n}\n\nbrowser_test_cases[\"ie6-2png1txt\"] = {\n    \"data\": b64d(\n        \"\"\"\nLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS03ZDkxYjAzYTIwMTI4DQpDb250ZW50LURpc3Bv\nc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9ImZpbGUxIjsgZmlsZW5hbWU9IkM6XFB5dGhvbjI1XHd6\ndGVzdFx3ZXJremV1Zy1tYWluXHRlc3RzXG11bHRpcGFydFxmaXJlZm94My0ycG5nMXR4dFxmaWxl\nMS5wbmciDQpDb250ZW50LVR5cGU6IGltYWdlL3gtcG5nDQoNColQTkcNChoKAAAADUlIRFIAAAAQ\nAAAAEAgGAAAAH/P/YQAAAARnQU1BAACvyDcFiukAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdl\nUmVhZHlxyWU8AAABnUlEQVQ4y6VTMWvCQBS+qwEFB10KGaS1P6FDpw7SrVvzAwRRx04VCk4K6iAo\nDhLXdhFcW9qhZCk4FQoW0gp2U4lQRDAUS4hJmn5Xgg2lsQ198PHu3b3vu5d3L9S2bfIf47wOer1e\nwzTNtGEYBP48kUjkfsrb8BIAMb1cLovwRfi07wrYzcCr4/1/Am4FzzhzBGZeefR7E7vd7j0Iu4wY\njUYDBMfD0dBiMUQfstns3toKkHgF6EgmqqruW6bFiHcsxr70awVu63Q6NiOmUinquwfMdF1f28CV\ngCRJx0jMAQ1BEFquRn7CbYVCYZVbr9dbnJMohoIh9kViu90WEW9nMpmxu4JyubyF/VEsFiNcgCPy\noyxiu7XhCPBzdU4s652VnUccbDabPLyN2C6VSmwdhFgel5DB84AJb64mEUlvmqadTKcv40gkUkUs\ng1DjeZ7iRsrWgByP71T7/afxYrHIYry/eoBD9mxsaK4VRamFw2EBQknMAWGvRClNTpQJAfkCxFNg\nBmiez1ipVA4hdgQcOD/TLfylKIo3vubgL/YBnIw+ioOMLtwAAAAASUVORK5CYIINCi0tLS0tLS0t\nLS0tLS0tLS0tLS0tLS0tLS0tLS0tN2Q5MWIwM2EyMDEyOA0KQ29udGVudC1EaXNwb3NpdGlvbjog\nZm9ybS1kYXRhOyBuYW1lPSJmaWxlMiI7IGZpbGVuYW1lPSJDOlxQeXRob24yNVx3enRlc3Rcd2Vy\na3pldWctbWFpblx0ZXN0c1xtdWx0aXBhcnRcZmlyZWZveDMtMnBuZzF0eHRcZmlsZTIucG5nIg0K\nQ29udGVudC1UeXBlOiBpbWFnZS94LXBuZw0KDQqJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAA\nAB/z/2EAAAAEZ0FNQQAAr8g3BYrpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccll\nPAAAAlFJREFUGBmlwd1rzXEcwPH353d+51jO5jDZFpnnJNaiUSK5mkJKMYkUSS1RSvwDpnFBkYeY\nO2p2sZRceCh5mpKnUXZssVaO2Q4Hw9nO+Z3v52O/ldoFF8vrJWbG/5CNB67uXbm65lgma3EzQBVT\nxanD1FBTzDnUDHMOp8qEWPCroyN1uPVE3Rm/ZkXNqWhR3CsvYiziv7LuFHDGzwbmZTM/GavBwDyG\n+eaMhm1zGavdjT2EfDMllC84DDA1nIJiqBpOFVcwXMEIPt8l+/wykeIq9pXd49XZ/Tt8zAiJJ4gZ\n5gkmhqjgeYKIh4hDM9eJ9j6lomo7iVmL+dY9n+StpuO+U0fIA0wEBCIGKqBqRAwK6dvEcm+Iz1tB\n5l0HMclTMqGC4smVCd/UGCECZniAiYCACOT77yM/npCYvYZcbzOx8ULPyyQDWZBcptpTdfwhIiBC\nyANy6fsUvtwmMWctQx8vItGvRItLiFuGK6nlLN3X2ukVgoARIogIIRGhL3md7IebJOZuYCh1Di8a\nkB+YSfphO1NqG/g4OJGQZ04JRQABRIT+5A1+pNooW7iO/KcmIjEjNzCD9KMXVGw6T1H5AkyVkK+q\n/CFAV1szhe+vKchUel+fZlJZjKHMdL49S1K55QLRxDRCakbIT3X3tNSfDOrUOdQptdLE5vpLvG0+\nSOeDNsZVVvO9L8WNoa30NTzGVFEl1MIwMTNGO7JnUXBoV72P53h55xo93V0/E1NKV9YebW/nL8TM\nGK1uVengktnl/rIFs7Borm2wP71zfeOr9/zDb6ZFKM6WU+GQAAAAAElFTkSuQmCCDQotLS0tLS0t\nLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTdkOTFiMDNhMjAxMjgNCkNvbnRlbnQtRGlzcG9zaXRpb246\nIGZvcm0tZGF0YTsgbmFtZT0idGV4dCINCg0KaWU2IHN1Y2tzIDotLw0KLS0tLS0tLS0tLS0tLS0t\nLS0tLS0tLS0tLS0tLS03ZDkxYjAzYTIwMTI4LS0NCg==\"\"\"\n    ),\n    \"boundary\": \"---------------------------7d91b03a20128\",\n    \"files\": {\n        \"file1\": (\n            \"file1.png\",\n            \"image/x-png\",\n            b64d(\n                \"\"\"\niVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0\nU29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGdSURBVDjLpVMxa8JAFL6rAQUHXQoZpLU/\noUOnDtKtW/MDBFHHThUKTgrqICgOEtd2EVxb2qFkKTgVChbSCnZTiVBEMBRLiEmafleCDaWxDX3w\n8e7dve+7l3cv1LZt8h/jvA56vV7DNM20YRgE/jyRSOR+ytvwEgAxvVwui/BF+LTvCtjNwKvj/X8C\nbgXPOHMEZl559HsTu93uPQi7jBiNRgMEx8PR0GIxRB+y2eze2gqQeAXoSCaqqu5bpsWIdyzGvvRr\nBW7rdDo2I6ZSKeq7B8x0XV/bwJWAJEnHSMwBDUEQWq5GfsJthUJhlVuv11uckyiGgiH2RWK73RYR\nb2cymbG7gnK5vIX9USwWI1yAI/KjLGK7teEI8HN1TizrnZWdRxxsNps8vI3YLpVKbB2EWB6XkMHz\ngAlvriYRSW+app1Mpy/jSCRSRSyDUON5nuJGytaAHI/vVPv9p/FischivL96gEP2bGxorhVFqYXD\nYQFCScwBYa9EKU1OlAkB+QLEU2AGaJ7PWKlUDiF2BBw4P9Mt/KUoije+5uAv9gGcjD6Kg4wu3AAA\nAABJRU5ErkJggg==\"\"\"\n            ),\n        ),\n        \"file2\": (\n            \"file2.png\",\n            \"image/x-png\",\n            b64d(\n                \"\"\"\niVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0\nU29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJRSURBVBgZpcHda81xHMDx9+d3fudYzuYw\n2RaZ5yTWolEiuZpCSjGJFEktUUr8A6ZxQZGHmDtqdrGUXHgoeZqSp1F2bLFWjtkOB8PZzvmd7+dj\nv5XaBRfL6yVmxv+QjQeu7l25uuZYJmtxM0AVU8Wpw9RQU8w51AxzDqfKhFjwq6Mjdbj1RN0Zv2ZF\nzaloUdwrL2Is4r+y7hRwxs8G5mUzPxmrwcA8hvnmjIZtcxmr3Y09hHwzJZQvOAwwNZyCYqgaThVX\nMFzBCD7fJfv8MpHiKvaV3ePV2f07fMwIiSeIGeYJJoao4HmCiIeIQzPXifY+paJqO4lZi/nWPZ/k\nrabjvlNHyANMBAQiBiqgakQMCunbxHJviM9bQeZdBzHJUzKhguLJlQnf1BghAmZ4gImAgAjk++8j\nP56QmL2GXG8zsfFCz8skA1mQXKbaU3X8ISIgQsgDcun7FL7cJjFnLUMfLyLRr0SLS4hbhiup5Szd\n19rpFYKAESKICCERoS95neyHmyTmbmAodQ4vGpAfmEn6YTtTahv4ODiRkGdOCUUAAUSE/uQNfqTa\nKFu4jvynJiIxIzcwg/SjF1RsOk9R+QJMlZCvqvwhQFdbM4XvrynIVHpfn2ZSWYyhzHS+PUtSueUC\n0cQ0QmpGyE9197TUnwzq1DnUKbXSxOb6S7xtPkjngzbGVVbzvS/FjaGt9DU8xlRRJdTCMDEzRjuy\nZ1FwaFe9j+d4eecaPd1dPxNTSlfWHm1v5y/EzBitblXp4JLZ5f6yBbOwaK5tsD+9c33jq/f8w2+m\nRSjOllPhkAAAAABJRU5ErkJggg==\"\"\"\n            ),\n        ),\n    },\n    \"forms\": {\"text\": u\"ie6 sucks :-/\"},\n}\n\nclass TestWerkzeugExamples(BaseMultipartTest):\n    def test_werkzeug_examples(self):\n        \"\"\"Tests multipart parsing against data collected from webbrowsers\"\"\"\n        for name in browser_test_cases:\n            self.reset()\n            self.data = BytesIO(browser_test_cases[name]['data'])\n            boundary = browser_test_cases[name]['boundary']\n            files = browser_test_cases[name]['files']\n            forms = browser_test_cases[name]['forms']\n            self.parse('multipart/form-data; boundary=%s'%boundary, clen=-1)\n            for name, file in files.items():\n                self.assertFile(name, file[0], file[1], file[2])\n            for name, form in forms.items():\n                self.assertForm(name, form)\n"
  },
  {
    "path": "test/test_oorouting.py",
    "content": "\"\"\"\nTests & demonstrates various OO approaches to routes\n\"\"\"\nimport unittest\nimport sys\n\nif sys.version_info >= (3, 0, 0):\n    from io import BytesIO\nelse:\n    from StringIO import StringIO as BytesIO\n\n__author__ = 'atc'\n\nfrom bottle import Bottle, request, tob, BaseRequest\n\n\nclass TestRouter(object):\n    \"\"\"\n    A test class for wrapping routes to test certain OO scenarios\n    \"\"\"\n\n    app = Bottle()\n\n    @app.post(\"/route1/<msg>\")\n    def route_1(self, msg):\n        body = request.body.readline()\n        return {'msg': msg, 'len': len(body)}\n\n\nclass TestRoutes(unittest.TestCase):\n    def test_route1(self):\n        body = \"abc\"\n        request.environ['CONTENT_LENGTH'] = str(len(tob(body)))\n        request.environ['wsgi.input'] = BytesIO()\n        request.environ['wsgi.input'].write(tob(body))\n        request.environ['wsgi.input'].seek(0)\n\n        result = TestRouter().route_1(\"bob\")\n        self.assertEqual(result, dict(msg=\"bob\", len=3))\n"
  },
  {
    "path": "test/test_outputfilter.py",
    "content": "# -*- coding: utf-8 -*-\n'''Everything returned by Bottle()._cast() MUST be WSGI compatiple.'''\n\nimport unittest\nimport bottle\nfrom bottle import tob, touni\nfrom .tools import ServerTestBase, tobs, warn\n\nUSING_UJSON = True\n\ntry:\n    import ujson\nexcept ImportError:\n    USING_UJSON = False\n\nclass TestOutputFilter(ServerTestBase):\n    ''' Tests for WSGI functionality, routing and output casting (decorators) '''\n\n    def test_bytes(self):\n        self.app.route('/')(lambda: tob('test'))\n        self.assertBody('test')\n\n    def test_bytearray(self):\n        self.app.route('/')(lambda: map(tob, ['t', 'e', 'st']))\n        self.assertBody('test')\n\n    def test_tuple(self):\n        self.app.route('/')(lambda: ('t', 'e', 'st'))\n        self.assertBody('test')\n\n    def test_emptylist(self):\n        self.app.route('/')(lambda: [])\n        self.assertBody('')\n\n    def test_none(self):\n        self.app.route('/')(lambda: None)\n        self.assertBody('')\n\n    def test_illegal(self):\n        self.app.route('/')(lambda: 1234)\n        self.assertStatus(500)\n        self.assertInBody('Unhandled exception')\n\n    def test_error(self):\n        bottle.debug(True)\n        self.app.route('/')(lambda: 1/0)\n        self.assertStatus(500)\n        self.assertInBody('ZeroDivisionError')\n\n    def test_fatal_error(self):\n        @self.app.route('/')\n        def test(): raise KeyboardInterrupt()\n        self.assertRaises(KeyboardInterrupt, self.assertStatus, 500)\n\n    def test_file(self):\n        self.app.route('/')(lambda: tobs('test'))\n        self.assertBody('test')\n\n    def test_unicode(self):\n        self.app.route('/')(lambda: touni('äöüß'))\n        self.assertBody(touni('äöüß').encode('utf8'))\n\n        self.app.route('/')(lambda: [touni('äö'), touni('üß')])\n        self.assertBody(touni('äöüß').encode('utf8'))\n\n        @self.app.route('/')\n        def test5():\n            bottle.response.content_type='text/html; charset=iso-8859-15'\n            return touni('äöüß')\n        self.assertBody(touni('äöüß').encode('iso-8859-15'))\n\n        @self.app.route('/')\n        def test5():\n            bottle.response.content_type='text/html'\n            return touni('äöüß')\n        self.assertBody(touni('äöüß').encode('utf8'))\n\n    def test_json(self):\n        self.app.route('/')(lambda: {'a': 1})\n\n        self.assertBody(bottle.json_dumps({'a': 1}))\n        self.assertHeader('Content-Type','application/json')\n\n    @unittest.skipIf(USING_UJSON, 'ujson do not throw exception in serialize')\n    def test_json_serialization_error(self):\n        \"\"\"\n        Verify that 500 errors serializing dictionaries don't return\n        content-type application/json\n        \"\"\"\n        self.app.route('/')(lambda: {'a': set()})\n\n        self.assertStatus(500)\n        self.assertHeader('Content-Type','text/html; charset=UTF-8')\n\n\n    def test_json_HTTPResponse(self):\n        self.app.route('/')(lambda: bottle.HTTPResponse({'a': 1}, 500))\n\n        self.assertBody(bottle.json_dumps({'a': 1}))\n        self.assertHeader('Content-Type','application/json')\n\n    def test_json_HTTPError(self):\n        self.app.error(400)(lambda e: e.body)\n        self.app.route('/')(lambda: bottle.HTTPError(400, {'a': 1}))\n\n        self.assertBody(bottle.json_dumps({'a': 1}))\n        self.assertHeader('Content-Type','application/json')\n\n    def test_generator_callback(self):\n        @self.app.route('/')\n        def test():\n            bottle.response.headers['Test-Header'] = 'test'\n            yield 'foo'\n        self.assertBody('foo')\n        self.assertHeader('Test-Header', 'test')\n\n    def test_empty_generator_callback(self):\n        @self.app.route('/')\n        def test():\n            yield\n            bottle.response.headers['Test-Header'] = 'test'\n        self.assertBody('')\n        self.assertHeader('Test-Header', 'test')\n\n    def test_error_in_generator_callback(self):\n        @self.app.route('/')\n        def test():\n            yield 1/0\n        self.assertStatus(500)\n        self.assertInBody('ZeroDivisionError')\n\n    def test_fatal_error_in_generator_callback(self):\n        @self.app.route('/')\n        def test():\n            yield\n            raise KeyboardInterrupt()\n        self.assertRaises(KeyboardInterrupt, self.assertStatus, 500)\n\n    def test_httperror_in_generator_callback(self):\n        @self.app.route('/')\n        def test():\n            yield\n            bottle.abort(404, 'teststring')\n        self.assertInBody('teststring')\n        self.assertInBody('404 Not Found')\n        self.assertStatus(404)\n\n    def test_httpresponse_in_generator_callback(self):\n        @self.app.route('/')\n        def test():\n            yield bottle.HTTPResponse('test')\n        self.assertBody('test')\n\n    def test_unicode_generator_callback(self):\n        @self.app.route('/')\n        def test():\n            yield touni('äöüß')\n        self.assertBody(touni('äöüß').encode('utf8'))\n\n    def test_invalid_generator_callback(self):\n        @self.app.route('/')\n        def test():\n            yield 1234\n        self.assertStatus(500)\n        self.assertInBody('Unsupported response type')\n\n    def test_iterator_with_close(self):\n        class MyIter(object):\n            def __init__(self, data):\n                self.data = data\n                self.closed = False\n            def close(self):    self.closed = True\n            def __iter__(self): return iter(self.data)\n\n        byte_iter = MyIter([tob('abc'), tob('def')])\n        unicode_iter = MyIter([touni('abc'), touni('def')])\n\n        for test_iter in (byte_iter, unicode_iter):\n            @self.app.route('/')\n            def test(): return test_iter\n            self.assertInBody('abcdef')\n            self.assertTrue(byte_iter.closed)\n\n    def test_cookie(self):\n        \"\"\" WSGI: Cookies \"\"\"\n        @bottle.route('/cookie')\n        def test():\n            bottle.response.set_cookie('b', 'b')\n            bottle.response.set_cookie('c', 'c', path='/')\n            return 'hello'\n        try:\n            c = self.urlopen('/cookie')['header'].get_all('Set-Cookie', '')\n        except:\n            c = self.urlopen('/cookie')['header'].get('Set-Cookie', '').split(',')\n            c = [x.strip() for x in c]\n        self.assertTrue('b=b' in c)\n        self.assertTrue('c=c; Path=/' in c)\n"
  },
  {
    "path": "test/test_plugins.py",
    "content": "# -*- coding: utf-8 -*-\nimport unittest\nfrom . import tools\n\nfrom bottle import HTTPResponse, HTTPError, json_dumps\n\n\nclass MyPlugin(object):\n    def __init__(self):\n        self.app = None\n        self.add_args = {}\n        self.add_content = ''\n\n    def setup(self, app):\n        self.app = app\n\n    def apply(self, func, config):\n        def wrapper(*a, **ka):\n            ka.update(self.add_args)\n            self.lastcall = func, a, ka\n            return ''.join(func(*a, **ka)) + self.add_content\n        return wrapper\n\n\ndef my_decorator(func):\n    def wrapper(*a, **ka):\n        return list(func(*a, **ka))[-1]\n\n\n\nclass TestPluginManagement(tools.ServerTestBase):\n\n    def verify_installed(self, plugin, otype, **config):\n        self.assertEqual(type(plugin), otype)\n        self.assertEqual(plugin.config, config)\n        self.assertEqual(plugin.app, self.app)\n        self.assertTrue(plugin in self.app.plugins)\n\n    def test_install_plugin(self):\n        plugin = MyPlugin()\n        installed = self.app.install(plugin)\n        self.assertEqual(plugin, installed)\n        self.assertTrue(plugin in self.app.plugins)\n\n    def test_install_decorator(self):\n        installed = self.app.install(my_decorator)\n        self.assertEqual(my_decorator, installed)\n        self.assertTrue(my_decorator in self.app.plugins)\n\n    def test_install_non_plugin(self):\n        self.assertRaises(TypeError, self.app.install, 'I am not a plugin')\n\n    def test_uninstall_by_instance(self):\n        plugin  = self.app.install(MyPlugin())\n        plugin2 = self.app.install(MyPlugin())\n        self.app.uninstall(plugin)\n        self.assertTrue(plugin not in self.app.plugins)\n        self.assertTrue(plugin2 in self.app.plugins)\n\n    def test_uninstall_by_type(self):\n        plugin = self.app.install(MyPlugin())\n        plugin2 = self.app.install(MyPlugin())\n        self.app.uninstall(MyPlugin)\n        self.assertTrue(plugin not in self.app.plugins)\n        self.assertTrue(plugin2 not in self.app.plugins)\n\n    def test_uninstall_by_name(self):\n        plugin = self.app.install(MyPlugin())\n        plugin2 = self.app.install(MyPlugin())\n        plugin.name = 'myplugin'\n        self.app.uninstall('myplugin')\n        self.assertTrue(plugin not in self.app.plugins)\n        self.assertTrue(plugin2 in self.app.plugins)\n\n    def test_uninstall_all(self):\n        plugin = self.app.install(MyPlugin())\n        plugin2 = self.app.install(MyPlugin())\n        self.app.uninstall(True)\n        self.assertFalse(self.app.plugins)\n\n    def test_route_plugin(self):\n        plugin = MyPlugin()\n        plugin.add_content = ';foo'\n        @self.app.route('/a')\n        @self.app.route('/b', apply=[plugin])\n        def a(): return 'plugin'\n        self.assertBody('plugin', '/a')\n        self.assertBody('plugin;foo', '/b')\n\n    def test_plugin_oder(self):\n        self.app.install(MyPlugin()).add_content = ';global-1'\n        self.app.install(MyPlugin()).add_content = ';global-2'\n        l1 = MyPlugin()\n        l1.add_content = ';local-1'\n        l2 = MyPlugin()\n        l2.add_content = ';local-2'\n        @self.app.route('/a')\n        @self.app.route('/b', apply=[l1, l2])\n        def a(): return 'plugin'\n        self.assertBody('plugin;global-2;global-1', '/a')\n        self.assertBody('plugin;local-2;local-1;global-2;global-1', '/b')\n\n    def test_skip_by_instance(self):\n        g1 = self.app.install(MyPlugin())\n        g1.add_content = ';global-1'\n        g2 = self.app.install(MyPlugin())\n        g2.add_content = ';global-2'\n        l1 = MyPlugin()\n        l1.add_content = ';local-1'\n        l2 = MyPlugin()\n        l2.add_content = ';local-2'\n        @self.app.route('/a', skip=[g2, l2])\n        @self.app.route('/b', apply=[l1, l2], skip=[g2, l2])\n        def a(): return 'plugin'\n        self.assertBody('plugin;global-1', '/a')\n        self.assertBody('plugin;local-1;global-1', '/b')\n\n    def test_skip_by_class(self):\n        g1 = self.app.install(MyPlugin())\n        g1.add_content = ';global-1'\n        @self.app.route('/a')\n        @self.app.route('/b', skip=[MyPlugin])\n        def a(): return 'plugin'\n        self.assertBody('plugin;global-1', '/a')\n        self.assertBody('plugin', '/b')\n\n    def test_skip_by_name(self):\n        g1 = self.app.install(MyPlugin())\n        g1.add_content = ';global-1'\n        g1.name = 'test'\n        @self.app.route('/a')\n        @self.app.route('/b', skip=['test'])\n        def a(): return 'plugin'\n        self.assertBody('plugin;global-1', '/a')\n        self.assertBody('plugin', '/b')\n\n    def test_skip_all(self):\n        g1 = self.app.install(MyPlugin())\n        g1.add_content = ';global-1'\n        @self.app.route('/a')\n        @self.app.route('/b', skip=[True])\n        def a(): return 'plugin'\n        self.assertBody('plugin;global-1', '/a')\n        self.assertBody('plugin', '/b')\n\n    def test_skip_nonlist(self):\n        g1 = self.app.install(MyPlugin())\n        g1.add_content = ';global-1'\n        @self.app.route('/a')\n        @self.app.route('/b', skip=g1)\n        def a(): return 'plugin'\n        self.assertBody('plugin;global-1', '/a')\n        self.assertBody('plugin', '/b')\n\n    def test_json_plugin_catches_httpresponse(self):\n        @self.app.get('/return')\n        def _():\n            return HTTPResponse({'test': 'ko'}, 402)\n        @self.app.get('/raise')\n        def _():\n            raise HTTPResponse({'test': 'ko2'}, 402)\n\n        self.assertBody(json_dumps({'test': 'ko'}), '/return')\n        self.assertBody(json_dumps({'test': 'ko2'}), '/raise')\n\n\nclass TestPluginAPI(tools.ServerTestBase):\n\n    def setUp(self):\n        super(TestPluginAPI, self).setUp()\n        @self.app.route('/', test='plugin.cfg')\n        def test(**args):\n            return ', '.join('%s:%s' % (k,v) for k,v in args.items())\n\n    def test_callable(self):\n        def plugin(func):\n            def wrapper(*a, **ka):\n                return func(test='me', *a, **ka) + '; tail'\n            return wrapper\n        self.app.install(plugin)\n        self.assertBody('test:me; tail', '/')\n\n\n    def test_apply(self):\n        class Plugin(object):\n            def apply(self, func, route):\n                def wrapper(*a, **ka):\n                    return func(test=route.config['test'], *a, **ka) + '; tail'\n                return wrapper\n            def __call__(self, func):\n                raise AssertionError(\"Plugins must not be called \"\\\n                                     \"if they implement 'apply'\")\n        self.app.install(Plugin())\n        self.assertBody('test:plugin.cfg; tail', '/')\n\n    def test_instance_method_wrapper(self):\n        class Plugin(object):\n            api=2\n            def apply(self, callback, route):\n                return self.b\n            def b(self): return \"Hello\"\n        self.app.install(Plugin())\n        self.assertBody('Hello', '/')\n\n    def test_setup(self):\n        class Plugin(object):\n            def __call__(self, func): return func\n            def setup(self, app): self.app = app\n        plugin = self.app.install(Plugin())\n        self.assertEqual(getattr(plugin, 'app', None), self.app)\n\n    def test_close(self):\n        class Plugin(object):\n            def __call__(self, func): return func\n            def close(self): self.closed = True\n        plugin = self.app.install(Plugin())\n        plugin2 = self.app.install(Plugin())\n        self.app.uninstall(plugin)\n        self.assertTrue(getattr(plugin, 'closed', False))\n        self.app.close()\n        self.assertTrue(getattr(plugin2, 'closed', False))\n"
  },
  {
    "path": "test/test_resources.py",
    "content": "import os.path\nimport sys\nimport unittest\nfrom bottle import ResourceManager\n\nif sys.platform == 'win32':\n    TEST_PATHS = ('C:\\\\foo\\\\bar\\\\', 'C:\\\\foo\\\\bar\\\\baz', 'C:\\\\foo\\\\baz\\\\..\\\\bar\\\\blub')\n    EXPECTED = ['C:\\\\foo\\\\bar\\\\']\nelse:\n    TEST_PATHS = ('/foo/bar/', '/foo/bar/baz', '/foo/baz/../bar/blub')\n    EXPECTED = ['/foo/bar/']\n\n\nclass TestResourceManager(unittest.TestCase):\n\n    def test_path_normalize(self):\n        for test in TEST_PATHS:\n            rm = ResourceManager()\n            rm.add_path(test)\n            self.assertEqual(rm.path, EXPECTED)\n\n    def test_path_create(self):\n        import shutil\n        import tempfile\n        tempdir = tempfile.mkdtemp()\n        try:\n            rm = ResourceManager()\n            exists = rm.add_path('./test/', base=tempdir)\n            self.assertEqual(exists, False)\n            exists = rm.add_path('./test2/', base=tempdir, create=True)\n            self.assertEqual(exists, True)\n        finally:\n            shutil.rmtree(tempdir)\n\n    def test_path_absolutize(self):\n        if sys.platform == 'win32':\n            tests = ('.\\\\foo\\\\bar\\\\', '.\\\\foo\\\\bar\\\\baz', '.\\\\foo\\\\baz\\\\..\\\\bar\\\\blub')\n            abspath = os.path.abspath('.\\\\foo\\\\bar\\\\') + os.sep\n        else:\n            tests = ('./foo/bar/', './foo/bar/baz', './foo/baz/../bar/blub')\n            abspath = os.path.abspath('./foo/bar/') + os.sep\n\n        for test in tests:\n            rm = ResourceManager()\n            rm.add_path(test)\n            self.assertEqual(rm.path, [abspath])\n\n        for test in tests:\n            rm = ResourceManager()\n            rm.add_path(test[2:])\n            self.assertEqual(rm.path, [abspath])\n\n    def test_path_unique(self):\n        rm = ResourceManager()\n        [rm.add_path(test) for test in TEST_PATHS]\n        self.assertEqual(rm.path, EXPECTED)\n\n    def test_root_path(self):\n        if sys.platform == 'win32':\n            expected = ['C:\\\\foo\\\\bar\\\\baz\\\\']\n        else:\n            expected = ['/foo/bar/baz/']\n\n        for test in TEST_PATHS:\n            rm = ResourceManager()\n            rm.add_path('./baz/', test)\n            self.assertEqual(rm.path, expected)\n\n        for test in TEST_PATHS:\n            rm = ResourceManager()\n            rm.add_path('baz/', test)\n            self.assertEqual(rm.path, expected)\n\n    def test_path_order(self):\n        rm = ResourceManager()\n        rm.add_path('/middle/')\n        rm.add_path('/first/', index=0)\n        rm.add_path('/last/')\n\n        if sys.platform == 'win32':\n            self.assertEqual(rm.path, ['C:\\\\first\\\\', 'C:\\\\middle\\\\', 'C:\\\\last\\\\'])\n        else:\n            self.assertEqual(rm.path, ['/first/', '/middle/', '/last/'])\n\n    def test_get(self):\n        rm = ResourceManager()\n        rm.add_path('/first/')\n        rm.add_path(__file__)\n        rm.add_path('/last/')\n        self.assertEqual(None, rm.lookup('notexist.txt'))\n        self.assertEqual(__file__, rm.lookup(os.path.basename(__file__)))\n\n    def test_open(self):\n        rm = ResourceManager()\n        rm.add_path(__file__)\n        fp = rm.open(__file__)\n        self.assertEqual(fp.read(), open(__file__).read())\n"
  },
  {
    "path": "test/test_route.py",
    "content": "import functools\nimport unittest\nimport bottle\nfrom .tools import api\nfrom bottle import _re_flatten\n\n\nclass TestReFlatten(unittest.TestCase):\n\n    def test_re_flatten(self):\n        self.assertEqual(_re_flatten(r\"(?:aaa)(_bbb)\"), '(?:aaa)(?:_bbb)')\n        self.assertEqual(_re_flatten(r\"(aaa)(_bbb)\"), '(?:aaa)(?:_bbb)')\n        self.assertEqual(_re_flatten(r\"aaa)(_bbb)\"), 'aaa)(?:_bbb)')\n        self.assertEqual(_re_flatten(r\"aaa(_bbb)\"), 'aaa(?:_bbb)')\n        self.assertEqual(_re_flatten(r\"aaa_bbb\"), 'aaa_bbb')\n\n\nclass TestRoute(unittest.TestCase):\n\n    @api('0.12')\n    def test_callback_inspection(self):\n        def x(a, b): pass\n        def d(f):\n            @functools.wraps(f)\n            def w():\n                return f()\n            return w\n        route = bottle.Route(bottle.Bottle(), None, None, d(x))\n        self.assertEqual(route.get_undecorated_callback(), x)\n        self.assertEqual(set(route.get_callback_args()), set(['a', 'b']))\n\n        def d2(foo):\n            def d(f):\n                @functools.wraps(f)\n                def w():\n                    return f()\n                return w\n            return d\n\n        route = bottle.Route(bottle.Bottle(), None, None, d2('foo')(x))\n        self.assertEqual(route.get_undecorated_callback(), x)\n        self.assertEqual(set(route.get_callback_args()), set(['a', 'b']))\n\n    def test_callback_inspection_multiple_args(self):\n        # decorator with argument, modifying kwargs\n        def d2(f=\"1\"):\n            def d(fn):\n                @functools.wraps(fn)\n                def w(*args, **kwargs):\n                    # modification of kwargs WITH the decorator argument\n                    # is necessary requirement for the error\n                    kwargs[\"a\"] = f\n                    return fn(*args, **kwargs)\n                return w\n            return d\n\n        @d2(f='foo')\n        def x(a, b):\n            return\n\n        route = bottle.Route(bottle.Bottle(), None, None, x)\n\n        # triggers the \"TypeError: 'foo' is not a Python function\"\n        self.assertEqual(set(route.get_callback_args()), set(['a', 'b']))\n\n    def test_callback_inspection_newsig(self):\n        env = {}\n        eval(compile('def foo(a, *, b=5): pass', '<foo>', 'exec'), env, env)\n        route = bottle.Route(bottle.Bottle(), None, None, env['foo'])\n        self.assertEqual(set(route.get_callback_args()), set(['a', 'b']))\n\n    def test_unwrap_wrapped(self):\n        import functools\n        def func(): pass\n        @functools.wraps(func)\n        def wrapped():\n            return func()\n\n        route = bottle.Route(bottle.Bottle(), None, None, wrapped)\n        self.assertEqual(route.get_undecorated_callback(), func)\n\n    @api(\"0.12\", \"0.14\")\n    def test_unwrap_closure(self):\n        def func(): pass\n        wrapped = _null_decorator(func, update_wrapper=False)\n        route = bottle.Route(bottle.Bottle(), None, None, wrapped)\n        self.assertEqual(route.get_undecorated_callback(), func)\n\n    # @api(\"0.15\")\n    # def test_not_unwrap_closure(self):\n    #     def other(): pass\n    #     def func():\n    #         return other()\n    #     route = bottle.Route(bottle.Bottle(), None, None, func)\n    #     self.assertEqual(route.get_undecorated_callback(), func)\n\n    @api(\"0.13\", \"0.14\")\n    def test_unwrap_closure_callable(self):\n        class Foo:\n            def __call__(self): pass\n\n        func = Foo()\n        wrapped = _null_decorator(func, update_wrapper=False)\n        route = bottle.Route(bottle.Bottle(), None, None, wrapped)\n        self.assertEqual(route.get_undecorated_callback(), func)\n        repr(route) # Raised cause cb has no '__name__'\n\n    def test_unwrap_method(self):\n        def func(self): pass\n\n        class Foo:\n            test = _null_decorator(func)\n\n        wrapped = Foo().test\n        route = bottle.Route(bottle.Bottle(), None, None, wrapped)\n        self.assertEqual(route.get_undecorated_callback(), func)\n\n\ndef _null_decorator(func, update_wrapper=True):\n    def wrapper():\n        return func()\n    if update_wrapper:\n        functools.update_wrapper(wrapper, func)\n    return wrapper\n"
  },
  {
    "path": "test/test_router.py",
    "content": "# -*- coding: utf-8 -*-\n\nimport unittest\nimport bottle\nimport warnings\n\n\nclass TestRouter(unittest.TestCase):\n    CGI = False\n    \n    def setUp(self):\n        self.r = bottle.Router()\n    \n    def add(self, path, target, method='GET', **ka):\n        with warnings.catch_warnings() as r:\n            warnings.simplefilter(\"ignore\")\n            self.r.add(path, method, target, **ka)\n\n    def match(self, path, method='GET'):\n        env = {'PATH_INFO': path, 'REQUEST_METHOD': method}\n        if self.CGI:\n            env['wsgi.run_once'] = 'true'\n        return self.r.match(env)\n\n    def assertMatches(self, rule, url, method='GET', **args):\n        self.add(rule, rule, method)\n        target, urlargs = self.match(url, method)\n        self.assertEqual(rule, target)\n        self.assertEqual(args, urlargs)\n\n    def testBasic(self):\n        self.assertMatches('/static', '/static')\n        self.assertMatches('/\\\\:its/:#.+#/:test/:name#[a-z]+#/',\n                           '/:its/a/cruel/world/',\n                           test='cruel', name='world')\n        self.assertMatches('/:test', '/test', test='test') # No tail\n        self.assertMatches(':test/', 'test/', test='test') # No head\n        self.assertMatches('/:test/', '/test/', test='test') # Middle\n        self.assertMatches(':test', 'test', test='test') # Full wildcard\n        self.assertMatches('/:#anon#/match', '/anon/match') # Anon wildcards\n        self.assertRaises(bottle.HTTPError, self.match, '//no/m/at/ch/')\n\n    def testNewSyntax(self):\n        self.assertMatches('/static', '/static')\n        self.assertMatches('/\\\\<its>/<:re:.+>/<test>/<name:re:[a-z]+>/',\n                           '/<its>/a/cruel/world/',\n                           test='cruel', name='world')\n        self.assertMatches('/<test>', '/test', test='test') # No tail\n        self.assertMatches('<test>/', 'test/', test='test') # No head\n        self.assertMatches('/<test>/', '/test/', test='test') # Middle\n        self.assertMatches('<test>', 'test', test='test') # Full wildcard\n        self.assertMatches('/<:re:anon>/match', '/anon/match') # Anon wildcards\n        self.assertRaises(bottle.HTTPError, self.match, '//no/m/at/ch/')\n\n    def testUnicode(self):\n        self.assertMatches('/uni/<x>', '/uni/瓶', x='瓶')\n\n    def testValueErrorInFilter(self):\n        self.r.add_filter('test', lambda x: ('.*', int, int))\n\n        self.assertMatches('/int/<i:test>', '/int/5', i=5) # No tail\n        self.assertRaises(bottle.HTTPError, self.match, '/int/noint')\n\n    def testIntFilter(self):\n        self.assertMatches('/object/<id:int>', '/object/567', id=567)\n        self.assertRaises(bottle.HTTPError, self.match, '/object/abc')\n\n    def testFloatFilter(self):\n        self.assertMatches('/object/<id:float>', '/object/1', id=1)\n        self.assertMatches('/object/<id:float>', '/object/1.1', id=1.1)\n        self.assertMatches('/object/<id:float>', '/object/.1', id=0.1)\n        self.assertMatches('/object/<id:float>', '/object/1.', id=1)\n        self.assertRaises(bottle.HTTPError, self.match, '/object/abc')\n        self.assertRaises(bottle.HTTPError, self.match, '/object/')\n        self.assertRaises(bottle.HTTPError, self.match, '/object/.')\n\n    def testPathFilter(self):\n        self.assertMatches('/<id:path>/:f', '/a/b', id='a', f='b')\n        self.assertMatches('/<id:path>', '/a', id='a')\n\n    def testAnonWildcard(self):\n        self.assertMatches('/anon/<>', '/anon/whatever')\n        self.assertMatches('/anonfilter/<:int>', '/anonfilter/5')\n        self.assertRaises(bottle.HTTPError, self.match, '/anonfilter/noint')\n\n    def testWildcardNames(self):\n        self.assertMatches('/alpha/:abc', '/alpha/alpha', abc='alpha')\n        self.assertMatches('/alnum/:md5', '/alnum/sha1', md5='sha1')\n\n    def testParentheses(self):\n        self.assertMatches('/func(:param)', '/func(foo)', param='foo')\n        self.assertMatches('/func2(:param#(foo|bar)#)', '/func2(foo)', param='foo')\n        self.assertMatches('/func2(:param#(foo|bar)#)', '/func2(bar)', param='bar')\n        self.assertRaises(bottle.HTTPError, self.match, '/func2(baz)')\n\n    def testErrorInPattern(self):\n        self.assertRaises(Exception, self.assertMatches, '/:bug#(#/', '/foo/')\n        self.assertRaises(Exception, self.assertMatches, '/<:re:(>/', '/foo/')\n\n    def testBuild(self):\n        add, build = self.add, self.r.build\n        add('/:test/:name#[a-z]+#/', 'handler', name='testroute')\n\n        url = build('testroute', test='hello', name='world')\n        self.assertEqual('/hello/world/', url)\n\n        url = build('testroute', test='hello', name='world', q='value')\n        self.assertEqual('/hello/world/?q=value', url)\n\n        # RouteBuildError: Missing URL argument: 'test'\n        self.assertRaises(bottle.RouteBuildError, build, 'test')\n\n    def testBuildAnon(self):\n        add, build = self.add, self.r.build\n        add('/anon/:#.#', 'handler', name='anonroute')\n\n        url = build('anonroute', 'hello')\n        self.assertEqual('/anon/hello', url)\n\n        url = build('anonroute', 'hello', q='value')\n        self.assertEqual('/anon/hello?q=value', url)\n\n        # RouteBuildError: Missing URL argument: anon0.\n        self.assertRaises(bottle.RouteBuildError, build, 'anonroute')\n\n    def testBuildFilter(self):\n        add, build = self.add, self.r.build\n        add('/int/<:int>', 'handler', name='introute')\n\n        url = build('introute', '5')\n        self.assertEqual('/int/5', url)\n\n        # RouteBuildError: Missing URL argument: anon0.\n        self.assertRaises(ValueError, build, 'introute', 'hello')\n\n    def test_dynamic_before_static_any(self):\n        ''' Static ANY routes have lower priority than dynamic GET routes. '''\n        self.add('/foo', 'foo', 'ANY')\n        self.assertEqual(self.match('/foo')[0], 'foo')\n        self.add('/<:>', 'bar', 'GET')\n        self.assertEqual(self.match('/foo')[0], 'bar')\n\n    def test_any_static_before_dynamic(self):\n        ''' Static ANY routes have higher priority than dynamic ANY routes. '''\n        self.add('/<:>', 'bar', 'ANY')\n        self.assertEqual(self.match('/foo')[0], 'bar')\n        self.add('/foo', 'foo', 'ANY')\n        self.assertEqual(self.match('/foo')[0], 'foo')\n\n    def test_dynamic_any_if_method_exists(self):\n        ''' Check dynamic ANY routes if the matching method is known,\n            but not matched.'''\n        self.add('/bar<:>', 'bar', 'GET')\n        self.assertEqual(self.match('/barx')[0], 'bar')\n        self.add('/foo<:>', 'foo', 'ANY')\n        self.assertEqual(self.match('/foox')[0], 'foo')\n\n    def test_lots_of_routes(self):\n        n = bottle.Router._MAX_GROUPS_PER_PATTERN+10\n        for i in range(n):        \n            self.add('/<:>/'+str(i), str(i), 'GET')\n        self.assertEqual(self.match('/foo/'+str(n-1))[0], str(n-1))\n\nclass TestRouterInCGIMode(TestRouter):\n    ''' Makes no sense since the default route does not optimize CGI anymore.'''\n    CGI = True\n"
  },
  {
    "path": "test/test_securecookies.py",
    "content": "#coding: utf-8\nimport unittest\n\nimport bottle\nfrom bottle import tob, touni\nfrom .tools import api\n\n\nclass TestSignedCookies(unittest.TestCase):\n    def setUp(self):\n        self.data = touni('υηι¢σ∂є')\n        self.secret = tob('secret')\n        bottle.app.push()\n        bottle.response.bind()\n\n    def tear_down(self):\n        bottle.app.pop()\n\n    def get_pairs(self):\n        for k, v in bottle.response.headerlist:\n            if k == 'Set-Cookie':\n                key, value = v.split(';')[0].split('=', 1)\n                yield key.lower().strip(), value.strip()\n\n    def set_pairs(self, pairs):\n        header = ','.join(['%s=%s' % (k, v) for k, v in pairs])\n        bottle.request.bind({'HTTP_COOKIE': header})\n\n    def testValid(self):\n        bottle.response.set_cookie('key', self.data, secret=self.secret)\n        pairs = self.get_pairs()\n        self.set_pairs(pairs)\n        result = bottle.request.get_cookie('key', secret=self.secret)\n        self.assertEqual(self.data, result)\n\n    def testWrongKey(self):\n        bottle.response.set_cookie('key', self.data, secret=self.secret)\n        pairs = self.get_pairs()\n        self.set_pairs([(k + 'xxx', v) for (k, v) in pairs])\n        result = bottle.request.get_cookie('key', secret=self.secret)\n        self.assertEqual(None, result)\n\n\nclass TestSignedCookiesWithPickle(TestSignedCookies):\n    def setUp(self):\n        super(TestSignedCookiesWithPickle, self).setUp()\n        self.data = dict(a=5, b=touni('υηι¢σ∂є'), c=[1,2,3,4,tob('bytestring')])\n\n    @api(\"0.9\", \"0.13\")\n    def testValid(self):\n        super(TestSignedCookiesWithPickle, self).testValid()\n\n    @api(\"0.9\", \"0.13\")\n    def testWrongKey(self):\n        super(TestSignedCookiesWithPickle, self).testWrongKey()\n"
  },
  {
    "path": "test/test_sendfile.py",
    "content": "import sys\nimport unittest\nfrom bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob\nimport bottle\nimport wsgiref.util\nimport os\nimport tempfile\nimport time\n\nbasename = os.path.basename(__file__)\nroot = os.path.dirname(__file__)\n\nbasename2 = os.path.basename(bottle.__file__)\nroot2 = os.path.dirname(bottle.__file__)\n\n\nweekday_full = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']\nweekday_abbr = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\nmonth_abbr = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n\nclass TestDateParser(unittest.TestCase):\n    def test_rfc1123(self):\n        \"\"\"DateParser: RFC 1123 format\"\"\"\n        ts = time.time()\n        rs = bottle.http_date(ts)\n        self.assertEqual(int(ts), int(parse_date(rs)))\n\n    def test_rfc850(self):\n        \"\"\"DateParser: RFC 850 format\"\"\"\n        ts = time.time()\n        t = time.gmtime(ts)\n        rs = time.strftime(\"%%s, %d-%%s-%y %H:%M:%S GMT\", t) % (weekday_full[t.tm_wday], month_abbr[t.tm_mon])\n        self.assertEqual(int(ts), int(parse_date(rs)))\n\n    def test_asctime(self):\n        \"\"\"DateParser: asctime format\"\"\"\n        ts = time.time()\n        t = time.gmtime(ts)\n        rs = time.strftime(\"%%s %%s %d %H:%M:%S %Y\", t) % (weekday_abbr[t.tm_wday], month_abbr[t.tm_mon])\n        self.assertEqual(int(ts), int(parse_date(rs)))\n\n    def test_bad(self):\n        \"\"\"DateParser: Bad format\"\"\"\n        self.assertEqual(None, parse_date('Bad 123'))\n\n\nclass TestSendFile(unittest.TestCase):\n    def setUp(self):\n        e = dict()\n        wsgiref.util.setup_testing_defaults(e)\n        b = Bottle()\n        request.bind(e)\n        response.bind()\n\n    def test_valid(self):\n        \"\"\" SendFile: Valid requests\"\"\"\n        out = static_file(basename, root=root)\n        self.assertEqual(open(__file__,'rb').read(), out.body.read())\n\n    def test_invalid(self):\n        \"\"\" SendFile: Invalid requests\"\"\"\n        self.assertEqual(404, static_file('not/a/file', root=root).status_code)\n        f = static_file(os.path.join('./../', basename), root='./views/')\n        self.assertEqual(403, f.status_code)\n\n    def test_file_not_readable(self):\n        if sys.platform == 'win32':\n            return\n        if os.geteuid() == 0:\n            return # Root can read anything\n\n        try:\n            fp, fn = tempfile.mkstemp()\n            os.chmod(fn, 0)\n            self.assertEqual(403, static_file(fn, root='/').status_code)\n        finally:\n            os.close(fp)\n            os.unlink(fn)\n\n    def test_mime(self):\n        \"\"\" SendFile: Mime Guessing\"\"\"\n        f = static_file(basename, root=root)\n        self.assertTrue(f.headers['Content-Type'].split(';')[0] in ('application/x-python-code', 'text/x-python'))\n        f = static_file(basename, root=root, mimetype='some/type')\n        self.assertEqual('some/type', f.headers['Content-Type'])\n        f = static_file(basename, root=root, mimetype='text/foo')\n        self.assertEqual('text/foo; charset=UTF-8', f.headers['Content-Type'])\n        f = static_file(basename, root=root, mimetype='text/foo', charset='latin1')\n        self.assertEqual('text/foo; charset=latin1', f.headers['Content-Type'])\n\n    def test_mime_gzip(self):\n        \"\"\" SendFile: Mime Guessing\"\"\"\n        try:\n            fp, fn = tempfile.mkstemp(suffix=\".txt.gz\")\n            os.close(fp) #  File needs to be closed before it can be accessed on Windows\n            f = static_file(fn, root='/')\n            self.assertTrue(f.headers['Content-Type'][0] in ('application/gzip'))\n            self.assertFalse('Content-Encoding' in f.headers)\n        finally:\n            os.close(fp)\n            os.unlink(fn)\n\n    def test_ims(self):\n        \"\"\" SendFile: If-Modified-Since\"\"\"\n        request.environ['HTTP_IF_MODIFIED_SINCE'] = bottle.http_date(time.time())\n        res = static_file(basename, root=root)\n        self.assertEqual(304, res.status_code)\n        self.assertEqual(int(os.stat(__file__).st_mtime), parse_date(res.headers['Last-Modified']))\n        self.assertAlmostEqual(int(time.time()), parse_date(res.headers['Date']), delta=2)\n        request.environ['HTTP_IF_MODIFIED_SINCE'] = bottle.http_date(100)\n        self.assertEqual(open(__file__,'rb').read(), static_file(basename, root=root).body.read())\n\n    def test_ims_empty(self):\n        \"\"\" SendFile: Empty If-Modified-Since\"\"\"\n        request.environ['HTTP_IF_MODIFIED_SINCE'] = ''\n        self.assertEqual(open(__file__, 'rb').read(), static_file(basename, root=root).body.read())\n\n    def test_etag(self):\n        \"\"\" SendFile: If-Modified-Since\"\"\"\n        res = static_file(basename, root=root)\n        self.assertTrue('ETag' in res.headers)\n        self.assertEqual(200, res.status_code)\n        etag = res.headers['ETag']\n        \n        request.environ['HTTP_IF_NONE_MATCH'] = etag\n        res = static_file(basename, root=root)\n        self.assertTrue('ETag' in res.headers)\n        self.assertEqual(etag, res.headers['ETag'])\n        self.assertEqual(304, res.status_code)\n\n        request.environ['HTTP_IF_NONE_MATCH'] = etag\n        res = static_file(basename2, root=root2)\n        self.assertTrue('ETag' in res.headers)\n        self.assertNotEqual(etag, res.headers['ETag'])\n        self.assertEqual(200, res.status_code)\n\n    def test_download(self):\n        \"\"\" SendFile: Download as attachment \"\"\"\n        f = static_file(basename, root=root, download=\"foo.mp3\")\n        self.assertEqual('audio/mpeg', f.headers['Content-Type'])\n\n        f = static_file(basename, root=root, download=True)\n        self.assertEqual('attachment; filename=\"%s\"' % basename, f.headers['Content-Disposition'])\n        request.environ['HTTP_IF_MODIFIED_SINCE'] = bottle.http_date(100)\n\n        f = static_file(basename, root=root)\n        self.assertEqual(open(__file__,'rb').read(), f.body.read())\n\n    def test_range(self):\n        request.environ['HTTP_RANGE'] = 'bytes=10-25,-80'\n        f = static_file(basename, root=root)\n        c = open(__file__, 'rb'); c.seek(10)\n        self.assertEqual(c.read(16), tob('').join(f.body))\n        self.assertEqual('bytes 10-25/%d' % len(open(__file__, 'rb').read()),\n                         f.headers['Content-Range'])\n        self.assertEqual('bytes', f.headers['Accept-Ranges'])\n\n    def test_range_parser(self):\n        r = lambda rs: list(parse_range_header(rs, 100))\n        self.assertEqual([(90, 100)], r('bytes=-10'))\n        self.assertEqual([(10, 100)], r('bytes=10-'))\n        self.assertEqual([(5, 11)],  r('bytes=5-10'))\n        self.assertEqual([(10, 100), (90, 100), (5, 11)],  r('bytes=10-,-10,5-10'))\n\n    def test_custom_headers(self):\n        \"\"\" SendFile: Custom headers \"\"\"\n        headers = {'X-Custom-Header': 'test-value'}\n        headers_orig = headers.copy()\n        res = static_file(basename, root=root, headers=headers)\n        self.assertTrue('X-Custom-Header' in res.headers)\n        self.assertEqual('test-value', res.headers['X-Custom-Header'])\n        # Check the passed in headers dict isn't modified.\n        self.assertEqual(headers_orig, headers)\n"
  },
  {
    "path": "test/test_stpl.py",
    "content": "# -*- coding: utf-8 -*-\nfrom __future__ import with_statement\nimport unittest\nfrom bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote\nimport re, os\nimport traceback\nfrom .tools import chdir\n\n\nclass TestSimpleTemplate(unittest.TestCase):\n    def assertRenders(self, tpl, to, *args, **vars):\n        if isinstance(tpl, str):\n            tpl = SimpleTemplate(tpl, lookup=[os.path.join(os.path.dirname(__file__), 'views')])\n        self.assertEqual(touni(to), tpl.render(*args, **vars))\n\n    def test_string(self):\n        \"\"\" Templates: Parse string\"\"\"\n        self.assertRenders('start {{var}} end', 'start var end', var='var')\n\n    def test_self_as_variable_name(self):\n        self.assertRenders('start {{self}} end', 'start var end', {'self':'var'})\n\n    def test_file(self):\n        with chdir(__file__):\n            t = SimpleTemplate(name='./views/stpl_simple.tpl', lookup=['.'])\n            self.assertRenders(t, 'start var end\\n', var='var')\n\n    def test_name(self):\n        with chdir(__file__):\n            t = SimpleTemplate(name='stpl_simple', lookup=['./views/'])\n            self.assertRenders(t, 'start var end\\n', var='var')\n\n    def test_unicode(self):\n        self.assertRenders('start {{var}} end', 'start äöü end', var=touni('äöü'))\n        self.assertRenders('start {{var}} end', 'start äöü end', var=tob('äöü'))\n\n    def test_unicode_code(self):\n        \"\"\" Templates: utf8 code in file\"\"\"\n        with chdir(__file__):\n            t = SimpleTemplate(name='./views/stpl_unicode.tpl', lookup=['.'])\n            self.assertRenders(t, 'start ñç äöü end\\n', var=touni('äöü'))\n\n    def test_import(self):\n        \"\"\" Templates: import statement\"\"\"\n        t = '%from base64 import b64encode\\nstart {{b64encode(var.encode(\"ascii\") if hasattr(var, \"encode\") else var)}} end'\n        self.assertRenders(t, 'start dmFy end', var='var')\n\n    def test_data(self):\n        \"\"\" Templates: Data representation \"\"\"\n        t = SimpleTemplate('<{{var}}>')\n        self.assertRenders('<{{var}}>', '<True>', var=True)\n        self.assertRenders('<{{var}}>', '<False>', var=False)\n        self.assertRenders('<{{var}}>', '<>', var=None)\n        self.assertRenders('<{{var}}>', '<0>', var=0)\n        self.assertRenders('<{{var}}>', '<5>', var=5)\n        self.assertRenders('<{{var}}>', '<b>', var=tob('b'))\n        self.assertRenders('<{{var}}>', '<1.0>', var=1.0)\n        self.assertRenders('<{{var}}>', '<[1, 2]>', var=[1,2])\n\n    def test_htmlutils_quote(self):\n        self.assertEqual('\"&lt;&#039;&#13;&#10;&#9;&quot;\\\\&gt;\"', html_quote('<\\'\\r\\n\\t\"\\\\>'));\n\n    def test_escape(self):\n        self.assertRenders('<{{var}}>', '<b>', var='b')\n        self.assertRenders('<{{var}}>', '<&lt;&amp;&gt;>',var='<&>')\n\n    def test_noescape(self):\n        self.assertRenders('<{{!var}}>', '<b>',   var='b')\n        self.assertRenders('<{{!var}}>', '<<&>>', var='<&>')\n\n    def test_noescape_setting(self):\n        t = SimpleTemplate('<{{var}}>', noescape=True)\n        self.assertRenders(t, '<b>', var='b')\n        self.assertRenders(t, '<<&>>', var='<&>')\n        t = SimpleTemplate('<{{!var}}>', noescape=True)\n        self.assertRenders(t, '<b>', var='b')\n        self.assertRenders(t, '<&lt;&amp;&gt;>', var='<&>')\n\n    def test_blocks(self):\n        \"\"\" Templates: Code blocks and loops \"\"\"\n        t = \"start\\n%for i in l:\\n{{i}} \\n%end\\nend\"\n        self.assertRenders(t, 'start\\n1 \\n2 \\n3 \\nend', l=[1,2,3])\n        self.assertRenders(t, 'start\\nend', l=[])\n        t = \"start\\n%if i:\\n{{i}} \\n%end\\nend\"\n        self.assertRenders(t, 'start\\nTrue \\nend', i=True)\n        self.assertRenders(t, 'start\\nend', i=False)\n\n    def test_elsebug(self):\n        ''' Whirespace between block keyword and colon is allowed '''\n        self.assertRenders(\"%if 1:\\nyes\\n%else:\\nno\\n%end\\n\", \"yes\\n\")\n        self.assertRenders(\"%if 1:\\nyes\\n%else     :\\nno\\n%end\\n\", \"yes\\n\")\n\n    def test_commentbug(self):\n        ''' A \"#\" sign within an string is not a comment '''\n        self.assertRenders(\"%if '#':\\nyes\\n%end\\n\", \"yes\\n\")\n\n    def test_multiline(self):\n        ''' Block statements with non-terminating newlines '''\n        self.assertRenders(\"%if 1\\\\\\n%and 1:\\nyes\\n%end\\n\", \"yes\\n\")\n\n    def test_newline_in_parameterlist(self):\n        ''' Block statements with non-terminating newlines in list '''\n        self.assertRenders(\"%a=[1,\\n%2]\\n{{len(a)}}\", \"2\")\n\n    def test_dedentbug(self):\n        ''' One-Line dednet blocks should not change indention '''\n        t = '%if x: a=\"if\"\\n%else: a=\"else\"\\n%end\\n{{a}}'\n        self.assertRenders(t, \"if\", x=True)\n        self.assertRenders(t, \"else\", x=False)\n        t = '%if x:\\n%a=\"if\"\\n%else: a=\"else\"\\n%end\\n{{a}}'\n        self.assertRenders(t, \"if\", x=True)\n        self.assertRenders(t, \"else\", x=False)\n        t = SimpleTemplate('%if x: a=\"if\"\\n%else: a=\"else\"\\n%end')\n        self.assertRaises(NameError, t.render)\n\n    def test_onelinebugs(self):\n        ''' One-Line blocks should not change indention '''\n        t = '%if x:\\n%a=1\\n%end\\n{{a}}'\n        self.assertRenders(t, \"1\", x=True)\n        t = '%if x: a=1; end\\n{{a}}'\n        self.assertRenders(t, \"1\", x=True)\n        t = '%if x:\\n%a=1\\n%else:\\n%a=2\\n%end\\n{{a}}'\n        self.assertRenders(t, \"1\", x=True)\n        self.assertRenders(t, \"2\", x=False)\n        t = '%if x:   a=1\\n%else:\\n%a=2\\n%end\\n{{a}}'\n        self.assertRenders(t, \"1\", x=True)\n        self.assertRenders(t, \"2\", x=False)\n        t = '%if x:\\n%a=1\\n%else:   a=2; end\\n{{a}}'\n        self.assertRenders(t, \"1\", x=True)\n        self.assertRenders(t, \"2\", x=False)\n        t = '%if x:   a=1\\n%else:   a=2; end\\n{{a}}'\n        self.assertRenders(t, \"1\", x=True)\n        self.assertRenders(t, \"2\", x=False)\n\n    def test_onelineblocks(self):\n        \"\"\" Templates: one line code blocks \"\"\"\n        t = \"start\\n%a=''\\n%for i in l: a += str(i); end\\n{{a}}\\nend\"\n        self.assertRenders(t, 'start\\n123\\nend', l=[1,2,3])\n        self.assertRenders(t, 'start\\n\\nend', l=[])\n\n    def test_escaped_codelines(self):\n        self.assertRenders('\\\\% test', '% test')\n        self.assertRenders('\\\\%% test', '%% test')\n        self.assertRenders('    \\\\% test', '    % test')\n\n    def test_nobreak(self):\n        \"\"\" Templates: Nobreak statements\"\"\"\n        self.assertRenders(\"start\\\\\\\\\\n%pass\\nend\", 'startend')\n\n    def test_nonobreak(self):\n        \"\"\" Templates: Escaped nobreak statements\"\"\"\n        self.assertRenders(\"start\\\\\\\\\\n\\\\\\\\\\n%pass\\nend\", 'start\\\\\\\\\\nend')\n\n    def test_include(self):\n        \"\"\" Templates: Include statements\"\"\"\n        with chdir(__file__):\n            t = SimpleTemplate(name='stpl_include', lookup=['./views/'])\n            self.assertRenders(t, 'before\\nstart var end\\nafter\\n', var='var')\n\n    def test_rebase(self):\n        \"\"\" Templates: %rebase and method passing \"\"\"\n        with chdir(__file__):\n            t = SimpleTemplate(name='stpl_t2main', lookup=['./views/'])\n            result='+base+\\n+main+\\n!1234!\\n+include+\\n-main-\\n+include+\\n-base-\\n'\n            self.assertRenders(t, result, content='1234')\n\n    def test_get(self):\n        self.assertRenders('{{get(\"x\", \"default\")}}', '1234', x='1234')\n        self.assertRenders('{{get(\"x\", \"default\")}}', 'default')\n\n    def test_setdefault(self):\n        t = '%setdefault(\"x\", \"default\")\\n{{x}}'\n        self.assertRenders(t, '1234', x='1234')\n        self.assertRenders(t, 'default')\n\n    def test_defnied(self):\n        self.assertRenders('{{x if defined(\"x\") else \"no\"}}', 'yes', x='yes')\n        self.assertRenders('{{x if defined(\"x\") else \"no\"}}', 'no')\n\n    def test_notfound(self):\n        \"\"\" Templates: Unavailable templates\"\"\"\n        self.assertRaises(TemplateError, SimpleTemplate, name=\"abcdef\", lookup=['.'])\n\n    def test_error(self):\n        \"\"\" Templates: Exceptions\"\"\"\n        self.assertRaises(SyntaxError, lambda: SimpleTemplate('%for badsyntax').co)\n        self.assertRaises(IndexError, SimpleTemplate('{{i[5]}}', lookup=['.']).render, i=[0])\n\n    def test_winbreaks(self):\n        \"\"\" Templates: Test windows line breaks \"\"\"\n        self.assertRenders('%var+=1\\r\\n{{var}}\\r\\n', '6\\r\\n', var=5)\n\n    def test_winbreaks_end_bug(self):\n        d = { 'test': [ 1, 2, 3 ] }\n        self.assertRenders('%for i in test:\\n{{i}}\\n%end\\n', '1\\n2\\n3\\n', **d)\n        self.assertRenders('%for i in test:\\n{{i}}\\r\\n%end\\n', '1\\r\\n2\\r\\n3\\r\\n', **d)\n        self.assertRenders('%for i in test:\\r\\n{{i}}\\n%end\\r\\n', '1\\n2\\n3\\n', **d)\n        self.assertRenders('%for i in test:\\r\\n{{i}}\\r\\n%end\\r\\n', '1\\r\\n2\\r\\n3\\r\\n', **d)\n\n    def test_commentonly(self):\n        \"\"\" Templates: Commentd should behave like code-lines (e.g. flush text-lines) \"\"\"\n        t = SimpleTemplate('...\\n%#test\\n...')\n        self.assertNotEqual('#test', t.code.splitlines()[0])\n\n    def test_template_shortcut(self):\n        result = template('start {{var}} end', var='middle')\n        self.assertEqual(touni('start middle end'), result)\n\n    def test_view_decorator(self):\n        @view('start {{var}} end')\n        def test():\n            return dict(var='middle')\n        self.assertEqual(touni('start middle end'), test())\n\n    def test_view_decorator_issue_407(self):\n        with chdir(__file__):\n            @view('stpl_no_vars')\n            def test():\n                pass\n            self.assertEqual(touni('hihi'), test())\n            @view('aaa {{x}}', x='bbb')\n            def test2():\n                pass\n            self.assertEqual(touni('aaa bbb'), test2())\n\n    def test_global_config(self):\n        SimpleTemplate.global_config('meh', 1)\n        t = SimpleTemplate('anything')\n        self.assertEqual(touni('anything'), t.render())\n\n    def test_bug_no_whitespace_before_stmt(self):\n        self.assertRenders('\\n{{var}}', '\\nx', var='x')\n\n    def test_bug_block_keywords_eat_prefixed_code(self):\n        ''' #595: Everything before an 'if' statement is removed, resulting in\n            SyntaxError. '''\n        tpl = \"% m = 'x' if True else 'y'\\n{{m}}\"\n        self.assertRenders(tpl, 'x')\n\n\nclass TestSTPLDir(unittest.TestCase):\n    def fix_ident(self, string):\n        lines = string.splitlines(True)\n        if not lines: return string\n        if not lines[0].strip(): lines.pop(0)\n        whitespace = re.match('([ \\t]*)', lines[0]).group(0)\n        if not whitespace: return string\n        for i in range(len(lines)):\n            lines[i] = lines[i][len(whitespace):]\n        return lines[0][:0].join(lines)\n\n    def assertRenders(self, source, result, syntax=None, *args, **vars):\n        source = self.fix_ident(source)\n        result = self.fix_ident(result)\n        tpl = SimpleTemplate(source, syntax=syntax)\n        try:\n            tpl.co\n            self.assertEqual(touni(result), tpl.render(*args, **vars))\n        except SyntaxError:\n            self.fail('Syntax error in template:\\n%s\\n\\nTemplate code:\\n##########\\n%s\\n##########' %\n                     (traceback.format_exc(), tpl.code))\n\n    def test_multiline_block(self):\n        source = '''\n            <% a = 5\n            b = 6\n            c = 7 %>\n            {{a+b+c}}\n        '''; result = '''\n            18\n        '''\n        self.assertRenders(source, result)\n        source_wineol = '<% a = 5\\r\\nb = 6\\r\\nc = 7\\r\\n%>\\r\\n{{a+b+c}}'\n        result_wineol = '18'\n        self.assertRenders(source_wineol, result_wineol)\n\n    def test_multiline_ignore_eob_in_string(self):\n        source = '''\n            <% x=5 # a comment\n               y = '%>' # a string\n               # this is still code\n               # lets end this %>\n            {{x}}{{!y}}\n        '''; result = '''\n            5%>\n        '''\n        self.assertRenders(source, result)\n\n    def test_multiline_find_eob_in_comments(self):\n        source = '''\n            <% # a comment\n               # %> ignore because not end of line\n               # this is still code\n               x=5\n               # lets end this here %>\n            {{x}}\n        '''; result = '''\n            5\n        '''\n        self.assertRenders(source, result)\n\n    def test_multiline_indention(self):\n        source = '''\n            <%   if True:\n                   a = 2\n                     else:\n                       a = 0\n                         end\n            %>\n            {{a}}\n        '''; result = '''\n            2\n        '''\n        self.assertRenders(source, result)\n\n    def test_multiline_eob_after_end(self):\n        source = '''\n            <%   if True:\n                   a = 2\n                 end %>\n            {{a}}\n        '''; result = '''\n            2\n        '''\n        self.assertRenders(source, result)\n\n    def test_multiline_eob_in_single_line_code(self):\n        # eob must be a valid python expression to allow this test.\n        source = '''\n            cline eob=5; eob\n            xxx\n        '''; result = '''\n            xxx\n        '''\n        self.assertRenders(source, result, syntax='sob eob cline foo bar')\n\n    def test_multiline_strings_in_code_line(self):\n        source = '''\n            % a = \"\"\"line 1\n                  line 2\"\"\"\n            {{a}}\n        '''; result = '''\n            line 1\n                  line 2\n        '''\n        self.assertRenders(source, result)\n\n    def test_multiline_comprehensions_in_code_line(self):\n        self.assertRenders(source='''\n            % a = [\n            %    (i + 1)\n            %    for i in range(5)\n            %    if i%2 == 0\n            % ]\n            {{a}}\n        ''', result='''\n            [1, 3, 5]\n        ''')\n\n\n    def test_end_keyword_on_same_line(self):\n        self.assertRenders('''\n            % if 1:\n            %    1; end\n            foo\n        ''', '''\n            foo\n        ''')\n"
  },
  {
    "path": "test/test_wsgi.py",
    "content": "# -*- coding: utf-8 -*-\nfrom __future__ import with_statement\nimport bottle\nfrom .tools import ServerTestBase, chdir\nfrom bottle import tob, touni, HTTPResponse\n\nclass TestWsgi(ServerTestBase):\n    ''' Tests for WSGI functionality, routing and output casting (decorators) '''\n\n    def test_get(self):\n        \"\"\" WSGI: GET routes\"\"\"\n        @bottle.route('/')\n        def test(): return 'test'\n        self.assertStatus(404, '/not/found')\n        self.assertStatus(405, '/', post=\"var=value\")\n        self.assertBody('test', '/')\n\n    def test_post(self):\n        \"\"\" WSGI: POST routes\"\"\"\n        @bottle.route('/', method='POST')\n        def test(): return 'test'\n        self.assertStatus(404, '/not/found')\n        self.assertStatus(405, '/')\n        self.assertBody('test', '/', post=\"var=value\")\n\n    def test_headget(self):\n        \"\"\" WSGI: HEAD routes and GET fallback\"\"\"\n        @bottle.route('/get')\n        def test(): return 'test'\n        @bottle.route('/head', method='HEAD')\n        def test2(): return 'test'\n        # GET -> HEAD\n        self.assertStatus(405, '/head')\n        # HEAD -> HEAD\n        self.assertStatus(200, '/head', method='HEAD')\n        self.assertBody('', '/head', method='HEAD')\n        # HEAD -> GET\n        self.assertStatus(200, '/get', method='HEAD')\n        self.assertBody('', '/get', method='HEAD')\n\n    def test_request_attrs(self):\n        \"\"\" WSGI: POST routes\"\"\"\n        @bottle.route('/')\n        def test():\n            self.assertEqual(bottle.request.app,\n                             bottle.default_app())\n            self.assertEqual(bottle.request.route,\n                             bottle.default_app().routes[0])\n            return 'foo'\n        self.assertBody('foo', '/')\n\n    def get204(self):\n        \"\"\" 204 responses must not return some entity headers \"\"\"\n        bad = ('content-length', 'content-type')\n        for h in bad:\n            bottle.response.set_header(h, 'foo')\n        bottle.status = 204\n        for h, v in bottle.response.headerlist:\n            self.assertFalse(h.lower() in bad, \"Header %s not deleted\" % h)\n\n    def get304(self):\n        \"\"\" 304 responses must not return entity headers \"\"\"\n        bad = ('allow', 'content-encoding', 'content-language',\n               'content-length', 'content-md5', 'content-range',\n               'content-type', 'last-modified') # + c-location, expires?\n        for h in bad:\n            bottle.response.set_header(h, 'foo')\n        bottle.status = 304\n        for h, v in bottle.response.headerlist:\n            self.assertFalse(h.lower() in bad, \"Header %s not deleted\" % h)\n\n    def test_anymethod(self):\n        self.assertStatus(404, '/any')\n        @bottle.route('/any', method='ANY')\n        def test2(): return 'test'\n        self.assertStatus(200, '/any', method='HEAD')\n        self.assertBody('test', '/any', method='GET')\n        self.assertBody('test', '/any', method='POST')\n        self.assertBody('test', '/any', method='DELETE')\n        @bottle.route('/any', method='GET')\n        def test2(): return 'test2'\n        self.assertBody('test2', '/any', method='GET')\n        @bottle.route('/any', method='POST')\n        def test2(): return 'test3'\n        self.assertBody('test3', '/any', method='POST')\n        self.assertBody('test', '/any', method='DELETE')\n\n    def test_500(self):\n        \"\"\" WSGI: Exceptions within handler code (HTTP 500) \"\"\"\n        @bottle.route('/')\n        def test(): return 1/0\n        self.assertStatus(500, '/')\n\n    def test_500_unicode(self):\n        @bottle.route('/')\n        def test(): raise Exception(touni('Unicode äöüß message.'))\n        self.assertStatus(500, '/')\n\n    def test_utf8_url(self):\n        \"\"\" WSGI: UTF-8 Characters in the URL \"\"\"\n        @bottle.route('/my-öäü/<string>')\n        def test(string): return string\n        self.assertBody(tob('urf8-öäü'), '/my-öäü/urf8-öäü')\n\n    def test_utf8_header(self):\n        header = 'öäü'.encode('utf8').decode('latin1')\n        @bottle.route('/test')\n        def test():\n            h = bottle.request.get_header('X-Test')\n            self.assertEqual(h, 'öäü')\n            bottle.response.set_header('X-Test', h)\n        self.assertHeader('X-Test', header, '/test', env={'HTTP_X_TEST': header})\n\n    def test_utf8_404(self):\n        self.assertStatus(404, '/not-found/urf8-öäü')\n\n    def test_401(self):\n        \"\"\" WSGI: abort(401, '') (HTTP 401) \"\"\"\n        @bottle.route('/')\n        def test(): bottle.abort(401)\n        self.assertStatus(401, '/')\n        @bottle.error(401)\n        def err(e):\n            bottle.response.status = 200\n            return str(type(e))\n        self.assertStatus(200, '/')\n        self.assertBody(\"<class 'bottle.HTTPError'>\",'/')\n\n    def test_303(self):\n        \"\"\" WSGI: redirect (HTTP 303) \"\"\"\n        @bottle.route('/')\n        def test(): bottle.redirect('/yes')\n        @bottle.route('/one')\n        def test2(): bottle.redirect('/yes',305)\n        env = {'SERVER_PROTOCOL':'HTTP/1.1'}\n        self.assertStatus(303, '/', env=env)\n        self.assertHeader('Location', 'http://127.0.0.1/yes', '/', env=env)\n        env = {'SERVER_PROTOCOL':'HTTP/1.0'}\n        self.assertStatus(302, '/', env=env)\n        self.assertHeader('Location', 'http://127.0.0.1/yes', '/', env=env)\n        self.assertStatus(305, '/one', env=env)\n        self.assertHeader('Location', 'http://127.0.0.1/yes', '/one', env=env)\n\n    def test_generator_callback(self):\n        @bottle.route('/yield')\n        def test():\n            bottle.response.headers['Test-Header'] = 'test'\n            yield 'foo'\n        @bottle.route('/yield_nothing')\n        def test2():\n            yield\n            bottle.response.headers['Test-Header'] = 'test'\n        self.assertBody('foo', '/yield')\n        self.assertHeader('Test-Header', 'test', '/yield')\n        self.assertBody('', '/yield_nothing')\n        self.assertHeader('Test-Header', 'test', '/yield_nothing')\n\n    def test_cookie(self):\n        \"\"\" WSGI: Cookies \"\"\"\n        @bottle.route('/cookie')\n        def test():\n            bottle.response.set_cookie('b', 'b')\n            bottle.response.set_cookie('c', 'c', path='/')\n            return 'hello'\n        try:\n            c = self.urlopen('/cookie')['header'].get_all('Set-Cookie', '')\n        except:\n            c = self.urlopen('/cookie')['header'].get('Set-Cookie', '').split(',')\n            c = [x.strip() for x in c]\n        self.assertTrue('b=b' in c)\n        self.assertTrue('c=c; Path=/' in c)\n\n\nclass TestErrorHandling(ServerTestBase):\n    def test_error_routing(self):\n\n        @bottle.route(\"/<code:int>\")\n        def throw_error(code):\n            bottle.abort(code)\n\n        # Decorator syntax\n        @bottle.error(500)\n        def catch_500(err):\n            return err.status_line\n\n        # Decorator syntax (unusual/custom error codes)\n        @bottle.error(999)\n        def catch_999(err):\n            return err.status_line\n\n        # Callback argument syntax\n        def catch_404(err):\n            return err.status_line\n        bottle.error(404, callback=catch_404)\n\n        self.assertBody(\"404 Not Found\", '/not_found')\n        self.assertBody(\"500 Internal Server Error\", '/500')\n        self.assertBody(\"999 Unknown\", '/999')\n\n\nclass CloseableBody:\n\n    def __init__(self, body):\n        self.body = body\n        self.close_events = []\n\n    def __iter__(self):\n        return iter(self.body)\n\n    def close(self):\n        self.close_events.append(True)\n\n\nclass TestCloseable(ServerTestBase):\n    \"\"\" Test that close-able return types are actually closed \"\"\"\n\n    def setUp(self):\n        super().setUp()\n\n    def closeable(self, body=[\"OK\"]):\n        self.closeable = CloseableBody(body)\n\n    def assertClosed(self, body, open_args=None):\n        closeable = CloseableBody(body)\n        self.app.route(\"/close\")(lambda: closeable)\n        try:\n            self.urlopen(\"/close\", **(open_args or {}))\n        finally:\n            self.assertTrue(len(closeable.close_events) > 0, \"Response object was not closed\")\n\n    def test_direct(self):\n        self.assertClosed([\"OK\"])\n        self.assertClosed([b\"OK\"])\n        self.assertClosed(\"OK\")\n        self.assertClosed(b\"OK\")\n        self.assertClosed([\"OK\" for ok in range(10)])\n        self.assertClosed([b\"OK\" for ok in range(10)])\n        self.assertClosed([\"OK\" for ok in range(0)])\n        self.assertClosed(5) # Internal server error in Bottle._cast\n        try:\n            self.assertClosed([\"CRASH\"], open_args={'crash': 'start_response'})\n        except RuntimeError:\n            pass\n\n\nclass TestRouteDecorator(ServerTestBase):\n    def test_decorators(self):\n        def foo(): return bottle.request.method\n        bottle.get('/')(foo)\n        bottle.post('/')(foo)\n        bottle.put('/')(foo)\n        bottle.delete('/')(foo)\n        for verb in 'GET POST PUT DELETE'.split():\n            self.assertBody(verb, '/', method=verb)\n\n    def test_single_path(self):\n        @bottle.route('/a')\n        def test(): return 'ok'\n        self.assertBody('ok', '/a')\n        self.assertStatus(404, '/b')\n\n    def test_path_list(self):\n        @bottle.route(['/a','/b'])\n        def test(): return 'ok'\n        self.assertBody('ok', '/a')\n        self.assertBody('ok', '/b')\n        self.assertStatus(404, '/c')\n\n    def test_no_path(self):\n        @bottle.route()\n        def test(x=5): return str(x)\n        self.assertBody('5', '/test')\n        self.assertBody('6', '/test/6')\n\n    def test_no_params_at_all(self):\n        @bottle.route\n        def test(x=5): return str(x)\n        self.assertBody('5', '/test')\n        self.assertBody('6', '/test/6')\n\n    def test_method(self):\n        @bottle.route(method='gEt')\n        def test(): return 'ok'\n        self.assertBody('ok', '/test', method='GET')\n        self.assertStatus(200, '/test', method='HEAD')\n        self.assertStatus(405, '/test', method='PUT')\n\n    def test_method_list(self):\n        @bottle.route(method=['GET','post'])\n        def test(): return 'ok'\n        self.assertBody('ok', '/test', method='GET')\n        self.assertBody('ok', '/test', method='POST')\n        self.assertStatus(405, '/test', method='PUT')\n\n    def test_apply(self):\n        def revdec(func):\n            def wrapper(*a, **ka):\n                return reversed(func(*a, **ka))\n            return wrapper\n\n        @bottle.route('/nodec')\n        @bottle.route('/dec', apply=revdec)\n        def test(): return '1', '2'\n        self.assertBody('21', '/dec')\n        self.assertBody('12', '/nodec')\n\n    def test_apply_list(self):\n        def revdec(func):\n            def wrapper(*a, **ka):\n                return reversed(func(*a, **ka))\n            return wrapper\n        def titledec(func):\n            def wrapper(*a, **ka):\n                return ''.join(func(*a, **ka)).title()\n            return wrapper\n\n        @bottle.route('/revtitle', apply=[revdec, titledec])\n        @bottle.route('/titlerev', apply=[titledec, revdec])\n        def test(): return 'a', 'b', 'c'\n        self.assertBody('cbA', '/revtitle')\n        self.assertBody('Cba', '/titlerev')\n\n    def test_hooks(self):\n        @bottle.route()\n        def test():\n            return bottle.request.environ.get('hooktest','nohooks')\n        @bottle.hook('before_request')\n        def hook():\n            bottle.request.environ['hooktest'] = 'before'\n        @bottle.hook('after_request')\n        def hook(*args, **kwargs):\n            bottle.response.headers['X-Hook'] = 'after'\n        self.assertBody('before', '/test')\n        self.assertHeader('X-Hook', 'after', '/test')\n\n    def test_after_request_sees_HTTPError_response(self):\n        \"\"\" Issue #671  \"\"\"\n        called = []\n\n        @bottle.hook('after_request')\n        def after_request():\n            called.append('after')\n            self.assertEqual(400, bottle.response.status_code)\n\n        @bottle.get('/')\n        def _get():\n            called.append(\"route\")\n            bottle.abort(400, 'test')\n\n        self.urlopen(\"/\")\n        self.assertEqual([\"route\", \"after\"], called)\n\n    def test_after_request_hooks_run_after_exception(self):\n        \"\"\" Issue #671  \"\"\"\n        called = []\n\n        @bottle.hook('before_request')\n        def before_request():\n            called.append('before')\n\n        @bottle.hook('after_request')\n        def after_request():\n            called.append('after')\n\n        @bottle.get('/')\n        def _get():\n            called.append(\"route\")\n            1/0\n\n        self.urlopen(\"/\")\n        self.assertEqual([\"before\", \"route\", \"after\"], called)\n\n    def test_after_request_hooks_run_after_exception_in_before_hook(self):\n        \"\"\" Issue #671  \"\"\"\n        called = []\n\n        @bottle.hook('before_request')\n        def before_request():\n            called.append('before')\n            1 / 0\n\n        @bottle.hook('after_request')\n        def after_request():\n            called.append('after')\n\n        @bottle.get('/')\n        def _get():\n            called.append(\"route\")\n\n        self.urlopen(\"/\")\n        self.assertEqual([\"before\", \"after\"], called)\n\n    def test_after_request_hooks_may_rise_response_exception(self):\n        \"\"\" Issue #671  \"\"\"\n        called = []\n\n        @bottle.hook('after_request')\n        def after_request():\n            called.append('after')\n            bottle.abort(400, \"hook_content\")\n\n        @bottle.get('/')\n        def _get():\n            called.append(\"route\")\n            return \"XXX\"\n\n        self.assertInBody(\"hook_content\", \"/\")\n        self.assertEqual([\"route\", \"after\"], called)\n\n    def test_after_response_hook_can_set_headers(self):\n        \"\"\" Issue #1125  \"\"\"\n\n        @bottle.route()\n        def test1():\n            return \"test\"\n        @bottle.route()\n        def test2():\n            return HTTPResponse(\"test\", 200)\n        @bottle.route()\n        def test3():\n            raise HTTPResponse(\"test\", 200)\n\n        @bottle.hook('after_request')\n        def hook():\n            bottle.response.headers[\"X-Hook\"] = 'works'\n\n        for route in (\"/test1\", \"/test2\", \"/test3\"):\n            self.assertBody('test', route)\n            self.assertHeader('X-Hook', 'works', route)\n\n    def test_template(self):\n        @bottle.route(template='test {{a}} {{b}}')\n        def test(): return dict(a=5, b=6)\n        self.assertBody('test 5 6', '/test')\n\n    def test_template_opts(self):\n        @bottle.route(template=('test {{a}} {{b}}', {'b': 6}))\n        def test(): return dict(a=5)\n        self.assertBody('test 5 6', '/test')\n\n    def test_name(self):\n        @bottle.route(name='foo')\n        def test(x=5): return 'ok'\n        self.assertEqual('/test/6', bottle.url('foo', x=6))\n\n    def test_callback(self):\n        def test(x=5): return str(x)\n        rv = bottle.route(callback=test)\n        self.assertBody('5', '/test')\n        self.assertBody('6', '/test/6')\n        self.assertEqual(rv, test)\n\n\n\n\nclass TestDecorators(ServerTestBase):\n    ''' Tests Decorators '''\n\n    def test_view(self):\n        \"\"\" WSGI: Test view-decorator (should override autojson) \"\"\"\n        with chdir(__file__):\n            @bottle.route('/tpl')\n            @bottle.view('stpl_t2main')\n            def test():\n                return dict(content='1234')\n            result = '+base+\\n+main+\\n!1234!\\n+include+\\n-main-\\n+include+\\n-base-\\n'\n            self.assertHeader('Content-Type', 'text/html; charset=UTF-8', '/tpl')\n            self.assertBody(result, '/tpl')\n\n    def test_view_error(self):\n        \"\"\" WSGI: Test if view-decorator reacts on non-dict return values correctly.\"\"\"\n        @bottle.route('/tpl')\n        @bottle.view('stpl_t2main')\n        def test():\n            return bottle.HTTPError(401, 'The cake is a lie!')\n        self.assertInBody('The cake is a lie!', '/tpl')\n        self.assertInBody('401 Unauthorized', '/tpl')\n        self.assertStatus(401, '/tpl')\n\n    def test_truncate_body(self):\n        \"\"\" WSGI: Some HTTP status codes must not be used with a response-body \"\"\"\n        @bottle.route('/test/<code>')\n        def test(code):\n            bottle.response.status = int(code)\n            return 'Some body content'\n        self.assertBody('Some body content', '/test/200')\n        self.assertBody('', '/test/100')\n        self.assertBody('', '/test/101')\n        self.assertBody('', '/test/204')\n        self.assertBody('', '/test/304')\n\n    def test_routebuild(self):\n        \"\"\" WSGI: Test route builder \"\"\"\n        def foo(): pass\n        bottle.route('/a/<b>/c', name='named')(foo)\n        bottle.request.environ['SCRIPT_NAME'] = ''\n        self.assertEqual('/a/xxx/c', bottle.url('named', b='xxx'))\n        self.assertEqual('/a/xxx/c', bottle.app().get_url('named', b='xxx'))\n        bottle.request.environ['SCRIPT_NAME'] = '/app'\n        self.assertEqual('/app/a/xxx/c', bottle.url('named', b='xxx'))\n        bottle.request.environ['SCRIPT_NAME'] = '/app/'\n        self.assertEqual('/app/a/xxx/c', bottle.url('named', b='xxx'))\n        bottle.request.environ['SCRIPT_NAME'] = 'app/'\n        self.assertEqual('/app/a/xxx/c', bottle.url('named', b='xxx'))\n\n    def test_autoroute(self):\n        app = bottle.Bottle()\n        def a(): pass\n        def b(x): pass\n        def c(x, y): pass\n        def d(x, y=5): pass\n        def e(x=5, y=6): pass\n        self.assertEqual(['/a'],list(bottle.yieldroutes(a)))\n        self.assertEqual(['/b/<x>'],list(bottle.yieldroutes(b)))\n        self.assertEqual(['/c/<x>/<y>'],list(bottle.yieldroutes(c)))\n        self.assertEqual(['/d/<x>','/d/<x>/<y>'],list(bottle.yieldroutes(d)))\n        self.assertEqual(['/e','/e/<x>','/e/<x>/<y>'],list(bottle.yieldroutes(e)))\n\n\n\nclass TestAppShortcuts(ServerTestBase):\n    def setUp(self):\n        ServerTestBase.setUp(self)\n\n    def testWithStatement(self):\n        default = bottle.default_app()\n        inner_app = bottle.Bottle()\n        self.assertEqual(default, bottle.default_app())\n        with inner_app:\n            self.assertEqual(inner_app, bottle.default_app())\n        self.assertEqual(default, bottle.default_app())\n\n    def assertWraps(self, test, other):\n        self.assertEqual(test.__doc__, other.__doc__)\n\n    def test_module_shortcuts(self):\n        for name in '''route get post put delete error mount\n                       hook install uninstall'''.split():\n            short = getattr(bottle, name)\n            original = getattr(bottle.app(), name)\n            self.assertWraps(short, original)\n\n    def test_module_shortcuts_with_different_name(self):\n        self.assertWraps(bottle.url, bottle.app().get_url)\n"
  },
  {
    "path": "test/tools.py",
    "content": "# -*- coding: utf-8 -*-\nfrom __future__ import with_statement\nimport os\n\nimport bottle\nimport sys\nimport unittest\nimport wsgiref\nimport wsgiref.util\nimport wsgiref.validate\nimport warnings\n\nimport mimetypes\nimport uuid\n\nfrom bottle import tob, BytesIO\n\n\ndef warn(msg):\n    sys.stderr.write('WARNING: %s\\n' % msg.strip())\n\n\ndef tobs(data):\n    ''' Transforms bytes or unicode into a byte stream. '''\n    return BytesIO(tob(data))\n\n\nclass chdir(object):\n    def __init__(self, dir):\n        if os.path.isfile(dir):\n            dir = os.path.dirname(dir)\n        self.wd = os.path.abspath(dir)\n        self.old = os.path.abspath('.')\n\n    def __enter__(self):\n        os.chdir(self.wd)\n\n    def __exit__(self, exc_type, exc_val, tb):\n        os.chdir(self.old)\n\n\nclass assertWarn(object):\n    def __init__(self, text):\n        self.searchtext = text\n\n    def __call__(self, func):\n        def wrapper(*a, **ka):\n            with warnings.catch_warnings(record=True) as wr:\n                warnings.simplefilter(\"always\")\n                out = func(*a, **ka)\n            messages = [repr(w.message) for w in wr]\n            for msg in messages:\n                if self.searchtext in msg:\n                    return out\n            raise AssertionError(\"Could not find phrase %r in any warning messaged: %r\" % (self.searchtext, messages))\n        return wrapper\n\ndef api(introduced, deprecated=None, removed=None):\n    current    = tuple(map(int, bottle.__version__.split('-')[0].split('.')))\n    introduced = tuple(map(int, introduced.split('.')))\n    deprecated = tuple(map(int, deprecated.split('.'))) if deprecated else (99,99)\n    removed    = tuple(map(int, removed.split('.')))    if removed    else (99,100)\n    assert introduced < deprecated < removed\n\n    def decorator(func):\n        if   current < introduced:\n            return None\n        elif current < deprecated:\n            return func\n        elif current < removed:\n            func.__doc__ = '(deprecated) ' + (func.__doc__ or '')\n            return assertWarn('DeprecationWarning')(func)\n        else:\n            return None\n    return decorator\n\n\ndef wsgistr(s):\n    return s.encode('utf8').decode('latin1')\n\nclass ServerTestBase(unittest.TestCase):\n    def setUp(self):\n        ''' Create a new Bottle app set it as default_app '''\n        self.port = 8080\n        self.host = 'localhost'\n        self.app = bottle.app.push()\n        self.wsgiapp = wsgiref.validate.validator(self.app)\n\n    def urlopen(self, path, method='GET', post='', env=None, crash=None):\n        result = {'code':0, 'status':'error', 'header':{}, 'body':tob('')}\n        def start_response(status, header, exc_info=None):\n            if crash == \"start_response\":\n                raise RuntimeError(\"Unittest requested crash in start_response\")\n            result['code'] = int(status.split()[0])\n            result['status'] = status.split(None, 1)[-1]\n            for name, value in header:\n                name = name.title()\n                if name in result['header']:\n                    result['header'][name] += ', ' + value\n                else:\n                    result['header'][name] = value\n        env = env if env else {}\n        wsgiref.util.setup_testing_defaults(env)\n        env['REQUEST_METHOD'] = wsgistr(method.upper().strip())\n        env['PATH_INFO'] = wsgistr(path)\n        env['QUERY_STRING'] = wsgistr('')\n        if post:\n            env['REQUEST_METHOD'] = 'POST'\n            env['CONTENT_LENGTH'] = str(len(tob(post)))\n            env['wsgi.input'].write(tob(post))\n            env['wsgi.input'].seek(0)\n        response = self.wsgiapp(env, start_response)\n        try:\n            for part in response:\n                try:\n                    result['body'] += part\n                except TypeError:\n                    raise TypeError('WSGI app yielded non-byte object %s', type(part))\n        finally:\n            bottle._try_close(response)\n        return result\n\n    def postmultipart(self, path, fields, files):\n        env = multipart_environ(fields, files)\n        return self.urlopen(path, method='POST', env=env)\n\n    def tearDown(self):\n        bottle.app.pop()\n\n    def assertStatus(self, code, route='/', **kargs):\n        self.assertEqual(code, self.urlopen(route, **kargs)['code'])\n\n    def assertBody(self, body, route='/', **kargs):\n        self.assertEqual(tob(body), self.urlopen(route, **kargs)['body'])\n\n    def assertInBody(self, body, route='/', **kargs):\n        result = self.urlopen(route, **kargs)['body']\n        if tob(body) not in result:\n            self.fail('The search pattern \"%s\" is not included in body:\\n%s' % (body, result))\n\n    def assertHeader(self, name, value, route='/', **kargs):\n        self.assertEqual(value, self.urlopen(route, **kargs)['header'].get(name))\n\n    def assertHeaderAny(self, name, route='/', **kargs):\n        self.assertTrue(self.urlopen(route, **kargs)['header'].get(name, None))\n\n    def assertInError(self, search, route='/', **kargs):\n        bottle.request.environ['wsgi.errors'].errors.seek(0)\n        err = bottle.request.environ['wsgi.errors'].errors.read()\n        if search not in err:\n            self.fail('The search pattern \"%s\" is not included in wsgi.error: %s' % (search, err))\n\ndef multipart_environ(fields, files):\n    boundary = 'lowerUPPER-1234'\n    env = {'REQUEST_METHOD':'POST',\n           'CONTENT_TYPE':  'multipart/form-data; boundary='+boundary}\n    wsgiref.util.setup_testing_defaults(env)\n    boundary = '--' + boundary \n    body = ''\n    for name, value in fields:\n        body += boundary + '\\r\\n'\n        body += 'Content-Disposition: form-data; name=\"%s\"\\r\\n\\r\\n' % name\n        body += value + '\\r\\n'\n    for name, filename, content in files:\n        mimetype = str(mimetypes.guess_type(filename)[0]) or 'application/octet-stream'\n        body += boundary + '\\r\\n'\n        body += 'Content-Disposition: file; name=\"%s\"; filename=\"%s\"\\r\\n' % \\\n             (name, filename)\n        body += 'Content-Type: %s\\r\\n\\r\\n' % mimetype\n        body += content + '\\r\\n'\n    body += boundary + '--\\r\\n'\n    if isinstance(body, str):\n        body = body.encode('utf8')\n    env['CONTENT_LENGTH'] = str(len(body))\n    env['wsgi.input'].write(body)\n    env['wsgi.input'].seek(0)\n    return env\n"
  },
  {
    "path": "test/views/jinja2_base.tpl",
    "content": "begin {% block content %}{% endblock %} end"
  },
  {
    "path": "test/views/jinja2_inherit.tpl",
    "content": "{% extends \"jinja2_base\" %}\n{% block content %}abc{% endblock %}"
  },
  {
    "path": "test/views/jinja2_simple.tpl",
    "content": "start {{var}} end"
  },
  {
    "path": "test/views/mako_base.tpl",
    "content": "o${self.body()}o\n"
  },
  {
    "path": "test/views/mako_inherit.tpl",
    "content": "<%inherit file=\"mako_base.tpl\"/>\nc${var}c\n"
  },
  {
    "path": "test/views/mako_simple.tpl",
    "content": "start ${var} end\n"
  },
  {
    "path": "test/views/stpl_include.tpl",
    "content": "before\n%include('stpl_simple', var=var)\nafter\n"
  },
  {
    "path": "test/views/stpl_no_vars.tpl",
    "content": "hihi"
  },
  {
    "path": "test/views/stpl_simple.tpl",
    "content": "start {{var}} end\n"
  },
  {
    "path": "test/views/stpl_t2base.tpl",
    "content": "%test('base')\n{{base}}\\\\\n%_ = include('stpl_t2inc', test=test)\n%_['test2']('base')\n"
  },
  {
    "path": "test/views/stpl_t2inc.tpl",
    "content": "%test('include')\n%def test2(var):\n-{{var}}-\n%end\n"
  },
  {
    "path": "test/views/stpl_t2main.tpl",
    "content": "%def test(var):\n+{{var}}+\n%end\n%rebase('stpl_t2base', test=test)\n%test('main')\n!{{content}}!\n%_ = include('stpl_t2inc', test=test)\n%_['test2']('main')\n"
  },
  {
    "path": "test/views/stpl_unicode.tpl",
    "content": "start {{\"ñç\"}} {{var}} end\n"
  }
]