[Zope-CVS] SVN: messageboard/trunk/step0 Removed getAdapter() calls
based on Eckard's suggestion.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed May 19 13:02:42 EDT 2004
Log message for revision 24827:
Removed getAdapter() calls based on Eckard's suggestion.
-=-
Modified: messageboard/trunk/step02/browser/message.py
===================================================================
--- messageboard/trunk/step02/browser/message.py 2004-05-19 16:06:28 UTC (rev 24826)
+++ messageboard/trunk/step02/browser/message.py 2004-05-19 17:02:42 UTC (rev 24827)
@@ -25,16 +25,16 @@
def author(self):
"""Get user who last modified the Message."""
- creators = zapi.getAdapter(self.context, ICMFDublinCore).creators
+ creators = ICMFDublinCore(self.context).creators
if not creators:
return 'unknown'
return creators[0]
def modified(self):
"""Get last modification date."""
- date = zapi.getAdapter(self.context, ICMFDublinCore).modified
+ date = ICMFDublinCore(self.context).modified
if date is None:
- date = zapi.getAdapter(self.context, ICMFDublinCore).created
+ date = ICMFDublinCore(self.context).created
if date is None:
return ''
return date.strftime('%d/%m/%Y %H:%M:%S')
Modified: messageboard/trunk/step03/browser/message.py
===================================================================
--- messageboard/trunk/step03/browser/message.py 2004-05-19 16:06:28 UTC (rev 24826)
+++ messageboard/trunk/step03/browser/message.py 2004-05-19 17:02:42 UTC (rev 24827)
@@ -25,16 +25,16 @@
def author(self):
"""Get user who last modified the Message."""
- creators = zapi.getAdapter(self.context, ICMFDublinCore).creators
+ creators = ICMFDublinCore(self.context).creators
if not creators:
return 'unknown'
return creators[0]
def modified(self):
"""Get last modification date."""
- date = zapi.getAdapter(self.context, ICMFDublinCore).modified
+ date = ICMFDublinCore(self.context).modified
if date is None:
- date = zapi.getAdapter(self.context, ICMFDublinCore).created
+ date = ICMFDublinCore(self.context).created
if date is None:
return ''
return date.strftime('%d/%m/%Y %H:%M:%S')
Modified: messageboard/trunk/step04/browser/message.py
===================================================================
--- messageboard/trunk/step04/browser/message.py 2004-05-19 16:06:28 UTC (rev 24826)
+++ messageboard/trunk/step04/browser/message.py 2004-05-19 17:02:42 UTC (rev 24827)
@@ -25,16 +25,16 @@
def author(self):
"""Get user who last modified the Message."""
- creators = zapi.getAdapter(self.context, ICMFDublinCore).creators
+ creators = ICMFDublinCore(self.context).creators
if not creators:
return 'unknown'
return creators[0]
def modified(self):
"""Get last modification date."""
- date = zapi.getAdapter(self.context, ICMFDublinCore).modified
+ date = ICMFDublinCore(self.context).modified
if date is None:
- date = zapi.getAdapter(self.context, ICMFDublinCore).created
+ date = ICMFDublinCore(self.context).created
if date is None:
return ''
return date.strftime('%d/%m/%Y %H:%M:%S')
Modified: messageboard/trunk/step05/browser/message.py
===================================================================
--- messageboard/trunk/step05/browser/message.py 2004-05-19 16:06:28 UTC (rev 24826)
+++ messageboard/trunk/step05/browser/message.py 2004-05-19 17:02:42 UTC (rev 24827)
@@ -25,16 +25,16 @@
def author(self):
"""Get user who last modified the Message."""
- creators = zapi.getAdapter(self.context, ICMFDublinCore).creators
+ creators = ICMFDublinCore(self.context).creators
if not creators:
return 'unknown'
return creators[0]
def modified(self):
"""Get last modification date."""
- date = zapi.getAdapter(self.context, ICMFDublinCore).modified
+ date = ICMFDublinCore(self.context).modified
if date is None:
- date = zapi.getAdapter(self.context, ICMFDublinCore).created
+ date = ICMFDublinCore(self.context).created
if date is None:
return ''
return date.strftime('%d/%m/%Y %H:%M:%S')
Modified: messageboard/trunk/step06/browser/message.py
===================================================================
--- messageboard/trunk/step06/browser/message.py 2004-05-19 16:06:28 UTC (rev 24826)
+++ messageboard/trunk/step06/browser/message.py 2004-05-19 17:02:42 UTC (rev 24827)
@@ -28,16 +28,16 @@
def author(self):
"""Get user who last modified the Message."""
- creators = zapi.getAdapter(self.context, ICMFDublinCore).creators
+ creators = ICMFDublinCore(self.context).creators
if not creators:
return _('unknown')
return creators[0]
def modified(self):
"""Get last modification date."""
- date = zapi.getAdapter(self.context, ICMFDublinCore).modified
+ date = ICMFDublinCore(self.context).modified
if date is None:
- date = zapi.getAdapter(self.context, ICMFDublinCore).created
+ date = ICMFDublinCore(self.context).created
if date is None:
return ''
formatter = self.request.locale.dates.getFormatter('dateTime', 'short')
More information about the Zope-CVS
mailing list