导入错误没有名为'project \\ order'的模块

时间:2021-09-12 18:09:50

I'm using oscar and added from fork order app. After added that cant run syncdb or server. It is giving an error import error: No module named 'project\\order'

我正在使用奥斯卡,并从fork订单应用程序添加。添加后,无法运行syncdb或服务器。它给出了错误导入错误:没有名为'project \\ order'的模块

from oscar import get_core_apps
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'django.contrib.sites',
    'compressor',
] + get_core_apps(['project\order'])

SITE_ID = 1 

this is my installed apps. I didnt understand why it doing this.

这是我安装的应用程序。我不明白为什么这样做。

2 个解决方案

#1


0  

This get_core_apps(['project\order']) should be get_core_apps(['project.order']).

这个get_core_apps(['project \ order'])应该是get_core_apps(['project.order'])。

#2


0  

I changed project to oscar.apps.order and it did work. But why, it is a question for me.

我将项目更改为oscar.apps.order,它确实有效。但为什么,这对我来说是一个问题。

#1


0  

This get_core_apps(['project\order']) should be get_core_apps(['project.order']).

这个get_core_apps(['project \ order'])应该是get_core_apps(['project.order'])。

#2


0  

I changed project to oscar.apps.order and it did work. But why, it is a question for me.

我将项目更改为oscar.apps.order,它确实有效。但为什么,这对我来说是一个问题。