Exemplo n.º 1
0
    def get_context_data(self, **kwargs):
        context = super(QuestionarioPartitiClosed, self).get_context_data(**kwargs)
        p = get_object_or_404(Partito, slug=kwargs['slug'])

        context['nome_lista']=p.denominazione
        context['n_questions']=Domanda.get_n_domande()
        context['nome_responsabile']=p.responsabile_nome
        context['answers']=p.get_answers()

        return context
Exemplo n.º 2
0
    def get_context_data(self, **kwargs):
        context = super(QuestionarioPartitiClosed,
                        self).get_context_data(**kwargs)
        p = get_object_or_404(Partito, slug=kwargs['slug'])

        context['nome_lista'] = p.denominazione
        context['n_questions'] = Domanda.get_n_domande()
        context['nome_responsabile'] = p.responsabile_nome
        context['answers'] = p.get_answers()

        return context
Exemplo n.º 3
0
    def get_context_data(self, **kwargs ):

        context = super(QuestionarioPartitiView, self).get_context_data(**kwargs)
        questions = Domanda.get_domande()
        n_questions=Domanda.get_n_domande()
        form= QuestionarioPartitiForm( extra=questions)

        party_key = kwargs['party_key']
        p = get_object_or_404(Partito, party_key=party_key)

        context['nome_lista']=p.denominazione
        context['n_questions']=n_questions
        context['form']=form
        context['possible_answers']=RispostaPartito.get_tipo_risposta()

        return context
Exemplo n.º 4
0
    def get_context_data(self, **kwargs):

        context = super(QuestionarioPartitiView,
                        self).get_context_data(**kwargs)
        questions = Domanda.get_domande()
        n_questions = Domanda.get_n_domande()
        form = QuestionarioPartitiForm(extra=questions)

        party_key = kwargs['party_key']
        p = get_object_or_404(Partito, party_key=party_key)

        context['nome_lista'] = p.denominazione
        context['n_questions'] = n_questions
        context['form'] = form
        context['possible_answers'] = RispostaPartito.get_tipo_risposta()

        return context