From 21aafa8181e729945756d40b699352019541f5fd Mon Sep 17 00:00:00 2001 From: Santosh Purbey Date: Mon, 30 Aug 2021 02:52:21 +0545 Subject: [PATCH 1/3] PLAT-5595: Modularize the backend scaffold folder structure --- .../{ => backend}/.dockerignore | 0 .../{ => backend}/.env.example | 0 .../{ => backend}/.gitignore | 0 .../{ => backend}/Dockerfile | 0 {{cookiecutter.project_slug}}/{ => backend}/Pipfile | 0 .../{ => backend}/Pipfile.lock | 0 .../{ => backend}/docker-compose.override.yml | 0 .../{ => backend}/docker-compose.yml | 0 .../{ => backend}/home/__init__.py | 0 .../{ => backend}/home/admin.py | 0 .../{ => backend}/home/api/__init__.py | 0 .../{ => backend}/home/api/v1/__init__.py | 0 .../{ => backend}/home/api/v1/serializers.py | 0 .../{ => backend}/home/api/v1/urls.py | 0 .../{ => backend}/home/api/v1/viewsets.py | 0 .../{ => backend}/home/apps.py | 0 .../{ => backend}/home/management/__init__.py | 0 .../home/management/commands/__init__.py | 0 .../home/management/commands/createsuperuserauto.py | 0 .../management/commands/customchangepassword.py | 0 .../management/commands/generate_project_report.py | 0 .../home/migrations/0001_load_initial_data.py | 0 .../{ => backend}/home/migrations/__init__.py | 0 .../{ => backend}/home/models.py | 0 .../{ => backend}/home/storage_backends.py | 0 .../{ => backend}/home/templates/account/login.html | 0 .../home/templates/account/logout.html | 0 .../home/templates/account/signup.html | 0 .../{ => backend}/home/templates/base.html | 0 .../{ => backend}/home/templates/home/index.html | 0 .../home/templates/users/user_detail.html | 0 .../home/templates/users/user_form.html | 0 .../{ => backend}/home/tests.py | 0 .../{ => backend}/home/urls.py | 0 .../{ => backend}/home/views.py | 0 .../{ => backend}/manage.py | 0 .../{ => backend}/modules/__init__.py | 0 .../{ => backend}/modules/admin.py | 0 .../{ => backend}/modules/apps.py | 0 .../{ => backend}/modules/manifest.py | 0 .../{ => backend}/modules/migrations/__init__.py | 0 .../{ => backend}/modules/urls.py | 0 .../{ => backend}/static/css/main.css | 0 .../{ => backend}/static/img/slack-app-pencil.png | Bin .../{ => backend}/users/__init__.py | 0 .../{ => backend}/users/adapters.py | 0 .../{ => backend}/users/admin.py | 0 .../{ => backend}/users/apps.py | 0 .../{ => backend}/users/forms.py | 0 .../{ => backend}/users/migrations/0001_initial.py | 0 .../{ => backend}/users/migrations/__init__.py | 0 .../{ => backend}/users/models.py | 0 .../{ => backend}/users/tests/__init__.py | 0 .../{ => backend}/users/tests/factories.py | 0 .../{ => backend}/users/tests/test_forms.py | 0 .../{ => backend}/users/tests/test_models.py | 0 .../{ => backend}/users/tests/test_urls.py | 0 .../{ => backend}/users/tests/test_views.py | 0 .../{ => backend}/users/urls.py | 0 .../{ => backend}/users/views.py | 0 .../{ => backend}/web_build/index.html | 0 .../{ => backend}/web_build/static/.keep | 0 .../{{cookiecutter.project_slug}}/__init__.py | 0 .../{{cookiecutter.project_slug}}/settings.py | 0 .../{{cookiecutter.project_slug}}/urls.py | 0 .../{{cookiecutter.project_slug}}/wsgi.py | 0 66 files changed, 0 insertions(+), 0 deletions(-) rename {{cookiecutter.project_slug}}/{ => backend}/.dockerignore (100%) rename {{cookiecutter.project_slug}}/{ => backend}/.env.example (100%) rename {{cookiecutter.project_slug}}/{ => backend}/.gitignore (100%) rename {{cookiecutter.project_slug}}/{ => backend}/Dockerfile (100%) rename {{cookiecutter.project_slug}}/{ => backend}/Pipfile (100%) rename {{cookiecutter.project_slug}}/{ => backend}/Pipfile.lock (100%) rename {{cookiecutter.project_slug}}/{ => backend}/docker-compose.override.yml (100%) rename {{cookiecutter.project_slug}}/{ => backend}/docker-compose.yml (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/admin.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/api/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/api/v1/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/api/v1/serializers.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/api/v1/urls.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/api/v1/viewsets.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/apps.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/management/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/management/commands/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/management/commands/createsuperuserauto.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/management/commands/customchangepassword.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/management/commands/generate_project_report.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/migrations/0001_load_initial_data.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/migrations/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/models.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/storage_backends.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/templates/account/login.html (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/templates/account/logout.html (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/templates/account/signup.html (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/templates/base.html (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/templates/home/index.html (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/templates/users/user_detail.html (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/templates/users/user_form.html (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/tests.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/urls.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/home/views.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/manage.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/modules/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/modules/admin.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/modules/apps.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/modules/manifest.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/modules/migrations/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/modules/urls.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/static/css/main.css (100%) rename {{cookiecutter.project_slug}}/{ => backend}/static/img/slack-app-pencil.png (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/adapters.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/admin.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/apps.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/forms.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/migrations/0001_initial.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/migrations/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/models.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/tests/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/tests/factories.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/tests/test_forms.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/tests/test_models.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/tests/test_urls.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/tests/test_views.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/urls.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/users/views.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/web_build/index.html (100%) rename {{cookiecutter.project_slug}}/{ => backend}/web_build/static/.keep (100%) rename {{cookiecutter.project_slug}}/{ => backend}/{{cookiecutter.project_slug}}/__init__.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/{{cookiecutter.project_slug}}/settings.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/{{cookiecutter.project_slug}}/urls.py (100%) rename {{cookiecutter.project_slug}}/{ => backend}/{{cookiecutter.project_slug}}/wsgi.py (100%) diff --git a/{{cookiecutter.project_slug}}/.dockerignore b/{{cookiecutter.project_slug}}/backend/.dockerignore similarity index 100% rename from {{cookiecutter.project_slug}}/.dockerignore rename to {{cookiecutter.project_slug}}/backend/.dockerignore diff --git a/{{cookiecutter.project_slug}}/.env.example b/{{cookiecutter.project_slug}}/backend/.env.example similarity index 100% rename from {{cookiecutter.project_slug}}/.env.example rename to {{cookiecutter.project_slug}}/backend/.env.example diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/backend/.gitignore similarity index 100% rename from {{cookiecutter.project_slug}}/.gitignore rename to {{cookiecutter.project_slug}}/backend/.gitignore diff --git a/{{cookiecutter.project_slug}}/Dockerfile b/{{cookiecutter.project_slug}}/backend/Dockerfile similarity index 100% rename from {{cookiecutter.project_slug}}/Dockerfile rename to {{cookiecutter.project_slug}}/backend/Dockerfile diff --git a/{{cookiecutter.project_slug}}/Pipfile b/{{cookiecutter.project_slug}}/backend/Pipfile similarity index 100% rename from {{cookiecutter.project_slug}}/Pipfile rename to {{cookiecutter.project_slug}}/backend/Pipfile diff --git a/{{cookiecutter.project_slug}}/Pipfile.lock b/{{cookiecutter.project_slug}}/backend/Pipfile.lock similarity index 100% rename from {{cookiecutter.project_slug}}/Pipfile.lock rename to {{cookiecutter.project_slug}}/backend/Pipfile.lock diff --git a/{{cookiecutter.project_slug}}/docker-compose.override.yml b/{{cookiecutter.project_slug}}/backend/docker-compose.override.yml similarity index 100% rename from {{cookiecutter.project_slug}}/docker-compose.override.yml rename to {{cookiecutter.project_slug}}/backend/docker-compose.override.yml diff --git a/{{cookiecutter.project_slug}}/docker-compose.yml b/{{cookiecutter.project_slug}}/backend/docker-compose.yml similarity index 100% rename from {{cookiecutter.project_slug}}/docker-compose.yml rename to {{cookiecutter.project_slug}}/backend/docker-compose.yml diff --git a/{{cookiecutter.project_slug}}/home/__init__.py b/{{cookiecutter.project_slug}}/backend/home/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/__init__.py rename to {{cookiecutter.project_slug}}/backend/home/__init__.py diff --git a/{{cookiecutter.project_slug}}/home/admin.py b/{{cookiecutter.project_slug}}/backend/home/admin.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/admin.py rename to {{cookiecutter.project_slug}}/backend/home/admin.py diff --git a/{{cookiecutter.project_slug}}/home/api/__init__.py b/{{cookiecutter.project_slug}}/backend/home/api/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/api/__init__.py rename to {{cookiecutter.project_slug}}/backend/home/api/__init__.py diff --git a/{{cookiecutter.project_slug}}/home/api/v1/__init__.py b/{{cookiecutter.project_slug}}/backend/home/api/v1/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/api/v1/__init__.py rename to {{cookiecutter.project_slug}}/backend/home/api/v1/__init__.py diff --git a/{{cookiecutter.project_slug}}/home/api/v1/serializers.py b/{{cookiecutter.project_slug}}/backend/home/api/v1/serializers.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/api/v1/serializers.py rename to {{cookiecutter.project_slug}}/backend/home/api/v1/serializers.py diff --git a/{{cookiecutter.project_slug}}/home/api/v1/urls.py b/{{cookiecutter.project_slug}}/backend/home/api/v1/urls.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/api/v1/urls.py rename to {{cookiecutter.project_slug}}/backend/home/api/v1/urls.py diff --git a/{{cookiecutter.project_slug}}/home/api/v1/viewsets.py b/{{cookiecutter.project_slug}}/backend/home/api/v1/viewsets.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/api/v1/viewsets.py rename to {{cookiecutter.project_slug}}/backend/home/api/v1/viewsets.py diff --git a/{{cookiecutter.project_slug}}/home/apps.py b/{{cookiecutter.project_slug}}/backend/home/apps.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/apps.py rename to {{cookiecutter.project_slug}}/backend/home/apps.py diff --git a/{{cookiecutter.project_slug}}/home/management/__init__.py b/{{cookiecutter.project_slug}}/backend/home/management/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/management/__init__.py rename to {{cookiecutter.project_slug}}/backend/home/management/__init__.py diff --git a/{{cookiecutter.project_slug}}/home/management/commands/__init__.py b/{{cookiecutter.project_slug}}/backend/home/management/commands/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/management/commands/__init__.py rename to {{cookiecutter.project_slug}}/backend/home/management/commands/__init__.py diff --git a/{{cookiecutter.project_slug}}/home/management/commands/createsuperuserauto.py b/{{cookiecutter.project_slug}}/backend/home/management/commands/createsuperuserauto.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/management/commands/createsuperuserauto.py rename to {{cookiecutter.project_slug}}/backend/home/management/commands/createsuperuserauto.py diff --git a/{{cookiecutter.project_slug}}/home/management/commands/customchangepassword.py b/{{cookiecutter.project_slug}}/backend/home/management/commands/customchangepassword.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/management/commands/customchangepassword.py rename to {{cookiecutter.project_slug}}/backend/home/management/commands/customchangepassword.py diff --git a/{{cookiecutter.project_slug}}/home/management/commands/generate_project_report.py b/{{cookiecutter.project_slug}}/backend/home/management/commands/generate_project_report.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/management/commands/generate_project_report.py rename to {{cookiecutter.project_slug}}/backend/home/management/commands/generate_project_report.py diff --git a/{{cookiecutter.project_slug}}/home/migrations/0001_load_initial_data.py b/{{cookiecutter.project_slug}}/backend/home/migrations/0001_load_initial_data.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/migrations/0001_load_initial_data.py rename to {{cookiecutter.project_slug}}/backend/home/migrations/0001_load_initial_data.py diff --git a/{{cookiecutter.project_slug}}/home/migrations/__init__.py b/{{cookiecutter.project_slug}}/backend/home/migrations/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/migrations/__init__.py rename to {{cookiecutter.project_slug}}/backend/home/migrations/__init__.py diff --git a/{{cookiecutter.project_slug}}/home/models.py b/{{cookiecutter.project_slug}}/backend/home/models.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/models.py rename to {{cookiecutter.project_slug}}/backend/home/models.py diff --git a/{{cookiecutter.project_slug}}/home/storage_backends.py b/{{cookiecutter.project_slug}}/backend/home/storage_backends.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/storage_backends.py rename to {{cookiecutter.project_slug}}/backend/home/storage_backends.py diff --git a/{{cookiecutter.project_slug}}/home/templates/account/login.html b/{{cookiecutter.project_slug}}/backend/home/templates/account/login.html similarity index 100% rename from {{cookiecutter.project_slug}}/home/templates/account/login.html rename to {{cookiecutter.project_slug}}/backend/home/templates/account/login.html diff --git a/{{cookiecutter.project_slug}}/home/templates/account/logout.html b/{{cookiecutter.project_slug}}/backend/home/templates/account/logout.html similarity index 100% rename from {{cookiecutter.project_slug}}/home/templates/account/logout.html rename to {{cookiecutter.project_slug}}/backend/home/templates/account/logout.html diff --git a/{{cookiecutter.project_slug}}/home/templates/account/signup.html b/{{cookiecutter.project_slug}}/backend/home/templates/account/signup.html similarity index 100% rename from {{cookiecutter.project_slug}}/home/templates/account/signup.html rename to {{cookiecutter.project_slug}}/backend/home/templates/account/signup.html diff --git a/{{cookiecutter.project_slug}}/home/templates/base.html b/{{cookiecutter.project_slug}}/backend/home/templates/base.html similarity index 100% rename from {{cookiecutter.project_slug}}/home/templates/base.html rename to {{cookiecutter.project_slug}}/backend/home/templates/base.html diff --git a/{{cookiecutter.project_slug}}/home/templates/home/index.html b/{{cookiecutter.project_slug}}/backend/home/templates/home/index.html similarity index 100% rename from {{cookiecutter.project_slug}}/home/templates/home/index.html rename to {{cookiecutter.project_slug}}/backend/home/templates/home/index.html diff --git a/{{cookiecutter.project_slug}}/home/templates/users/user_detail.html b/{{cookiecutter.project_slug}}/backend/home/templates/users/user_detail.html similarity index 100% rename from {{cookiecutter.project_slug}}/home/templates/users/user_detail.html rename to {{cookiecutter.project_slug}}/backend/home/templates/users/user_detail.html diff --git a/{{cookiecutter.project_slug}}/home/templates/users/user_form.html b/{{cookiecutter.project_slug}}/backend/home/templates/users/user_form.html similarity index 100% rename from {{cookiecutter.project_slug}}/home/templates/users/user_form.html rename to {{cookiecutter.project_slug}}/backend/home/templates/users/user_form.html diff --git a/{{cookiecutter.project_slug}}/home/tests.py b/{{cookiecutter.project_slug}}/backend/home/tests.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/tests.py rename to {{cookiecutter.project_slug}}/backend/home/tests.py diff --git a/{{cookiecutter.project_slug}}/home/urls.py b/{{cookiecutter.project_slug}}/backend/home/urls.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/urls.py rename to {{cookiecutter.project_slug}}/backend/home/urls.py diff --git a/{{cookiecutter.project_slug}}/home/views.py b/{{cookiecutter.project_slug}}/backend/home/views.py similarity index 100% rename from {{cookiecutter.project_slug}}/home/views.py rename to {{cookiecutter.project_slug}}/backend/home/views.py diff --git a/{{cookiecutter.project_slug}}/manage.py b/{{cookiecutter.project_slug}}/backend/manage.py similarity index 100% rename from {{cookiecutter.project_slug}}/manage.py rename to {{cookiecutter.project_slug}}/backend/manage.py diff --git a/{{cookiecutter.project_slug}}/modules/__init__.py b/{{cookiecutter.project_slug}}/backend/modules/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/modules/__init__.py rename to {{cookiecutter.project_slug}}/backend/modules/__init__.py diff --git a/{{cookiecutter.project_slug}}/modules/admin.py b/{{cookiecutter.project_slug}}/backend/modules/admin.py similarity index 100% rename from {{cookiecutter.project_slug}}/modules/admin.py rename to {{cookiecutter.project_slug}}/backend/modules/admin.py diff --git a/{{cookiecutter.project_slug}}/modules/apps.py b/{{cookiecutter.project_slug}}/backend/modules/apps.py similarity index 100% rename from {{cookiecutter.project_slug}}/modules/apps.py rename to {{cookiecutter.project_slug}}/backend/modules/apps.py diff --git a/{{cookiecutter.project_slug}}/modules/manifest.py b/{{cookiecutter.project_slug}}/backend/modules/manifest.py similarity index 100% rename from {{cookiecutter.project_slug}}/modules/manifest.py rename to {{cookiecutter.project_slug}}/backend/modules/manifest.py diff --git a/{{cookiecutter.project_slug}}/modules/migrations/__init__.py b/{{cookiecutter.project_slug}}/backend/modules/migrations/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/modules/migrations/__init__.py rename to {{cookiecutter.project_slug}}/backend/modules/migrations/__init__.py diff --git a/{{cookiecutter.project_slug}}/modules/urls.py b/{{cookiecutter.project_slug}}/backend/modules/urls.py similarity index 100% rename from {{cookiecutter.project_slug}}/modules/urls.py rename to {{cookiecutter.project_slug}}/backend/modules/urls.py diff --git a/{{cookiecutter.project_slug}}/static/css/main.css b/{{cookiecutter.project_slug}}/backend/static/css/main.css similarity index 100% rename from {{cookiecutter.project_slug}}/static/css/main.css rename to {{cookiecutter.project_slug}}/backend/static/css/main.css diff --git a/{{cookiecutter.project_slug}}/static/img/slack-app-pencil.png b/{{cookiecutter.project_slug}}/backend/static/img/slack-app-pencil.png similarity index 100% rename from {{cookiecutter.project_slug}}/static/img/slack-app-pencil.png rename to {{cookiecutter.project_slug}}/backend/static/img/slack-app-pencil.png diff --git a/{{cookiecutter.project_slug}}/users/__init__.py b/{{cookiecutter.project_slug}}/backend/users/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/__init__.py rename to {{cookiecutter.project_slug}}/backend/users/__init__.py diff --git a/{{cookiecutter.project_slug}}/users/adapters.py b/{{cookiecutter.project_slug}}/backend/users/adapters.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/adapters.py rename to {{cookiecutter.project_slug}}/backend/users/adapters.py diff --git a/{{cookiecutter.project_slug}}/users/admin.py b/{{cookiecutter.project_slug}}/backend/users/admin.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/admin.py rename to {{cookiecutter.project_slug}}/backend/users/admin.py diff --git a/{{cookiecutter.project_slug}}/users/apps.py b/{{cookiecutter.project_slug}}/backend/users/apps.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/apps.py rename to {{cookiecutter.project_slug}}/backend/users/apps.py diff --git a/{{cookiecutter.project_slug}}/users/forms.py b/{{cookiecutter.project_slug}}/backend/users/forms.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/forms.py rename to {{cookiecutter.project_slug}}/backend/users/forms.py diff --git a/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py b/{{cookiecutter.project_slug}}/backend/users/migrations/0001_initial.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/migrations/0001_initial.py rename to {{cookiecutter.project_slug}}/backend/users/migrations/0001_initial.py diff --git a/{{cookiecutter.project_slug}}/users/migrations/__init__.py b/{{cookiecutter.project_slug}}/backend/users/migrations/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/migrations/__init__.py rename to {{cookiecutter.project_slug}}/backend/users/migrations/__init__.py diff --git a/{{cookiecutter.project_slug}}/users/models.py b/{{cookiecutter.project_slug}}/backend/users/models.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/models.py rename to {{cookiecutter.project_slug}}/backend/users/models.py diff --git a/{{cookiecutter.project_slug}}/users/tests/__init__.py b/{{cookiecutter.project_slug}}/backend/users/tests/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/tests/__init__.py rename to {{cookiecutter.project_slug}}/backend/users/tests/__init__.py diff --git a/{{cookiecutter.project_slug}}/users/tests/factories.py b/{{cookiecutter.project_slug}}/backend/users/tests/factories.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/tests/factories.py rename to {{cookiecutter.project_slug}}/backend/users/tests/factories.py diff --git a/{{cookiecutter.project_slug}}/users/tests/test_forms.py b/{{cookiecutter.project_slug}}/backend/users/tests/test_forms.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/tests/test_forms.py rename to {{cookiecutter.project_slug}}/backend/users/tests/test_forms.py diff --git a/{{cookiecutter.project_slug}}/users/tests/test_models.py b/{{cookiecutter.project_slug}}/backend/users/tests/test_models.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/tests/test_models.py rename to {{cookiecutter.project_slug}}/backend/users/tests/test_models.py diff --git a/{{cookiecutter.project_slug}}/users/tests/test_urls.py b/{{cookiecutter.project_slug}}/backend/users/tests/test_urls.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/tests/test_urls.py rename to {{cookiecutter.project_slug}}/backend/users/tests/test_urls.py diff --git a/{{cookiecutter.project_slug}}/users/tests/test_views.py b/{{cookiecutter.project_slug}}/backend/users/tests/test_views.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/tests/test_views.py rename to {{cookiecutter.project_slug}}/backend/users/tests/test_views.py diff --git a/{{cookiecutter.project_slug}}/users/urls.py b/{{cookiecutter.project_slug}}/backend/users/urls.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/urls.py rename to {{cookiecutter.project_slug}}/backend/users/urls.py diff --git a/{{cookiecutter.project_slug}}/users/views.py b/{{cookiecutter.project_slug}}/backend/users/views.py similarity index 100% rename from {{cookiecutter.project_slug}}/users/views.py rename to {{cookiecutter.project_slug}}/backend/users/views.py diff --git a/{{cookiecutter.project_slug}}/web_build/index.html b/{{cookiecutter.project_slug}}/backend/web_build/index.html similarity index 100% rename from {{cookiecutter.project_slug}}/web_build/index.html rename to {{cookiecutter.project_slug}}/backend/web_build/index.html diff --git a/{{cookiecutter.project_slug}}/web_build/static/.keep b/{{cookiecutter.project_slug}}/backend/web_build/static/.keep similarity index 100% rename from {{cookiecutter.project_slug}}/web_build/static/.keep rename to {{cookiecutter.project_slug}}/backend/web_build/static/.keep diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__init__.py b/{{cookiecutter.project_slug}}/backend/{{cookiecutter.project_slug}}/__init__.py similarity index 100% rename from {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__init__.py rename to {{cookiecutter.project_slug}}/backend/{{cookiecutter.project_slug}}/__init__.py diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/settings.py b/{{cookiecutter.project_slug}}/backend/{{cookiecutter.project_slug}}/settings.py similarity index 100% rename from {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/settings.py rename to {{cookiecutter.project_slug}}/backend/{{cookiecutter.project_slug}}/settings.py diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/urls.py b/{{cookiecutter.project_slug}}/backend/{{cookiecutter.project_slug}}/urls.py similarity index 100% rename from {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/urls.py rename to {{cookiecutter.project_slug}}/backend/{{cookiecutter.project_slug}}/urls.py diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/wsgi.py b/{{cookiecutter.project_slug}}/backend/{{cookiecutter.project_slug}}/wsgi.py similarity index 100% rename from {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/wsgi.py rename to {{cookiecutter.project_slug}}/backend/{{cookiecutter.project_slug}}/wsgi.py From 8fc6a0d8dc0f7b6ddce0aadb81714a71fde91c6a Mon Sep 17 00:00:00 2001 From: Santosh Purbey Date: Mon, 30 Aug 2021 03:13:22 +0545 Subject: [PATCH 2/3] PLAT-5595: Update README.md with backend scaffold structure --- .../.github/dependabot.yml | 2 +- {{cookiecutter.project_slug}}/README.md | 82 ++++++++++++++----- {{cookiecutter.project_slug}}/heroku.yml | 2 +- 3 files changed, 64 insertions(+), 22 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.github/dependabot.yml b/{{cookiecutter.project_slug}}/.github/dependabot.yml index f4247bd7..402d78f4 100644 --- a/{{cookiecutter.project_slug}}/.github/dependabot.yml +++ b/{{cookiecutter.project_slug}}/.github/dependabot.yml @@ -1,7 +1,7 @@ version: 2 updates: - package-ecosystem: pip - directory: "/" + directory: "/backend" schedule: interval: weekly day: sunday diff --git a/{{cookiecutter.project_slug}}/README.md b/{{cookiecutter.project_slug}}/README.md index 879c27e1..35b59884 100644 --- a/{{cookiecutter.project_slug}}/README.md +++ b/{{cookiecutter.project_slug}}/README.md @@ -1,30 +1,66 @@ # {{cookiecutter.project_slug}} -This is a repository for a web application developed with Django, built with [Crowdbotics](https://crowdbotics.com) +Welcome to your new Crowdbotics app. This is a repository for a web application developed with Django, built with [Crowdbotics](https://crowdbotics.com) +## What is Crowdbotics? + +Crowdbotics is an easy way to build software applications of all kinds. You can build production, high-caliber software applications in minutes, rather than weeks or months, even if you're not a software developer. + +The reason this works is that most software applications and features we want to build are similar to applications that have been built before. We've crawled hundreds of thousands of public code repositories to teach the Crowdbotics engine how to create software. + +As a result, Crowdbotics can generate new applications automatically in a standardized way. ## Table of Contents -1. [Project Structure](#project-structure) -2. [Features](#features) -3. [Getting Started: Backend](#getting-started-backend) - - [Docker Setup (recommended)](#docker-setup-recommended) - - [Local Setup](#local-setup-alternative-to-docker) -4. [Usage](#usage) - - [Admin Panel](#admin-panel) - - [API Documentation](#api-documentation) +- [{{cookiecutter.project_slug}}](#cookiecutterproject_slug) + - [What is Crowdbotics?](#what-is-crowdbotics) + - [Table of Contents](#table-of-contents) + - [Useful Links](#useful-links) + - [Project Description](#project-description) + - [Project Structure](#project-structure) + - [Features](#features) +- [Getting Started: Backend](#getting-started-backend) + - [Docker Setup (Recommended)](#docker-setup-recommended) + - [Local Setup (Alternative to Docker)](#local-setup-alternative-to-docker) + - [Installation](#installation) + - [Getting Started](#getting-started) +- [Usage](#usage) + - [Admin Panel](#admin-panel) + - [API Documentation](#api-documentation) +- [License](#license) + +### Useful Links + +- [App Dashboard](https://app.crowdbotics.com/) +- [Knowledgebase](https://knowledge.crowdbotics.com/) +- [Developer Training](https://knowledge.crowdbotics.com/crowdbotics-developer-training) +- [Forum](https://discuss.crowdbotics.com/) +- [Tech Support](https://crowdbotics.slack.com/archives/CGSAV319V) + +## Project Description + +{{cookiecutter.project_description}} ## Project Structure - .. - ├── home # Starter home app - ├── modules # Crowdbotics Modules app - ├── {{cookiecutter.project_slug}} # Django project configurations - ├── static # Static assets - ├── users # Starter users app - ├── web_build # React Native Web build - ├── ... + . + ├── .github + │   └── dependabot.yml ├── README.md - └── ... + ├── backend + │   ├── .env.example + │   ├── Dockerfile + │   ├── Pipfile + │   ├── docker-compose.override.yml + │   ├── docker-compose.yml + │   ├── home # Starter home app + │   ├── manage.py + │   ├── modules # Crowdbotics Modules app + │   ├── static # Static assets + │   ├── users # Starter users app + │   ├── web_build # React Native Web build + │   └── {{cookiecutter.project_slug}} # Django project configurations + └── heroku.yml + ## Features @@ -50,7 +86,7 @@ This project is set up to run using [Docker Compose](https://docs.docker.com/com 1. Install Docker: - Linux - [get.docker.com](https://get.docker.com/) - Windows or MacOS - [Docker Desktop](https://www.docker.com/products/docker-desktop) -1. Clone this repo and `cd {{cookiecutter.project_slug}}` +1. Clone this repo and `cd {{cookiecutter.project_slug}}/backend` 1. Make sure `Pipfile.lock` exists. If it doesn't, generate it with: ```sh $ docker run -it --rm -v "$PWD":/django -w /django python:3.7 pip3 install --no-cache-dir -q pipenv && pipenv lock @@ -90,7 +126,7 @@ This project is set up to run using [Docker Compose](https://docs.docker.com/com ### Installation 1. Install [pipenv](https://pypi.org/project/pipenv/) -2. Clone this repo and `cd {{cookiecutter.project_slug}}` +2. Clone this repo and `cd {{cookiecutter.project_slug}}/backend` 3. Run `pip install --user --upgrade pipenv` to get the latest pipenv version. 4. Run `pipenv --python 3.6` 5. Run `pipenv install` @@ -114,3 +150,9 @@ Admin Panel can be accessed through http://localhost:8000/admin/. If you are the ## API Documentation API Documentation is generated automatically and can be access through http://localhost:8000/api-docs/. Please make sure you are signed in to the admin panel before navigating to this page. + +# License + +The use of code in this repository is governed by Crowdbotics [Terms and Conditions](https://www.crowdbotics.com/terms-of-service). + +Created with ❤️ by [Crowdbotics](https://www.crowdbotics.com/) \ No newline at end of file diff --git a/{{cookiecutter.project_slug}}/heroku.yml b/{{cookiecutter.project_slug}}/heroku.yml index fd588a29..67146b4c 100644 --- a/{{cookiecutter.project_slug}}/heroku.yml +++ b/{{cookiecutter.project_slug}}/heroku.yml @@ -1,6 +1,6 @@ build: docker: - web: Dockerfile + web: ./backend/Dockerfile config: DEBUG_COLLECTSTATIC: 1 SECRET_KEY: build From 18efd693a107dccce0738816511876e41b05efc7 Mon Sep 17 00:00:00 2001 From: Santosh Purbey Date: Thu, 30 Dec 2021 13:48:43 +0545 Subject: [PATCH 3/3] PLAT-5595: unifiy gitignore and gitattributes --- .../backend/.gitattributes | 11 + .../backend/.gitignore | 189 +++++++++++++++++- 2 files changed, 196 insertions(+), 4 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/backend/.gitattributes diff --git a/{{cookiecutter.project_slug}}/backend/.gitattributes b/{{cookiecutter.project_slug}}/backend/.gitattributes new file mode 100644 index 00000000..3592e3c3 --- /dev/null +++ b/{{cookiecutter.project_slug}}/backend/.gitattributes @@ -0,0 +1,11 @@ +# Windows files should use crlf line endings +# https://help.github.com/articles/dealing-with-line-endings/ +*.bat text eol=crlf + +# Normalize line endings to avoid spurious failures in the core test suite on Windows. +*html text eol=lf +*css text eol=lf +*js text eol=lf +tests/staticfiles_tests/apps/test/static/test/*txt text eol=lf +tests/staticfiles_tests/project/documents/test/*txt text eol=lf +docs/releases/*.txt merge=union diff --git a/{{cookiecutter.project_slug}}/backend/.gitignore b/{{cookiecutter.project_slug}}/backend/.gitignore index 300ca1f8..e68e2247 100644 --- a/{{cookiecutter.project_slug}}/backend/.gitignore +++ b/{{cookiecutter.project_slug}}/backend/.gitignore @@ -1,6 +1,187 @@ -*.pyc -env/ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +*.keystore +!debug.keystore + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +*/fastlane/report.xml +*/fastlane/Preview.html +*/fastlane/screenshots + +# Bundle artifact +*.jsbundle + +# CocoaPods +/ios/Pods/ + +# ----------------------------------------------------------------------------- +# Python and Django gitignore +# ----------------------------------------------------------------------------- + + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST .terraform -.env + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ +tests/.coverage +tests/report/ +tests/coverage_html/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal staticfiles/ -postgres-data/ \ No newline at end of file + +# Postgress DB +postgres-data/ + +# Sphinx documentation +docs/_build/ +docs/locale/ + +# PyBuilder +.pybuilder/ +target/ + +# IPython +profile_default/ +ipython_config.py + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ \ No newline at end of file