Messy transition to Vue

This commit is contained in:
2023-05-02 18:41:31 -07:00
parent aed2080b53
commit b0c3eaf33d
35 changed files with 4894 additions and 22 deletions
+5 -1
View File
@@ -1,4 +1,5 @@
from flask import Flask
from flask import Flask, jsonify
from flask_cors import CORS
from flask_sqlalchemy import SQLAlchemy
import os
@@ -7,6 +8,9 @@ persistent_path = os.getenv(
app = Flask(__name__)
# enable CORS
CORS(app, resources={r'/*': {'origins': '*'}})
db_path = os.path.join(persistent_path, "sqlite.db")
app.config["SQLALCHEMY_DATABASE_URI"] = f'sqlite:///{db_path}'
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -6,6 +6,7 @@
integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<!-- HTMX -->
<script src="https://unpkg.com/htmx.org@1.5.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.css" />
<link rel="stylesheet" href="/colors.css"/>
+3 -21
View File
@@ -1,26 +1,8 @@
{% extends "layout.html" %}
{% block content %}
<div id="app">
{{ message }}
</div>
<div id="container"></div>
<script language="javascript">
const container = document.querySelector('#container');
const data = [
{ id: 1, name: 'Ted Right', address: '' },
{ id: 2, name: 'Frank Honest', address: '' },
{ id: 3, name: 'Joan Well', address: '' },
{ id: 4, name: 'Gail Polite', address: '' },
{ id: 5, name: 'Michael Fair', address: '' },
];
const hot = new Handsontable(container, {
data,
colHeaders: false,
height: 'auto',
width: 'auto',
minSpareRows: 1,
licenseKey: 'non-commercial-and-evaluation'
});
</script>
{% endblock %}