from dajaxice.core import dajaxice_config
from dajaxice.core.Dajaxice import dajaxice_autodiscover
from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin
from tasks import views as tasks_views

dajaxice_autodiscover()

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
    url(r'^summernote/', include('django_summernote.urls')),

    url(r'^$', tasks_views.PathListView.as_view(), name='path-list'),
    url(r'^articles/', include('articles.urls', namespace='articles')),
    url(r'^tasks/', include('tasks.urls', namespace='tasks')),
    url(r'^exercises/', include('exercises.urls', namespace='exercises')),
    url(r'^users/', include('users.urls', namespace='users'))
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
