1
0
Fork 0
IdreXyz/idre/urls.py
2016-02-01 17:52:43 +01:00

26 lines
717 B
Python

from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
import idre.settings
import label.views
admin.autodiscover()
urlpatterns = [
url(r"^$", label.views.home, name = "home"),
url(r"^artists/$", label.views.artists, name = "artists"),
url(r"^artists/(?P<slug>\S+)$", label.views.artist, name = "artist"),
url(r"^releases/$", label.views.releases, name = "releases"),
url(r"^releases/(?P<tag>\S+)$", label.views.release, name = "release"),
url(r"^admin/", include(admin.site.urls)),
]
if idre.settings.DEBUG:
urlpatterns += static(
idre.settings.MEDIA_URL,
document_root = idre.settings.MEDIA_ROOT
)