aboutsummaryrefslogtreecommitdiff
path: root/weblog/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'weblog/migrations')
-rw-r--r--weblog/migrations/0001_initial.py65
-rw-r--r--weblog/migrations/0002_auto_20180113_1606.py57
-rw-r--r--weblog/migrations/0003_auto_20180119_0156.py28
-rw-r--r--weblog/migrations/0004_auto_20180119_0156.py21
-rw-r--r--weblog/migrations/0005_auto_20180119_0231.py20
-rw-r--r--weblog/migrations/0006_auto_20180121_1002.py27
-rw-r--r--weblog/migrations/0007_auto_20180122_1943.py22
-rw-r--r--weblog/migrations/__init__.py0
8 files changed, 240 insertions, 0 deletions
diff --git a/weblog/migrations/0001_initial.py b/weblog/migrations/0001_initial.py
new file mode 100644
index 0000000..2ab0238
--- /dev/null
+++ b/weblog/migrations/0001_initial.py
@@ -0,0 +1,65 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.8 on 2018-01-09 08:02
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='BlogPost',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(max_length=100, verbose_name='Title')),
+ ('content', models.TextField(verbose_name='Content')),
+ ('preview_image', models.ImageField(blank=True, upload_to='weblog/preview_images/%Y/%m/%d/', verbose_name='Preview image')),
+ ('preview_text', models.CharField(blank=True, max_length=250, verbose_name='Preview Text')),
+ ('original_language', models.CharField(max_length=5, verbose_name='Original language (ISO)')),
+ ('publish_date', models.DateTimeField(verbose_name='Publish date')),
+ ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Author')),
+ ],
+ options={
+ 'verbose_name': 'Blog Post',
+ 'verbose_name_plural': 'Blog Posts',
+ },
+ ),
+ migrations.CreateModel(
+ name='PostComment',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('content', models.TextField(verbose_name='Content')),
+ ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Author')),
+ ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weblog.BlogPost', verbose_name='Post')),
+ ],
+ options={
+ 'verbose_name': 'Comment',
+ 'verbose_name_plural': 'Comments',
+ },
+ ),
+ migrations.CreateModel(
+ name='Translation',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('language', models.CharField(max_length=5, verbose_name='Language (ISO)')),
+ ('title', models.CharField(max_length=100, verbose_name='Title')),
+ ('content', models.TextField(verbose_name='Content')),
+ ('preview_image', models.ImageField(blank=True, upload_to='weblog/preview_images/%Y/%m/%d/', verbose_name='Preview image')),
+ ('preview_text', models.CharField(blank=True, max_length=250, verbose_name='Preview Text')),
+ ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weblog.BlogPost', verbose_name='Post')),
+ ],
+ options={
+ 'verbose_name': 'Translation',
+ 'verbose_name_plural': 'Translations',
+ },
+ ),
+ ]
diff --git a/weblog/migrations/0002_auto_20180113_1606.py b/weblog/migrations/0002_auto_20180113_1606.py
new file mode 100644
index 0000000..8eb3789
--- /dev/null
+++ b/weblog/migrations/0002_auto_20180113_1606.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.8 on 2018-01-13 13:06
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('weblog', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Category',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=250, verbose_name='Name')),
+ ('parent_category', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='weblog.Category', verbose_name='Parent category')),
+ ],
+ options={
+ 'verbose_name': 'Category',
+ 'verbose_name_plural': 'Categories',
+ },
+ ),
+ migrations.CreateModel(
+ name='CategoryTranslation',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=250, verbose_name='Name')),
+ ('language', models.CharField(max_length=5, verbose_name='Language (ISO)')),
+ ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weblog.Category', verbose_name='Category')),
+ ],
+ options={
+ 'verbose_name': 'Category name translation',
+ 'verbose_name_plural': 'Category name translations',
+ },
+ ),
+ migrations.AddField(
+ model_name='blogpost',
+ name='published',
+ field=models.BooleanField(default=False, verbose_name='Published'),
+ preserve_default=False,
+ ),
+ migrations.AlterField(
+ model_name='blogpost',
+ name='original_language',
+ field=models.CharField(blank=True, max_length=5, verbose_name='Original language (ISO)'),
+ ),
+ migrations.AddField(
+ model_name='blogpost',
+ name='category',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='weblog.Category', verbose_name='Category'),
+ ),
+ ]
diff --git a/weblog/migrations/0003_auto_20180119_0156.py b/weblog/migrations/0003_auto_20180119_0156.py
new file mode 100644
index 0000000..73ca4e1
--- /dev/null
+++ b/weblog/migrations/0003_auto_20180119_0156.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.8 on 2018-01-18 22:56
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('weblog', '0002_auto_20180113_1606'),
+ ]
+
+ operations = [
+ migrations.AlterModelOptions(
+ name='blogpost',
+ options={'ordering': ['-publish_date', 'title'], 'verbose_name': 'Blog Post', 'verbose_name_plural': 'Blog Posts'},
+ ),
+ migrations.RemoveField(
+ model_name='blogpost',
+ name='category',
+ ),
+ migrations.AddField(
+ model_name='blogpost',
+ name='categories',
+ field=models.ManyToManyField(blank=True, to='weblog.Category', verbose_name='Categories'),
+ ),
+ ]
diff --git a/weblog/migrations/0004_auto_20180119_0156.py b/weblog/migrations/0004_auto_20180119_0156.py
new file mode 100644
index 0000000..937b7a0
--- /dev/null
+++ b/weblog/migrations/0004_auto_20180119_0156.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.8 on 2018-01-18 22:56
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('weblog', '0003_auto_20180119_0156'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='category',
+ name='parent_category',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='weblog.Category', verbose_name='Parent category'),
+ ),
+ ]
diff --git a/weblog/migrations/0005_auto_20180119_0231.py b/weblog/migrations/0005_auto_20180119_0231.py
new file mode 100644
index 0000000..42b1bd0
--- /dev/null
+++ b/weblog/migrations/0005_auto_20180119_0231.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.8 on 2018-01-18 23:31
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('weblog', '0004_auto_20180119_0156'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='category',
+ name='name',
+ field=models.CharField(max_length=250, unique=True, verbose_name='Name'),
+ ),
+ ]
diff --git a/weblog/migrations/0006_auto_20180121_1002.py b/weblog/migrations/0006_auto_20180121_1002.py
new file mode 100644
index 0000000..db56a3f
--- /dev/null
+++ b/weblog/migrations/0006_auto_20180121_1002.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.8 on 2018-01-21 07:02
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('weblog', '0005_auto_20180119_0231'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='blogpost',
+ name='slug',
+ field=models.SlugField(default='Test', max_length=100, unique=True, verbose_name='Slug (URL)'),
+ preserve_default=False,
+ ),
+ migrations.AddField(
+ model_name='category',
+ name='slug',
+ field=models.SlugField(default='Test', max_length=60, unique=True, verbose_name='Slug (URL)'),
+ preserve_default=False,
+ ),
+ ]
diff --git a/weblog/migrations/0007_auto_20180122_1943.py b/weblog/migrations/0007_auto_20180122_1943.py
new file mode 100644
index 0000000..cae0a4f
--- /dev/null
+++ b/weblog/migrations/0007_auto_20180122_1943.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.8 on 2018-01-22 16:43
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('weblog', '0006_auto_20180121_1002'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='postcomment',
+ name='author',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Author'),
+ ),
+ ]
diff --git a/weblog/migrations/__init__.py b/weblog/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/weblog/migrations/__init__.py