Index: MoinMoin/schema/display.py |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/MoinMoin/schema/display.py |
@@ -0,0 +1,22 @@ |
+# Copyright: 2013 MoinMoin:CheerXiao |
+# License: GNU GPL v2 (or any later version), see LICENSE.txt for details. |
+ |
+""" |
+MoinMoin - helpers for displaying metadata fields |
+""" |
+ |
+ |
+from __future__ import absolute_import, division |
+ |
+from collections import namedtuple |
+ |
+ |
+class DisplayField(namedtuple('DisplayField', 'name label widget')): |
+ """ |
+ Information about displaying a metadata field. Useful on the item page or |
+ index pages. |
+ |
+ The `widget` attribute should be one of the constants defined in |
+ :mod:`MoinMoin.constants.display_widgets`, referring to one of the widget |
+ in templates/display_widgets.html. |
+ """ |