oioioi.newsfeed.models

Module Contents

Classes

News

Make subclasses preserve the alters_data attribute on overridden methods.

NewsLanguageVersion

Represents a content of a news.

class oioioi.newsfeed.models.News(*args, **kwargs)[source]

Bases: django.db.models.Model

Make subclasses preserve the alters_data attribute on overridden methods.

date[source]
get_content(request=None)[source]
class oioioi.newsfeed.models.NewsLanguageVersion(*args, **kwargs)[source]

Bases: django.db.models.Model

Represents a content of a news. News may have multiple versions - each in another language.

news[source]
language[source]
title[source]
content[source]
rendered_content()[source]
save(*args, **kwargs)[source]

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.