Skip to content

Instantly share code, notes, and snippets.

@decko
Created September 12, 2013 22:11
Show Gist options
  • Save decko/6544529 to your computer and use it in GitHub Desktop.
Save decko/6544529 to your computer and use it in GitHub Desktop.
def conselhos(self):
if self.titular.all():
return "Titular no %s" % (", titular no ".join([str(mandato.conselho) for mandato in self.titular.all()]))
elif self.suplente.all():
return "Suplente no %s" % (", suplente no ".join([str(mandato.conselho) for mandato in self.suplente.all()]))
else:
return "Sem mandato"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment