feat: enable media file handling and allow manual assignment of letter public_id

This commit is contained in:
Your Name
2026-04-12 03:07:09 +05:30
parent 88686cdb0f
commit c288dba6e8
4 changed files with 9 additions and 2 deletions
+2
View File
@@ -168,3 +168,5 @@ USE_TZ = True
# https://docs.djangoproject.com/en/6.0/howto/static-files/
STATIC_URL = "static/"
MEDIA_URL = "/media/"
MEDIA_ROOT = BASE_DIR / "media"
+5
View File
@@ -15,6 +15,8 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
@@ -23,3 +25,6 @@ urlpatterns = [
path("api/auth/", include("users.urls")), # user related operations
path("api/letters/", include("letters.urls")), # letter related operations
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)