12 lines
365 B
Python
12 lines
365 B
Python
|
from django.core.management.base import BaseCommand
|
||
|
from right_tree.api.models import Plant
|
||
|
|
||
|
|
||
|
class Command(BaseCommand):
|
||
|
help = 'Removes all plant objects from the database'
|
||
|
|
||
|
def handle(self, *args, **options):
|
||
|
self.stdout.write(self.style.WARNING(
|
||
|
'Removing all plant objects from the database.'))
|
||
|
Plant.objects.all().delete()
|