Created
March 7, 2012 20:20
-
-
Save guglielmo/1995758 to your computer and use it in GitHub Desktop.
Open Municipio Internal Municipality API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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