OnlineJudge/conf/models.py

31 lines
932 B
Python
Raw Normal View History

2016-09-25 09:00:52 +00:00
# coding=utf-8
2016-09-25 06:07:45 +00:00
from __future__ import unicode_literals
from django.db import models
2016-09-25 09:00:52 +00:00
class SMTPConfig(models.Model):
2016-10-29 18:17:35 +00:00
server = models.CharField(max_length=128)
port = models.IntegerField(default=25)
email = models.CharField(max_length=128)
password = models.CharField(max_length=128)
tls = models.BooleanField()
class Meta:
db_table = "smtp_config"
class WebsiteConfig(models.Model):
base_url = models.CharField(max_length=128, default=None)
name = models.CharField(max_length=32, default="Online Judge")
name_shortcut = models.CharField(max_length=32, default="oj")
website_footer = models.CharField(max_length=256, default="Online Judge")
# allow register
register = models.BooleanField(default=True)
# submission list show all user's submission
submission_list_show_all = models.BooleanField(default=False)
class Meta:
db_table = "website_config"