models.py 393 Bytes
Newer Older
alexandre's avatar
alexandre committed
1
from django.db import models
2
from django.contrib.postgres.fields import JSONField
3
4


alexandre's avatar
alexandre committed
5
6
7
class Score(models.Model):
    """docstring"""

8
    title = models.TextField(blank=True)
9
10
    stage_set = models.TextField(blank=True)
    mainline = JSONField(blank=True)
alexandre's avatar
alexandre committed
11
12

    def __str__(self):
13
        return self.title
alexandre's avatar
alexandre committed
14
15
16

    def get_absolute_url(self):
        return "/playground/score/#{}".format(self.id)