Skip to content

Instantly share code, notes, and snippets.

@guglielmo
Created March 7, 2012 20:20
Show Gist options
  • Save guglielmo/1995758 to your computer and use it in GitHub Desktop.
Save guglielmo/1995758 to your computer and use it in GitHub Desktop.
Open Municipio Internal Municipality API
## Private DB access API
class Council(object):
@property
def members(self):
return Institution.objects.get(institution_type=Institution.COUNCIL).institutioncharge_set
@property
def majority_members(self):
pass
@property
def minority_members(self):
pass
@property
def groups(self):
pass
@property
def majority_groups(self):
pass
@property
def minority_groups(self):
pass
class CityGov(object):
@property
def members(self):
return Institution.objects.get(institution_type=Institution.CITY_GOVERNMENT).institutioncharge_set
class Municipality(object):
def __init__(self):
self.gov = CityGov()
self.council = Council()
@property
def mayor(self):
pass
municipality = Municipality()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment