与Djangojetdem一步步

2024-05-20 18:21:58 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着看django-jet的演示,也就是https://github.com/geex-arts/django-jet-demo,但它没用。在

  • git clone https://github.com/geex-arts/django-jet-demo.git
  • mkvirtualenv venv
  • cd django-jet-demo
  • pip install -r requirements/base.txt
  • django makemigrations

我有错误

1-configparser.NoSectionError: No section: 'common'

如果我删除config.get(..., 'common')内的application/settings.py

2-configparser.NoSectionError: No section: 'email'

如果我删除config.get(..., 'email')内的application/settings.py

3-configparser.NoSectionError: No section: 'database'

我怎样才能解决这个问题?让django jet演示工作的步骤是什么?它在你的电脑上运行得好吗?在

更新

如果我修改default.conf文件,我会得到相同的第一个错误。在

[common]
secret_key='t_g&c7^(!jb*$caaeue%$t_0pdtx5z(a7v%b6#svl1&0$5h9o-'
debug=False

[email]
server_email=test@test.com
host=localhost
port=1025
user=
password=
tls=True

[database]
ENGINE=django.db.backends.mysql
NAME=capitaine
USER=root
PASSWORD=wd9598%%DD
HOST='localhost'
PORT=3306

Tags: djangonohttpsgitgithubcomdemoemail
2条回答

您可以使用this documentation来使用django jet管理接口,而不是默认的django管理接口。 (文档是官方的django-jet文档,您可以随时搜索它。)

很简单。在

有一个名为^{}的文件,其中每个部分的值都是空的,您应该至少为secret_keyserver_email和{}部分添加适当的值。在

如果不想使用mysql作为数据库后端,请使用sqlite(不需要NAMEUSERPASSWORD等)。在

另请注意,您必须在以下路径下创建.conf文件:

/path/to/project/conf/project_name.conf

当然,将project_name改为实际项目的名称。在

相关问题 更多 >