coalition.campaigns.models

Campaigns models package.

Submodules

Classes

Bill

Model representing legislative bills at federal and state levels.

PolicyCampaign

Represents a policy advocacy campaign that stakeholders can endorse.

Package Contents

class coalition.campaigns.models.Bill(*args, **kwargs)[source]

Bases: django.db.models.Model

Model representing legislative bills at federal and state levels.

level
policy
number
title
chamber
session
state
introduced_date
status
url
is_primary
related_bill
sponsors
cosponsors
class Meta
db_table = 'bill'
verbose_name = 'Bill'
verbose_name_plural = 'Bills'
ordering = ['-introduced_date', 'chamber', 'number']
__str__() str[source]
clean() None[source]

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.

class coalition.campaigns.models.PolicyCampaign(*args, **kwargs)[source]

Bases: 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.

name
title
summary
description
endorsement_statement
allow_endorsements
endorsement_form_instructions
created_at
active
image
class Meta
db_table = 'campaign'
__str__() str[source]
current_bills() django.db.models.QuerySet[Bill][source]
save(*args: Any, **kwargs: Any) None[source]

Sanitize HTML fields before saving to prevent XSS attacks.