def get_template(self, resource, context): hostname = context.uri.authority if hostname[:6] == 'admin.' : # Backoffice login template template = '/ui/backoffice/login.xml' return resource.get_resource(template) return get_skin_template(context, 'shop_login.xml')
def get_template(self, resource, context): hostname = context.uri.authority if hostname[:6] == 'admin.': # Backoffice login template template = '/ui/backoffice/login.xml' return resource.get_resource(template) return get_skin_template(context, 'shop_login.xml')
def internal_server_error(self, context): # We send an email to administrators for email in self.get_property('administrators'): subject = MSG(u'Internal server error').gettext() headers = u'\n'.join([u'%s => %s' % (x, y) for x, y in context.get_headers()]) text = internal_error_body.gettext(uri=context.uri, error=traceback.format_exc(), headers=headers) self.send_email(email, subject, text=text) # We show a prerry error page database = context.database namespace = {'traceback': '', 'read_only': type(database) is ReadOnlyDatabase} handler = get_skin_template(context, 'internal_server_error.xml') return stl(handler, namespace, mode='html')
def internal_server_error(self, context): # We send an email to administrators for email in self.get_property('administrators'): subject = MSG(u'Internal server error').gettext() headers = u'\n'.join( [u'%s => %s' % (x, y) for x, y in context.get_headers()]) text = internal_error_body.gettext(uri=context.uri, error=traceback.format_exc(), headers=headers) self.send_email(email, subject, text=text) # We show a prerry error page database = context.database namespace = { 'traceback': '', 'read_only': type(database) is ReadOnlyDatabase } handler = get_skin_template(context, 'internal_server_error.xml') return stl(handler, namespace, mode='html')
def get_template(self): context = get_context() return get_skin_template(context, '/common/languages.xml', is_on_skin=True)
def get_template(self, resource, context): return get_skin_template(context, '/user/profile.xml')
def get_template(self, resource, context): return get_skin_template(context, 'manufacturer_view.xml')
def get_template(self, resource, context): return get_skin_template(context, 'cart_viewbox.xml')
def get_template(self, resource, context): return get_skin_template(context, 'virtualcategory_view.xml') # XXX category_view
def get_template(self, resource, context): return get_skin_template(context, '/news/sidebar.xml')