小编ign*_*ens的帖子

django cors 标头中的 corsheaders.E013 错误

我尝试打开端口以在“http://localhost:3000”处使用 django 后端作为 API

这是我的工具

CORS_ALLOWED_ORIGINS = (
    'http://localhost:3000'
)
Run Code Online (Sandbox Code Playgroud)
INSTALLED_APPS = [
    *
    'corsheaders',
]
Run Code Online (Sandbox Code Playgroud)
MIDDLEWARE = [
    *
    "corsheaders.middleware.CorsMiddleware",# new
    "django.middleware.common.CommonMiddleware", # new
    *
]
Run Code Online (Sandbox Code Playgroud)

但我不断收到这样的错误消息

django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
?: (corsheaders.E013) Origin '/' in CORS_ALLOWED_ORIGINS is missing scheme or netloc
        HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com).
?: (corsheaders.E013) Origin '/' in CORS_ALLOWED_ORIGINS is missing scheme or netloc
        HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com).
?: (corsheaders.E013) …
Run Code Online (Sandbox Code Playgroud)

django django-cors-headers

6
推荐指数
1
解决办法
5749
查看次数

开始使用大型 Lisp“库”(日历计算)

我曾经用 Cadence Design Systems 的衍生品 Skill 编写小型 Lisp 程序和中型程序。我现在想使用日历计算附带的 Lisp 函数“库” ,可以从剑桥大学下载(供个人使用)。

我在 Windows 10 计算机上安装了 Lipstick 软件包(我以前没有使用过)。(至少我用过Emacs)。我一直在使用Peter Seibel 的Practical Common Lisp (2005) 作为文本。

我想首先在 REPL 中进行单独的函数调用,因此我想在 REPL 中“安装”“库”。我将这些词放在引号中是因为我不确定使用正确的 Lisp 词。我尝试加载文件但失败了,所以我尝试了

(compile-file "calendar.l")
Run Code Online (Sandbox Code Playgroud)

REPL 缓冲区中的响应是

; compiling file "c:/Users/card9/lispstick/calendar.l" (written 19 JUN 2022 01:12:02 PM):
; compiling (IN-PACKAGE "CC4")
Run Code Online (Sandbox Code Playgroud)

另一个缓冲区 sldb[2] 中的响应是

    The name "CC4" does not designate any package.
    [Condition of type SB-Kernel:SIMPLE-PACKAGE-ERROR]The name "CC4" does not designate any package.
    [Condition of type SB-Kernel:SIMPLE-PACKAGE-ERROR] …
Run Code Online (Sandbox Code Playgroud)

lisp calendar common-lisp astronomy

1
推荐指数
1
解决办法
228
查看次数