FrontSide on upgrade, allNames() in models

This commit is contained in:
Damien Elmes 2012-05-21 14:32:43 +09:00
parent 0345ad7e2e
commit 8f89ea57f5
2 changed files with 4 additions and 1 deletions

View file

@ -115,6 +115,9 @@ class ModelManager(object):
"Get all models."
return self.models.values()
def allNames(self):
return [m['name'] for m in self.all()]
def byName(self, name):
"Get model with NAME."
for m in self.models.values():

View file

@ -419,7 +419,7 @@ order by ordinal""", mid)):
# q fields now in a
if not hideq:
conf['afmt'] = (
conf['qfmt'] + "\n\n<hr id=answer>\n\n" + conf['afmt'])
"{{FrontSide}}\n\n<hr id=answer>\n\n" + conf['afmt'])
tmpls.append(conf)
return tmpls