core.mixins.URLMixin module

Module with the core.mixins.URLMixin mixin.

class core.mixins.URLMixin.URLMixin[source]

Bases: object

Mixin to add url features to a django.db.models.Model.

BASENAME = ''
get_absolute_url()[source]

Gets the detail webview url for the model instance.

Note

Used by django.views.generics.ModelFormMixin for redirection.

Return type:

str

Returns:

The detail webview url for the model instance.

get_absolute_edit_url()[source]

Gets the edit webview url for the model instance.

Return type:

str

Returns:

The edit webview url for the model instance.

get_absolute_list_url()[source]

Gets the list webview url for the model instance.

Return type:

str

Returns:

The list webview url for the model instance.

get_absolute_table_url()[source]

Gets the table webview url for the model instance.

Return type:

str

Returns:

The table webview url for the model instance.

get_absolute_api_list_url()[source]

Gets the list api url for the model instance.

Return type:

str

Returns:

The list api url for the model instance.

classmethod get_list_web_url_name()[source]

Gets the list webview urlname for the model.

Return type:

str

Returns:

The list webview urlname for the model.

classmethod get_table_web_url_name()[source]

Gets the list webview urlname for the model.

Return type:

str

Returns:

The list webview urlname for the model.

classmethod get_detail_web_url_name()[source]

Gets the detail webview urlname for the model.

Return type:

str

Returns:

The detail webview urlname for the model.

classmethod get_edit_web_url_name()[source]

Gets the edit webview urlname for the model.

Return type:

str

Returns:

The edit webview urlname for the model.