Add order images model and test this model

This commit is contained in:
2022-09-30 02:36:44 +03:00
parent 2c3445c889
commit 2a1fa6ce5e
7 changed files with 38 additions and 5 deletions

View File

@@ -130,6 +130,9 @@ USE_TZ = True
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field

View File

@@ -15,7 +15,8 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path('admin/', admin.site.urls),
@@ -25,4 +26,4 @@ urlpatterns = [
path('dev/', include('dev.urls')),
path('orders/', include('order.urls')),
path('', include('index.urls')),
]
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)