core.mixins.FavoriteModelMixin module

Module with the core.mixins.FavoriteMixin mixin.

class core.mixins.FavoriteModelMixin.FavoriteModelMixin(*args, **kwargs)[source]

Bases: Model

Mixin adding a favorite functionality to a model class.

is_favorite

Flags favorite accounts. False by default.

class Meta[source]

Bases: object

Metadata class for the mixin, abstract to avoid makemigrations picking it up.

abstract = False
toggle_favorite()[source]

Toggles the is_favorite flag on the model instance.

Return type:

None

_meta = <Options for FavoriteModelMixin>
get_absolute_toggle_favorite_url()[source]

Gets the upload webview url for the model instance.

Return type:

str

Returns:

The upload webview url for the model instance.