为了账号安全,请及时绑定邮箱和手机立即绑定

2017 Vue+Django API前后端分离开发电商新技课程中出现的问题

/ 猿问

2017 Vue+Django API前后端分离开发电商新技课程中出现的问题

INSTALLED_APPS = {
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'users.apps.UsersConfig',
   'DjangoUeditor',
   'goods.apps.GoodsConfig',
   'trade.apps.TradeConfig',
   'user_operation.apps.UserOperationConfig',
   'crispy_forms',
   'django_filters',
   'xadmin',
   'rest_framework',


}


这是报的错误码

Traceback (most recent call last):

  File "E:/work1/mxshop/mxshop/urls.py", line 24, in <module>

    url(r'^xadmin/', xadmin.site.urls),

  File "E:\work1\mxshop\extra_apps\xadmin\sites.py", line 339, in urls

    return self.get_urls(), self.name, self.app_name

  File "E:\work1\mxshop\extra_apps\xadmin\sites.py", line 293, in get_urls

    from xadmin.views.base import BaseAdminView

  File "E:\work1\mxshop\extra_apps\xadmin\views\__init__.py", line 3, in <module>

    from .base import BaseAdminPlugin, BaseAdminView, CommAdminView, ModelAdminView, filter_hook, csrf_protect_m, BaseAdminObject

  File "E:\work1\mxshop\extra_apps\xadmin\views\base.py", line 31, in <module>

    from xadmin.util import static, json, vendor, sortkeypicker

  File "E:\work1\mxshop\extra_apps\xadmin\util.py", line 23, in <module>

    if 'django.contrib.staticfiles' in settings.INSTALLED_APPS:

  File "D:\Python\Python36-32\lib\site-packages\django\conf\__init__.py", line 56, in __getattr__

    self._setup(name)

  File "D:\Python\Python36-32\lib\site-packages\django\conf\__init__.py", line 39, in _setup

    % (desc, ENVIRONMENT_VARIABLE))

django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.


查看完整描述

目前暂无任何回答

添加回答

回复

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信