Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# list_detail.object_list replacement with all the things I need
def object_list(request, queryset, extra_context=None,
template_name='', paginate_by=None):
class ObjectList(ListView):
def post(self, request, *args, **kwargs):
return self.get(request, *args, **kwargs)
def get_context_data(self, **kwargs):
c = super(ObjectList, self).get_context_data(**kwargs)
return c
return ObjectList.as_view(template_name=template_name,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment