mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
thinko
This commit is contained in:
parent
6a00419ebc
commit
cca48a0ced
2 changed files with 5 additions and 5 deletions
|
@ -108,7 +108,7 @@ insert or replace into facts values (?, ?, ?, ?, ?, ?, ?, ?)""",
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
def hasTag(self, tag):
|
def hasTag(self, tag):
|
||||||
return self.deck.tags.inStr(tag, self.tags)
|
return self.deck.tags.inList(tag, self.tags)
|
||||||
|
|
||||||
def stringTags(self):
|
def stringTags(self):
|
||||||
return self.deck.tags.canonify(self.tags)
|
return self.deck.tags.canonify(self.tags)
|
||||||
|
|
|
@ -155,10 +155,6 @@ select id from cards where fid in (select id from facts where mid = ?)""",
|
||||||
return self.deck.db.scalar(
|
return self.deck.db.scalar(
|
||||||
"select count() from facts where mid = ?", m['id'])
|
"select count() from facts where mid = ?", m['id'])
|
||||||
|
|
||||||
def css(self):
|
|
||||||
"CSS for all models."
|
|
||||||
return "\n".join([m['css'] for m in self.all()])
|
|
||||||
|
|
||||||
# Copying
|
# Copying
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
|
@ -171,6 +167,10 @@ select id from cards where fid in (select id from facts where mid = ?)""",
|
||||||
# CSS generation
|
# CSS generation
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
|
def css(self):
|
||||||
|
"CSS for all models."
|
||||||
|
return "\n".join([m['css'] for m in self.all()])
|
||||||
|
|
||||||
def _css(self, m):
|
def _css(self, m):
|
||||||
# fields
|
# fields
|
||||||
css = "".join(self._fieldCSS(
|
css = "".join(self._fieldCSS(
|
||||||
|
|
Loading…
Reference in a new issue