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

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()


urlpatterns = patterns('',
                # Examples:
                url(r'^$', 'index.views.index', name='home'),
                url(r'^accounts/', include('accounts.urls')),
                url(r'^news/', include('news.urls')),
                url(r'^about', 'index.views.about', name='about'),



               url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
               url(r'^admin/', include(admin.site.urls)),
)

from django.conf import settings

if settings.DEBUG:
    # static files (images, css, javascript, etc.)
    urlpatterns += patterns('',
        (r'^' + settings.MEDIA_URL + '(?P<path>.*)$', 'django.views.static.serve', {
        'document_root': settings.MEDIA_ROOT}))


