Pycharm没有制作MEDIA文件夹

时间:2019-04-10 21:07:39

标签: python django

设置和urls.py文件..... Pycharm无法创建MEDIA文件夹:/发生了什么..请进行指导?

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, '/media')


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('shop/', include('shop.urls')),
    path('blog/', include('blog.urls'))
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

0 个答案:

没有答案