コード例 #1
0
ファイル: public_views.py プロジェクト: Siikakala/kompassi
def core_event_view(request, event_slug):
    event = get_object_or_404(Event, slug=event_slug)

    vars = dict(
        event=event,
        settings=settings,
    )

    if event.enrollment_event_meta:
        from enrollment.views import enrollment_event_box_context
        vars.update(enrollment_event_box_context(request, event))

    if event.labour_event_meta:
        from labour.views import labour_event_box_context
        vars.update(labour_event_box_context(request, event))

    if event.programme_event_meta:
        from programme.views import programme_event_box_context
        vars.update(programme_event_box_context(request, event))

    if event.tickets_event_meta:
        from tickets.views import tickets_event_box_context
        vars.update(tickets_event_box_context(request, event))

    if event.badges_event_meta:
        from badges.views import badges_event_box_context
        vars.update(badges_event_box_context(request, event))

    if event.sms_event_meta:
        from sms.views import sms_event_box_context
        vars.update(sms_event_box_context(request, event))

    if event.intra_event_meta:
        from intra.views import intra_event_box_context
        vars.update(intra_event_box_context(request, event))

    return render(request, 'core_event_view.jade', vars)
コード例 #2
0
ファイル: public_views.py プロジェクト: tracon/kompassi
def core_event_view(request, event_slug):
    event = get_object_or_404(Event, slug=event_slug)

    vars = dict(
        event=event,
        settings=settings,
    )

    if event.enrollment_event_meta:
        from enrollment.views import enrollment_event_box_context
        vars.update(enrollment_event_box_context(request, event))

    if event.labour_event_meta:
        from labour.views import labour_event_box_context
        vars.update(labour_event_box_context(request, event))

    if event.programme_event_meta:
        from programme.views import programme_event_box_context
        vars.update(programme_event_box_context(request, event))

    if event.tickets_event_meta:
        from tickets.views import tickets_event_box_context
        vars.update(tickets_event_box_context(request, event))

    if event.badges_event_meta:
        from badges.views import badges_event_box_context
        vars.update(badges_event_box_context(request, event))

    # if event.sms_event_meta:
    #     from sms.views import sms_event_box_context
    #     vars.update(sms_event_box_context(request, event))

    if event.intra_event_meta:
        from intra.views import intra_event_box_context
        vars.update(intra_event_box_context(request, event))

    return render(request, 'core_event_view.pug', vars)