coalition.legislators.models ============================ .. py:module:: coalition.legislators.models Classes ------- .. autoapisummary:: coalition.legislators.models.Legislator Module Contents --------------- .. py:class:: Legislator(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: level .. py:attribute:: bioguide_id .. py:attribute:: state_id .. py:attribute:: first_name .. py:attribute:: last_name .. py:attribute:: chamber .. py:attribute:: state .. py:attribute:: state_region .. py:attribute:: district .. py:attribute:: is_senior .. py:attribute:: party .. py:attribute:: in_office .. py:attribute:: url .. py:method:: __str__() -> str .. py:method:: display_name() -> str .. py:method:: clean() -> None Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS. .. py:class:: Meta .. py:attribute:: db_table :value: 'legislator' .. py:attribute:: verbose_name :value: 'Legislator' .. py:attribute:: verbose_name_plural :value: 'Legislators' .. py:attribute:: ordering :value: ['state', 'chamber', 'last_name', 'first_name'] .. py:attribute:: indexes