14 lines
483 B
Python
14 lines
483 B
Python
from wagtail.admin.forms.account import User
|
|
from assignments.models import Assignment
|
|
from objectives.models import Objective
|
|
from rooms.models import Comment
|
|
|
|
|
|
def nuke_users():
|
|
# todo: make sure the user confirms this when called from a django command
|
|
Objective.objects.exclude(owner=None).delete()
|
|
Comment.objects.all().delete()
|
|
Assignment.objects.exclude(owner=None).exclude(owner__username="guru").delete()
|
|
|
|
User.objects.filter(is_superuser=False).delete()
|