def static(request, filepath): body = '' content_type = 'test/plain' try: body = util.static(filepath) if filepath.endswith('.css'): content_type = 'text/css' elif filepath.endswith('.js'): content_type = 'text/javascript' elif filepath.endswith('.html'): content_type = 'text/html' except: pass return dream.Response(body=body, content_type=content_type)
def media(self): return forms.Media(js=[static('xadmin/js/bootstrap-timepicker.js'), static("xadmin/js/widgets/datetime.js")], css={'screen': [static('xadmin/css/timepicker.css')]})
def media(self): return forms.Media( js=[static("xadmin/js/bootstrap-datepicker.js"), static("xadmin//js/widgets/datetime.js")], css={"screen": [static("xadmin/css/datepicker.css")]}, )