[Checkins] SVN: grok/trunk/src/grok/components.py Revert r86301:
Grok traversal doesn' tneed to deal with integers (this is a
Philipp von Weitershausen
philikon at philikon.de
Sat May 3 17:53:38 EDT 2008
Log message for revision 86302:
Revert r86301: Grok traversal doesn' tneed to deal with integers (this is a
RDB specific issue that has no place in Grok itself). But most importantly
of all, this change didn't come with a test that would document the intent
and make sure what the change is all about.
Changed:
U grok/trunk/src/grok/components.py
-=-
Modified: grok/trunk/src/grok/components.py
===================================================================
--- grok/trunk/src/grok/components.py 2008-05-03 21:22:39 UTC (rev 86301)
+++ grok/trunk/src/grok/components.py 2008-05-03 21:53:38 UTC (rev 86302)
@@ -482,15 +482,10 @@
result = traverse(name)
if result is not None:
return result
- # try to get the item from the container, casting it to an int
- # if the key might be an int (which is quite reasonable for a
- # key that lives in a database)
- # XXX this is a dirty hack, but it works fine
- try:
- return self.context.get(type(self.context.keys()[0])(name))
- except KeyError:
- return self.context.get(name)
+ # try to get the item from the container
+ return self.context.get(name)
+
default_form_template = PageTemplateFile(os.path.join(
'templates', 'default_edit_form.pt'))
default_form_template.__grok_name__ = 'default_edit_form'
More information about the Checkins
mailing list