问题描述
我有一个 Django CookieCutter 项目,我正在尝试根据 cookie 切割器变量动态设置模型名称:
{
"project_name": "Project","project_slug_name": "Slug Name","add_file_logger": "n","add_tests_to_pipeline": "y","add_run_migrations_to_pipeline": "y","main_entity_name": "usually called model,represent the highest level in the app"
}
我正在尝试:
class {{cookiecutter.main_entity_name}}(LocationBaseModel):
pass
引发:
FileNotFoundError: [Errno 2] No such file or directory
创建项目时。 另外,有没有办法在 post gen 脚本(base 不是 .py)中使用 cookie cut 变量?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)