描述:django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
解决:
settings中多了几行代码, 删除或放在 secret_keys下方位置.
from rest_framework.pagination import PageNumberPagination
REST_FRAMEWORK = {
'PAGE_SIZE': 2
}
本文描述了在Django项目中遇到的SECRET_KEY设置为空导致的ImproperlyConfigured异常,提供了检查settings.py文件中SECRET_KEY配置是否正确以及代码位置的解决方案。
描述:django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
解决:
settings中多了几行代码, 删除或放在 secret_keys下方位置.
from rest_framework.pagination import PageNumberPagination
REST_FRAMEWORK = {
'PAGE_SIZE': 2
}
2604
944
2357
5865
626
2638

被折叠的 条评论
为什么被折叠?