mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-28 16:12:13 +00:00
rename website_footer ->footer
This commit is contained in:
parent
637baba71b
commit
294fd8b5b2
20
conf/migrations/0002_auto_20161119_1657.py
Normal file
20
conf/migrations/0002_auto_20161119_1657.py
Normal file
@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.10 on 2016-11-19 08:57
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('conf', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='websiteconfig',
|
||||
old_name='website_footer',
|
||||
new_name='footer',
|
||||
),
|
||||
]
|
@ -19,7 +19,7 @@ class WebsiteConfig(models.Model):
|
||||
base_url = models.CharField(max_length=128, default="http://127.0.0.1")
|
||||
name = models.CharField(max_length=32, default="Online Judge")
|
||||
name_shortcut = models.CharField(max_length=32, default="oj")
|
||||
website_footer = models.TextField(default="Online Judge Footer")
|
||||
footer = models.TextField(default="Online Judge Footer")
|
||||
# allow register
|
||||
allow_register = models.BooleanField(default=True)
|
||||
# submission list show all user's submission
|
||||
|
@ -29,7 +29,7 @@ class CreateEditWebsiteConfigSerializer(serializers.Serializer):
|
||||
base_url = serializers.CharField(max_length=128)
|
||||
name = serializers.CharField(max_length=32)
|
||||
name_shortcut = serializers.CharField(max_length=32)
|
||||
website_footer = serializers.CharField(max_length=1024)
|
||||
footer = serializers.CharField(max_length=1024)
|
||||
allow_register = serializers.BooleanField()
|
||||
submission_list_show_all = serializers.BooleanField()
|
||||
|
||||
|
@ -53,7 +53,7 @@ class WebsiteConfigAPITest(APITestCase):
|
||||
user = self.create_super_admin()
|
||||
url = self.reverse("website_config_api")
|
||||
data = {"base_url": "http://test.com", "name": "test name",
|
||||
"name_shortcut": "test oj", "website_footer": "<a>test</a>",
|
||||
"name_shortcut": "test oj", "footer": "<a>test</a>",
|
||||
"allow_register": True, "submission_list_show_all": False}
|
||||
resp = self.client.post(url, data=data)
|
||||
self.assertSuccess(resp)
|
||||
@ -62,7 +62,7 @@ class WebsiteConfigAPITest(APITestCase):
|
||||
user = self.create_super_admin()
|
||||
url = self.reverse("website_config_api")
|
||||
data = {"base_url": "http://test.com", "name": "test name",
|
||||
"name_shortcut": "test oj", "website_footer": "<a>test</a>",
|
||||
"name_shortcut": "test oj", "footer": "<a>test</a>",
|
||||
"allow_register": True, "submission_list_show_all": False}
|
||||
resp = self.client.post(url, data=data)
|
||||
self.assertSuccess(resp)
|
||||
|
Loading…
Reference in New Issue
Block a user