Changeset 6875 for main/waeup.sirp/trunk/src/waeup/sirp/students
- Timestamp:
- 12 Oct 2011, 19:28:49 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/payments.py
r6860 r6875 20 20 from grok import index 21 21 from zope.component.interfaces import IFactory 22 from zope.interface import implementedBy 22 23 from waeup.sirp.students.interfaces import IStudentPaymentsContainer, IStudentNavigation 23 from waeup.sirp.payments import PaymentsContainer 24 from waeup.sirp.payments import PaymentsContainer, OnlinePayment 25 from waeup.sirp.payments.interfaces import IOnlinePayment 24 26 from waeup.sirp.utils.helpers import attrs_to_fields 25 27 … … 38 40 39 41 StudentPaymentsContainer = attrs_to_fields(StudentPaymentsContainer) 42 43 class StudentOnlinePayment(OnlinePayment): 44 """This is an online payment. 45 """ 46 grok.implements(IOnlinePayment, IStudentNavigation) 47 grok.provides(IOnlinePayment) 48 49 def __init__(self): 50 super(StudentOnlinePayment, self).__init__() 51 p_id = None 52 return 53 54 def getStudent(self): 55 return self.__parent__.__parent__ 56 57 StudentOnlinePayment = attrs_to_fields(StudentOnlinePayment) 58 59 # Student online payments must be importable. So we might need a factory. 60 class StudentOnlinePaymentFactory(grok.GlobalUtility): 61 """A factory for student online payments. 62 """ 63 grok.implements(IFactory) 64 grok.name(u'waeup.StudentOnlinePayment') 65 title = u"Create a new online payment.", 66 description = u"This factory instantiates new online payment instances." 67 68 def __call__(self, *args, **kw): 69 return StudentOnlinePayment() 70 71 def getInterfaces(self): 72 return implementedBy(StudentOnlinePayment)
Note: See TracChangeset for help on using the changeset viewer.