delete_perso.py 511 Bytes
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import logging

from django.core.management.base import BaseCommand
from rainboard.models import Project

LICENSES = 'https://raw.githubusercontent.com/spdx/license-list-data/master/json/licenses.json'
logger = logging.getLogger('rainboard.management.populate')


class Command(BaseCommand):
    help = 'Delete personnal projects'

    def handle(self, *args, **options):
        logger.info(f'removing unwanted projects:')
        logger.info(str(Project.objects.filter(main_namespace__group=False).delete()))