Marietje 4.1: Addition of Django REST framework, Swagger, Dark mode and updates to Django and Bootstrap

This commit is contained in:
Lars van Rhijn
2023-09-14 19:55:51 +02:00
parent 379ababcc0
commit d1a1be7e2e
124 changed files with 4835 additions and 3490 deletions

View File

@ -3,12 +3,14 @@ from django.core.management.base import BaseCommand
from songs.models import ReportNote
class Command(BaseCommand):
help = 'Gather all song reports'
help = "Gather all song reports"
def handle(self, *args, **options):
reports = ReportNote.objects.all()
for report in reports:
song = report.song
url = '<{base_url}/admin/songs/song/{r.song.id}/change/>'.format(base_url=settings.BASE_URL, r=report)
print('Song: {r.song.artist} - {r.song.title}\nMessage: {r.note}\nLink: {url}'.format(url=url, r=report))
print('-' * 72)
url = "<{base_url}/admin/songs/song/{r.song.id}/change/>".format(base_url=settings.BASE_URL, r=report)
print("Song: {r.song.artist} - {r.song.title}\nMessage: {r.note}\nLink: {url}".format(url=url, r=report))
print("-" * 72)