Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/c/a/candideitorg-django-0.0.1/candidator/elections/views/election_views.py   candideitorg-django(Download)
 
# Import models
from elections.forms.candidate_form import CandidateForm
from elections.forms.election_form import AnswerForm, ElectionLogoUpdateForm
from elections.models import Election, Candidate, Category
    def get_context_data(self, **kwargs):
        context = super(ElectionUpdateView, self).get_context_data(**kwargs)
        election = kwargs['form'].instance
        context['election_url'] = self.request.build_absolute_uri(election.get_absolute_url())
        new_candidate_form = CandidateForm()