Add media to staticfiles, update profile.html

This commit is contained in:
Sokurov Idar
2021-02-11 21:26:02 +03:00
parent 7e779733c2
commit d91f5b8ba8
3 changed files with 29 additions and 27 deletions

View File

@@ -119,6 +119,7 @@ STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticroot')
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
os.path.join(BASE_DIR, 'media'),
]
MEDIA_ROOT = BASE_DIR / 'media'
@@ -126,4 +127,3 @@ MEDIA_URL = '/media/'
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'

View File

@@ -31,6 +31,3 @@ urlpatterns = [
path('accounts/', include('django.contrib.auth.urls')),
path('accounts/', include('django_registration.backends.one_step.urls')),
]
if DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)