yeh*_*ehe 5 python orm database-design django-models algebraic-data-types
下面是我用来解析字符串并将结果存储到Python数据结构中的语法.
;; subject_code is a string which matches certain pattern.
code => <subject_code>
prereq => one_of | normal | and | either_or
one_of => “one of” code*
normal => code*
and => prereq “and/plus” prereq
either_or => “either” prereq “or” prereq
Run Code Online (Sandbox Code Playgroud)
代码在这里.
如何通过django ORM将prereq存储到关系数据库中?
我已经浏览了django的文档,但我还没有得到线索.
提前致谢.