Browse Source

i don't know why i used format(), i must have been very tired

master
Lynne Megido 1 year ago
parent
commit
63b30040a8
Signed by: Lynne <thecoolone3@gmail.com> GPG Key ID: FB7B970303ACE499
2 changed files with 3 additions and 2 deletions
  1. 2
    1
      templates/imports.html
  2. 1
    1
      web.py

+ 2
- 1
templates/imports.html View File

@@ -1,2 +1,3 @@
<link rel='stylesheet' type='text/css' href="{{ url_for('static', filename='style.css') }}" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet">
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">

+ 1
- 1
web.py View File

@@ -41,7 +41,7 @@ dc = db.cursor(dictionary=True)
# | time_between_checks | int(11) | YES | | NULL | |
# | settings | varchar(4096) | YES | | {"cw": false} | |
# +---------------------+---------------+------+-----+------------------------------------------------+-------+
c.execute("CREATE TABLE IF NOT EXISTS `data` (username VARCHAR(64) NOT NULL, instance VARCHAR(128) NOT NULL, password TINYTEXT NOT NULL, avi TEXT NOT NULL, secret TINYTEXT NOT NULL, client_id VARCHAR(128) NOT NULL, client_secret TINYTEXT NOT NULL, cc TINYTEXT, ccavi VARCHAR(128) DEFAULT 'https://lynnesbian.space/res/ceres/cc-smol.png', latest_post TINYTEXT, last_check TINYTEXT, time_between_checks INT, settings VARCHAR(4096) DEFAULT \"{}\", PRIMARY KEY(username, instance))".format(json.dumps(settings)))
c.execute("CREATE TABLE IF NOT EXISTS `data` (username VARCHAR(64) NOT NULL, instance VARCHAR(128) NOT NULL, password TINYTEXT NOT NULL, avi TEXT NOT NULL, secret TINYTEXT NOT NULL, client_id VARCHAR(128) NOT NULL, client_secret TINYTEXT NOT NULL, cc TINYTEXT, ccavi VARCHAR(128) DEFAULT 'https://lynnesbian.space/res/ceres/cc-smol.png', latest_post TINYTEXT, last_check TINYTEXT, time_between_checks INT, settings VARCHAR(4096) DEFAULT %s, PRIMARY KEY(username, instance))", json.dumps(settings))

app = Flask(cfg['name'])
app.secret_key = cfg['flask_key']

Loading…
Cancel
Save