From d8c9c162f1476d8a474ce8737ed21b4bdcca0053 Mon Sep 17 00:00:00 2001 From: Mike <22396211+Dresdn@users.noreply.github.com> Date: Sun, 4 Jul 2021 08:59:40 -0700 Subject: [PATCH] chore: remove old test_app --- django_test_app/django_test_app/__init__.py | 0 django_test_app/django_test_app/settings.py | 111 ---------------- django_test_app/django_test_app/urls.py | 21 --- django_test_app/django_test_app/wsgi.py | 16 --- django_test_app/main_app/__init__.py | 0 django_test_app/main_app/admin.py | 3 - django_test_app/main_app/apps.py | 5 - .../main_app/migrations/0001_initial.py | 120 ------------------ .../main_app/migrations/__init__.py | 0 django_test_app/main_app/models.py | 58 --------- django_test_app/main_app/tests.py | 3 - django_test_app/main_app/views.py | 3 - django_test_app/manage.py | 10 -- 13 files changed, 350 deletions(-) delete mode 100644 django_test_app/django_test_app/__init__.py delete mode 100644 django_test_app/django_test_app/settings.py delete mode 100644 django_test_app/django_test_app/urls.py delete mode 100644 django_test_app/django_test_app/wsgi.py delete mode 100644 django_test_app/main_app/__init__.py delete mode 100644 django_test_app/main_app/admin.py delete mode 100644 django_test_app/main_app/apps.py delete mode 100644 django_test_app/main_app/migrations/0001_initial.py delete mode 100644 django_test_app/main_app/migrations/__init__.py delete mode 100644 django_test_app/main_app/models.py delete mode 100644 django_test_app/main_app/tests.py delete mode 100644 django_test_app/main_app/views.py delete mode 100755 django_test_app/manage.py diff --git a/django_test_app/django_test_app/__init__.py b/django_test_app/django_test_app/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django_test_app/django_test_app/settings.py b/django_test_app/django_test_app/settings.py deleted file mode 100644 index 0f46484..0000000 --- a/django_test_app/django_test_app/settings.py +++ /dev/null @@ -1,111 +0,0 @@ -""" -Django settings for django_test_app project. - -Generated by 'django-admin startproject' using Django 3.1.5. - -For more information on this file, see -https://docs.djangoproject.com/en/3.1/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/3.1/ref/settings/ -""" - -from pathlib import Path - -# Build paths inside the project like this: BASE_DIR / 'subdir'. -BASE_DIR = Path(__file__).resolve().parent.parent - - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '$s149z%i@q3941y3g8^7k@@v%4-hn-$zhk&9$y&w9kbis9n&w3' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = [] - - -# Application definition - -INSTALLED_APPS = [ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - # Custom: - 'main_app', - # Our app: - 'eav', -] - -MIDDLEWARE = [ - 'django.middleware.security.SecurityMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', -] - -ROOT_URLCONF = 'django_test_app.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, - }, -] - -WSGI_APPLICATION = 'django_test_app.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/3.1/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', - } -} - - -# Password validation -# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [] - - -# Internationalization -# https://docs.djangoproject.com/en/3.1/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'UTC' - -USE_I18N = True - -USE_L10N = True - -USE_TZ = False - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/3.1/howto/static-files/ - -STATIC_URL = '/static/' diff --git a/django_test_app/django_test_app/urls.py b/django_test_app/django_test_app/urls.py deleted file mode 100644 index e68e57c..0000000 --- a/django_test_app/django_test_app/urls.py +++ /dev/null @@ -1,21 +0,0 @@ -"""django_test_app URL Configuration - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/3.1/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: path('', views.home, name='home') -Class-based views - 1. Add an import: from other_app.views import Home - 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.urls import include, path - 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) -""" -from django.contrib import admin -from django.urls import path - -urlpatterns = [ - path('admin/', admin.site.urls), -] diff --git a/django_test_app/django_test_app/wsgi.py b/django_test_app/django_test_app/wsgi.py deleted file mode 100644 index 8d6c2ae..0000000 --- a/django_test_app/django_test_app/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for django_test_app project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_test_app.settings') - -application = get_wsgi_application() diff --git a/django_test_app/main_app/__init__.py b/django_test_app/main_app/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django_test_app/main_app/admin.py b/django_test_app/main_app/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/django_test_app/main_app/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/django_test_app/main_app/apps.py b/django_test_app/main_app/apps.py deleted file mode 100644 index 2e344d9..0000000 --- a/django_test_app/main_app/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class MyAppConfig(AppConfig): - name = 'main_app' diff --git a/django_test_app/main_app/migrations/0001_initial.py b/django_test_app/main_app/migrations/0001_initial.py deleted file mode 100644 index 5747d7a..0000000 --- a/django_test_app/main_app/migrations/0001_initial.py +++ /dev/null @@ -1,120 +0,0 @@ -# Generated by Django 3.2.4 on 2021-06-17 22:20 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [] - - operations = [ - migrations.CreateModel( - name='ExampleMetaclassModel', - fields=[ - ( - 'id', - models.AutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name='ID', - ), - ), - ('name', models.CharField(max_length=12)), - ], - ), - migrations.CreateModel( - name='ExampleModel', - fields=[ - ( - 'id', - models.AutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name='ID', - ), - ), - ('name', models.CharField(max_length=12)), - ], - ), - migrations.CreateModel( - name='RegisterTestModel', - fields=[ - ( - 'id', - models.AutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name='ID', - ), - ), - ('name', models.CharField(max_length=12)), - ], - ), - migrations.CreateModel( - name='Patient', - fields=[ - ( - 'id', - models.AutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name='ID', - ), - ), - ('name', models.CharField(max_length=12)), - ( - 'example', - models.ForeignKey( - blank=True, - null=True, - on_delete=models.deletion.PROTECT, - to='main_app.examplemodel', - ), - ), - ], - ), - migrations.CreateModel( - name='M2MModel', - fields=[ - ( - 'id', - models.AutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name='ID', - ), - ), - ('name', models.CharField(max_length=12)), - ('models', models.ManyToManyField(to='main_app.ExampleModel')), - ], - ), - migrations.CreateModel( - name='Encounter', - fields=[ - ( - 'id', - models.AutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name='ID', - ), - ), - ('num', models.PositiveSmallIntegerField()), - ( - 'patient', - models.ForeignKey( - on_delete=models.deletion.PROTECT, - to='main_app.patient', - ), - ), - ], - ), - ] diff --git a/django_test_app/main_app/migrations/__init__.py b/django_test_app/main_app/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django_test_app/main_app/models.py b/django_test_app/main_app/models.py deleted file mode 100644 index 7a0950f..0000000 --- a/django_test_app/main_app/models.py +++ /dev/null @@ -1,58 +0,0 @@ -from django.db import models - -from eav.decorators import register_eav -from eav.models import EAVModelMeta - - -class Patient(models.Model): - name = models.CharField(max_length=12) - example = models.ForeignKey( - 'ExampleModel', null=True, blank=True, on_delete=models.PROTECT) - - def __str__(self): - return self.name - - def __repr__(self): - return self.name - - -class Encounter(models.Model): - num = models.PositiveSmallIntegerField() - patient = models.ForeignKey(Patient, on_delete=models.PROTECT) - - def __str__(self): - return '%s: encounter num %d' % (self.patient, self.num) - - def __repr__(self): - return self.name - - -@register_eav() -class ExampleModel(models.Model): - name = models.CharField(max_length=12) - - def __unicode__(self): - return self.name - - -@register_eav() -class M2MModel(models.Model): - name = models.CharField(max_length=12) - models = models.ManyToManyField(ExampleModel) - - def __unicode__(self): - return self.name - - -class ExampleMetaclassModel(models.Model, metaclass=EAVModelMeta): - name = models.CharField(max_length=12) - - def __str__(self): - return self.name - - -class RegisterTestModel(models.Model, metaclass=EAVModelMeta): - name = models.CharField(max_length=12) - - def __str__(self): - return self.name diff --git a/django_test_app/main_app/tests.py b/django_test_app/main_app/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/django_test_app/main_app/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/django_test_app/main_app/views.py b/django_test_app/main_app/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/django_test_app/main_app/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/django_test_app/manage.py b/django_test_app/manage.py deleted file mode 100755 index f078ec0..0000000 --- a/django_test_app/manage.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python -"""Django's command-line utility for administrative tasks.""" -import os -import sys - -from django.core.management import execute_from_command_line - -if __name__ == '__main__': - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_test_app.settings') - execute_from_command_line(sys.argv)