from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.auth import urls as auth_urls
from p4l.views import RecordListView, RecordDetailView, RecordEditView

admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', RecordListView.as_view(), name='p4l_home'),
    url(r'^auth/', include(auth_urls)),
    url(r'^record/view/(?P<slug>\w+)$', RecordDetailView.as_view(), name='p4l_record_view'),
    url(r'^record/edit/(?P<slug>\w+)$', RecordEditView.as_view(), name='p4l_record_edit'),
    url(r'^api/', include('p4l.api.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    url(r'^admin/', include(admin.site.urls)),
    
)