Small fixes
This commit is contained in:
Binary file not shown.
+1
-1
@@ -10,7 +10,7 @@ def validate_URL(form, field):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# If the url contains spaces or does not have any dots
|
# 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 a ValidationError
|
||||||
raise ValidationError("Invalid URL")
|
raise ValidationError("Invalid URL")
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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 import app, db
|
||||||
from tiny0.forms import URLForm
|
from tiny0.forms import URLForm
|
||||||
from tiny0.models import URL
|
from tiny0.models import URL
|
||||||
|
|||||||
Reference in New Issue
Block a user