# dataset urls.py
from django.urls import path
from . import views
from django.conf import settings #never do this in production, django doesnt really deal with media but this is a shortcut for development
from django.conf.urls.static import static #never do this in production, django doesnt really deal with media but this is a shortcut for development
app_name = 'dataset'

urlpatterns = [
    path('upload/', views.new, name='dataset_new'),
    path('dataset/<slug:slug>/', views.detail, name='dataset_detail'),
    path('dataset/<int:pk>/delete/', views.delete, name='delete'),
    path('dataset/<int:pk>/edit/', views.edit, name='edit'),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
