将announcement 加入 setings.py 里面的 INSTALLED_APPS,并且创建announcement这张表

This commit is contained in:
hohoTT 2015-08-05 10:34:00 +08:00
parent 2fae6493d0
commit 17b44800ca
2 changed files with 30 additions and 0 deletions

View 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',
},
),
]

View File

@ -47,6 +47,7 @@ INSTALLED_APPS = (
'django.contrib.staticfiles',
'account',
'announcement',
'utils',
'rest_framework',