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
3a6101df
Commit
3a6101df
authored
Feb 21, 2015
by
Daniel W Bond
Browse files
alphabetized buildings
parent
ff77c5bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
roomlist/housing/views.py
View file @
3a6101df
...
...
@@ -12,9 +12,9 @@ class ListBuildings(LoginRequiredMixin, ListView):
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'
)
context
[
'rappahannock'
]
=
Building
.
objects
.
filter
(
neighbourhood
=
'ra'
)
.
order_by
(
'name'
)
context
[
'shenandoah'
]
=
Building
.
objects
.
filter
(
neighbourhood
=
'sh'
)
.
order_by
(
'name'
)
context
[
'aquia'
]
=
Building
.
objects
.
filter
(
neighbourhood
=
'aq'
)
.
order_by
(
'name'
)
return
context
# building floors, other information
...
...
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