fix for utf-8 in admin backend
This commit is contained in:
parent
eeea587ca3
commit
2757088859
1 changed files with 6 additions and 5 deletions
|
@ -16,7 +16,7 @@ class Setting(models.Model):
|
||||||
logo = models.CharField(max_length=256, null=True)
|
logo = models.CharField(max_length=256, null=True)
|
||||||
active = models.BooleanField(unique=True, default=False)
|
active = models.BooleanField(unique=True, default=False)
|
||||||
|
|
||||||
def __str__(self):
|
def __unicode__(self):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,16 +26,17 @@ class Question(models.Model):
|
||||||
text = models.TextField(null=True)
|
text = models.TextField(null=True)
|
||||||
explanation = models.TextField(null=True)
|
explanation = models.TextField(null=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __unicode__(self):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Option(models.Model):
|
class Option(models.Model):
|
||||||
text = models.CharField(max_length=100, null=True)
|
text = models.CharField(max_length=100, null=True)
|
||||||
correct = models.BooleanField(null=False, default=False)
|
correct = models.BooleanField(null=False, default=False)
|
||||||
question = models.ForeignKey(Question, on_delete=models.CASCADE, null=False)
|
question = models.ForeignKey(Question, on_delete=models.CASCADE, null=False)
|
||||||
|
|
||||||
def __str__(self):
|
def __unicode__(self):
|
||||||
return self.text
|
return self.text
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ class User(models.Model):
|
||||||
name = models.CharField(max_length=100, null=False)
|
name = models.CharField(max_length=100, null=False)
|
||||||
last_seen = models.DateTimeField(null=True)
|
last_seen = models.DateTimeField(null=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __unicode__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ class UserAnswer(models.Model):
|
||||||
user = models.ForeignKey(User, on_delete=models.CASCADE, null=False)
|
user = models.ForeignKey(User, on_delete=models.CASCADE, null=False)
|
||||||
question = models.ForeignKey(Question, on_delete=models.CASCADE, null=False)
|
question = models.ForeignKey(Question, on_delete=models.CASCADE, null=False)
|
||||||
|
|
||||||
def __str__(self):
|
def __unicode__(self):
|
||||||
return str(self.user) + " - " + str(self.question)
|
return str(self.user) + " - " + str(self.question)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
Loading…
Reference in a new issue