diff --git a/tiny0/database.db b/tiny0/database.db index 8bcab84..6e5e6e7 100644 Binary files a/tiny0/database.db and b/tiny0/database.db differ diff --git a/tiny0/forms.py b/tiny0/forms.py index dee4707..23cc2e6 100644 --- a/tiny0/forms.py +++ b/tiny0/forms.py @@ -10,7 +10,7 @@ def validate_URL(form, field): return # If the url contains spaces or does not have any dots - if field.data.count(" ") > 0 or field.data.count(".") == 0: + if (" " in field.data) or not("." in field.data): # Raise a ValidationError raise ValidationError("Invalid URL") diff --git a/tiny0/routes.py b/tiny0/routes.py index 908162a..9a876a0 100644 --- a/tiny0/routes.py +++ b/tiny0/routes.py @@ -1,4 +1,4 @@ -from flask import render_template, redirect, request, url_for +from flask import render_template, redirect, url_for from tiny0 import app, db from tiny0.forms import URLForm from tiny0.models import URL