From f1e8185bffad916f649e08d8222641ddcd9c100b Mon Sep 17 00:00:00 2001 From: j Date: Fri, 18 Apr 2025 21:47:12 +0100 Subject: [PATCH 1/2] text area for title --- app/item/admin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/item/admin.py b/app/item/admin.py index 4e77a55..c40dad3 100644 --- a/app/item/admin.py +++ b/app/item/admin.py @@ -17,7 +17,10 @@ class ItemAdmin(admin.ModelAdmin): return {'user': request.user} def get_form(self, request, obj=None, **kwargs): - kwargs['widgets'] = {'url': forms.Textarea} + kwargs['widgets'] = { + 'title': forms.Textarea, + 'url': forms.Textarea + } return super().get_form(request, obj, **kwargs) admin.site.register(models.Item, ItemAdmin) From b6f3e01721ea66bc7d5d2c7de9421132f02d7d86 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 18 Apr 2025 21:49:05 +0100 Subject: [PATCH 2/2] strip html from title in metadata --- app/templates/item.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/templates/item.html b/app/templates/item.html index 053d03a..6612ada 100644 --- a/app/templates/item.html +++ b/app/templates/item.html @@ -1,9 +1,9 @@ {% extends "base.html" %} {% load static sass_tags compress %} {% block head %} - {{ item.title }} - {{ settings.SITENAME }} - - + {{ item.title|striptags }} - {{ settings.SITENAME }} + + {% if item.data.thumbnail %}