@@ -0,0 +1,1299 @@
+%22%22%22%0AFor me, the most useful part of Django's generic class based views is%0Athe template name generation and the context variable naming for list%0Aand detail views, and maybe later also the pagination.%0A%0AThe rest of the CBV is less flexible than I'd like them to be, i.e.%0Aintegrating forms on detail pages can be a hassle.%0A%0ABecause of this, %60%60render_list%60%60 and %60%60render_detail%60%60.%0A%22%22%22%0A%0Afrom __future__ import unicode_literals%0A%0Afrom django.shortcuts import render%0A%0A%0A__all__ = ('render', 'render_list', 'render_detail')%0A%0A%0Adef template_name(model, template_name_suffix):%0A    return '%25s/%25s%25s.html' %25 (%0A        model._meta.app_label,%0A        model._meta.model_name,%0A        template_name_suffix,%0A    )%0A%0A%0Adef render_list(request, queryset, context, template_name_suffix='_list'):%0A    context.update(%7B%0A        'object_list': queryset,%0A        '%25s_list' %25 queryset.model._meta.model_name: queryset,%0A    %7D)%0A    return render(%0A        request,%0A        template_name(queryset.model, template_name_suffix),%0A        context,%0A    )%0A%0A%0Adef render_detail(request, object, context, template_name_suffix='_detail'):%0A    context.update(%7B%0A        'object': object,%0A        object._meta.model_name: object,%0A    %7D)%0A    return render(%0A        request,%0A        template_name(object, template_name_suffix),%0A        context,%0A    )%0A

Add some shortcuts