From 5e9c8a51a5a305913744d017425eb04e659d5fcf Mon Sep 17 00:00:00 2001 From: Jan Gaura Date: Fri, 12 Apr 2024 14:26:30 +0200 Subject: [PATCH] Removed unused files. `import_students.py` haven't been used for years and uses non-existing code. It's not worth maintaining. --- common/management/commands/import_students.py | 21 ------------------- web/admin.py | 3 --- web/models.py | 3 --- 3 files changed, 27 deletions(-) delete mode 100644 common/management/commands/import_students.py delete mode 100644 web/admin.py delete mode 100644 web/models.py diff --git a/common/management/commands/import_students.py b/common/management/commands/import_students.py deleted file mode 100644 index b16a0a2d..00000000 --- a/common/management/commands/import_students.py +++ /dev/null @@ -1,21 +0,0 @@ -from django.core.management.base import BaseCommand -from common.bulk_import import BulkImport - -class Command(BaseCommand): - def add_arguments(self, parser): - parser.add_argument('file', help='saved html from edison') - parser.add_argument('--no-lectures', action='store_true', help='do not add students to lectures') - parser.add_argument('--no-exercises', action='store_true', help='do not add students to exercises') - parser.add_argument('--class-code', help='add all students to classes with this code', action='append', default=[]) - - def handle(self, *args, **opts): - with open(opts['file']) as f: - students = BulkImport().run( - f.read(), - class_code=opts['class_code'], - no_lectures=opts['no_lectures'], - no_exercises=opts['no_exercises'], - ) - - for s in students: - print(f"{s['login']} {s['firstname']:>15} {s['lastname']:>15} {('created' if s['created'] else ''):>5} {', '.join(s['classes'])}") diff --git a/web/admin.py b/web/admin.py deleted file mode 100644 index 8c38f3f3..00000000 --- a/web/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/web/models.py b/web/models.py deleted file mode 100644 index 71a83623..00000000 --- a/web/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here.