django_sorcery.views.list module

Django list view things for sqlalchemy.

class django_sorcery.views.list.BaseListView(**kwargs)[source]

Bases: django_sorcery.views.list.MultipleObjectMixin, django.views.generic.base.View

A base view for displaying a list of objects.

get(request, *args, **kwargs)[source]

Handle GET request on list view.

class django_sorcery.views.list.ListView(**kwargs)[source]

Bases: django_sorcery.views.list.MultipleObjectTemplateResponseMixin, django_sorcery.views.list.BaseListView

Render some list of objects, set by self.model or self.queryset.

self.queryset can actually be any iterable of items, not just a queryset.

class django_sorcery.views.list.MultipleObjectMixin[source]

Bases: django_sorcery.views.base.BaseMultipleObjectMixin

A mixin for views manipulating multiple objects.

context_object_name = 'object_list'
get_context_data(object_list=None, **kwargs)[source]

Get the context for this view.


Get the name to use for the object.

class django_sorcery.views.list.MultipleObjectTemplateResponseMixin[source]

Bases: django.views.generic.base.TemplateResponseMixin

Mixin for responding with a template and list of objects.


Return a list of template names to be used for the request.

Must return a list. May not be called if render_to_response is overridden.

template_name_suffix = '_list'