Commit f5227a7b authored by Daniel W Bond's avatar Daniel W Bond

beginning url additions

parent 6c449c1b
from django.conf.urls import patterns, include, url
from housing.views import ListBuildings, DetailBuilding, ListRooms, DetailRoom
from housing.models import Building, Room
from housing.views import ListBuildings, DetailBuilding, DetailFloor, DetailRoom
from housing.models import Building, Floor, Room
urlpatterns = patterns('',
......@@ -11,15 +11,28 @@ urlpatterns = patterns('',
#paginate_by='10',
queryset=Building.objects.all(),
context_object_name='buildings',
template_name='listBuildings.html'),
name='listBuildings'),
template_name='list_buildings.html'),
name='list_buildings'),
url(r'^buildings/(?P<slug>[\w-]+)/$',
DetailBuilding.as_view(
model=Building,
slug_field='slug__iexact',
context_object_name='building',
template_name='detailBuilding.html'),
name='detailBuilding'),
template_name='detail_building.html'),
name='detail_building'),
# url(r'^buildings/whitetop/5/$',
# DetailFloor.as_view(
# model=Floor,
# context_object_name='floor',
# template_name='detail_floor.html'),
# name='detail_floor'),
# url(r'^buildings/whitetop/5/5542/$',
# DetailRoom.as_view(
# model=Room,
# context_object_name='room',
# template_name='detail_room.html'),
# name='detail_room'),
)
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