Polished custom user model avatar photo

This commit is contained in:
Keannu Christian Bernasol 2023-06-26 20:42:22 +08:00
parent 87d30a0ecc
commit 49a69c6737
7 changed files with 99 additions and 3 deletions

View file

@ -160,6 +160,9 @@ USE_TZ = True
# https://docs.djangoproject.com/en/4.2/howto/static-files/
STATIC_URL = 'static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

View file

@ -16,8 +16,10 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('api/v1/', include('api.urls'))
]
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)