mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Making newBasicModel private
Following @timrae's advice on the pull request #340.
This commit is contained in:
parent
c14b9e2077
commit
db4edf62eb
1 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ models = []
|
||||||
# Basic
|
# Basic
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
def newBasicModel(col):
|
def _newBasicModel(col):
|
||||||
mm = col.models
|
mm = col.models
|
||||||
m = mm.new(_("Basic"))
|
m = mm.new(_("Basic"))
|
||||||
fm = mm.newField(_("Front"))
|
fm = mm.newField(_("Front"))
|
||||||
|
@ -24,7 +24,7 @@ def newBasicModel(col):
|
||||||
return m
|
return m
|
||||||
|
|
||||||
def addBasicModel(col):
|
def addBasicModel(col):
|
||||||
m = newBasicModel(col)
|
m = _newBasicModel(col)
|
||||||
col.models.add(m)
|
col.models.add(m)
|
||||||
return m
|
return m
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ models.append((lambda: _("Basic (type in the answer)"), addBasicTypingModel))
|
||||||
|
|
||||||
def addForwardReverse(col):
|
def addForwardReverse(col):
|
||||||
mm = col.models
|
mm = col.models
|
||||||
m = newBasicModel(col)
|
m = _newBasicModel(col)
|
||||||
m['name'] = _("Basic (and reversed card)")
|
m['name'] = _("Basic (and reversed card)")
|
||||||
t = mm.newTemplate(_("Card 2"))
|
t = mm.newTemplate(_("Card 2"))
|
||||||
t['qfmt'] = "{{"+_("Back")+"}}"
|
t['qfmt'] = "{{"+_("Back")+"}}"
|
||||||
|
@ -70,7 +70,7 @@ models.append((lambda: _("Basic (and reversed card)"), addForwardReverse))
|
||||||
|
|
||||||
def addForwardOptionalReverse(col):
|
def addForwardOptionalReverse(col):
|
||||||
mm = col.models
|
mm = col.models
|
||||||
m = newBasicModel(col)
|
m = _newBasicModel(col)
|
||||||
m['name'] = _("Basic (optional reversed card)")
|
m['name'] = _("Basic (optional reversed card)")
|
||||||
av = _("Add Reverse")
|
av = _("Add Reverse")
|
||||||
fm = mm.newField(av)
|
fm = mm.newField(av)
|
||||||
|
|
Loading…
Reference in a new issue