Пример #1
0
    def get_context_data(self, *args, **kwargs):
        context = super(TwilioCallHandler, self).get_context_data(*args, **kwargs)
        on_duty = ModSchedule.get_current_mod()
        if on_duty:
            context["name"] = on_duty.user.first_name
            context["cell"] = on_duty.cell
        else:
            # this should NOT HAPPEN
            pass

        return context
Пример #2
0
    def get_context_data(self, *args, **kwargs):
        context = super(TwilioCallHandler,
                        self).get_context_data(*args, **kwargs)
        on_duty = ModSchedule.get_current_mod()
        if on_duty:
            context["name"] = on_duty.user.first_name
            context["cell"] = on_duty.cell
        else:
            # this should NOT HAPPEN
            pass

        return context
def inject_mod_info(request):
    print ModSchedule.get_current_mod()
    return {
        'CURRENT_MOD': ModSchedule.get_current_mod(),
        'MOD_PHONE_NUMBER': settings.MOD_PHONE_NUMBER,
    }
Пример #4
0
def inject_mod_info(request):
    return {
        'CURRENT_MOD': ModSchedule.get_current_mod(),
        'MOD_PHONE_NUMBER': settings.MOD_PHONE_NUMBER,
    }