diff --git a/src/core/management/commands/create_conference.py b/src/core/management/commands/create_conference.py index 60ca31482bbd1df8b99e6c3246820f572d983512..44a930beaaeb2b3be75c7424d5c99c86fb5ecf5d 100644 --- a/src/core/management/commands/create_conference.py +++ b/src/core/management/commands/create_conference.py @@ -1,3 +1,4 @@ +from argparse import BooleanOptionalAction from datetime import datetime from zoneinfo import ZoneInfo @@ -5,7 +6,9 @@ from zoneinfo import ZoneInfo from django.core.management import call_command from django.core.management.base import BaseCommand -from core.models import Assembly, Conference, StaticPage, StaticPageNamespace +from core.models.assemblies import Assembly +from core.models.conference import Conference +from core.models.pages import StaticPage, StaticPageNamespace NS_INTRO = '_intro_' INTRO_PAGES = { @@ -330,10 +333,29 @@ def seed_conference(conf: Conference, year: int = 0, force: bool = False): class Command(BaseCommand): def add_arguments(self, parser): - parser.add_argument('slug', type=str, nargs='?') - parser.add_argument('--name', type=str) - parser.add_argument('--year', type=int) - parser.add_argument('--bootstrap', action='store_true') + parser.add_argument( + 'slug', + type=str, + nargs='?', + help='The url slug of the new conference.', + ) + parser.add_argument( + '-n', + '--name', + type=str, + help='The name of the new conference', + ) + parser.add_argument( + '-y', + '--year', + type=int, + help='The year of the CCC congress. If not given, it will use the current year.', + ) + parser.add_argument( + '--bootstrap', + action=BooleanOptionalAction, + help=("Initialize the conference permission groups (e.g. 'Assembly-Teams')."), + ) def handle(self, *args, **options): if not (slug := options.get('slug')):