Popravljeni requirements, upload fix, nekaj drugih popravkov
parent
5893cca01c
commit
1068f1acee
2
menu.py
2
menu.py
|
@ -28,7 +28,7 @@ def index():
|
|||
action = request.form.get("menu", False) #internetna rešitev, nevem kako, ampak dela, tj. dobi info iz meni buttonov
|
||||
print(action)
|
||||
if action == "new_session":
|
||||
#tu bi moral preveriti če je kak unfinished deck, potem bi pisalo continiue, namesto new
|
||||
# @TODO tu bi moral preveriti če je kak unfinished deck, potem bi pisalo continiue, namesto new
|
||||
|
||||
#ustvari novi vnos v Deck
|
||||
deck = probabilistic_deck_generator(user_id, 5, 5)
|
||||
|
|
|
@ -1,44 +1,5 @@
|
|||
Package Version
|
||||
------------------------- ---------
|
||||
altgraph 0.17.2
|
||||
async-generator 1.10
|
||||
attrs 21.4.0
|
||||
certifi 2021.10.8
|
||||
cffi 1.15.0
|
||||
charset-normalizer 2.0.12
|
||||
click 8.1.2
|
||||
colorama 0.4.4
|
||||
cryptography 36.0.1
|
||||
Flask 2.1.1
|
||||
future 0.18.2
|
||||
greenlet 1.1.2
|
||||
h11 0.12.0
|
||||
idna 3.3
|
||||
importlib-metadata 4.11.3
|
||||
itsdangerous 2.1.2
|
||||
Jinja2 3.1.1
|
||||
MarkupSafe 2.1.1
|
||||
numpy 1.22.3
|
||||
outcome 1.1.0
|
||||
pefile 2021.9.3
|
||||
pip 21.1.1
|
||||
pycparser 2.21
|
||||
pyinstaller 4.8
|
||||
pyinstaller-hooks-contrib 2021.5
|
||||
PyMySQL 1.0.2
|
||||
pyncclient 0.7
|
||||
pyOpenSSL 21.0.0
|
||||
pywin32-ctypes 0.2.0
|
||||
requests 2.27.1
|
||||
selenium 4.1.0
|
||||
setuptools 56.0.0
|
||||
six 1.16.0
|
||||
sniffio 1.2.0
|
||||
sortedcontainers 2.4.0
|
||||
SQLAlchemy 1.4.35
|
||||
trio 0.19.0
|
||||
trio-websocket 0.9.2
|
||||
urllib3 1.26.7
|
||||
Werkzeug 2.1.1
|
||||
wsproto 1.0.0
|
||||
zipp 3.8.0
|
||||
Flask==2.1.1
|
||||
PyMySQL==1.0.2
|
||||
pyncclient==0.7
|
||||
SQLAlchemy==1.4.35
|
||||
numpy==1.21.6
|
||||
|
|
|
@ -22,7 +22,8 @@ dbsession = dbsessionmaker()
|
|||
|
||||
|
||||
nc = nextcloud_client.Client('https://obzorje.kompot.si')
|
||||
nc.login('gia', 'gia0000!')
|
||||
#print("Loggin in", CONFIG['NC_USER'], CONFIG['NC_PASSWORD'])
|
||||
nc.login(CONFIG['NC_USER'],CONFIG['NC_PASSWORD'])
|
||||
|
||||
|
||||
@bp.route("/", methods=["GET", "POST"])
|
||||
|
@ -42,7 +43,7 @@ def upload_file():
|
|||
filename = secure_filename(upload.filename)
|
||||
|
||||
script_path = os.path.dirname(os.path.abspath(__file__))
|
||||
temp_path = script_path + "\\temp\\"
|
||||
temp_path = os.path.join(script_path, "temp")
|
||||
|
||||
|
||||
#a lot of stuff can wrong here and nobody may know
|
||||
|
@ -50,8 +51,8 @@ def upload_file():
|
|||
fp.write(upload.stream.read())
|
||||
path = fp.name
|
||||
fp.close()
|
||||
nc.put_file("/GIA CLOUD/" + filename, "temp\\" + path.split("\\")[-1])
|
||||
os.remove(fp.name)
|
||||
nc.put_file("/GIA CLOUD/" + filename, path)
|
||||
os.remove(path)
|
||||
|
||||
#get public link
|
||||
public_link = nc.share_file_with_link("/GIA CLOUD/" + filename).get_link()+"/download/"+filename
|
||||
|
|
Loading…
Reference in New Issue