mirror of
https://github.com/Without-Proper-Instructions/GoatCTF
synced 2025-10-08 07:40:46 +00:00
parent
0549394bf5
commit
16cb4ab2ca
@ -1,5 +1,6 @@
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
from core.settings import FLAG_LENGTH
|
||||
from core.settings import TEAM_NAME_LENGTH, FLAG_LENGTH
|
||||
|
||||
|
||||
class Challenge(models.Model):
|
||||
@ -9,3 +10,14 @@ class Challenge(models.Model):
|
||||
flag = models.CharField(max_length=FLAG_LENGTH)
|
||||
description_markdown = models.TextField()
|
||||
description_html = models.TextField()
|
||||
|
||||
|
||||
class Team(models.Model):
|
||||
"""A team is a collection of players."""
|
||||
name = models.CharField(max_length=TEAM_NAME_LENGTH)
|
||||
creator = models.ForeignKey("Player", related_name="created_teams")
|
||||
|
||||
|
||||
class Player(User):
|
||||
"""A player is a user with a team."""
|
||||
team = models.ForeignKey("Team")
|
||||
|
@ -1 +1,2 @@
|
||||
FLAG_LENGTH = 256
|
||||
TEAM_NAME_LENGTH = 64
|
||||
|
@ -1 +1,2 @@
|
||||
Django==1.7.1
|
||||
Django==1.7.1
|
||||
django-gravatar2==1.1.4
|
Loading…
x
Reference in New Issue
Block a user