From b89c3a9885933c22a64ba48540e24a6afe04510e Mon Sep 17 00:00:00 2001 From: Paul McKissock Date: Mon, 29 Jul 2024 15:19:41 -0400 Subject: [PATCH] [#N/A] Fixed user links on fyp to update with JS. Removed sounds index and made for_you the root. Made comment form reset after a user comments or goes to a different sound. --- audioapp/forms.py | 14 +++++++------ audioapp/templates/audioapp/base.html | 1 - audioapp/templates/audioapp/for_you.html | 26 +++++++++++++++++------- audioapp/templates/audioapp/index.html | 12 ----------- audioapp/tests/test_views.py | 6 ------ audioapp/urls.py | 2 +- audioapp/views.py | 18 ++++++++-------- 7 files changed, 38 insertions(+), 41 deletions(-) delete mode 100644 audioapp/templates/audioapp/index.html diff --git a/audioapp/forms.py b/audioapp/forms.py index bee36d16..99cfdc05 100644 --- a/audioapp/forms.py +++ b/audioapp/forms.py @@ -13,10 +13,12 @@ class Meta: model = Comment fields = ["text"] widgets = { - 'text': forms.Textarea(attrs={ - 'rows': 5, # Number of rows - 'cols': 30, # Number of columns - 'class': 'w-full p-2 border border-gray-300 rounded', # Tailwind CSS classes - 'placeholder': 'Write your comment here...', - }), + "text": forms.Textarea( + attrs={ + "rows": 5, # Number of rows + "cols": 30, # Number of columns + "class": "w-full p-2 border border-gray-300 rounded", # Tailwind CSS classes + "placeholder": "Write your comment here...", + } + ), } diff --git a/audioapp/templates/audioapp/base.html b/audioapp/templates/audioapp/base.html index c7ca12bd..2809ddc5 100644 --- a/audioapp/templates/audioapp/base.html +++ b/audioapp/templates/audioapp/base.html @@ -9,7 +9,6 @@