diff --git a/src/dataproc/__init__.py b/src/dataproc/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/dataproc/__pycache__/__init__.cpython-38.pyc b/src/dataproc/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index fd75c82b28fb87acfca8b457a898cbcd134c5f19..0000000000000000000000000000000000000000 Binary files a/src/dataproc/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/src/dataproc/__pycache__/admin.cpython-38.pyc b/src/dataproc/__pycache__/admin.cpython-38.pyc deleted file mode 100644 index d3c9a01886bc0a5a48c5c80de1295cf2022630bd..0000000000000000000000000000000000000000 Binary files a/src/dataproc/__pycache__/admin.cpython-38.pyc and /dev/null differ diff --git a/src/dataproc/__pycache__/apps.cpython-38.pyc b/src/dataproc/__pycache__/apps.cpython-38.pyc deleted file mode 100644 index 352437ad2a3980fd22afb9dc91b98bebbcfe2edd..0000000000000000000000000000000000000000 Binary files a/src/dataproc/__pycache__/apps.cpython-38.pyc and /dev/null differ diff --git a/src/dataproc/__pycache__/models.cpython-38.pyc b/src/dataproc/__pycache__/models.cpython-38.pyc deleted file mode 100644 index 6644fca13e4998b8e7b77a91c8d8c3a44fe868cd..0000000000000000000000000000000000000000 Binary files a/src/dataproc/__pycache__/models.cpython-38.pyc and /dev/null differ diff --git a/src/dataproc/admin.py b/src/dataproc/admin.py deleted file mode 100644 index 8c38f3f3dad51e4585f3984282c2a4bec5349c1e..0000000000000000000000000000000000000000 --- a/src/dataproc/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/src/dataproc/api/__init__.py b/src/dataproc/api/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/dataproc/api/serializers.py b/src/dataproc/api/serializers.py deleted file mode 100644 index b78cb10b9370015716170550c50e41292279ce9e..0000000000000000000000000000000000000000 --- a/src/dataproc/api/serializers.py +++ /dev/null @@ -1,8 +0,0 @@ -from rest_framework import serializers -from dataproc.models import Contruct - - -class ContructSerializer(serializers.ModelSerializer): - class Meta: - model = Contruct - fields = ['title', 'created_at', 'updated_at',] \ No newline at end of file diff --git a/src/dataproc/api/urls.py b/src/dataproc/api/urls.py deleted file mode 100644 index 29c171805434f8376369c429a31d7430775b30ea..0000000000000000000000000000000000000000 --- a/src/dataproc/api/urls.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.urls import path -from dataproc.api.views import( - api_detail_construct_view, - api_update_construct_view, - api_delete_construct_view, - api_create_construct_view, -) - -app_name = 'dataproc' - -urlpatterns = [ - path('<slug>/', api_detail_construct_view, name="detail"), - path('<slug>/update', api_update_construct_view, name="update"), - path('<slug>/delete', api_delete_construct_view, name="delete"), - path('create', api_create_construct_view, name="create"), -] \ No newline at end of file diff --git a/src/dataproc/api/views.py b/src/dataproc/api/views.py deleted file mode 100644 index b36507b85c03601719875921a186ca7a1d7bc25c..0000000000000000000000000000000000000000 --- a/src/dataproc/api/views.py +++ /dev/null @@ -1,72 +0,0 @@ -from rest_framework import status -from rest_framework.response import Response -from rest_framework.decorators import api_view - -from dataproc.models import Construct -from dataproc.api.serializers import ConstructSerializer - -SUCCESS = 'success' -ERROR = 'error' -DELETE_SUCCESS = 'deleted' -UPDATE_SUCCESS = 'updated' -CREATE_SUCCESS = 'created' - -@api_view(['GET', ]) -def api_detail_construct_view(request, slug): - - try: - construct = Construct.objects.get(slug=slug) - except Construct.DoesNotExist: - return Response(status=status.HTTP_404_NOT_FOUND) - - if request.method == 'GET': - serializer = ConstructSerializer(blog_post) - return Response(serializer.data) - - -@api_view(['PUT',]) -def api_update_construct_view(request, slug): - - try: - construct = Construct.objects.get(slug=slug) - except Construct.DoesNotExist: - return Response(status=status.HTTP_404_NOT_FOUND) - - if request.method == 'PUT': - serializer = ConstructSerializer(construct, data=request.data) - data = {} - if serializer.is_valid(): - serializer.save() - data['SUCCESS'] = UPDATE_SUCCESS - return Response(data=data) - return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) - - -@api_view(['DELETE',]) -def api_delete_blog_view(request, slug): - - try: - construct = Construct.objects.get(slug=slug) - except Construct.DoesNotExist: - return Response(status=status.HTTP_404_NOT_FOUND) - - if request.method == 'DELETE': - operation = construct.delete() - data = {} - if operation: - data['SUCCESS'] = DELETE_SUCCESS - return Response(data=data) - - -@api_view(['POST']) -def api_create_construct_view(request): - - construct = Construct() - - if request.method == 'POST': - serializer = ConstructSerializer(construct, data=request.data) - data = {} - if serializer.is_valid(): - serializer.save() - return Response(serializer.data, status=status.HTTP_201_CREATED) - return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) \ No newline at end of file diff --git a/src/dataproc/apps.py b/src/dataproc/apps.py deleted file mode 100644 index f1cf212e23c7cae3e4676e5172d3f3070d788c3b..0000000000000000000000000000000000000000 --- a/src/dataproc/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class apiConfig(AppConfig): - name = 'api' diff --git a/src/dataproc/migrations/__init__.py b/src/dataproc/migrations/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/dataproc/migrations/models/report.py b/src/dataproc/migrations/models/report.py deleted file mode 100644 index cca49203c2e904744cffdbee592c400df4a08f79..0000000000000000000000000000000000000000 --- a/src/dataproc/migrations/models/report.py +++ /dev/null @@ -1,10 +0,0 @@ -from django.db import models, StatisticalReport -from neomodel import StructuredNode, StringProperty, IntegerProperty,UniqueIdProperty, RelationshipTo, DateTimeProperty, BooleanProperty - -class Report(StructuredNode): - report_path=StringProperty() - report_source=StringProperty() - report_size=StringProperty() - - # Relationships - is_statisticalreport=RelationshipTo(StatisticalReport, 'IS') \ No newline at end of file diff --git a/src/dataproc/migrations/models/rsf.py b/src/dataproc/migrations/models/rsf.py deleted file mode 100644 index 07b764df666a80f78e129f568044ec428409f01f..0000000000000000000000000000000000000000 --- a/src/dataproc/migrations/models/rsf.py +++ /dev/null @@ -1,15 +0,0 @@ -from django.db import models, report, DPStep, MTZfile, ScalepackFile, Reference, Construct -from neomodel import StructuredNode, StringProperty, IntegerProperty,UniqueIdProperty, RelationshipTo, DateTimeProperty, BooleanProperty - -class RefelctionStructureFactors(StructuredNode): - rsf_source=StringProperty() - rsf_filesize=StringProperty() - rsf_filepath=StringProperty() - - # Relationships - input_as_ref=RelationshipTo(DPStep, 'INPUT_AS_REFERENCE') - input_of=RelationshipTo(DPStep, 'INPUT') - generates_mtz=RelationshipTo(MTZfile, 'GENERATES') - generates_scalepack=RelationshipTo(ScalepackFile, 'GENERATES') - labelled=RelationshipTo(Reference, 'LABELLED') - belongs=RelationshipTo(Construct, 'BELONGS') \ No newline at end of file diff --git a/src/dataproc/models.py b/src/dataproc/models.py deleted file mode 100644 index e351f71c12e4be39d9d48742694ccc0bc7e9b833..0000000000000000000000000000000000000000 --- a/src/dataproc/models.py +++ /dev/null @@ -1,179 +0,0 @@ -# from django.db import models -# from neomodel import StructuredNode, StringProperty, IntegerProperty,UniqueIdProperty, RelationshipTo, DateTimeProperty, BooleanProperty - -# class City(StructuredNode): -# code = StringProperty(unique_index=True, required=True) -# name = StringProperty(index=True, default="city") - -from django.db import models -from django.utils.text import slugify -from django.conf import settings - -class Contruct(models.Model): - title = models.CharField(max_length=50, null=False, blank=True) - created_at = models.DateTimeField(auto_now_add=True, verbose_name="created at") - updated_at = models.DateTimeField(auto_now=True, verbose_name="updated at") - slug = models.SlugField(blank=True, unique=True) - - def __str__(self): - return self.title - -##################################### -# Nodes and properties of the model # -##################################### - -# class LigandsFitting(StructuredNode): -# uid=UniqueIdProperty() -# dp_step_name = StringProperty() -# created_at=DateTimeProperty() -# updated_at=DateTimeProperty() -# pipedream_id=IntegerProperty() -# score=IntegerProperty() -# fitting_success=BooleanProperty() - -# class Refinement(StructuredNode): -# uid=UniqueIdProperty() -# dp_step_name=StringProperty() -# created_at=DateTimeProperty() -# updated_at=DateTimeProperty() - -# class PostRefinement(StructuredNode): -# uid=UniqueIdProperty() -# dp_step_name=StringProperty() -# pipedream_id=IntegerProperty() -# created_at=DateTimeProperty() -# updated_at=DateTimeProperty() - -# class ReductionScaling(StructuredNode): -# uid=UniqueIdProperty() -# dp_step_name=StringProperty() -# created_at=DateTimeProperty() -# updated_at=DateTimeProperty() - -# class autoPROC(StructuredNode): -# uid=UniqueIdProperty() -# tool_name=StringProperty() - -# class Buster(StructuredNode): -# uid=UniqueIdProperty() -# tool_name=StringProperty() - -# class Rhofit(StructuredNode): -# uid=UniqueIdProperty() -# tool_name=StringProperty() - -# class StatisticalReport(StructuredNode): -# uid=UniqueIdProperty() -# report_name=StringProperty() - -# class ComputingHost(StructuredNode): -# ch_softwares=StringProperty() -# ch_softwares_number=IntegerProperty() - -# class StorageHost(StructuredNode): -# sh_files=StringProperty() -# sh_files_number=IntegerProperty() - -# class Report(StructuredNode): -# report_path=StringProperty() -# report_source=StringProperty() -# report_size=StringProperty() - -# # Relationships -# is_statisticalreport=RelationshipTo(StatisticalReport, 'IS') - -# class RefelctionStructureFactors(StructuredNode): -# rsf_source=StringProperty() -# rsf_filesize=StringProperty() -# rsf_filepath=StringProperty() - -# # Relationships -# input_as_ref=RelationshipTo(DPStep, 'INPUT_AS_REFERENCE') -# input_of=RelationshipTo(DPStep, 'INPUT') -# generates_mtz=RelationshipTo(MTZfile, 'GENERATES') -# generates_scalepack=RelationshipTo(ScalepackFile, 'GENERATES') -# labelled=RelationshipTo(Reference, 'LABELLED') -# belongs=RelationshipTo(Construct, 'BELONGS') - -# class DPStep(StructuredNode): - -# # Relationships -# is_fitting=RelationshipTo(LigandsFitting, 'IS') -# is_refinement=RelationshipTo(Refinement, 'IS') -# is_postrefinement=RelationshipTo(PostRefinement, 'IS') -# is_reductionscaling=RelationshipTo(ReductionScaling, 'IS') -# with_tool_1=RelationshipTo(autoPROC, 'WITH') -# with_tool_2=RelationshipTo(Rhofit, 'WITH') -# with_tool_3=RelationshipTo(Buster, 'WITH') -# genereates_report=RelationshipTo(Report, 'GENERATES') -# # generates_coordinates=RelationshipTo(Coordinates, 'GENERATES') -# generates_rsf=RelationshipTo(RefelctionStructureFactors, 'GENERATES') - -# class Coordinates(StructuredNode): -# coordinates_source=StringProperty(unique_index=True, required=True) -# coordinates_filesize=StringProperty(unique_index=True, required=True) -# coordinates_filepath=StringProperty(unique_index=True, required=True) - -# # Relationships -# input_as_ref=RelationshipTo(DPStep, 'INPUT_AS_REFERENCE') -# input_of=RelationshipTo(DPStep, 'INPUT') -# has_pdb=RelationshipTo(PDBFile, 'HAS') -# has_mmcif=RelationshipTo(mmCIFFile, 'HAS') -# belongs=RelationshipTo(Construct, 'BELONGS') -# labelled=RelationshipTo(Reference, 'LABELLED') - - -# class DataCollection (StructuredNode): -# collection_type=StringProperty() -# collection_size=StringProperty() - -# # Relationships -# genereates_dataset=RelationshipTo(Datatset, 'GENERATES') - -# class Datatset(StructuredNode): -# dataset_file_no=IntegerProperty() -# dataset_size=StringProperty() - -# # Relationships -# input_of=RelationshipTo(DPStep, 'INPUT') -# stored=RelationshipTo(StorageHost, 'STORED') -# belongs=RelationshipTo(Construct, 'BELONGS') - -# class mmCIFFile(StructuredNode): -# uid=UniqueIdProperty() -# coordinates_filetype=StringProperty(unique_index=True, required=True) - -# class PDBFile(StructuredNode): -# uid=UniqueIdProperty() -# coordinates_filetype=StringProperty(unique_index=True, required=True) - -# class MTZfile(StructuredNode): -# uid=UniqueIdProperty() -# rsf_filetype = StringProperty(unique_index=True, required=True) - -# class ScalepackFile(StructuredNode): -# uid=UniqueIdProperty() -# rsf_filetype = StringProperty(unique_index=True, required=True) - -# class Reference(StructuredNode): -# uid=UniqueIdProperty() - -# class OCF(StructuredNode): - -# # Relationships -# has_rsf=RelationshipTo(RefelctionStructureFactors, 'HAS') -# has_coordinates=RelationshipTo(Coordinates, 'HAS') - -# class Construct(StructuredNode): - -# # Relationships -# has_ocf=RelationshipTo(OCF, 'HAS') -# has_storage_host=RelationshipTo(StorageHost, 'HAS') -# has_computing_host=RelationshipTo(ComputingHost, 'HAS') - - -# class Ligand(StructuredNode): - -# # Relationships -# associated=RelationshipTo(Datatset, 'ASSOCIATED') - diff --git a/src/dataproc/settings.py b/src/dataproc/settings.py deleted file mode 100644 index e58a414a46df444d065ce9a42ea76ecb2c93f897..0000000000000000000000000000000000000000 --- a/src/dataproc/settings.py +++ /dev/null @@ -1,133 +0,0 @@ -""" -Django settings for newapi project. - -Generated by 'django-admin startproject' using Django 3.1.6. - -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 -import os -from decouple import config - -# 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 = '=013nqbp3o8hr9e*it$b1um^%ke*uxqvt5qnp=xe6@^20a)d!b' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = [] - - -# Application definition - -INSTALLED_APPS = [ - - #django apps - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'django_neomodel' - 'rest_framework' - - - #My apps - 'dataproc', -] - -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 = 'newapi.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 = 'newapi.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', - } -} - -NEOMODEL_NEO4J_BOLT_URL = os.environ.get('NEO4J_BOLT_URL','bolt://neo4j:neo4@localhost:7687') - - - -# Password validation -# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, -] - - -# 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 = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/3.1/howto/static-files/ - -STATIC_URL = '/static/' diff --git a/src/dataproc/tests/__init.py__ b/src/dataproc/tests/__init.py__ deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/dataproc/tests/test_forms.py b/src/dataproc/tests/test_forms.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/dataproc/tests/test_models.py b/src/dataproc/tests/test_models.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/dataproc/tests/test_urls.py b/src/dataproc/tests/test_urls.py deleted file mode 100644 index a6ef7fa26433d51d96b448536e2e5f0c3cbe6beb..0000000000000000000000000000000000000000 --- a/src/dataproc/tests/test_urls.py +++ /dev/null @@ -1,9 +0,0 @@ -from django.test import SimpleTestCase -from django.urls import reverse, resolve - -class TestUrls(SimpleTestCase): - - def {test_url}(self): - url = reverse('{url_route}') - self.assertEquals(resolve(url).func, ) - diff --git a/src/dataproc/tests/test_views.py b/src/dataproc/tests/test_views.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/dataproc/views.py b/src/dataproc/views.py deleted file mode 100644 index 91ea44a218fbd2f408430959283f0419c921093e..0000000000000000000000000000000000000000 --- a/src/dataproc/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/src/manage.py b/src/manage.py deleted file mode 100755 index f0431db1465cc32a935bdaf1c9bb34132d528c0f..0000000000000000000000000000000000000000 --- a/src/manage.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -"""Django's command-line utility for administrative tasks.""" -import os -import sys - - -def main(): - """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dataproc.settings') - try: - from django.core.management import execute_from_command_line - except ImportError as exc: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?" - ) from exc - execute_from_command_line(sys.argv) - - -if __name__ == '__main__': - main() diff --git a/src/myservice/__init__.py b/src/myservice/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/myservice/__pycache__/__init__.cpython-38.pyc b/src/myservice/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index faf7c92ec32915194d2dd70bf3f42e4d29106d7e..0000000000000000000000000000000000000000 Binary files a/src/myservice/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/src/myservice/__pycache__/settings.cpython-38.pyc b/src/myservice/__pycache__/settings.cpython-38.pyc deleted file mode 100644 index c4f675b8d20d9336efbed2ce7526247e5ebf03cd..0000000000000000000000000000000000000000 Binary files a/src/myservice/__pycache__/settings.cpython-38.pyc and /dev/null differ diff --git a/src/myservice/__pycache__/urls.cpython-38.pyc b/src/myservice/__pycache__/urls.cpython-38.pyc deleted file mode 100644 index 429d66ab5623aec78890f53f19bab119276006ad..0000000000000000000000000000000000000000 Binary files a/src/myservice/__pycache__/urls.cpython-38.pyc and /dev/null differ diff --git a/src/myservice/asgi.py b/src/myservice/asgi.py deleted file mode 100644 index eb7b9819d21d40820873f62ea6c867134e7c8fb2..0000000000000000000000000000000000000000 --- a/src/myservice/asgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -ASGI config for newapi project. - -It exposes the ASGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ -""" - -import os - -from django.core.asgi import get_asgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'newapi.settings') - -application = get_asgi_application() diff --git a/src/myservice/settings.py b/src/myservice/settings.py deleted file mode 100644 index bb06d0e70537b126787a4fcf2f1080fecde39c64..0000000000000000000000000000000000000000 --- a/src/myservice/settings.py +++ /dev/null @@ -1,132 +0,0 @@ -""" -Django settings for newapi project. - -Generated by 'django-admin startproject' using Django 3.1.6. - -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 -import os - -# 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 = '=013nqbp3o8hr9e*it$b1um^%ke*uxqvt5qnp=xe6@^20a)d!b' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = [] - - -# Application definition - -INSTALLED_APPS = [ - - #django apps - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'django_neomodel' - 'rest_framework' - - - #My apps - 'api.apps.apiConfig', -] - -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 = 'newapi.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 = 'newapi.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', - } -} - -NEOMODEL_NEO4J_BOLT_URL = os.environ.get('NEO4J_BOLT_URL','bolt://neo4j:neo4@localhost:7687') - - - -# Password validation -# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, -] - - -# 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 = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/3.1/howto/static-files/ - -STATIC_URL = '/static/' diff --git a/src/myservice/urls.py b/src/myservice/urls.py deleted file mode 100644 index d604da1fb00375ebd4140b33c12ec95150047106..0000000000000000000000000000000000000000 --- a/src/myservice/urls.py +++ /dev/null @@ -1,21 +0,0 @@ -"""newapi 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/src/myservice/wsgi.py b/src/myservice/wsgi.py deleted file mode 100644 index 1ed8999a1ae4dc7ec1bc231de7e8ab94f04121ee..0000000000000000000000000000000000000000 --- a/src/myservice/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for newapi 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', 'newapi.settings') - -application = get_wsgi_application()