缺少静态文件django CMS

时间:2016-11-18 18:10:12

标签: python django django-cms

我使用的是django CMS,我有这个错误

http://127.0.0.1:8000/static/ 404 (NOT FOUND)

我的设置文件是

import os
from base import *
from config import *

gettext = lambda s: s
DATA_DIR = os.path.dirname(os.path.dirname(__file__))    
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '...'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
# Application definition
ROOT_URLCONF = 'portal.urls'
WSGI_APPLICATION = 'portal.wsgi.application'

LANGUAGE_CODE = 'en'
TIME_ZONE = 'America/New_York'
USE_I18N = True
USE_L10N = True
USE_TZ = True

STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
STATIC_ROOT = os.path.join(DATA_DIR, 'static')
STATIC_HEALTH_URL = ''

STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'portal', 'static'),
)

我创建了一个新的扩展程序like this这完全有效,之后我重新排序我的应用程序看到图像。现在,当我使用该组件保存图像但不显示任何内容时。

有什么想法吗?

0 个答案:

没有答案