from django.conf.urls import url
from mrbelvedereci.build import views

urlpatterns = [
    url(
        r'^$',
        views.build_list,
        name='home',
    ),
    url(
        r'^/search$',
        views.build_search,
        name='build_search',
    ),
    url(
        r'^/(?P<build_id>\w+)$',
        views.build_detail,
        name='build_detail',
    ),
    url(
        r'^/(?P<build_id>\w+)/(?P<tab>\w+)$',
        views.build_detail,
        name='build_detail_tab',
    ),
    url(
        r'^/(?P<build_id>\w+)/rebuild$',
        views.build_rebuild,
        name='build_rebuild',
    ),
    url(
        r'^/(?P<build_id>\w+)/rebuilds/(?P<rebuild_id>\w+)/(?P<tab>\w+)$',
        views.build_detail,
        name='build_rebuild_detail_tab',
    ),
    url(
        r'^/(?P<build_id>\w+)/rebuilds/(?P<rebuild_id>\w+)$',
        views.build_detail,
        name='build_rebuild_detail',
    ),
]

@@ -267,237 +267,8 @@
 rl(%0A
-        r'%5E/(?P%3Cbuild_id%3E%5Cw+)$',%0A        views.build_detail,%0A        name='build_detail',%0A    ),%0A    url(%0A        r'%5E/(?P%3Cbuild_id%3E%5Cw+)/(?P%3Ctab%3E%5Cw+)$',%0A        views.build_detail,%0A        name='build_detail_tab',%0A    ),%0A    url(%0A
     
@@ -673,10 +673,239 @@
 %0A    ),%0A
+    url(%0A        r'%5E/(?P%3Cbuild_id%3E%5Cw+)/(?P%3Ctab%3E%5Cw+)$',%0A        views.build_detail,%0A        name='build_detail_tab',%0A    ),%0A    url(%0A        r'%5E/(?P%3Cbuild_id%3E%5Cw+)$',%0A        views.build_detail,%0A        name='build_detail',%0A    ),%0A
 %5D%0A

fix order of URLs for dispatcher - fixes #45