Pastebin Models
inyoka.pastebin.models
Database models for the pastebin.
- copyright:
2007-2024 by the Inyoka Team, see AUTHORS for more details.
- license:
BSD, see LICENSE for more details.
- class inyoka.pastebin.models.Entry(id, title, lang, code, pub_date, author)
- exception DoesNotExist
- exception MultipleObjectsReturned
- _meta = <Options for Entry>
- author
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 aForwardManyToOneDescriptor
instance.
- author_id
- code
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property code_rendered
Renders the content of the field.
- get_absolute_url(action='show')
- static get_code_rendered(text, lang)
Renders a specific text with the configuration of this field.
This is needed to render text that is not in the database (for example the preview).
This method is bound to the django models as staticmethod, so it can also be called from the Model and not only from the instance.
- get_next_by_pub_date(*, field=<django.db.models.fields.DateTimeField: pub_date>, is_next=True, **kwargs)
- get_previous_by_pub_date(*, field=<django.db.models.fields.DateTimeField: pub_date>, is_next=False, **kwargs)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_code_in_cache()
- lang
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>
- pub_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- remove_code_from_cache()
- title
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.