Commit acb91826 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added building filters

parent 495ca793
......@@ -10,6 +10,13 @@ class ListBuildings(LoginRequiredMixin, ListView):
model = Building
login_url = '/'
def get_context_data(self, **kwargs):
context = super(ListBuildings, self).get_context_data(**kwargs)
context['rappahannock'] = Building.objects.filter(neighbourhood='ra')
context['shenandoah'] = Building.objects.filter(neighbourhood='sh')
context['aquia'] = Building.objects.filter(neighbourhood='aq')
return context
# building floors, other information
class DetailBuilding(LoginRequiredMixin, DetailView):
model = Building
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment