def export(): for cls_name, cls in diagram_classes.items(): path = app.path / 'migrations' / 'export' / f'{cls_name}.yaml' with open(path, 'w') as migration_file: instances = diagram_classes[cls_name].export() dump(instances, migration_file, default_flow_style=False) return jsonify(True)
def dashboard(): return render_template( 'dashboard.html', names=pretty_names, properties=type_to_diagram_properties, default_properties=default_diagrams_properties, counters={name: len(cls.query.all()) for name, cls in diagram_classes.items()} )