From c4583482b5700a79cbebf8f25cbcabf872091b34 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 29 May 2018 16:18:00 +0200 Subject: [PATCH] rsqlite UPDATE --- .DS_Store | Bin 8196 -> 8196 bytes app/__init__.py | 2 +- app/models.py | 4 + app/templates/base.html | 36 ++++++- app/templates/edit_book_detail.html | 2 + app/templates/scape.html | 145 ++++++++++++++++++++++++++++ app/templates/show_book_detail.html | 5 +- app/templates/show_books.html | 7 +- app/templates/show_books_grid.html | 31 ++++++ app/views.py | 23 ++++- xpublibrary.csv | 3 - 11 files changed, 246 insertions(+), 12 deletions(-) create mode 100644 app/templates/scape.html create mode 100644 app/templates/show_books_grid.html diff --git a/.DS_Store b/.DS_Store index 7877a07d2d068d34e5d3f1fc4f5799cbcd995e1c..23147fac7472315dcce7f2b5e38e9cc7b82f63aa 100644 GIT binary patch delta 1187 zcmd7QTSyd97zgn4H!m|C(&Ks?ue)k$nRsbcH1d)cyq2YIT9&fwjybgMnzOE1*hVQt zRxeXVRQM*91wm<4ZJyg(B^%7L{QfGGrpRA{#d6;3oKWDy=?>FO>qQW`Ws7i^FP@9X>;ozkM++5m=Mh;nBy{dqmTXg4o&X8W@nB zZdI>UNSg%qNa*%=ZnmoKmO4( zdf~tTTo{B0UL3{|9K~cBPU8%wFpW#Nj9Fa8T|B@79^x6E<263ulQt36$VH7@G`1mg z8Bz1!L|=vLj4`osri|=db4gj1HW6*{Qlo|MTHbFNQS9#i9agnhcG?x^o(_+qDmI7A z!Xl9)3O*@5Au%=0Xk`9{>aUquM#{j&#X!0)i>E=0SzbQRR&ZQBD=eZ$7Q!9%lcgId zWx*U;lmbV~D|j5rNd;eGe1b%iX|3jpiCega^ zq8c@*#TINuE85V`F?wKyEdb&SfQ;fG#&C$U9K&&(z)76KS)5D4d0fCn%y6750h~F^ n;}&k?4({Jbi+vmF{b!3=ZZD$9h>))TvV>@3G2;KerT6#^Y9Sm* delta 1154 zcmd6lOGs2v7{|}wO7F#^o^f>4>($grL$lQJ5%zLS(R`Gp4jP6zdarp=XUsd}Bco|y z6qTz>Pomr;l?g#=1+98hZmNNZa3e*_HbF(3&deBXg4zU~#ewht9nN?7{m!_3+w>h07HdNt1|vkHPgmYHH`s+10&6! zFQAg6&)KQ=F+~*oF?D==aS4@LhSWh_bGukwAm!nvI4ZSvx%>N7mq+JW;6+lIR4%Y* zLVI9xy;Juz45+SOZ!#XmrujsxJ)eY@KvIZ}RFZnqK?cbfnIPxMG?^vyt1PtUr$E~u1ip<9 zS&O$Mq-AEWw{6@~Zj8q{d~|iokfv*$eX3(vQ#?I;oqCt*QZ&~A2gk0C2qxr;EW)3h zBqgS2$TAD?6M|)AmQ1-`F<9he@m?73@V}5u^W*}NOJpm8rCdZy1g?v%3Uy2AW|0eJ zEB%QUep=o}?E?44!b9y8T4@Z#C;Y96=j1h6;ugMxAe%?s#>rQp5>;s6 z?3>UG2iiG*CpXZ``Mco82u3l6!#IND%N8bZ7Uz(10T*!zS22Za+{QF!F^75F#XUU0 hi`yBN#cqR5C~UH+cLYWU)X{~ps4egHdU3}^rV diff --git a/app/__init__.py b/app/__init__.py index a1cb2a7..981b170 100755 --- a/app/__init__.py +++ b/app/__init__.py @@ -16,7 +16,7 @@ app = Flask(__name__) app.config['SECRET_KEY'] = 'super secret key' #app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/mydatabase.db' app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER -app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'mydatabase.db') +app.config['SQLALCHEMY_DATABASE_URI'] = 'rqlite+pyrqlite://localhost:4001/' db = SQLAlchemy(app) app.config.from_object(__name__) diff --git a/app/models.py b/app/models.py index b103540..64061c9 100755 --- a/app/models.py +++ b/app/models.py @@ -23,6 +23,8 @@ class Book(db.Model): backref=db.backref('books', lazy=True)) tags = db.relationship('Tag', secondary=tags, lazy='subquery', backref=db.backref('books', lazy=True)) + scapeX = db.Column(db.Numeric(10,2)) + scapeY = db.Column(db.Numeric(10,2)) def __init__(self, title, file, cover, fileformat, category): self.title = title @@ -30,6 +32,8 @@ class Book(db.Model): self.cover = cover self.fileformat = fileformat self.category = category + self.scapeX = 0 + self.scapeY = 0 def __repr__(self): diff --git a/app/templates/base.html b/app/templates/base.html index fc7e9b7..91396d2 100755 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -38,14 +38,48 @@ diff --git a/app/templates/edit_book_detail.html b/app/templates/edit_book_detail.html index 0125983..f7f9a27 100755 --- a/app/templates/edit_book_detail.html +++ b/app/templates/edit_book_detail.html @@ -11,7 +11,9 @@ {{ form.csrf_token }}

{{ form.title.label }} {{ form.title(size=20, class="form-control") }}

+ +

{{ form.author.label }}