Skip to content

Commit

Permalink
Create setup script to create modules
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoest committed Jan 11, 2025
1 parent 1be36e0 commit 6e6c49f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion S1/initial_setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
python manage.py makemigrations
python manage.py migrate
python manage.py create_mentor_group
python manage.py collectstatic
python manage.py collectstatic
python manage.py make_modules
12 changes: 12 additions & 0 deletions S1/waitinglists/management/commands/make_modules.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from django.core.management.base import BaseCommand

from waitinglists.models import Module


class Command(BaseCommand):
help = "Initial setup to create modules"

def handle(self, *args, **kwargs):
Module.objects.create(name="Module 1")
Module.objects.create(name="Module 3")
Module.objects.create(name="Module 4")

0 comments on commit 6e6c49f

Please sign in to comment.