diff --git a/tiny0/models.py b/tiny0/models.py index f40229d..c52436f 100644 --- a/tiny0/models.py +++ b/tiny0/models.py @@ -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): diff --git a/tiny0/static/style.css b/tiny0/static/style.css index 6ab4a10..71eddc9 100644 --- a/tiny0/static/style.css +++ b/tiny0/static/style.css @@ -1,7 +1,7 @@ * { margin: 0; padding: 0; - font-family: sans-serif; + font-family: 'Roboto Mono', monospace; } body { diff --git a/tiny0/token.py b/tiny0/token.py index a56921c..a592533 100644 --- a/tiny0/token.py +++ b/tiny0/token.py @@ -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():