Skip to content

update, make a favicon and make the storage_dir visable#1

Open
zaourzag wants to merge 15 commits into
KSoft-Si:masterfrom
zaourzag:master
Open

update, make a favicon and make the storage_dir visable#1
zaourzag wants to merge 15 commits into
KSoft-Si:masterfrom
zaourzag:master

Conversation

@zaourzag
Copy link
Copy Markdown

No description provided.

@zaourzag zaourzag changed the title update update, make a favicon and make the storage_dir visable Mar 18, 2021
zaourzag and others added 11 commits March 18, 2021 23:13
This commit implements a fully-automated development setup using Gitpod.io, an
online IDE for GitLab, GitHub, and Bitbucket that enables Dev-Environments-As-Code.
This makes it easy for anyone to get a ready-to-code workspace for any branch,
issue or pull request almost instantly with a single click.
Fully automate dev setup with Gitpod
the add-user endpoint didnt work and it had a different get methodd then other so i tested it with the other and it works;
 pushing to repo now
implements it just so it works :)
Comment thread server.py
import secrets
import traceback
from os.path import splitext
import datetime import hashlib import os import secrets import traceback from os.path import splitext from
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Against PEP8

Comment thread server.py
def datefromunix(s):
return datetime.datetime.fromtimestamp(int(s) / 1000).strftime("%Y-%m-%d %H:%M")

@app.route('/favicon.ico')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should be done with nginx

Comment thread server.py
activity = [x for x in activity]
return render_template("my_portal.html", domains=allowed_domains, total=total, images=activity)

@app.route('/i/<filename>')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should be done with nginx or storage provider

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give an example?

Comment thread server.py
@app.route('/add-user', methods=['POST'])
def add_user():
token = request.headers.get("Authorization", "unknown")
token = request.form['Authorization']
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's an admin token, should be used in headers

Comment thread templates/nl/login.html
@@ -0,0 +1,53 @@
<!DOCTYPE html>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should look into flask-babel

Comment thread server.py
"files": _db.images.count(),
"domains": len(allowed_domains)
})
@app.route('/nl/')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should look into flask-babel

@@ -0,0 +1,96 @@
<!DOCTYPE html>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should look into flask-babel

@@ -0,0 +1,257 @@
<!DOCTYPE html>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should look into flask-babel

@@ -0,0 +1,61 @@
<!DOCTYPE html>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should look into flask-babel

Comment thread requirements.txt
asn1crypto==0.24.0
certifi==2018.4.16
cffi==1.11.5
dnspython
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

irrelevant dependency?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants