Ignore:
Timestamp:
6 May 2024, 07:53:03 (6 months ago)
Author:
Henrik Bettermann
Message:

Configure deplinks via a csv file.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py

    r17542 r17750  
    1818import grok
    1919import os
     20import csv
    2021from datetime import datetime
    2122from zope.i18n import translate
     
    7879    ITiship,
    7980    ICustomCourseTicket)
    80 from waeup.uniben.students.deplinks import DEPLINKS
    8181from waeup.uniben.interfaces import MessageFactory as _
     82
     83deplinks_path = os.path.join(
     84    os.path.dirname(__file__), 'deplinks.csv')
     85reader = csv.DictReader(open(deplinks_path, 'rb'))
     86DEPLINKS = {line['code']:line['url'] for line in reader}
    8287
    8388class CustomStudentBaseDisplayFormPage(NigeriaStudentBaseDisplayFormPage):
Note: See TracChangeset for help on using the changeset viewer.