File: glossary.rst

package info (click to toggle)
django-tables 2.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,752 kB
  • sloc: python: 7,120; makefile: 132; sh: 74
file content (57 lines) | stat: -rw-r--r-- 1,620 bytes parent folder | download | duplicates (3)
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
Glossary
========

.. glossary::

    accessor
        Refers to an `.Accessor` object

    column name
        The name given to a column. In the follow example, the *column name* is
        ``age``.

        .. sourcecode:: python

            class SimpleTable(tables.Table):
                age = tables.Column()

    empty value
        An empty value is synonymous with "no value". Columns have an
        ``empty_values`` attribute that contains values that are considered
        empty. It's a way to declare which values from the database correspond
        to *null*/*blank*/*missing* etc.

    order by alias
        A prefixed column name that describes how a column should impact the
        order of data within the table. This allows the implementation of how
        a column affects ordering to be abstracted, which is useful (e.g. in
        query strings).

        .. sourcecode:: python

            class ExampleTable(tables.Table):
                name = tables.Column(order_by=("first_name", "last_name"))

        In this example ``-name`` and ``name`` are valid order by aliases. In
        a query string you might then have ``?order=-name``.

    table
        The traditional concept of a table. i.e. a grid of rows and columns
        containing data.

    view
        A Django view.

    record
        A single Python object used as the data for a single row.

    render
        The act of serializing a `.Table` into
        HTML.

    template
        A Django template.

    table data
        An iterable of :term:`records <record>` that
        `.Table` uses to populate its rows.