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/candidate_views.py   candideitorg-django(Download)
 
# Import exceptions
from elections.exceptions import NoCandidateError
 
# Candidate views
            candidates = election.candidate_set.all()
            if not candidates:
                raise NoCandidateError(_(u"There are no candidates"),[_(u"There are no candidates")])
            self.kwargs['slug'] = candidates[0].slug