“django.core.exceptions.improperlyconfigured: Pengaturan Secret_key tidak boleh kosong” Kode Jawaban

django.core.exceptions.improperlyconfigured: Pengaturan Secret_key tidak boleh kosong

# add SECRET_KEY from terminal (secret_key is collected from django -->settings.py file)
$ export SECRET_KEY='lmrffsgfhrilklg-za7#57vi!zr)ps8)2anyona25###dl)s-#s=7=vn_'
#settings.py
import os
SECRET_KEY = os.environ['SECRET_KEY']
visualscrapper

django.core.exceptions.improperlyconfigured: Pengaturan Secret_key tidak boleh kosong.

I had the same error and it turned out to be a circular dependency between a module or class loaded by the settings and the settings module itself. In my case it was a middleware class which was named in the settings which itself tried to load the settings.
Santino

Jawaban yang mirip dengan “django.core.exceptions.improperlyconfigured: Pengaturan Secret_key tidak boleh kosong”

Pertanyaan yang mirip dengan “django.core.exceptions.improperlyconfigured: Pengaturan Secret_key tidak boleh kosong”

Lebih banyak jawaban terkait untuk “django.core.exceptions.improperlyconfigured: Pengaturan Secret_key tidak boleh kosong” di Shell/Bash

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya