mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
rename special field templates
This commit is contained in:
parent
428b6a0520
commit
1114fc084a
2 changed files with 4 additions and 4 deletions
|
@ -445,10 +445,10 @@ select id from notes where id in %s and id not in (select nid from cards)""" %
|
|||
for (name, (idx, conf)) in self.models.fieldMap(model).items():
|
||||
fields[name] = flist[idx]
|
||||
fields['Tags'] = data[5]
|
||||
fields['Model'] = model['name']
|
||||
fields['Type'] = model['name']
|
||||
fields['Deck'] = self.decks.name(data[3])
|
||||
template = model['tmpls'][data[4]]
|
||||
fields['Template'] = template['name']
|
||||
fields['Card'] = template['name']
|
||||
# render q & a
|
||||
d = dict(id=data[0])
|
||||
for (type, format) in (("q", template['qfmt']), ("a", template['afmt'])):
|
||||
|
|
|
@ -404,9 +404,9 @@ order by ordinal""", mid)):
|
|||
conf[type] = re.sub(
|
||||
"(?i){{tags}}", "{{Tags}}", conf[type])
|
||||
conf[type] = re.sub(
|
||||
"(?i){{cardModel}}", "{{Template}}", conf[type])
|
||||
"(?i){{cardModel}}", "{{Card}}", conf[type])
|
||||
conf[type] = re.sub(
|
||||
"(?i){{modelTags}}", "{{Model}}", conf[type])
|
||||
"(?i){{modelTags}}", "{{Type}}", conf[type])
|
||||
# type answer is now embedded in the format
|
||||
if typeAns:
|
||||
if type == "qfmt" or hideq:
|
||||
|
|
Loading…
Reference in a new issue