Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1092)

Unified Diff: MoinMoin/schema/display.py

Issue 10889044: Rough TicketIndex implementation
Patch Set: put display_fields.py under a new schema package Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « MoinMoin/schema/__init__.py ('k') | MoinMoin/templates/display_widgets.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
+ """
« no previous file with comments | « MoinMoin/schema/__init__.py ('k') | MoinMoin/templates/display_widgets.html » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b