changeset 1453:accea307e94e

Fix some comments in the itemtype changeset.
author Cheer Xiao <xiaqqaix@gmail.com>
date Sat, 28 Jul 2012 09:41:22 +0800
parents 35024b2245c5
children 7f85d95ec4e4
files MoinMoin/apps/frontend/views.py MoinMoin/items/__init__.py
diffstat 2 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sat Jul 28 01:26:50 2012 +0800
+++ b/MoinMoin/apps/frontend/views.py	Sat Jul 28 09:41:22 2012 +0800
@@ -442,7 +442,7 @@
     # XXX Maybe use a random name to be sure it does not exist
     item_name_converted = item_name + 'converted'
     try:
-        # TODO implement Content.create and use it Content.create here
+        # TODO implement Content.create and use it here
         converted_item = Item.create(item_name_converted, itemtype=u'default', contenttype=contenttype)
     except AccessDenied:
         abort(403)
--- a/MoinMoin/items/__init__.py	Sat Jul 28 01:26:50 2012 +0800
+++ b/MoinMoin/items/__init__.py	Sat Jul 28 09:41:22 2012 +0800
@@ -555,7 +555,6 @@
         return C
 
 
-# TODO better name and clearer definition
 class Default(Contentful):
     """
     A "conventional" wiki item.
@@ -566,7 +565,7 @@
         item_templates = self.content.get_templates(self.contenttype)
         return render_template('modify_show_template_selection.html',
                                item_name=self.name,
-                               # XXX avoid the magic string
+                               # XXX u'default' should be a constant
                                itemtype=u'default',
                                rev=self.rev,
                                contenttype=self.contenttype,
@@ -577,15 +576,13 @@
                                data_rendered='',
                                )
 
-    # To code reviewers: this method was mostly merged from Item.do_modify and
-    # Draw, with modifications.
     def do_modify(self):
         method = request.method
         if method == 'GET':
             if isinstance(self.content, NonExistentContent):
                 return render_template('modify_show_contenttype_selection.html',
                                        item_name=self.name,
-                                       # XXX avoid the magic string
+                                       # XXX see comment above
                                        itemtype=u'default',
                                        contenttype_groups=CONTENTTYPE_GROUPS,
                                       )
@@ -739,7 +736,6 @@
 
 # XXX Too much boilerplate in Entry implementation. Maybe use namedtuple
 # as a starting point?
-# Renamed from old RegistryItem, whole class untouched
 class RegistryContent(RegistryBase):
     class Entry(object):
         def __init__(self, factory, content_type, priority):