- Timestamp:
- 26 Oct 2011, 06:27:24 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/hostels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/hostels/browser.py
r6953 r6954 116 116 @grok.action('Create hostel') 117 117 def addHostel(self, **data): 118 #hostel = createObject(u'waeup.Hostel') 119 #self.applyData(hostel, **data) 120 hostel = Hostel(**data) 118 hostel = Hostel() 119 self.applyData(hostel, **data) 121 120 self.context.addHostel(hostel) 122 121 self.flash('Hostel created.') -
main/waeup.sirp/trunk/src/waeup/sirp/hostels/hostel.py
r6953 r6954 28 28 grok.implements(IHostel) 29 29 grok.provides(IHostel) 30 grok.baseclass()31 32 def __init__(self, **data):33 super(Hostel, self).__init__()34 self.hostel_id = data['hostel_id']35 return36 30 37 31 def loggerInfo(self, ob_class, comment=None): -
main/waeup.sirp/trunk/src/waeup/sirp/hostels/interfaces.py
r6953 r6954 21 21 hostel_id = schema.TextLine( 22 22 title = u'Hostel ID', 23 required = False, 23 required = True, 24 default = u'hostel_1', 24 25 )
Note: See TracChangeset for help on using the changeset viewer.