Changeset 5f82b6c for remit/util


Ignore:
Timestamp:
Jul 6, 2014, 4:38:22 AM (11 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master
Children:
7a292ed
Parents:
bc1da44
git-author:
Alex Dehnert <adehnert@…> (07/06/14 04:38:22)
git-committer:
Alex Dehnert <adehnert@…> (07/06/14 04:38:22)
Message:

Replace ListViewWithContext? with simpler render_to_response

It turns out that if you're specifying a queryset and a bunch of extra context,
ListView? isn't *actually* buying much...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • remit/util/shortcuts.py

    r21360c8 r5f82b6c  
    1212
    1313
    14 class ListViewWithContext(ListView):
    15     extra_context = {}
    16 
    17     # I believe .queryset will work out-of-the-box
    18 
    19     def get_context_data(self, **kwargs):
    20         context = super(ListViewWithContext,self).get_context_data(**kwargs)
    21         context.update(self.extra_context)
    22         return context
    23 
    24 
    2514class TemplateViewWithContext(TemplateView):
    2615    extra_context = {}
Note: See TracChangeset for help on using the changeset viewer.