mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
add type in answer support
This commit is contained in:
parent
86e3c19ad6
commit
36a715fd17
2 changed files with 5 additions and 1 deletions
|
@ -1841,6 +1841,9 @@ alter table decks add column revCardOrder integer not null default 0""")
|
||||||
if ver < 18:
|
if ver < 18:
|
||||||
s.execute("""
|
s.execute("""
|
||||||
alter table cardModels add column allowEmptyAnswer boolean not null default 1""")
|
alter table cardModels add column allowEmptyAnswer boolean not null default 1""")
|
||||||
|
if ver < 19:
|
||||||
|
s.execute("""
|
||||||
|
alter table cardModels add column typeAnswer boolean not null default 0""")
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
deck = s.query(Deck).get(1)
|
deck = s.query(Deck).get(1)
|
||||||
|
|
|
@ -96,7 +96,8 @@ cardModelsTable = Table(
|
||||||
Column('editAnswerFontFamily', UnicodeText, default=None),
|
Column('editAnswerFontFamily', UnicodeText, default=None),
|
||||||
Column('editAnswerFontSize', Integer, default=None),
|
Column('editAnswerFontSize', Integer, default=None),
|
||||||
# empty answer
|
# empty answer
|
||||||
Column('allowEmptyAnswer', Boolean, default=True))
|
Column('allowEmptyAnswer', Boolean, nullable=False, default=True),
|
||||||
|
Column('typeAnswer', Boolean, nullable=False, default=False))
|
||||||
|
|
||||||
class CardModel(object):
|
class CardModel(object):
|
||||||
"""Represents how to generate the front and back of a card."""
|
"""Represents how to generate the front and back of a card."""
|
||||||
|
|
Loading…
Reference in a new issue