From 5f9ef08e3b08b4674bc19bbaf7064f4520ae6041 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Sat, 2 Oct 2021 02:40:48 +0200 Subject: [PATCH] Added linktype to externallink class and made it non-abstract. --- .../lostplaces/models/external_links.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/django_lostplaces/lostplaces/models/external_links.py b/django_lostplaces/lostplaces/models/external_links.py index e8c42b8..1d532e3 100644 --- a/django_lostplaces/lostplaces/models/external_links.py +++ b/django_lostplaces/lostplaces/models/external_links.py @@ -4,9 +4,9 @@ from django.utils.translation import ugettext_lazy as _ from lostplaces.models.place import PlaceAsset class ExternalLink(PlaceAsset): - + class Meta: - abstract = True + abstract = False url = models.URLField( max_length=200, @@ -16,6 +16,12 @@ class ExternalLink(PlaceAsset): max_length=100, verbose_name=_('link text') ) + linktype = models.CharField( + max_length=20, + verbose_name=_('link type'), + blank=True, + null=True + ) class PhotoAlbum(ExternalLink): - pass \ No newline at end of file + pass