Commit e5ea18bf authored by Dennis Appel's avatar Dennis Appel
Browse files

Heroku DB Workaround

parent 0aa6ccbc
from django.contrib import admin
from .models import CheckListEntry, CheckListCategory
from .models import CheckListEntry
# 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 = [
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.SET_NULL, null=True)
checkListEntryTitle = models.CharField(max_length=200)
checkListEntrySeverity = models.CharField(max_length=10)
checkListEntryDescription = models.TextField()
......@@ -3,12 +3,9 @@ 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()
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