Commit 07f11596 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

shortened housing urls

parent b18f6b74
......@@ -5,7 +5,7 @@ from housing.models import Building, Floor, Room
urlpatterns = patterns('',
url(r'^buildings/$',
url(r'^$',
ListBuildings.as_view(
model=Building,
#paginate_by='10',
......@@ -14,7 +14,7 @@ urlpatterns = patterns('',
template_name='list_buildings.html'),
name='list_buildings'),
url(r'^buildings/(?P<slug>[\w-]+)/$',
url(r'^(?P<slug>[\w-]+)/$',
DetailBuilding.as_view(
model=Building,
slug_field='slug__iexact',
......@@ -22,14 +22,14 @@ urlpatterns = patterns('',
template_name='detail_building.html'),
name='detail_building'),
url(r'^buildings/(?P<building>[\w-]+)/(?P<slug>[\w-]+)/$',
url(r'^(?P<building>[\w-]+)/(?P<slug>[\w-]+)/$',
DetailFloor.as_view(
model=Floor,
context_object_name='floor',
template_name='detail_floor.html'),
name='detail_floor'),
url(r'^buildings/(?P<building>[\w-]+)/(?P<floor>[\w-]+)/(?P<slug>[\w-]+)/$',
url(r'^(?P<building>[\w-]+)/(?P<floor>[\w-]+)/(?P<slug>[\w-]+)/$',
DetailRoom.as_view(
model=Room,
context_object_name='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