Initial commit
This commit is contained in:
31
flashcards/models.py
Normal file
31
flashcards/models.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import genanki
|
||||
|
||||
|
||||
|
||||
general_css = '''
|
||||
.card {
|
||||
font-family: arial;
|
||||
font-size: 32px;
|
||||
text-align: center;
|
||||
color: black;
|
||||
background-color: white;
|
||||
white-space: pre-line;
|
||||
}
|
||||
'''
|
||||
|
||||
simple = genanki.Model(
|
||||
1653277989,
|
||||
'Simple Model',
|
||||
fields=[
|
||||
{'name': 'Question'},
|
||||
{'name': 'Answer'},
|
||||
],
|
||||
templates=[
|
||||
{
|
||||
'name': 'Card 1',
|
||||
'qfmt': '{{Question}}',
|
||||
'afmt': '{{FrontSide}}<hr id="answer">{{Answer}}',
|
||||
},
|
||||
],
|
||||
css=general_css
|
||||
)
|
||||
Reference in New Issue
Block a user