Planet Models

inyoka.planet.models

Database models for the planet.

copyright:
  1. 2007-2024 by the Inyoka Team, see AUTHORS for more details.

license:

BSD, see LICENSE for more details.

class inyoka.planet.models.Blog(id, name, description, blog_url, feed_url, user, icon, last_sync, active)
exception DoesNotExist
exception MultipleObjectsReturned
_meta = <Options for Blog>
active

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

blog_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

delete()
description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

entry_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

feed_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_absolute_url(action='show')
icon

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

property icon_url
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_sync

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id
class inyoka.planet.models.Entry(id, blog, guid, title, url, text, pub_date, updated, author, author_homepage, hidden, hidden_by)
exception DoesNotExist
exception MultipleObjectsReturned
_meta = <Options for Entry>
author

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

author_homepage

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

blog

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

blog_id
delete()
get_absolute_url(action='show')
get_next_by_pub_date(*, field=<django.db.models.fields.DateTimeField: pub_date>, is_next=True, **kwargs)
get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
get_previous_by_pub_date(*, field=<django.db.models.fields.DateTimeField: pub_date>, is_next=False, **kwargs)
get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)
guid

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

hidden

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

hidden_by

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

hidden_by_id
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <inyoka.planet.models.EntryManager object>
pub_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

save(*args, **kwargs)

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

property simplified_text
text

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

title

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

updated

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class inyoka.planet.models.EntryManager(*args, **kwargs)
get_latest_entries(count=10)