You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Please to help me I push to de ploy the project all worked fine but the image in media even uploaded in my project pass 2 hours and give 404 error ,
in settings.py:
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
Hello,
Please to help me I push to de ploy the project all worked fine but the image in media even uploaded in my project pass 2 hours and give 404 error ,
in settings.py:
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
Django debug toolbar
INTERNAL_IPS = ['127.0.0.1']
PROJECT_ROOT = os.path.dirname(os.path.abspath(file))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
#MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
STATICFILES_DIRS = (
os.path.join(PROJECT_ROOT, 'static'),
)
and urls:
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('allauth.urls')),
path('', include('core.urls', namespace='core'))
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG:
import debug_toolbar
urlpatterns += [path('debug/', include(debug_toolbar.urls))]
urlpatterns += static(settings.MEDIA_URL,
document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL,
document_root=settings.STATIC_ROOT)
The text was updated successfully, but these errors were encountered: