delete_perso.py 510 Bytes
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
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):
Guilhem Saurel's avatar
flake8    
Guilhem Saurel committed
14
        logger.info('removing unwanted projects:')
Guilhem Saurel's avatar
Guilhem Saurel committed
15
        logger.info(str(Project.objects.filter(main_namespace__group=False).delete()))