We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcdf445 commit e2671f1Copy full SHA for e2671f1
shortener/forms.py
@@ -19,12 +19,13 @@ def clean_custom(self):
19
if not custom:
20
return
21
22
+ # they specified a custom url to shorten to. verify that we can decode
23
+ # that shortened form, and that it's not already taken
24
try:
25
id = base62.to_decimal(custom)
26
except DecodingError as e:
27
raise forms.ValidationError(e)
28
- # make sure this custom alias is not alrady taken
29
30
if Link.objects.filter(id=id).exists():
31
raise forms.ValidationError('"%s" is already taken' % custom)
shortener/models.py
@@ -1,5 +1,3 @@
1
-import datetime
2
-
3
from django.db import models
4
from django.conf import settings
5
0 commit comments