uw.local package¶
Subpackages¶
- uw.local.deploy package
- uw.local.grad package
- Subpackages
- uw.local.grad.bin package
- uw.local.grad.db package
- uw.local.grad.webui package
- Submodules
- uw.local.grad.webui.ajax module
- uw.local.grad.webui.analysis module
- uw.local.grad.webui.authority module
- uw.local.grad.webui.coordinator module
- uw.local.grad.webui.delegate module
- uw.local.grad.webui.director module
- uw.local.grad.webui.faculty module
- uw.local.grad.webui.list module
- uw.local.grad.webui.list_render module
- uw.local.grad.webui.roles module
- uw.local.grad.webui.stats module
- uw.local.grad.webui.util module
- uw.local.grad.webui.view module
- uw.local.grad.webui.view_accept module
- uw.local.grad.webui.view_comments module
- uw.local.grad.webui.view_compilation module
- uw.local.grad.webui.view_contact module
- uw.local.grad.webui.view_edit module
- uw.local.grad.webui.view_history module
- uw.local.grad.webui.view_main module
- uw.local.grad.webui.view_offer module
- uw.local.grad.webui.view_render module
- uw.local.grad.webui.wsgifunc module
- Module contents
- Module contents
- Subpackages
- uw.local.identity package
- uw.local.ofcourse package
- uw.local.outgoing package
- uw.local.print_ package
- uw.local.quest package
- Subpackages
- uw.local.quest.bin package
- uw.local.quest.db package
- uw.local.quest.webui package
- Submodules
- uw.local.quest.webui.ajax module
- uw.local.quest.webui.building module
- uw.local.quest.webui.compare module
- uw.local.quest.webui.course module
- uw.local.quest.webui.delegate module
- uw.local.quest.webui.format module
- uw.local.quest.webui.instructor module
- uw.local.quest.webui.room module
- uw.local.quest.webui.schema module
- uw.local.quest.webui.subject module
- uw.local.quest.webui.term module
- uw.local.quest.webui.timetable module
- uw.local.quest.webui.timetable_test module
- uw.local.quest.webui.ui module
- uw.local.quest.webui.unit module
- uw.local.quest.webui.wsgifunc module
- Module contents
- Module contents
- Subpackages
- uw.local.teaching package
- Subpackages
- uw.local.teaching.bin package
- Submodules
- uw.local.teaching.bin.crowdmark_create_json module
- uw.local.teaching.bin.crowdmark_process_pdf module
- uw.local.teaching.bin.crowdmark_save_qr_codes module
- uw.local.teaching.bin.crowdmark_upload_pdf module
- uw.local.teaching.bin.daily_notify module
- uw.local.teaching.bin.generate_cyon module
- uw.local.teaching.bin.main_web module
- uw.local.teaching.bin.markbox_create_assessment module
- uw.local.teaching.bin.markbox_get_pdf module
- uw.local.teaching.bin.markbox_send_classlist module
- uw.local.teaching.bin.send_final_examination_reminder module
- uw.local.teaching.bin.send_instructor_setup_reminders module
- uw.local.teaching.bin.send_scheduling_coordinator_reminder module
- uw.local.teaching.bin.send_scheduling_rep_reminder module
- uw.local.teaching.bin.submit_cel_coversheets module
- uw.local.teaching.bin.submit_exam_print module
- uw.local.teaching.bin.submit_grade_revisions module
- uw.local.teaching.bin.submit_posting_pads module
- uw.local.teaching.bin.ta_eval_approve_reminder module
- Module contents
- uw.local.teaching.command package
- uw.local.teaching.db package
- Submodules
- uw.local.teaching.db.aids module
- uw.local.teaching.db.classlist module
- uw.local.teaching.db.crowdmark module
- uw.local.teaching.db.cursor module
- uw.local.teaching.db.cyon module
- uw.local.teaching.db.exam_import_rooms module
- uw.local.teaching.db.exam_import_times module
- uw.local.teaching.db.exam_print module
- uw.local.teaching.db.markbox module
- uw.local.teaching.db.pdf module
- Module contents
- uw.local.teaching.webui package
- Subpackages
- uw.local.teaching.webui.ta package
- Submodules
- uw.local.teaching.webui.ta.admin module
- uw.local.teaching.webui.ta.entitlement module
- uw.local.teaching.webui.ta.eval module
- uw.local.teaching.webui.ta.planner module
- uw.local.teaching.webui.ta.position module
- uw.local.teaching.webui.ta.setup module
- uw.local.teaching.webui.ta.student module
- uw.local.teaching.webui.ta.ta module
- uw.local.teaching.webui.ta.ui module
- Module contents
- uw.local.teaching.webui.ta package
- Submodules
- uw.local.teaching.webui.accommodation module
- uw.local.teaching.webui.accommodation_test module
- uw.local.teaching.webui.admin module
- uw.local.teaching.webui.admin_account_edit module
- uw.local.teaching.webui.admin_exams_edit module
- uw.local.teaching.webui.administer module
- uw.local.teaching.webui.administer_test module
- uw.local.teaching.webui.aids_edit module
- uw.local.teaching.webui.api module
- uw.local.teaching.webui.authority module
- uw.local.teaching.webui.candidate module
- uw.local.teaching.webui.candidate_test module
- uw.local.teaching.webui.coordinators module
- uw.local.teaching.webui.crowdmark module
- uw.local.teaching.webui.crowdmark_test module
- uw.local.teaching.webui.delegate module
- uw.local.teaching.webui.division module
- uw.local.teaching.webui.enrolment module
- uw.local.teaching.webui.enrolment_test module
- uw.local.teaching.webui.eval_view module
- uw.local.teaching.webui.exam module
- uw.local.teaching.webui.exam_edit module
- uw.local.teaching.webui.exam_edit_test module
- uw.local.teaching.webui.exam_render module
- uw.local.teaching.webui.exam_scan module
- uw.local.teaching.webui.exam_scan_test module
- uw.local.teaching.webui.exam_schedule module
- uw.local.teaching.webui.exam_schedule_test module
- uw.local.teaching.webui.exam_version module
- uw.local.teaching.webui.exam_version_test module
- uw.local.teaching.webui.grades module
- uw.local.teaching.webui.grades_test module
- uw.local.teaching.webui.integration module
- uw.local.teaching.webui.new_features module
- uw.local.teaching.webui.offering module
- uw.local.teaching.webui.offering_conflict module
- uw.local.teaching.webui.offering_edit module
- uw.local.teaching.webui.order_edit module
- uw.local.teaching.webui.override_uploader module
- uw.local.teaching.webui.personnel module
- uw.local.teaching.webui.print_ module
- uw.local.teaching.webui.room module
- uw.local.teaching.webui.room_create module
- uw.local.teaching.webui.room_edit module
- uw.local.teaching.webui.room_render module
- uw.local.teaching.webui.room_render_test module
- uw.local.teaching.webui.schedule module
- uw.local.teaching.webui.schedule_test module
- uw.local.teaching.webui.sitting module
- uw.local.teaching.webui.sitting_edit module
- uw.local.teaching.webui.special module
- uw.local.teaching.webui.term module
- uw.local.teaching.webui.ui module
- uw.local.teaching.webui.upload module
- uw.local.teaching.webui.wsgifunc module
- Module contents
- Subpackages
- uw.local.teaching.bin package
- Module contents
- Subpackages
- uw.local.userdb package
- uw.local.util package
- uw.local.uwdata package
- uw.local.watiam package
- uw.local.wcms package
Submodules¶
uw.local.config module¶
Simple password configuration.
This module provides a ConfigParser for ~/.odyssey_pw in order to allow storing non-Postgres credentials outside of program code.
uw.local.dbtools module¶
uw.local.debug module¶
Debug utilities.
Functions which may be useful for debugging.
-
uw.local.debug.
stopwatch
(msg)[source]¶ Create a decorator which may be used to time execution of a function.
- Parameters
msg (str) – A message to print out when the wrapped function is timed.
- Returns
A decorator which times the function to which it is applied and prints the time along with the specified message.
-
uw.local.debug.
sw
(msg, f)[source]¶ Call a function and time its execution.
- Parameters
msg (str) – A message to print out when the wrapped function is timed.
f – The function to time. This must expect no parameters. Providing a no-parameter lambda expression is likely to be useful.
- Returns
The result of calling the wrapped function.
uw.local.termtools module¶
-
class
uw.local.termtools.
Term
(sequence)[source]¶ Bases:
object
Class representing UW terms.
Terms can be converted to and from term codes, written as text strings or as integers. Methods are available to print useful representations of terms and perform arithmetic on them.
-
uw.local.termtools.
fromOldCode
(code)[source]¶ Convert an old term code into a term object.
Years from 50-99 are assuming to be in the 1900s while 00-49 are 2000s. This allows all old term codes from just before the founding of the University up to Fall 2049 to be processed correctly. If we’re still using the old codes for anything in Fall 2049 then I’m not responsible for the consequences.
uw.local.termtools_test module¶
-
class
uw.local.termtools_test.
TermtoolsTests
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
test_make_returns_correct_term
()[source]¶ Tests if the make () function works when given a valid input.
-
uw.local.webtools module¶
-
uw.local.webtools.
web_main
(Cursor, wsgifunc, template=<function test_template>, header_insert=None)[source]¶
-
uw.local.webtools.
wsgi_application
(Cursor, wsgifunc, demo_mode=False, template=<function test_template>, header_insert=None)[source]¶
-
uw.local.webtools.
wsgimain
(wsgifunc, db=None, connection_pool=None, server_address=None, template=<function test_template>, header_insert=None)[source]¶ Standard WSGI main function.
Each application is started by invoking this routine with the proper wsgifunc which is responsible for handling web requests.
The db parameter should be an instance of uw.local.dbtools.Database. If provided the given wsgifunc will be wrapped with the sql_db and sql_transaction handlers.
The provided wsgifunc will be wrapped in the following order, from innermost (first) to outermost (last):
Demo handler, if environment variable DEMO_MODE is set to ‘yes’
Standard wrappers, as per wsgiwrap()
SQL access wrappers, if db parameter is specified
The SQL access is outermost so that exceptions used within the other handlers to return valid results (e.g., 302 HTTP Found results) do not interfere with the SQL wrappers’ handling of transactions.
-
uw.local.webtools.
wsgiwrap
(handler, demo_mode=False, connection_pool=None, template=<function test_template>, header_insert=None)[source]¶ Standard WSGI wrapper.
This introduces the CLF template and error handling.
Note that the CLF is wrapped after the error handler. If this order is reversed, it actually still works because the same environ is passed down and the template variable is added to it. If a modified copy of the environment were passed down (i.e., proper functional style) then the other would not work.
Module contents¶
UW-local modules.
This package contains all code specific to UW applications. Code in here is likely not useful out of the context of each individual application.