mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-01-04 03:22:06 +00:00
将announcement 加入 setings.py 里面的 INSTALLED_APPS,并且创建announcement这张表
This commit is contained in:
parent
2fae6493d0
commit
17b44800ca
29
announcement/migrations/0001_initial.py
Normal file
29
announcement/migrations/0001_initial.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import models, migrations
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Announcement',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||||
|
('title', models.CharField(max_length=50)),
|
||||||
|
('description', models.TextField()),
|
||||||
|
('create_time', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('visible', models.BooleanField(default=True)),
|
||||||
|
('created_by', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'db_table': 'announcement',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
@ -47,6 +47,7 @@ INSTALLED_APPS = (
|
|||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
|
||||||
'account',
|
'account',
|
||||||
|
'announcement',
|
||||||
'utils',
|
'utils',
|
||||||
|
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
|
Loading…
Reference in New Issue
Block a user