Commit 9f4ecdcf authored by Ale's avatar Ale

feat: Simplify Testimony model

parent 4f961674
......@@ -27,7 +27,7 @@ class TestimonyAdmin(LeafletGeoAdmin):
model = models.Testimony
ordering = ('creation_date',)
list_display = ('name', 'summary', 'owner', 'creation_date', 'update_date')
fields = ( ('name', 'owner'), ('slug', 'published',), 'category', 'summary', 'position',)
fields = ( ('name', 'published'), 'category', 'other_categories', 'position', 'video')
inlines = [ model_utils.ImageInline, model_utils.LinkInline ]
admin.site.register(models.Testimony, TestimonyAdmin)
......
......@@ -19,6 +19,7 @@ from . import validators
validator_video = validators.VideoTypeValidator()
class TestimonyCategory(Category):
content = RichTextUploadingField(
......@@ -86,16 +87,6 @@ class Testimony(Publishable):
blank = False,
null = True,
)
image = models.ImageField(
_('Imagen'),
help_text = _(
'Introduce opcionalmente una imagen de entidad/persona'
),
# upload_to='agents',
null = True,
blank = True,
)
video = models.FileField(
_('Sube el vídeo con tu historia'),
help_text = _(
......@@ -105,18 +96,6 @@ class Testimony(Publishable):
blank=False,
null=True
)
link = models.URLField(
_('Enlace'),
help_text = _(
'Un enlace a una página con más información, a una fuente...'
'No olvides prefijarlo con http:// o https://'
),
null=True,
blank = True,
)
def is_owned_by(self, user):
return user.is_staff or user == self.owner
class Meta:
verbose_name = _('testimonio')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment