Skip to content

Commit

Permalink
Delete unnecessary files and add new components
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasTischer committed Dec 12, 2023
1 parent 23e4eb0 commit 696acf2
Show file tree
Hide file tree
Showing 241 changed files with 13,160 additions and 630 deletions.
10 changes: 8 additions & 2 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,14 @@ dmypy.json
# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained 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/

# End of https://www.toptal.com/developers/gitignore/api/django

.vscode
.DS_Store

*_cache
Empty file removed backend/backend/__init__.py
Empty file.
6 changes: 0 additions & 6 deletions backend/core/apps.py

This file was deleted.

4 changes: 2 additions & 2 deletions backend/backend/asgi.py → backend/core/asgi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
ASGI config for backend project.
ASGI config for core project.
It exposes the ASGI callable as a module-level variable named ``application``.
Expand All @@ -11,6 +11,6 @@

from django.core.asgi import get_asgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backend.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")

application = get_asgi_application()
Empty file.
Empty file.
26 changes: 0 additions & 26 deletions backend/core/management/commands/wait_for_db.py

This file was deleted.

46 changes: 0 additions & 46 deletions backend/core/migrations/0001_initial.py

This file was deleted.

Empty file.
19 changes: 12 additions & 7 deletions backend/backend/settings.py → backend/core/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Django settings for backend project.
Django settings for core project.
Generated by 'django-admin startproject' using Django 4.2.1.
Expand Down Expand Up @@ -50,7 +50,6 @@
"django.contrib.staticfiles",
"corsheaders",
"rest_framework",
"core",
"djoser",
"storages",
"social_django",
Expand All @@ -69,7 +68,7 @@
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]

ROOT_URLCONF = "backend.urls"
ROOT_URLCONF = "core.urls"

TEMPLATES = [
{
Expand All @@ -87,7 +86,7 @@
},
]

WSGI_APPLICATION = "backend.wsgi.application"
WSGI_APPLICATION = "core.wsgi.application"


# Database
Expand Down Expand Up @@ -120,7 +119,7 @@
USE_SES_V2 = True

DOMAIN = getenv("DOMAIN")
SITE_NAME = "Full Auth"
SITE_NAME = "Tutorial App"

# Password validation
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators
Expand Down Expand Up @@ -179,18 +178,19 @@

AUTHENTICATION_BACKENDS = [
"social_core.backends.google.GoogleOAuth2",
"social_core.backends.facebook.FacebookOAuth2",
"django.contrib.auth.backends.ModelBackend",
]


DJOSER = {
"PASSWORD_RESET_CONFIRM_URL": "password-reset/{uid}/{token}",
"SEND_ACTIVATION_EMAIL": False, # Change this if you want to send activation email
"SEND_ACTIVATION_EMAIL": False,
"ACTIVATION_URL": "activation/{uid}/{token}",
"USER_CREATE_PASSWORD_RETYPE": True,
"PASSWORD_RESET_CONFIRM_RETYPE": True,
"TOKEN_MODEL": None,
"SOCIAL_AUTH_ALLOWED_REDIRECT_URIS": getenv("REDIRECT_URLS", "").split(","),
"SOCIAL_AUTH_ALLOWED_REDIRECT_URIS": getenv("REDIRECT_URLS").split(","),
}

AUTH_COOKIE = "access"
Expand All @@ -209,6 +209,11 @@
]
SOCIAL_AUTH_GOOGLE_OAUTH2_EXTRA_DATA = ["first_name", "last_name"]

SOCIAL_AUTH_FACEBOOK_KEY = getenv("FACEBOOK_AUTH_KEY")
SOCIAL_AUTH_FACEBOOK_SECRET = getenv("FACEBOOK_AUTH_SECRET_KEY")
SOCIAL_AUTH_FACEBOOK_SCOPE = ["email"]
SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = {"fields": "email, first_name, last_name"}

CORS_ALLOWED_ORIGINS = getenv(
"CORS_ALLOWED_ORIGINS", "http://localhost:3000,http://127.0.0.1:3000"
).split(",")
Expand Down
Empty file removed backend/core/tests/__init__.py
Empty file.
34 changes: 0 additions & 34 deletions backend/core/tests/test_commands.py

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions backend/backend/wsgi.py → backend/core/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
WSGI config for backend project.
WSGI config for core project.
It exposes the WSGI callable as a module-level variable named ``application``.
Expand All @@ -11,6 +11,6 @@

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backend.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")

application = get_wsgi_application()
2 changes: 1 addition & 1 deletion backend/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backend.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
Expand Down
Loading

0 comments on commit 696acf2

Please sign in to comment.