Changeset 13426 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 10 Nov 2015, 06:44:30 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r13396 r13426 1374 1374 1375 1375 def update(self, filename=None, select=None, cancel=None): 1376 if not grok.getSite()['configuration'].maintmode_enabled_by and \ 1377 not self.request.principal.id == 'admin': 1376 if not grok.getSite()['configuration'].maintmode_enabled_by: 1378 1377 self.flash( 1379 1378 _('Portal must be in maintenance mode for data import.'), 1380 1379 type='warning') 1381 self.redirect(self.url(self.context))1382 return1383 1380 if cancel is not None: 1384 1381 self.redirect(self.url(self.context)) … … 1627 1624 1628 1625 def update(self, back=None, finish=None, showlog=None): 1626 if not grok.getSite()['configuration'].maintmode_enabled_by and \ 1627 not self.request.principal.id == 'admin': 1628 self.flash( 1629 _('File has not been imported. ' 1630 'Portal must be in maintenance mode for data import.'), 1631 type='danger') 1632 self.redirect(self.url(self.context)) 1633 return 1629 1634 if finish is not None: 1630 1635 self.redirect(self.url(self.context, '@@import1')) -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py
r13346 r13426 204 204 hostel = Hostel() 205 205 self.applyData(hostel, **data) 206 hostel.hostel_id = data[ 207 ' hostel_name'].lower().replace(' ','-').replace('_','-')206 hostel.hostel_id = data['hostel_name'].lower().replace( 207 ' ','-').replace('_','-').replace('.','') 208 208 try: 209 209 self.context.addHostel(hostel)
Note: See TracChangeset for help on using the changeset viewer.