Browse Source

Comando para limpiar datos

main
Celestino Rey 10 months ago
parent
commit
1ba12507a7
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      lyrics/management/commands/limpia_datos.py

+ 8
- 0
lyrics/management/commands/limpia_datos.py View File

@ -0,0 +1,8 @@
from django.core.management.base import BaseCommand
from lyrics.models import Album, Artista, Song
class Command(BaseCommand):
def handle(self, *args, **options):
Album.objects.all().delete()
Artista.objects.all().delete()
Song.objects.all().delete()

Loading…
Cancel
Save