from django.conf.urls.defaults import patterns, include, url
from django.conf import settings

from django.contrib import admin
admin.autodiscover()

from .docbow.admin import site as docbow_admin_site

urlpatterns = patterns('',
    url(r'^', include('docbow_project.docbow.urls')),
    url(r'^robots.txt', 'docbow_project.docbow.views.robots'),
    url(r'^favicon.ico', 'django.views.defaults.page_not_found'),
    url(r'^grappelli/', include('grappelli.urls')),
    url(r'^tinymce/', include('tinymce.urls')),
    url(r'^accounts/', include('docbow_project.docbow.auth_urls')),
    url(r'^superadmin/', include(admin.site.urls), name='admin'),
    url(r'^admin/', include(docbow_admin_site.urls), name='docbow_admin'),
)

if settings.DEBUG:
    urlpatterns += patterns('django.contrib.staticfiles.views',
        url(r'^static/(?P<path>.*)$', 'serve'),
    )
