from django.contrib import admin
from django.conf.urls import url, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf.urls.static import static
from django.conf import settings
from article import views as article_views

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^article/',include('article.urls')),
    url(r'^exam/',include('exam.urls')),
    url(r'^$',article_views.article_list, name="home"),
]


urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
