changeset 2108:55694eb202a3

use constants for ticket meta keys in items/ticket.py too
author Cheer Xiao <xiaqqaix@gmail.com>
date Thu, 02 May 2013 20:34:58 +0800
parents 15eafde0d14d
children 38b5c2746f83
files MoinMoin/items/ticket.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/ticket.py	Thu May 02 15:09:42 2013 +0800
+++ b/MoinMoin/items/ticket.py	Thu May 02 20:34:58 2013 +0800
@@ -22,7 +22,7 @@
 from MoinMoin.forms import (Form, OptionalText, OptionalMultilineText, SmallNatural, Tags,
                             Reference, BackReference, SelectSubmit)
 from MoinMoin.storage.middleware.protecting import AccessDenied
-from MoinMoin.constants.keys import ITEMTYPE, CONTENTTYPE, ITEMID, CURRENT
+from MoinMoin.constants.keys import ITEMTYPE, CONTENTTYPE, ITEMID, CURRENT, SUPERSEDED_BY, DEPENDS_ON, SUBSCRIBED_ITEMS
 from MoinMoin.constants.contenttypes import CONTENTTYPE_USER
 from MoinMoin.items import Item, Contentful, register, BaseModifyForm
 from MoinMoin.items.content import NonExistentContent
@@ -57,9 +57,9 @@
 
     def _load(self, item):
         id_ = item.meta[ITEMID]
-        self['supersedes'].set(Term('superseded_by', id_))
-        self['required_by'].set(Term('depends_on', id_))
-        self['subscribers'].set(Term('subscribed_items', id_))
+        self['supersedes'].set(Term(SUPERSEDED_BY, id_))
+        self['required_by'].set(Term(DEPENDS_ON, id_))
+        self['subscribers'].set(Term(SUBSCRIBED_ITEMS, id_))
 
 
 class TicketForm(BaseModifyForm):