19 lines
441 B
Python
19 lines
441 B
Python
from django.urls import path
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
|
|
from .views import (
|
|
ImageUploadView,
|
|
PublicImageListView
|
|
)
|
|
|
|
urlpatterns = [
|
|
path('', PublicImageListView.as_view(), name='home'),
|
|
path('upload/', ImageUploadView.as_view(), name='upload_image')
|
|
]
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += static(
|
|
settings.MEDIA_URL,
|
|
document_root=settings.MEDIA_ROOT
|
|
) |