Ignore:
Timestamp:
13 Jun 2016, 01:37:24 (9 years ago)
Author:
uli
Message:

pep8 for first 100 lines, reorder imports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-scores-upload/src/waeup/kofa/students/browser.py

    r13927 r13928  
    1919"""
    2020import csv
    21 import sys
    2221import grok
    2322import pytz
     23import sys
    2424from cStringIO import StringIO
     25from datetime import datetime
     26from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    2527from urllib import urlencode
    26 from datetime import datetime
    27 from zope.event import notify
    28 from zope.i18n import translate
    2928from zope.catalog.interfaces import ICatalog
    3029from zope.component import queryUtility, getUtility, createObject
     30from zope.event import notify
     31from zope.formlib.textwidgets import BytesDisplayWidget
     32from zope.i18n import translate
    3133from zope.schema.interfaces import ConstraintNotSatisfied, RequiredMissing
    32 from zope.formlib.textwidgets import BytesDisplayWidget
    3334from zope.security import checkPermission
    34 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    3535from waeup.kofa.accesscodes import (
    3636    invalidate_accesscode, get_access_code)
    3737from waeup.kofa.accesscodes.workflow import USED
     38from waeup.kofa.browser.breadcrumbs import Breadcrumb
     39from waeup.kofa.browser.interfaces import ICaptchaManager
    3840from waeup.kofa.browser.layout import (
    3941    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
    4042    NullValidator, jsaction, action, UtilityView)
    41 from waeup.kofa.browser.breadcrumbs import Breadcrumb
    4243from waeup.kofa.browser.pages import (
    4344    ContactAdminFormPage, ExportCSVView, doll_up, exports_not_allowed,
    4445    LocalRoleAssignmentUtilityView)
    45 from waeup.kofa.browser.interfaces import ICaptchaManager
    4646from waeup.kofa.hostels.hostel import NOT_OCCUPIED
    4747from waeup.kofa.interfaces import (
     
    5050    academic_sessions_vocab, IDataCenter, DOCLINK)
    5151from waeup.kofa.interfaces import MessageFactory as _
    52 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
    5352from waeup.kofa.mandates.mandate import PasswordMandate
    5453from waeup.kofa.university.interfaces import (
    5554    IDepartment, ICertificate, ICourse)
     55from waeup.kofa.university.certificate import (
     56    VirtualCertificateExportJobContainer)
     57from waeup.kofa.university.department import (
     58    VirtualDepartmentExportJobContainer)
    5659from waeup.kofa.university.faculty import VirtualFacultyExportJobContainer
    57 from waeup.kofa.university.department import VirtualDepartmentExportJobContainer
    5860from waeup.kofa.university.facultiescontainer import (
    5961    VirtualFacultiesExportJobContainer)
    60 from waeup.kofa.university.certificate import (
    61     VirtualCertificateExportJobContainer,)
    6262from waeup.kofa.university.course import (
    6363    VirtualCourseExportJobContainer,)
     
    6565from waeup.kofa.utils.batching import VirtualExportJobContainer
    6666from waeup.kofa.utils.helpers import get_current_principal, now
     67from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
    6768from waeup.kofa.students.interfaces import (
    68     IStudentsContainer, IStudent,
    69     IUGStudentClearance,IPGStudentClearance,
     69    IStudentsContainer, IStudent, IUGStudentClearance, IPGStudentClearance,
    7070    IStudentPersonal, IStudentPersonalEdit, IStudentBase, IStudentStudyCourse,
    7171    IStudentStudyCourseTransfer, IStudentStudyCourseTranscript,
    72     IStudentAccommodation, IStudentStudyLevel,
    73     ICourseTicket, ICourseTicketAdd, IStudentPaymentsContainer,
    74     IStudentOnlinePayment, IStudentPreviousPayment, IStudentBalancePayment,
    75     IBedTicket, IStudentsUtils, IStudentRequestPW, IStudentTranscript
     72    IStudentAccommodation, IStudentStudyLevel, ICourseTicket, ICourseTicketAdd,
     73    IStudentPaymentsContainer, IStudentOnlinePayment, IStudentPreviousPayment,
     74    IStudentBalancePayment, IBedTicket, IStudentsUtils, IStudentRequestPW,
     75    IStudentTranscript
    7676    )
    7777from waeup.kofa.students.catalog import search, StudentQueryResultItem
    7878from waeup.kofa.students.vocabularies import StudyLevelSource
    79 
    8079from waeup.kofa.students.workflow import (
    8180    ADMITTED, PAID, CLEARANCE, REQUESTED, RETURNING, CLEARED, REGISTERED,
     
    8483
    8584
    86 grok.context(IKofaObject) # Make IKofaObject the default context
     85grok.context(IKofaObject)  # Make IKofaObject the default context
     86
    8787
    8888# Save function used for save methods in pages
     
    9191    # Turn list of lists into single list
    9292    if changed_fields:
    93         changed_fields = reduce(lambda x,y: x+y, changed_fields.values())
     93        changed_fields = reduce(lambda x, y: x+y, changed_fields.values())
    9494    # Inform catalog if certificate has changed
    9595    # (applyData does this only for the context)
Note: See TracChangeset for help on using the changeset viewer.