Changeset 12876
- Timestamp:
- 23 Apr 2015, 21:12:47 (10 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r11846 r12876 89 89 grok.context(ICustomStudentStudyLevel) 90 90 form_fields = grok.AutoFields(ICustomStudentStudyLevel).omit( 91 'total_credits', 'gpa' )91 'total_credits', 'gpa', 'level') 92 92 form_fields[ 93 93 'validation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') … … 100 100 form_fields = grok.AutoFields(ICustomStudentStudyLevel).omit( 101 101 'level_session', 'level_verdict', 102 'validated_by', 'validation_date', 'gpa' )102 'validated_by', 'validation_date', 'gpa', 'level') 103 103 104 104 omit_fields = ('password', 'suspended', 'suspended_comment', -
main/waeup.aaue/trunk/src/waeup/aaue/students/export.py
r12081 r12876 26 26 NigeriaStudentExporter, NigeriaStudentStudyCourseExporter, 27 27 NigeriaStudentStudyLevelExporter, 28 NigeriaCourseTicketExporter, NigeriaStudentPayment sExporter)28 NigeriaCourseTicketExporter, NigeriaStudentPaymentExporter) 29 29 from waeup.kofa.utils.helpers import iface_names 30 30 … … 58 58 #: Fieldnames considered by this exporter 59 59 fields = tuple(sorted(iface_names( 60 ICustomStudentStudyLevel) + ['level'])) + (60 ICustomStudentStudyLevel))) + ( 61 61 'student_id', 'number_of_tickets','certcode') 62 62 63 class CustomStudentPayment sExporter(NigeriaStudentPaymentsExporter):63 class CustomStudentPaymentExporter(NigeriaStudentPaymentExporter): 64 64 """Exporter for OnlinePayment instances. 65 65 """ -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_export.py
r12429 r12876 7 7 from waeup.aaue.utils.utils import CustomKofaUtils 8 8 from waeup.aaue.students.export import ( 9 CustomStudentExporter, CustomStudentPayment sExporter,9 CustomStudentExporter, CustomStudentPaymentExporter, 10 10 CustomStudentStudyLevelExporter) 11 11 from waeup.aaue.testing import FunctionalLayer … … 74 74 return 75 75 76 class CustomStudentPayment sExporterTest(StudentImportExportSetup):76 class CustomStudentPaymentExporterTest(StudentImportExportSetup): 77 77 78 78 layer = FunctionalLayer 79 79 80 80 def setUp(self): 81 super(CustomStudentPayment sExporterTest, self).setUp()81 super(CustomStudentPaymentExporterTest, self).setUp() 82 82 self.setup_for_export() 83 83 return … … 85 85 def test_ifaces(self): 86 86 # make sure we fullfill interface contracts 87 obj = CustomStudentPayment sExporter()87 obj = CustomStudentPaymentExporter() 88 88 verifyObject(ICSVExporter, obj) 89 verifyClass(ICSVExporter, CustomStudentPayment sExporter)89 verifyClass(ICSVExporter, CustomStudentPaymentExporter) 90 90 return 91 91 … … 96 96 self.student['payments']['my-payment'].r_company = 'interswatch' 97 97 self.student['payments']['my-payment'].r_card_num = '789' 98 exporter = CustomStudentPayment sExporter()98 exporter = CustomStudentPaymentExporter() 99 99 exporter.export_all(self.app, self.outfile) 100 100 result = open(self.outfile, 'rb').read()
Note: See TracChangeset for help on using the changeset viewer.