Commit 878e8efa authored by Daniel W Bond's avatar Daniel W Bond
Browse files

indentation

parent f5227a7b
......@@ -36,6 +36,9 @@ class DetailFloor(LoginRequiredMixin, DetailView):
context_object_name = 'floor'
template_name = 'detail_floor.html'
def get_context_data(self, **kwargs):
context = super(DetailFloor, self).get_context_data(**kwargs)
requesting_student = Student.objects.filter(user=self.request.user)
# if self.request.user is on the floor
......@@ -62,20 +65,20 @@ class DetailFloor(LoginRequiredMixin, DetailView):
else:
floor_students.extend(Student.objects.filter(room=room).students())
def get_context_data(self, **kwargs):
context = super(DetailFloor, self).get_context_data(**kwargs)
context['students'] = floor_students
return context
login_url = '/'
class DetailRoom(LoginRequiredMixin, DetailView):
model = Room
context_object_name = 'room'
template_name='detailBuilding.html'
def get_context_data(self, **kwargs):
context = super(DetailRoom, self).get_context_data(**kwargs)
requesting_student = Student.objects.filter(user=self.request.user)
# if self.request.user is on the floor
def onFloor():
floor_status = False
......@@ -97,8 +100,6 @@ class DetailRoom(LoginRequiredMixin, DetailView):
else:
students = Student.objects.filter(room=self.get_object()).students()
def get_context_data(self, **kwargs):
context = super(DetailRoom, self).get_context_data(**kwargs)
context['students'] = students
return context
......
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