use py3 metaclass syntax
parent
4d0e864ee6
commit
8978d43fd1
|
@ -159,8 +159,7 @@ class DBStylesheet(models.Model):
|
|||
__str__ = __unicode__
|
||||
|
||||
|
||||
class QuestionSet(models.Model):
|
||||
__metaclass__ = TransMeta
|
||||
class QuestionSet(models.Model, metaclass=TransMeta):
|
||||
|
||||
"Which questions to display on a question page"
|
||||
questionnaire = models.ForeignKey(Questionnaire, on_delete=models.CASCADE)
|
||||
|
@ -356,8 +355,7 @@ class RunInfoHistory(models.Model):
|
|||
verbose_name_plural = 'Run Info History'
|
||||
|
||||
|
||||
class Question(models.Model):
|
||||
__metaclass__ = TransMeta
|
||||
class Question(models.Model, metaclass=TransMeta):
|
||||
|
||||
questionset = models.ForeignKey(QuestionSet, on_delete=models.CASCADE)
|
||||
number = models.CharField(max_length=8, help_text=
|
||||
|
@ -484,8 +482,7 @@ class Question(models.Model):
|
|||
["number", "questionset"],
|
||||
]
|
||||
|
||||
class Choice(models.Model):
|
||||
__metaclass__ = TransMeta
|
||||
class Choice(models.Model, metaclass=TransMeta):
|
||||
|
||||
question = models.ForeignKey(Question, on_delete=models.CASCADE)
|
||||
sortid = models.IntegerField()
|
||||
|
|
|
@ -2,8 +2,7 @@ from django.db import models
|
|||
from django.urls import reverse
|
||||
from transmeta import TransMeta
|
||||
|
||||
class Page(models.Model):
|
||||
__metaclass__ = TransMeta
|
||||
class Page(models.Model, metaclass=TransMeta):
|
||||
|
||||
slug = models.SlugField(unique=True, primary_key=True)
|
||||
title = models.CharField(u"Title", max_length=256)
|
||||
|
|
Loading…
Reference in New Issue