Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
11739410
Commit
11739410
authored
Jan 09, 2015
by
Jason D Yeomans
Browse files
Fixed detailBuilding to show rooms
parent
b9411e34
Changes
1
Hide whitespace changes
Inline
Side-by-side
roomlist/housing/views.py
View file @
11739410
...
...
@@ -13,6 +13,13 @@ class ListBuildings(LoginRequiredMixin, ListView):
# building floors, other information
class
DetailBuilding
(
LoginRequiredMixin
,
DetailView
):
model
=
Building
context_object_name
=
'building_detail'
template_name
=
'detailBuilding.html'
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
DetailBuilding
,
self
).
get_context_data
(
**
kwargs
)
context
[
'room_list'
]
=
Room
.
objects
.
filter
(
building__name
=
''
+
self
.
get_object
().
name
).
order_by
(
'number'
)
return
context
login_url
=
'/'
# this lists the rooms on the floor
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment