Commit f77f37d7 authored by Dennis Appel's avatar Dennis Appel

reset db

parent e5ea18bf
from django.contrib import admin
from .models import CheckListEntry
from .models import CheckListEntry, CheckListCategory
admin.site.register(CheckListEntry)
admin.site.register(CheckListCategory)
# Generated by Django 2.1.3 on 2018-11-19 14:27
# Generated by Django 2.1.3 on 2018-12-12 17:48
from django.db import migrations, models
import django.db.models.deletion
......@@ -20,7 +20,7 @@ class Migration(migrations.Migration):
('checkListEntryTitle', models.CharField(max_length=200)),
('checkListEntrySeverity', models.CharField(max_length=10)),
('checkListEntryDescription', models.TextField()),
('wikiEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry')),
('wikiEntry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry')),
],
options={
'ordering': ['checkListEntryTitle', '-checkListEntrySeverity'],
......
# Generated by Django 2.1.3 on 2018-12-11 13:47
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('checklist', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='checklistentry',
name='wikiEntry',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry'),
),
]
# Generated by Django 2.1.3 on 2018-12-12 14:39
# Generated by Django 2.1.3 on 2018-12-12 17:49
from django.db import migrations, models
import django.db.models.deletion
......@@ -7,7 +7,7 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('checklist', '0002_auto_20181211_1447'),
('checklist', '0001_initial'),
]
operations = [
......@@ -21,6 +21,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='checklistentry',
name='checklistCategory',
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.SET_DEFAULT, to='checklist.CheckListCategory'),
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='checklist.CheckListCategory'),
preserve_default=False,
),
]
# Generated by Django 2.1.3 on 2018-12-12 16:48
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('checklist', '0003_auto_20181212_1539'),
]
operations = [
migrations.AlterField(
model_name='checklistentry',
name='checklistCategory',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='checklist.CheckListCategory'),
),
]
# Generated by Django 2.1.3 on 2018-12-12 16:52
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('checklist', '0004_auto_20181212_1748'),
]
operations = [
migrations.RemoveField(
model_name='checklistentry',
name='checklistCategory',
),
]
# Generated by Django 2.1.3 on 2018-12-12 17:15
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('checklist', '0005_remove_checklistentry_checklistcategory'),
]
operations = [
migrations.AddField(
model_name='checklistentry',
name='checklistCategory',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='checklist.CheckListCategory'),
),
]
# Generated by Django 2.1.3 on 2018-12-12 17:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('checklist', '0006_checklistentry_checklistcategory'),
]
operations = [
migrations.RemoveField(
model_name='checklistentry',
name='checklistCategory',
),
migrations.DeleteModel(
name='CheckListCategory',
),
]
from django.db import models
class CheckListCategory(models.Model):
categoryTitle = models.CharField(max_length=100)
def getEntries(self):
return self.checklistentry_set.all()
def __str__(self):
return self.categoryTitle
class CheckListEntry(models.Model):
wikiEntry = models.ForeignKey(
'wiki.WikiEntry', on_delete=models.SET_NULL, blank=True, null=True)
checklistCategory = models.ForeignKey(
'checklist.CheckListCategory', on_delete=models.CASCADE)
checkListEntryTitle = models.CharField(max_length=200)
checkListEntrySeverity = models.CharField(max_length=10)
checkListEntryDescription = models.TextField()
......
......@@ -3,9 +3,12 @@ from django.shortcuts import render
from django.urls import reverse
from django.views import generic
from .models import CheckListCategory
class IndexView(generic.ListView):
template_name = 'checklist/index.html'
context_object_name = 'checklist'
def get_queryset(self):
return CheckListCategory.objects.all()
# Generated by Django 2.1.3 on 2018-11-19 15:05
# Generated by Django 2.1.3 on 2018-12-12 17:48
from django.db import migrations, models
import django.db.models.deletion
......@@ -28,8 +28,9 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('exampleTitle', models.CharField(max_length=200)),
('exampleText', models.TextField()),
('exampleResource', models.CharField(blank=True, max_length=200)),
('exampleText', models.TextField(default='Beispiel')),
('exampleImage', models.CharField(max_length=200)),
('exampleImageAlt', models.CharField(default='Bild', max_length=400)),
('examplePositive', models.BooleanField(default=True)),
('wikiEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry')),
],
......
# Generated by Django 2.1.3 on 2018-11-19 15:06
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wiki', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='wikiexample',
old_name='exampleResource',
new_name='exampleImage',
),
]
# Generated by Django 2.1.3 on 2018-11-19 15:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wiki', '0002_auto_20181119_1606'),
]
operations = [
migrations.AddField(
model_name='wikiexample',
name='exampleResource',
field=models.CharField(blank=True, max_length=200),
),
]
# Generated by Django 2.1.3 on 2018-11-19 15:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wiki', '0003_wikiexample_exampleresource'),
]
operations = [
migrations.RemoveField(
model_name='wikiexample',
name='exampleResource',
),
migrations.AlterField(
model_name='wikiexample',
name='exampleImage',
field=models.CharField(max_length=200),
),
]
# Generated by Django 2.1.3 on 2018-11-19 15:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wiki', '0004_auto_20181119_1610'),
]
operations = [
migrations.RemoveField(
model_name='wikiexample',
name='exampleText',
),
]
# Generated by Django 2.1.3 on 2018-11-19 15:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wiki', '0005_remove_wikiexample_exampletext'),
]
operations = [
migrations.AddField(
model_name='wikiexample',
name='exampleText',
field=models.TextField(default='Beispiel'),
),
]
# Generated by Django 2.1.3 on 2018-11-20 15:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wiki', '0006_wikiexample_exampletext'),
]
operations = [
migrations.AddField(
model_name='wikiexample',
name='exampleImageAlt',
field=models.CharField(default='Bild', max_length=400),
),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment