24 lines
733 B
Python
24 lines
733 B
Python
from django.conf.urls import patterns, include, url
|
|
from django.conf.urls.static import static
|
|
from django.contrib import admin
|
|
|
|
from idre import settings
|
|
import label.views
|
|
|
|
|
|
admin.autodiscover()
|
|
|
|
urlpatterns = patterns("",
|
|
url(r"^$", label.views.home, name = "home"),
|
|
url(r"^artists/$", "label.views.artists", name = "artists"),
|
|
url(r"^artists/(?P<aid>\d+)$", "label.views.artist", name = "artist"),
|
|
url(r"^releases/$", "label.views.releases", name = "releases"),
|
|
url(r"^releases/(?P<rid>\d+)$", "label.views.release", name = "release"),
|
|
url(r"^admin/", include(admin.site.urls)),
|
|
)
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += static(
|
|
settings.MEDIA_URL,
|
|
document_root = settings.MEDIA_ROOT
|
|
) |