📄 deptstart.py
字号:
#
# $Workfile: DeptStart.py $ $Revision: 2 $
# $Date: 10/07/01 1:40p $ $Author: Sholden $
#
import Web
from Error import Error
from cachequery import CacheQuery
from dtuple import TupleDescriptor, DatabaseTuple
from dbsource import dbsource
import mx.DateTime
DptNames = ["DptCode", "DptName"]
conn = dbsource().conn
cursor = conn.cursor()
qDept = CacheQuery("department", DptNames, (), conn, ORDER=(("DptName", )), refresh=30)
class Page(Web.Page):
"""Abstract page implementing departmental look and feel."""
def Body(self):
return """<H2>Departments</H2>
<P>Welcome to the PythonTeach.com departments.
Many people with an interest in Python also need technical
resources to assist them in their research and development
work. These departments are intended to assist you in finding
useful information.</P>
<P>These areas of the site are maintained in a database, so
we can update them in a timely fashion. We hope you will make
use of them on a regular basis, and
<HREF="mailto:Departments@holdenweb.com">assist us</A> by
suggesting other useful links, news items and questions of
interest.
"""
def Title(self):
"""Title is generic for departments."""
return "PythonTeach Departments"
def DeptNav(self):
"""Generate navigation bar for departments start page."""
return "\n".join([self.NavLink(("/DeptHome/%s/" % p.DptCode, p.DptName)) for p in qDept()])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -