coalition.stakeholders.models ============================= .. py:module:: coalition.stakeholders.models Classes ------- .. autoapisummary:: coalition.stakeholders.models.Stakeholder Module Contents --------------- .. py:class:: Stakeholder(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Represents individuals and organizations that can endorse policy campaigns. Stakeholders are automatically geocoded and assigned to legislative districts based on their address, including congressional districts, state senate districts, and state house districts. They can endorse multiple campaigns and are categorized by type (business, nonprofit, individual, etc.). The model includes comprehensive address fields and geographic coordinates for mapping and district assignment purposes. .. py:attribute:: STAKEHOLDER_TYPE_CHOICES :value: [('farmer', 'Farmer'), ('waterman', 'Waterman'), ('business', 'Business'), ('nonprofit',... .. py:attribute:: first_name .. py:attribute:: last_name .. py:attribute:: organization .. py:attribute:: role .. py:attribute:: email .. py:attribute:: street_address .. py:attribute:: city .. py:attribute:: state .. py:attribute:: zip_code .. py:attribute:: county .. py:attribute:: location .. py:attribute:: congressional_district .. py:attribute:: state_senate_district .. py:attribute:: state_house_district .. py:attribute:: type .. py:attribute:: email_updates .. py:attribute:: created_at .. py:attribute:: updated_at .. py:method:: save(*args: object, **kwargs: object) -> None Normalize email and state to consistent format .. py:property:: name :type: str Return full name from first and last name .. py:property:: full_address :type: str Return formatted full address .. py:property:: latitude :type: float | None Get latitude from location point .. py:property:: longitude :type: float | None Get longitude from location point .. py:class:: Meta .. py:attribute:: db_table :value: 'stakeholder' .. py:method:: __str__() -> str