Changeset 8714 for main/waeup.futminna/trunk/src/waeup
- Timestamp:
- 14 Jun 2012, 05:37:00 (12 years ago)
- Location:
- main/waeup.futminna/trunk/src/waeup/futminna
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna/interfaces.py
r8678 r8714 36 36 ('Other Certification','oc'), 37 37 ('Higher National Diploma','hnd'), 38 ('Post Graduate Diploma','pgd'), 38 39 ('NCE AL OTH','nce_al_oth'), 39 40 ('National Defence Academy','nda'), -
main/waeup.futminna/trunk/src/waeup/futminna/students/payments.py
r8619 r8714 23 23 from zope.interface import implementedBy 24 24 from waeup.kofa.students.interfaces import IStudentNavigation 25 from waeup.kofa.students.payments import StudentOnlinePayment 25 from waeup.kofa.students.payments import ( 26 StudentOnlinePayment, StudentOnlinePaymentFactory) 26 27 from waeup.kofa.utils.helpers import attrs_to_fields 27 28 from waeup.futminna.students.interfaces import ICustomStudentOnlinePayment … … 47 48 CustomStudentOnlinePayment = attrs_to_fields(CustomStudentOnlinePayment) 48 49 49 # Student online payments must be importable. So we might need a factory. 50 class CustomStudentOnlinePaymentFactory(grok.GlobalUtility): 50 class CustomStudentOnlinePaymentFactory(StudentOnlinePaymentFactory): 51 51 """A factory for student online payments. 52 52 """ 53 grok.implements(IFactory)54 grok.name(u'waeup.CustomStudentOnlinePayment')55 title = u"Create a new online payment.",56 description = u"This factory instantiates new online payment instances."57 53 58 54 def __call__(self, *args, **kw): -
main/waeup.futminna/trunk/src/waeup/futminna/students/utils.py
r8678 r8714 30 30 """ 31 31 grok.implements(IStudentsUtils) 32 33 paymentfactory = u'waeup.CustomStudentOnlinePayment'34 32 35 33 def getReturningData(self, student): … … 121 119 ticket.p_session == p_session: 122 120 return _('This type of payment has already been made.'), None 123 payment = createObject( self.paymentfactory)121 payment = createObject(u'waeup.StudentOnlinePayment') 124 122 timestamp = "%d" % int(time()*1000) 125 123 payment.p_id = "p%s" % timestamp
Note: See TracChangeset for help on using the changeset viewer.