Welcome to Squishdot Websites Squishdot How-To Newbies
 about
 search
 post article
 Documentation
 Mailing Lists
 Bug Tracking
 Development
 Installation
 Upgrading
 Download
 admin
 rdf

 main


Date format
How-To Posted by Petra Aradi on Sunday November 20, 08:38PM, 2005
from the dept.
I need to change the date format of articles to the local format. In index_html <dtml-var "date_posted('%Y.%m.%d. %H:%M')"> works fine, but when I try to use it in showSearchResults, I got an error message.

Is it possible to use my date format in showSearchResults?

Thanks,
Petra

Error Type: TypeError Error Value: object of type 'string' is not callable

Traceback (innermost last):
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 150, in publish_module
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 114, in publish
File /usr/lib/zope/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook (Object: blueheaven)
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 98, in publish
File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply (Object: search)
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 39, in call_object (Object: search)
File /usr/lib/zope/lib/python/Products/Squishdot/SquishSite.py, line 755, in search (Object: blueheaven)
File /usr/lib/zope/lib/python/OFS/DTMLMethod.py, line 127, in __call__ (Object: showSearchResults)
File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__ (Object: showSearchResults)
File /usr/lib/zope/lib/python/DocumentTemplate/DT_In.py, line 695, in renderwob (Object: search_results)
File /usr/lib/zope/lib/python/DocumentTemplate/DT_Util.py, line 159, in eval (Object: date_posted('%Y.%m.%d. %H:%M')) (Info: date_posted)
File <string>, line 2, in f
TypeError: (see above)

Jumped to Zope 2.8.4, Problem with Linux Medical News | Modifying showSearchResults page  >

 

Related Links
  • Articles on How-To
  • Also by Petra Aradi
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Date format, yet again ;-)
    by Chris Withers on Monday November 21, 10:23AM, 2005
    Why is it that no-one can find the discussion of this that's happened over and over again? :-S

    Try this summary.

    ...and if none of that really helps, then try:

    <dtml-with getObject>
    <dtml-var "date_posted('%Y.%m.%d. %H:%M')">
    </dtml-with>
    
    [ Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Powered by Zope  Squishdot Powered
      "Any system that depends on reliability is unreliable." -- Nogg's Postulate
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 Butch Landingin, ©2000-2002 Chris Withers.