from django.conf import settings
from django.conf.urls.defaults import *
from models import Repository
urlpatterns = patterns('',
url(r'^repos/$', 'django.views.generic.simple.direct_to_template',
{'template': 'vcs/repository_list.html', 'extra_context': {'object_list': Repository.objects.all()}}, 'vcs_repo_list'),
url(r'^(?P<vcs>\w+)/hook/$', 'vcs.views.webhook', name='vcs_hook'),
url(r'^(?P<vcs>\w+)/(?P<slug>[-\w]+)/$', 'vcs.views.repo_detail', name='vcs_repo_detail'),
url(r'^(?P<vcs>\w+)/(?P<slug>[-\w]+)/(?P<revision>\w+)/$', 'vcs.views.repo_detail', name='vcs_commit_detail'),
)