summaryrefslogtreecommitdiff
path: root/docs/glossary.rst
blob: ccfa0edfb55f1504c33b9df53739820bd653c99f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.. _glossary:

Glossary
========



.. glossary::

    component
        A part of a URL delimited by slashes.  The URL "/help/about" contains
        two components: "help" and "about".
    
    generation
        The act of creating a URL based on a route name and/or variable values.
        This is the opposite of matching.  Finding a route by name is called
        *named generation*.  Finding a route without specifying a name is
        called *nameless generation*.

    mapper
        A container for routes.  There is normally one mapper per application,
        although nested subapplications might have their own mappers.  A
        mapper knows how to match routes and generate them.

    matching
        The act of matching a given URL against a list  of routes, and
        returning the routing variables.  See the *route* entry for an example.

    minimization
        A deprecated feature which allowed short URLs to match long paths.
        Details are in the ``Backward Compatibility`` section in the manual. 

    route
        A rule mapping a URL pattern to a dict of routing  variables.   For
        instance, if the pattern is "/{controller}/{action}" and the requested
        URL is "/help/about", the resulting dict would be::

            {"controller": "help", "action": "about"}

        Routes does not know what these variables mean; it simply returns them
        to the application.  Pylons would look for a ``controllers/help.py``
        module containing a ``HelpController`` class, and call its ``about``
        method.  Other frameworks may do something different.

        A route may have a name, used to identify the route.

    route path
        The URL pattern in a route.

    routing variables
        A dict of key-value pairs returned by matching.  Variables defined in
        the route path are called *path variables*; their values will be taken
        from the URL.  Variables defined outside the route path are called
        *default variables*; their values are not affected by the URL. 
        
        The WSGI.org environment key for routing variables is
        "wsgiorg.routing_args".  This manual does not use that term because it
        can be confused with function arguments.