Use more appropriate fields instead of TextFields

Fix issue #72
This commit is contained in:
Aarni
2017-09-13 18:44:17 +03:00
parent 4f62dce814
commit d438c7b16a
6 changed files with 71 additions and 7 deletions
+2 -2
View File
@@ -97,7 +97,7 @@ class ApyInfoItem(InfoItem):
class ExternalWebsiteInfoItem(InfoItem):
display_name = _("External website")
url = models.TextField()
url = models.URLField()
def get_template_url(self):
return "/static/html/external_website.html?url={}".format(self.name)
@@ -213,7 +213,7 @@ class HslInfoItem(InfoItem):
class ExternalImageInfoItem(InfoItem):
display_name = _("External image")
url = models.TextField()
url = models.URLField()
def get_template_url(self):
return "/static/html/generic_image.html?img={}".format(self.name)