def handle(self, *args, **opts): from core.models import Event, Organization, Venue from enrollment.models import EnrollmentEventMeta tz = tzlocal() organization = Organization.objects.get(slug='tracon-ry') venue, unused = Venue.objects.get_or_create(name='Ilmoitetaan myöhemmin') event, unused = Event.objects.get_or_create( slug='traconjvk2019', defaults=dict( public=False, name='Traconin JV-kertauskurssi 2019', name_genitive='Traconin JV-kertauskurssin', name_illative='Traconin JV-kertauskurssille', name_inessive='Traconin JV-kertauskurssilla', homepage_url='http://ry.tracon.fi/', organization=organization, start_time=datetime(2019, 2, 24, 10, 0, tzinfo=tz), end_time=datetime(2019, 2, 24, 22, 0, tzinfo=tz), venue=venue, ) ) admin_group, = EnrollmentEventMeta.get_or_create_groups(event, ['admins']) EnrollmentEventMeta.objects.get_or_create( event=event, defaults=dict( admin_group=admin_group, form_class_path='events.traconjvk2019.forms:EnrollmentForm', is_participant_list_public=False, is_official_name_required=True, ), )
def setup_enrollment(self): from enrollment.models import ( EnrollmentEventMeta, SpecialDiet, ) enrollment_admin_group, = EnrollmentEventMeta.get_or_create_groups( self.event, ['admins']) enrollment_event_meta_defaults = dict( admin_group=enrollment_admin_group, form_class_path='events.tracrossf2016.forms:EnrollmentForm', ) if self.test: enrollment_event_meta_defaults.update( enrollment_opens=now() - timedelta(days=60), enrollment_closes=now() + timedelta(days=60), ) else: enrollment_event_meta_defaults.update( enrollment_opens=datetime(2016, 10, 11, 20, 10, 0, tzinfo=self.tz), enrollment_closes=datetime(2016, 10, 20, 23, 59, 59, tzinfo=self.tz), ) enrollment_event_meta, unused = EnrollmentEventMeta.objects.get_or_create( event=self.event, defaults=enrollment_event_meta_defaults, ) for diet_name in [ 'Gluteeniton', 'Laktoositon', 'Maidoton', 'Vegaaninen', 'Lakto-ovo-vegetaristinen', ]: SpecialDiet.objects.get_or_create(name=diet_name)
def setup_enrollment(self): from enrollment.models import ( EnrollmentEventMeta, SpecialDiet, ConconPart, ) enrollment_admin_group, = EnrollmentEventMeta.get_or_create_groups( self.event, ['admins']) enrollment_event_meta_defaults = dict( admin_group=enrollment_admin_group, form_class_path='events.concon15.forms:EnrollmentForm', is_participant_list_public=True, ) if self.test: enrollment_event_meta_defaults.update( enrollment_opens=now() - timedelta(days=60), enrollment_closes=now() + timedelta(days=60), ) enrollment_event_meta, unused = EnrollmentEventMeta.objects.get_or_create( event=self.event, defaults=enrollment_event_meta_defaults, ) for diet_name in [ 'Gluteeniton', 'Laktoositon', 'Maidoton', 'Vegaaninen', 'Lakto-ovo-vegetaristinen', ]: SpecialDiet.objects.get_or_create(name=diet_name) for part_name in [ 'Luento-ohjelma', 'Jatkot', ]: ConconPart.objects.get_or_create(name=part_name)
def setup_enrollment(self): from enrollment.models import ( EnrollmentEventMeta, SpecialDiet, ) enrollment_admin_group, = EnrollmentEventMeta.get_or_create_groups(self.event, ['admins']) enrollment_event_meta_defaults = dict( admin_group=enrollment_admin_group, form_class_path='events.tracrossf2016.forms:EnrollmentForm', ) if self.test: enrollment_event_meta_defaults.update( enrollment_opens=now() - timedelta(days=60), enrollment_closes=now() + timedelta(days=60), ) else: enrollment_event_meta_defaults.update( enrollment_opens=datetime(2016, 10, 11, 20, 10, 0, tzinfo=self.tz), enrollment_closes=datetime(2016, 10, 20, 23, 59, 59, tzinfo=self.tz), ) enrollment_event_meta, unused = EnrollmentEventMeta.objects.get_or_create( event=self.event, defaults=enrollment_event_meta_defaults, ) for diet_name in [ 'Gluteeniton', 'Laktoositon', 'Maidoton', 'Vegaaninen', 'Lakto-ovo-vegetaristinen', ]: SpecialDiet.objects.get_or_create(name=diet_name)
def handle(self, *args, **opts): from core.models import Event, Organization, Venue from enrollment.models import EnrollmentEventMeta tz = tzlocal() organization = Organization.objects.get(slug='tracon-ry') venue, unused = Venue.objects.get_or_create(name='Ilmoitetaan myöhemmin', defaults=dict( name_inessive='Ilmoitetaan myöhemmin', )) event, unused = Event.objects.get_or_create( slug='traconjvp2019', defaults=dict( public=False, name='Traconin JV-peruskurssi 2019', name_genitive='Traconin JV-peruskurssin', name_illative='Traconin JV-peruskurssille', name_inessive='Traconin JV-peruskurssilla', homepage_url='http://ry.tracon.fi/', organization=organization, start_time=datetime(2019, 4, 13, 10, 0, tzinfo=tz), end_time=datetime(2019, 4, 13, 22, 0, tzinfo=tz), venue=venue, ) ) admin_group, = EnrollmentEventMeta.get_or_create_groups(event, ['admins']) EnrollmentEventMeta.objects.get_or_create( event=event, defaults=dict( admin_group=admin_group, form_class_path='events.traconjvp2019.forms:EnrollmentForm', is_participant_list_public=False, is_official_name_required=True, ), )