コード例 #1
0
ファイル: evolve42.py プロジェクト: l1ph0x/schooltool-2
def evolveScheduleContainers(app):
    annotations = IAnnotations(app)
    prefs = getApplicationPreferences(app)
    schedule_containers = app[SCHEDULES_KEY]
    for container in schedule_containers.values():
        if container.timezone != prefs.timezone:
            container.timezone = prefs.timezone
            zope.lifecycleevent.modified(container)
コード例 #2
0
ファイル: evolve42.py プロジェクト: l1ph0x/schooltool-2
def evolveTimetableContainers(app):
    annotations = IAnnotations(app)
    prefs = getApplicationPreferences(app)
    schedule_containers = app[TIMETABLES_KEY]
    for container in schedule_containers.values():
        for timetable in container.values():
            if timetable.timezone != prefs.timezone:
                timetable.timezone = prefs.timezone
                zope.lifecycleevent.modified(timetable)
コード例 #3
0
ファイル: main.py プロジェクト: l1ph0x/schooltool-2
 def initializePreferences(self, app):
     prefs = getApplicationPreferences(app)
     prefs.initializeTimezone()
コード例 #4
0
ファイル: main.py プロジェクト: achouhans/schooltool-2.8.5
 def initializePreferences(self, app):
     prefs = getApplicationPreferences(app)
     prefs.initializeTimezone()