coalition.campaigns.models ========================== .. py:module:: coalition.campaigns.models .. autoapi-nested-parse:: Campaigns models package. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/coalition/campaigns/models/bill/index /autoapi/coalition/campaigns/models/policy_campaign/index Classes ------- .. autoapisummary:: coalition.campaigns.models.Bill coalition.campaigns.models.PolicyCampaign Package Contents ---------------- .. py:class:: Bill(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Model representing legislative bills at federal and state levels. .. py:attribute:: level .. py:attribute:: policy .. py:attribute:: number .. py:attribute:: title .. py:attribute:: chamber .. py:attribute:: session .. py:attribute:: state .. py:attribute:: introduced_date .. py:attribute:: status .. py:attribute:: url .. py:attribute:: is_primary .. py:attribute:: related_bill .. py:attribute:: sponsors .. py:attribute:: cosponsors .. py:class:: Meta .. py:attribute:: db_table :value: 'bill' .. py:attribute:: verbose_name :value: 'Bill' .. py:attribute:: verbose_name_plural :value: 'Bills' .. py:attribute:: ordering :value: ['-introduced_date', 'chamber', 'number'] .. py:method:: __str__() -> 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:: PolicyCampaign(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Represents a policy advocacy campaign that stakeholders can endorse. Campaigns are the central organizing unit of the platform. Each campaign represents a specific policy position that organizations and individuals can publicly endorse. Campaigns can be linked to specific legislation at federal and state levels. The campaign includes public-facing content (title, summary, description) as well as administrative settings for endorsement collection and moderation. .. py:attribute:: name .. py:attribute:: title .. py:attribute:: summary .. py:attribute:: description .. py:attribute:: endorsement_statement .. py:attribute:: allow_endorsements .. py:attribute:: endorsement_form_instructions .. py:attribute:: created_at .. py:attribute:: active .. py:attribute:: image .. py:class:: Meta .. py:attribute:: db_table :value: 'campaign' .. py:method:: __str__() -> str .. py:method:: current_bills() -> django.db.models.QuerySet[Bill] .. py:method:: save(*args: Any, **kwargs: Any) -> None Sanitize HTML fields before saving to prevent XSS attacks.