1 from django
.db
import models
2 from django
.contrib
.auth
.models
import User
4 class Card(models
.Model
):
5 question
= models
.CharField(max_length
=100)
6 answer
= models
.CharField(max_length
=100)
9 class CardStatus(models
.Model
):
10 card
= models
.ForeignKey(Card
)
11 user
= models
.ForeignKey(User
)
12 level
= models
.PositiveIntegerField()
13 is_current
= models
.BooleanField()