Changed the css font and the token length to 6

This commit is contained in:
xemeds
2020-07-25 18:28:42 +00:00
parent d6836c1c1c
commit 43062cd5e3
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ from tiny0 import db
class URL(db.Model):
id = db.Column(db.Integer, primary_key=True)
token = db.Column(db.String(8), index=True, unique=True, nullable=False)
token = db.Column(db.String(6), index=True, unique=True, nullable=False)
url = db.Column(db.String(2000), nullable=False)
def __repr__(self):
+1 -1
View File
@@ -1,7 +1,7 @@
* {
margin: 0;
padding: 0;
font-family: sans-serif;
font-family: 'Roboto Mono', monospace;
}
body {
+1 -1
View File
@@ -7,7 +7,7 @@ token_characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwx
def gen_valid_token():
while True:
# Generate a token
token = "".join(choice(token_characters) for i in range(8))
token = "".join(choice(token_characters) for i in range(6))
# If the token does not exists in the database
if not URL.query.filter_by(token=token).first():