summaryrefslogtreecommitdiff
path: root/src/zope/browser/README.txt
blob: 5bb99b4ed9656b3003bbe008e3d702f807b22b10 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
IView
-----

Views adapt both a context and a request.

There is not much we can test except that ``IView`` is importable
and an interface:

  >>> from zope.interface import Interface
  >>> from zope.browser.interfaces import IView
  >>> Interface.providedBy(IView)
  True

IBrowserView
-------------

Browser views are views specialized for requests from a browser (e.g.,
as distinct from WebDAV, FTP, XML-RPC, etc.).

There is not much we can test except that ``IBrowserView`` is importable
and an interface derived from ``IView``:

  >>> from zope.interface import Interface
  >>> from zope.browser.interfaces import IBrowserView
  >>> Interface.providedBy(IBrowserView)
  True
  >>> IBrowserView.extends(IView)
  True

IAdding
-------

Adding views manage how newly-created items get added to containers.

There is not much we can test except that ``IAdding`` is importable
and an interface derived from ``IBrowserView``:

  >>> from zope.interface import Interface
  >>> from zope.browser.interfaces import IAdding
  >>> Interface.providedBy(IBrowserView)
  True
  >>> IAdding.extends(IBrowserView)
  True

ITerms
------

The ``ITerms`` interface is used as a base for ``ISource`` widget
implementations.  This interfaces get used by ``zope.app.form`` and was
initially defined in ``zope.app.form.browser.interfaces``, which made it
impossible to use for other packages like ``z3c.form`` wihtout depending on
``zope.app.form``.

Moving such base components / interfaces to ``zope.browser`` makes it
possible to share them without undesirable dependencies.

There is not much we can test except that ITerms is importable
and an interface:

  >>> from zope.interface import Interface
  >>> from zope.browser.interfaces import ITerms
  >>> Interface.providedBy(ITerms)
  True

ISystemErrorView
----------------

Views providing this interface can classify their contexts as system
errors. These errors can be handled in a special way (e. g. more
detailed logging).

There is not much we can test except that ISystemErrorView is importable
and an interface:

  >>> from zope.interface import Interface
  >>> from zope.browser.interfaces import ISystemErrorView
  >>> Interface.providedBy(ISystemErrorView)
  True