I'm an old hand at Python but new to Quixote.  We are running Apache 2.0 on
Linux (various) but use Windows 2k as a developer platform. 

I'm using cgi for now, but will need some persistant store and MySQL
connection pooling. (figured to cross those bridges later)

I'm using Eclipse 3.x with PyDev as my ~IDE.  I'm no Eclipse expert, but am
getting by.

The idea of PTL seems cool, but I'm having some trouble.  Eclipse does not
recognize it as Python unless I mistakenly name it xxx.py when I create it,
then rename it to xxx.ptl.  Even then Eclipse barfs on the [html] part of
"def foo [html] (a,b,c):"
I've also spent too much time (IMO) tracking down my bugs related to content
that needs to be wrapped in a call to "htmltext()"

I am building a simple app to evaluate Quixote as a standard for our small
company.  I'm the only experienced Pythonista in the group, and am tasked
with recommending a "framework" and training the other 2 developers.  I've
tried googling, but I got too many pieces without seeing a clear path.

So after all that, my question to those more experienced is: 
(1) Should I use PTL, or use straignt Python (.py files) with perhaps some
use of the quixote utility functions.
(2) If PTL, is there any way to get Eclipse/PyDev to parse it?
(3) Are there other alternatives/add on's that have been very useful.

I have attached a sample class, to show how I am thinking.  Perhaps I just
don't have a good grasp of how to use it yet.

TIA
Fred
------------------------ code follows----------------------------
''' This is the root or home page for this project.  
The class name ***MUST*** be "Page",  This is our naming convention for
all classes that create a web page. the file/module name makes them unique
'''
import util
import xPage
from quixote import enable_ptl; enable_ptl()
from quixote.html import htmltext

_BODY="""<h1>Weekly Nursing Report Home Page</h1>
        <p>This is the beginning of a new capability to ...
        <p>
          <ul>
          The following a available features
            <li><a href="beginnew">Edit Report</a>:
                This will edit a report for the week ending
%(next_saturday)s
            <li><a href="viewhistory">View Prior Reports</a>:
                Display a link to the last several reports 
            <li><a href="other">Reserved for Expansion </a>:
                yadda, yadda, yadda.....
          </ul>
        </p>
         """
class Page(xPage.Page):

    def _q_index [html] (self):
        parms = {}
        parms['next_saturday'] =
util.getWeekdayMonthDayYear(util.getNextSaturday())
        body = _BODY % parms
        "<html><head><title>"
        "title is here"
        '</title>'#<link rel="stylesheet" href="css" type="text/css" />'
        '</head><body>'
        htmltext(body)
        '</body> </html>'

    def _q_lookup(self, component):
        if   component in ["beginnew", "viewhistory"]:
            page = self.getUnderConstructionPage(__file__, component)
        else:
            page = self.getUndefinedLinkPage(__file__, component)
        return page

---------------------------------------------------------------------------
The information contained in this message may be privileged and / or
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender
immediately by replying to this message and deleting the material from any
computer.
---------------------------------------------------------------------------
_______________________________________________
Quixote-users mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users

Reply via email to