From f077badf3163fc36c111dc45fe8d7d6f57d8712a Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 8 Nov 2013 09:31:01 +0200 Subject: Merged motor and checkin --- apps/troubleshooting/__init__.py | 0 apps/troubleshooting/models.py | 19 +++++++++++++++++++ apps/troubleshooting/tests.py | 16 ++++++++++++++++ apps/troubleshooting/views.py | 1 + 4 files changed, 36 insertions(+) create mode 100644 apps/troubleshooting/__init__.py create mode 100644 apps/troubleshooting/models.py create mode 100644 apps/troubleshooting/tests.py create mode 100644 apps/troubleshooting/views.py (limited to 'apps/troubleshooting') diff --git a/apps/troubleshooting/__init__.py b/apps/troubleshooting/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/troubleshooting/models.py b/apps/troubleshooting/models.py new file mode 100644 index 0000000..cd1edf3 --- /dev/null +++ b/apps/troubleshooting/models.py @@ -0,0 +1,19 @@ +from django.db import models +from apps.core.models import ServiceProvider +from apps.checkin.models import ServiceOrder + + +class Question(models.Model): + sp = models.ForeignKey(ServiceProvider) + required = models.BooleanField(default=True) + question = models.CharField(max_length=256) + + +class Choice(models.Model): + question = models.ForeignKey(Question) + choice = models.CharField(max_length=256) + + +class Answer(models.Model): + choice = models.ForeignKey(Choice) + so = models.ForeignKey(ServiceOrder) diff --git a/apps/troubleshooting/tests.py b/apps/troubleshooting/tests.py new file mode 100644 index 0000000..501deb7 --- /dev/null +++ b/apps/troubleshooting/tests.py @@ -0,0 +1,16 @@ +""" +This file demonstrates writing tests using the unittest module. These will pass +when you run "manage.py test". + +Replace this with more appropriate tests for your application. +""" + +from django.test import TestCase + + +class SimpleTest(TestCase): + def test_basic_addition(self): + """ + Tests that 1 + 1 always equals 2. + """ + self.assertEqual(1 + 1, 2) diff --git a/apps/troubleshooting/views.py b/apps/troubleshooting/views.py new file mode 100644 index 0000000..60f00ef --- /dev/null +++ b/apps/troubleshooting/views.py @@ -0,0 +1 @@ +# Create your views here. -- cgit v1.2.3