From 6c2136db0eefd0c4bf37a16c1fba920aed3d6e04 Mon Sep 17 00:00:00 2001 From: Sandra Modzelewska Date: Sat, 25 Jan 2025 07:29:28 +0000 Subject: [PATCH] Remove python files --- kredens/__init__.py | 0 kredens/asgi.py | 16 --- kredens/auth/__init__.py | 0 kredens/auth/apps.py | 5 - kredens/auth/management/__init__.py | 0 kredens/auth/management/commands/__init__.py | 0 kredens/auth/management/commands/bootstrap.py | 14 -- kredens/settings.py | 132 ------------------ kredens/urls.py | 22 --- kredens/wsgi.py | 16 --- 10 files changed, 205 deletions(-) delete mode 100644 kredens/__init__.py delete mode 100644 kredens/asgi.py delete mode 100644 kredens/auth/__init__.py delete mode 100644 kredens/auth/apps.py delete mode 100644 kredens/auth/management/__init__.py delete mode 100644 kredens/auth/management/commands/__init__.py delete mode 100644 kredens/auth/management/commands/bootstrap.py delete mode 100644 kredens/settings.py delete mode 100644 kredens/urls.py delete mode 100644 kredens/wsgi.py diff --git a/kredens/__init__.py b/kredens/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/kredens/asgi.py b/kredens/asgi.py deleted file mode 100644 index 379e2d5..0000000 --- a/kredens/asgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -ASGI config for kredens 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/5.1/howto/deployment/asgi/ -""" - -import os - -from django.core.asgi import get_asgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kredens.settings') - -application = get_asgi_application() diff --git a/kredens/auth/__init__.py b/kredens/auth/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/kredens/auth/apps.py b/kredens/auth/apps.py deleted file mode 100644 index 6fe2c82..0000000 --- a/kredens/auth/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - -class KredensAuthConfig(AppConfig): - name = "kredens.auth" - label = "kredens_auth" \ No newline at end of file diff --git a/kredens/auth/management/__init__.py b/kredens/auth/management/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/kredens/auth/management/commands/__init__.py b/kredens/auth/management/commands/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/kredens/auth/management/commands/bootstrap.py b/kredens/auth/management/commands/bootstrap.py deleted file mode 100644 index 61f914e..0000000 --- a/kredens/auth/management/commands/bootstrap.py +++ /dev/null @@ -1,14 +0,0 @@ -import os - -from django.core.management.base import BaseCommand, CommandError -from django.contrib.auth import get_user_model - -class Command(BaseCommand): - help = "Create a superuser with a preset password" - - def handle(self, *args, **options): - get_user_model().objects.create_superuser( - username=os.environ["SUPERUSER_NAME"], - email=os.environ["SUPERUSER_EMAIL"], - password=os.environ["SUPERUSER_PASSWORD"] - ) \ No newline at end of file diff --git a/kredens/settings.py b/kredens/settings.py deleted file mode 100644 index a722d8b..0000000 --- a/kredens/settings.py +++ /dev/null @@ -1,132 +0,0 @@ -""" -Django settings for kredens project. - -Generated by 'django-admin startproject' using Django 5.1.5. - -For more information on this file, see -https://docs.djangoproject.com/en/5.1/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/5.1/ref/settings/ -""" - -from pathlib import Path -import os - -import dj_database_url - -# 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/5.1/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = "django-insecure-n+yg%(i+kmm6yf=ab5)f1qv)-kzn$*!v&f6(5rtczz52!rer$&" - -# 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", - "kredens.auth", -] - -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", -] - -CSRF_TRUSTED_ORIGINS = [ - "https://localhost" -] - -ROOT_URLCONF = "kredens.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 = "kredens.wsgi.application" - - -# Database -# https://docs.djangoproject.com/en/5.1/ref/settings/#databases - -DATABASES = { - "default": dj_database_url.config( - default=f"postgres://postgres:{os.environ.get("DATABASE_PASSWORD")}@localhost/kredens", - conn_max_age=600, - conn_health_checks=True, - ), -} - - -# Password validation -# https://docs.djangoproject.com/en/5.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/5.1/topics/i18n/ - -LANGUAGE_CODE = "en-us" - -TIME_ZONE = "UTC" - -USE_I18N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/5.1/howto/static-files/ - -STATIC_URL = "static/" - -# Default primary key field type -# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field - -DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" diff --git a/kredens/urls.py b/kredens/urls.py deleted file mode 100644 index 1f12cca..0000000 --- a/kredens/urls.py +++ /dev/null @@ -1,22 +0,0 @@ -""" -URL configuration for kredens project. - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/5.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/kredens/wsgi.py b/kredens/wsgi.py deleted file mode 100644 index 5ddf168..0000000 --- a/kredens/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for kredens 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/5.1/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kredens.settings') - -application = get_wsgi_application()