Skip to content

rss.models

rss.models

Defines the database models

Feed

Bases: Model

Represents a known feed entry

Source code in rss/models.py
class Feed(Model):
    """Represents a known feed entry"""

    id = fields.IntField(primary_key=True)

    url = fields.CharField(max_length=255, unique=True)
    """url of the feed"""
    title = fields.CharField(max_length=255)
    """feed title"""
    actor_id = fields.CharField(max_length=255, unique=True)
    """actor_id corresponding to the feed. The actor is managed
    by cattle_grid"""
    acct_uri = fields.CharField(max_length=255, unique=True)
    """The acct-uri associated with this actor"""

acct_uri = fields.CharField(max_length=255, unique=True) class-attribute instance-attribute

The acct-uri associated with this actor

actor_id = fields.CharField(max_length=255, unique=True) class-attribute instance-attribute

actor_id corresponding to the feed. The actor is managed by cattle_grid

title = fields.CharField(max_length=255) class-attribute instance-attribute

feed title

url = fields.CharField(max_length=255, unique=True) class-attribute instance-attribute

url of the feed

FeedEntry

Bases: Model

Represents a syndicated entry of the feed

Source code in rss/models.py
class FeedEntry(Model):
    """Represents a syndicated entry of the feed"""

    id = fields.IntField(primary_key=True)
    feed = fields.ForeignKeyField("rss_models.Feed", related_name="entries")
    """The feed this entry belongs to"""

    entry_id = fields.CharField(max_length=255)
    """The id of the feed entry"""

entry_id = fields.CharField(max_length=255) class-attribute instance-attribute

The id of the feed entry

feed = fields.ForeignKeyField('rss_models.Feed', related_name='entries') class-attribute instance-attribute

The feed this entry belongs to

StoredObject

Bases: Model

ActivityPub object for each feed item

Source code in rss/models.py
class StoredObject(Model):
    """ActivityPub object for each feed item"""

    id = fields.CharField(max_length=255, primary_key=True)
    """URI of the object"""
    data = fields.JSONField()
    """The feed item data as json"""

data = fields.JSONField() class-attribute instance-attribute

The feed item data as json

id = fields.CharField(max_length=255, primary_key=True) class-attribute instance-attribute

URI of the object