python - AttributeError: 'settings' object has no attribute ...
stackoverflow.com › questions › 60038366Feb 03, 2020 · AttributeError: 'Settings' object has no attribute 'MEDIA_Root'. Settings.py STATIC_URL = '/static/' MEDIA_ROOT = os.path.join (BASE_DIR, 'media') MEDIA_URL = '/media/' urls.py from django.contrib import admin from django.urls import path from django.conf import settings from django.conf.urls.static import static urlpatterns = patterns ('', path ('admin/', admin.site.urls), ] + static (settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),