media and static file added

This commit is contained in:
nabijonovdavronbek619@gmail.com
2025-12-06 19:49:02 +05:00
parent 0ef5c57d71
commit 9f240e96f0
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
from django.conf import settings
from django.conf.urls.static import static
from django.urls import path
from .views import get_products, create_contact
@@ -5,3 +7,7 @@ urlpatterns = [
path('products/', get_products), # GET
path('contact/', create_contact), # POST
]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)