Commit b56e8887896334b1e7d74577379925df2608e44d
1 parent
fe932798
Exists in
master
and in
2 other branches
Migrations
Showing
2 changed files
with
57 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,20 @@ | @@ -0,0 +1,20 @@ | ||
1 | +# -*- coding: utf-8 -*- | ||
2 | +# Generated by Django 1.10.4 on 2017-04-08 01:51 | ||
3 | +from __future__ import unicode_literals | ||
4 | + | ||
5 | +from django.db import migrations, models | ||
6 | + | ||
7 | + | ||
8 | +class Migration(migrations.Migration): | ||
9 | + | ||
10 | + dependencies = [ | ||
11 | + ('chat', '0002_auto_20170402_2207'), | ||
12 | + ] | ||
13 | + | ||
14 | + operations = [ | ||
15 | + migrations.AlterField( | ||
16 | + model_name='talkmessages', | ||
17 | + name='text', | ||
18 | + field=models.TextField(blank=True, verbose_name='Message'), | ||
19 | + ), | ||
20 | + ] |
@@ -0,0 +1,37 @@ | @@ -0,0 +1,37 @@ | ||
1 | +# -*- coding: utf-8 -*- | ||
2 | +# Generated by Django 1.10.4 on 2017-04-08 01:51 | ||
3 | +from __future__ import unicode_literals | ||
4 | + | ||
5 | +import autoslug.fields | ||
6 | +from django.conf import settings | ||
7 | +from django.db import migrations, models | ||
8 | +import django.db.models.deletion | ||
9 | +import news.models | ||
10 | + | ||
11 | + | ||
12 | +class Migration(migrations.Migration): | ||
13 | + | ||
14 | + initial = True | ||
15 | + | ||
16 | + dependencies = [ | ||
17 | + migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
18 | + ] | ||
19 | + | ||
20 | + operations = [ | ||
21 | + migrations.CreateModel( | ||
22 | + name='News', | ||
23 | + fields=[ | ||
24 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
25 | + ('title', models.CharField(max_length=200, unique=True, verbose_name='Name')), | ||
26 | + ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='title', unique=True, verbose_name='Slug')), | ||
27 | + ('image', models.ImageField(upload_to='news/', validators=[news.models.validate_img_extension], verbose_name='News Image')), | ||
28 | + ('content', models.TextField(verbose_name='News Content')), | ||
29 | + ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='Create Date')), | ||
30 | + ('creator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='news_creator_user', to=settings.AUTH_USER_MODEL, verbose_name='Creator')), | ||
31 | + ], | ||
32 | + options={ | ||
33 | + 'verbose_name_plural': 'News', | ||
34 | + 'verbose_name': 'News', | ||
35 | + }, | ||
36 | + ), | ||
37 | + ] |