datamade / django-councilmatic

:heartpulse: Django app providing core functions for *.councilmatic.org
http://councilmatic.org
MIT License
26 stars 16 forks source link

Test ProxyForeignKey #246

Closed hancush closed 5 years ago

hancush commented 5 years ago
In [1]: from councilmatic_core.models import Organization

In [2]: o = Organization.objects.filter(memberships__isnull=False).first()

In [3]: o.memberships.first()
Out[3]: <Membership: Daley, Richard M. in City of Chicago (Mayor)>

In [4]: type(o.memberships.first())
Out[4]: councilmatic_core.models.Membership