From 4c263a94fe2ccee6e9a2bdc931085b7cf2d0331f Mon Sep 17 00:00:00 2001 From: snnbotchway Date: Mon, 26 Jun 2023 00:40:32 +0000 Subject: [PATCH] Make it generic --- .flake8 | 2 +- README.md | 4 ++-- app/manage.py | 2 +- app/{storeroom => project_name}/__init__.py | 0 app/{storeroom => project_name}/asgi.py | 4 ++-- app/{storeroom => project_name}/settings/__init__.py | 0 app/{storeroom => project_name}/settings/common.py | 6 +++--- app/{storeroom => project_name}/settings/dev.py | 0 app/{storeroom => project_name}/settings/prod.py | 0 app/{storeroom => project_name}/urls.py | 2 +- app/{storeroom => project_name}/wsgi.py | 4 ++-- app/pytest.ini | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) rename app/{storeroom => project_name}/__init__.py (100%) rename app/{storeroom => project_name}/asgi.py (71%) rename app/{storeroom => project_name}/settings/__init__.py (100%) rename app/{storeroom => project_name}/settings/common.py (95%) rename app/{storeroom => project_name}/settings/dev.py (100%) rename app/{storeroom => project_name}/settings/prod.py (100%) rename app/{storeroom => project_name}/urls.py (94%) rename app/{storeroom => project_name}/wsgi.py (71%) diff --git a/.flake8 b/.flake8 index 55ea0f0..ad091c4 100644 --- a/.flake8 +++ b/.flake8 @@ -1,3 +1,3 @@ [flake8] max-line-length = 100 -exclude = migrations,__pycache__,manage.py,app/storeroom/settings/*,venv +exclude = migrations,__pycache__,manage.py,app/project_name/settings/*,venv diff --git a/README.md b/README.md index 458fbbc..93fce95 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Storeroom Backend +# project_name Backend -The backend of a storeroom management app, enables seamless inventory tracking, real-time notifications, and comprehensive data analysis. +To get started, rename all instances of `project_name` in the codebase to the name of your project. ## Development Environment Setup diff --git a/app/manage.py b/app/manage.py index 1cca1a9..6f262cc 100755 --- a/app/manage.py +++ b/app/manage.py @@ -6,7 +6,7 @@ def main(): """Run administrative tasks.""" - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "storeroom.settings.dev") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_name.settings.dev") try: from django.core.management import execute_from_command_line except ImportError as exc: diff --git a/app/storeroom/__init__.py b/app/project_name/__init__.py similarity index 100% rename from app/storeroom/__init__.py rename to app/project_name/__init__.py diff --git a/app/storeroom/asgi.py b/app/project_name/asgi.py similarity index 71% rename from app/storeroom/asgi.py rename to app/project_name/asgi.py index b229387..c2db7af 100644 --- a/app/storeroom/asgi.py +++ b/app/project_name/asgi.py @@ -1,5 +1,5 @@ """ -ASGI config for storeroom project. +ASGI config for project_name project. It exposes the ASGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ from django.core.asgi import get_asgi_application -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "storeroom.settings.dev") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_name.settings.dev") application = get_asgi_application() diff --git a/app/storeroom/settings/__init__.py b/app/project_name/settings/__init__.py similarity index 100% rename from app/storeroom/settings/__init__.py rename to app/project_name/settings/__init__.py diff --git a/app/storeroom/settings/common.py b/app/project_name/settings/common.py similarity index 95% rename from app/storeroom/settings/common.py rename to app/project_name/settings/common.py index 36889d0..544fc29 100644 --- a/app/storeroom/settings/common.py +++ b/app/project_name/settings/common.py @@ -1,5 +1,5 @@ """ -Django settings for storeroom project. +Django settings for project_name project. Generated by 'django-admin startproject' using Django 4.2.1. @@ -44,7 +44,7 @@ "django.middleware.clickjacking.XFrameOptionsMiddleware", ] -ROOT_URLCONF = "storeroom.urls" +ROOT_URLCONF = "project_name.urls" TEMPLATES = [ { @@ -62,7 +62,7 @@ }, ] -WSGI_APPLICATION = "storeroom.wsgi.application" +WSGI_APPLICATION = "project_name.wsgi.application" # Password validation diff --git a/app/storeroom/settings/dev.py b/app/project_name/settings/dev.py similarity index 100% rename from app/storeroom/settings/dev.py rename to app/project_name/settings/dev.py diff --git a/app/storeroom/settings/prod.py b/app/project_name/settings/prod.py similarity index 100% rename from app/storeroom/settings/prod.py rename to app/project_name/settings/prod.py diff --git a/app/storeroom/urls.py b/app/project_name/urls.py similarity index 94% rename from app/storeroom/urls.py rename to app/project_name/urls.py index f93e42e..61760b6 100644 --- a/app/storeroom/urls.py +++ b/app/project_name/urls.py @@ -1,5 +1,5 @@ """ -URL configuration for storeroom project. +URL configuration for project_name project. The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/4.2/topics/http/urls/ diff --git a/app/storeroom/wsgi.py b/app/project_name/wsgi.py similarity index 71% rename from app/storeroom/wsgi.py rename to app/project_name/wsgi.py index 80adf48..a13618a 100644 --- a/app/storeroom/wsgi.py +++ b/app/project_name/wsgi.py @@ -1,5 +1,5 @@ """ -WSGI config for storeroom project. +WSGI config for project_name project. It exposes the WSGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ from django.core.wsgi import get_wsgi_application -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "storeroom.settings.dev") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_name.settings.dev") application = get_wsgi_application() diff --git a/app/pytest.ini b/app/pytest.ini index d884a87..36bd047 100644 --- a/app/pytest.ini +++ b/app/pytest.ini @@ -1,2 +1,2 @@ [pytest] -DJANGO_SETTINGS_MODULE = storeroom.settings.dev +DJANGO_SETTINGS_MODULE = project_name.settings.dev