FAQ
WHIFF 0.6 RELEASED

WHIFF += Mako & treeview & url rewrites

WHIFF is a collection of support services
for Python/WSGI Web applications which
allows applications to be composed by
"dropping" dynamic pages into container
directories.

This mode of development will be familiar
to developers who have created PHP
applications, vanilla CGI scripts,
Apache/modpy Publisher applications,
JSP pages, or static web content.

The new WHIFF 0.6 release now includes

** Treeview widgets

WHIFF now includes components for
implementing "tree views" for web navigation panes
or other purposes, either using AJAX or frame
reloads. Try the GenBank demo at

http://aaron.oirt.rutgers.edu/myapp/GenBankTree/index

Read more in the tree view tutorial:

http://aaron.oirt.rutgers.edu/myapp/docs/W1100_2200.TreeView

** Mako template support

New standard middleware provides built in support
for using the fast, powerful, elegant, and popular
Mako template engine in WHIFF applications. Read
more in the Mako tutorial:

http://aaron.oirt.rutgers.edu/myapp/docs/W1100_1075.MakoGrading

** Url rewrites

The URL rewrite tutorial explains how to
implement WHIFF applications using URLs that
are shorter and easier to understand. Read
it here:

http://aaron.oirt.rutgers.edu/myapp/docs/W1100_2050.UrlMapping

WHIFF HOME PAGE: http://whiff.sourceforge.net

I hope you like it! -- Aaron Watters

===
less is more.

Search Discussions

  • Paul Boddie at Oct 27, 2009 at 11:04 am

    On 27 Okt, 03:49, Aaron Watters wrote:
    WHIFF now includes components for
    implementing "tree views" for web navigation panes
    or other purposes, either using AJAX or frame
    reloads. ?Try the GenBank demo at

    http://aaron.oirt.rutgers.edu/myapp/GenBankTree/index
    This looks interesting, but when I have JavaScript switched off, I get
    a big traceback page which indicates that the application doesn't
    understand the normal link on each of the nodes of the tree. I imagine
    that the ideas is to have the application functional with and without
    JavaScript, which is a worthy objective forgotten by many Web
    developers these days.

    Paul
  • Aaron Watters at Oct 27, 2009 at 11:18 am

    On Oct 27, 7:04?am, Paul Boddie wrote:
    On 27 Okt, 03:49, Aaron Watters wrote:


    WHIFF now includes components for
    implementing "tree views" for web navigation panes
    or other purposes, either using AJAX or frame
    reloads. ?Try the GenBank demo at
    http://aaron.oirt.rutgers.edu/myapp/GenBankTree/index
    This looks interesting, but when I have JavaScript switched off, I get
    a big traceback page which indicates that the application doesn't
    understand the normal link on each of the nodes of the tree. I imagine
    that the ideas is to have the application functional with and without
    JavaScript, which is a worthy objective forgotten by many Web
    developers these days.

    Paul
    That exact application

    http://aaron.oirt.rutgers.edu/myapp/GenBankTree/index

    cannot be implemented with javascript
    turned off. You can implement something
    kinda similar... hmmmm....

    These days I would guess you are pretty
    limited without javascript, no? For example
    I don't think the instructional support web
    sites at Rutgers will work properly without
    js.

    By the way tracebacks are on for debugging
    purposes, they can be turned off, of course.

    -- Aaron Watters
    ===
  • Aaron Watters at Oct 27, 2009 at 11:52 am

    Paul Boddie wrote:
    On 27 Okt, 03:49, Aaron Watters wrote:
    ...
    This looks interesting, but when I have JavaScript switched off, I get
    a big traceback ...
    I just tried it. How do you get a traceback? For me none of the
    javascript links work: they just do nothing.
    -- Aaron Watters

    ===
    if you want a friend, get a dog. --Truman
  • Alex23 at Oct 27, 2009 at 12:02 pm

    Aaron Watters wrote:
    I just tried it. ?How do you get a traceback? ?For me none of the
    javascript links work: they just do nothing.
    I'm getting the same as Paul in Firefox 3.5.3 with javascript
    disabled:

    <class 'whiff.resolver.ModuleRootResolutionException'> Python 2.5: /
    usr/local/apache2/bin/httpd
    Tue Oct 27 07:56:50 2009

    A problem occurred in a Python script. Here is the sequence of
    function calls leading up to the error, in the order they occurred.
    /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
    packages/whiff/middleware/displayTraceback.py in __call__
    (self=<whiff.middleware.displayTraceback.displayTraceback instance at
    0x2435698>, env={'DOCUMENT_ROOT': '/usr/local/apache2/htdocs',
    'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/
    xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET':
    'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
    'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
    'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST':
    'aaron.oirt.rutgers.edu', 'HTTP_KEEP_ALIVE': '300', 'HTTP_REFERER':
    'http://aaron.oirt.rutgers.edu/myapp/GenBankTree/index', ...},
    start_response=<whiff.middleware.displayTraceback.callOnce instance at
    0x2435918>)
    44 #pr "displayTraceback called for", page
    45 try:
    46 pageContentSequence = page(env, start_response)
    47 pageContentList = list(pageContentSequence)
    48 return pageContentList
    ...

    If you need a full traceback, let me know.
  • Aaron Watters at Oct 27, 2009 at 12:16 pm

    On Oct 27, 8:02?am, alex23 wrote:

    If you need a full traceback, let me know.
    Well, yes, the bottom of the traceback would be more useful :).

    -- Aaron Watters
  • Aaron Watters at Oct 27, 2009 at 5:26 pm

    On Oct 27, 8:16?am, Aaron Watters wrote:
    On Oct 27, 8:02?am, alex23 wrote:

    If you need a full traceback, let me know.
    Well, yes, the bottom of the traceback would be more useful :).

    ? ?-- Aaron Watters
    Alex sent me the traceback (thanks!) and after consulting
    the logs and the pages I figured out that the version of
    Firefox in question was not ignoring my javascript links like
    it should. Instead FF was interpreting them as HTTP links to
    pages that didn't exist -- which is perfectly idiotic -- so
    WHIFF was complaining that it couldn't find the page (which
    is correct).

    Anyway, you shouldn't see this buglet any more -- if you
    don't have javascript you will get a nice polite message
    saying that the page doesn't work unless javascript is
    enabled.

    http://aaron.oirt.rutgers.edu/myapp/GenBankTree/index

    I hope you like it again. Thanks for the help!
    -- Aaron Watters

    ===

    nobody ever got fired for buying IBM^H^H^HMicrosoft.
  • Paul Boddie at Oct 28, 2009 at 1:00 pm

    On 27 Okt, 18:26, Aaron Watters wrote:
    Alex sent me the traceback (thanks!) and after consulting
    the logs and the pages I figured out that the version of
    Firefox in question was not ignoring my javascript links like
    it should. ?Instead FF was interpreting them as HTTP links to
    pages that didn't exist -- which is perfectly idiotic -- so
    WHIFF was complaining that it couldn't find the page (which
    is correct).
    Were you using "javascript:" URLs in the links before? Maybe using the
    onclick attribute is more appropriate for JavaScript-specific actions:

    http://www.w3.org/TR/1999/REC-html401-19991224/interact/scripts.html#adef-onclick
    Anyway, you shouldn't see this buglet any more -- if you
    don't have javascript you will get a nice polite message
    saying that the page doesn't work unless javascript is
    enabled.

    http://aaron.oirt.rutgers.edu/myapp/GenBankTree/index
    I still don't see why you couldn't have a non-JavaScript version.
    Think of all the people wanting to use Python to screen-scrape the
    content! ;-)

    Paul

    P.S. Although people not running JavaScript on every page by default
    are often criticised as being modern-day Luddites, and I too used to
    have JavaScript running for everything, a few annoying experiences led
    me to installing NoScript just to stop stupid CPU-wasting
    advertisements. Useful sites employing JavaScript probably suffer from
    the effects of such antics, unfortunately, which is one reason I
    advocate supporting non-JavaScript browsers.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedOct 27, '09 at 2:49a
activeOct 28, '09 at 1:00p
posts8
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase