【发布时间】:2011-07-30 12:58:04
【问题描述】:
我是Flask 初学者,我想使用flask 和sqlite3 作为数据库引擎来构建一个投票应用程序。
我的问题是如何创建两个表,“问题”和“选择”,以便每个问题都有一些选择(可能不是固定数字。
我最初的做法相当幼稚:
drop table if exists entries;
create table question (
ques_id integer primary key autoincrement,
ques string not null,
choice1 string not null,
choice2 string not null,
choice3 string not null,
choice4 string not null,
pub_date integer
);
【问题讨论】:
标签: sqlite database-schema flask