progress on conversion to tailwind

This commit is contained in:
badblocks 2025-03-06 21:28:36 -08:00
parent 6a872124c6
commit 6e2843c60e
110 changed files with 4997 additions and 1691 deletions

View file

@ -3,7 +3,6 @@ from pathlib import Path
# 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/dev/howto/deployment/checklist/
@ -11,13 +10,15 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "django-insecure-0peo@#x9jur3!h$ryje!$879xww8y1y66jx!%*#ymhg&jkozs2"
# Resend API Key
RESEND_API_KEY = "re_BBXJWctP_8gb4iNpfaHuau7Na95mc3feu"
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "pocket-trade-dev.fly.dev"]
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "pkmntradeclub.fly.dev", "pkmntrade.club"]
# Application definition
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
@ -35,7 +36,7 @@ INSTALLED_APPS = [
"allauth.account",
'allauth.socialaccount.providers.google',
"crispy_forms",
"crispy_bootstrap5",
"crispy_tailwind",
"debug_toolbar",
"el_pagination",
"tailwind",
@ -45,7 +46,7 @@ INSTALLED_APPS = [
"cards",
"home",
"trades.apps.TradesConfig",
"friend_codes"
"widget_tweaks",
]
TAILWIND_APP_NAME = 'theme'
@ -67,7 +68,7 @@ MIDDLEWARE = [
]
DAISY_SETTINGS = {
'SITE_TITLE': 'Pocket.Trade Admin',
'SITE_TITLE': 'PKMN Trade Club Admin',
'DONT_SUPPORT_ME': True,
}
@ -81,8 +82,7 @@ WSGI_APPLICATION = "django_project.wsgi.application"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
#"DIRS": [BASE_DIR / "templates"],
"DIRS": [BASE_DIR / "theme", BASE_DIR / "templates"],
"DIRS": [BASE_DIR / "theme/templates", BASE_DIR / "theme"],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
@ -105,25 +105,25 @@ TEMPLATES = [
# For Docker/PostgreSQL usage uncomment this and comment the DATABASES config above
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "postgres",
"PASSWORD": "postgres",
"HOST": "db", # set in docker-compose.yml
"PORT": 5432, # default postgres port
},
"neon": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "pocket-trade",
"USER": "pocket_trade_owner",
"PASSWORD": "npg_f1lTpOX7Rnvb",
"HOST": "ep-cool-cake-a6zvgu85-pooler.us-west-2.aws.neon.tech", # set in docker-compose.yml
"PORT": 5432, # default postgres port
"OPTIONS": {
"sslmode": "require"
},
}
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "postgres",
"PASSWORD": "",
"HOST": "db", # set in docker-compose.yml
"PORT": 5432, # default postgres port
},
"neon": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "pocket-trade",
"USER": "pocket_trade_owner",
"PASSWORD": "npg_f1lTpOX7Rnvb",
"HOST": "ep-cool-cake-a6zvgu85-pooler.us-west-2.aws.neon.tech", # set in docker-compose.yml
"PORT": 5432, # default postgres port
"OPTIONS": {
"sslmode": "require"
},
}
}
# Password validation
@ -189,14 +189,19 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# django-crispy-forms
# https://django-crispy-forms.readthedocs.io/en/latest/install.html#template-packs
CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap5'
CRISPY_TEMPLATE_PACK = "bootstrap5"
CRISPY_ALLOWED_TEMPLATE_PACKS = 'tailwind'#'bootstrap5'
CRISPY_TEMPLATE_PACK = "tailwind"#"bootstrap5"
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
EMAIL_HOST = "smtp.resend.com"
EMAIL_PORT = 587
EMAIL_HOST_USER = "resend"
EMAIL_HOST_PASSWORD = RESEND_API_KEY
EMAIL_USE_TLS = True
# https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email
DEFAULT_FROM_EMAIL = "root@localhost"
DEFAULT_FROM_EMAIL = "noreply@pkmntrade.club"
# django-debug-toolbar
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html
@ -226,14 +231,17 @@ AUTHENTICATION_BACKENDS = (
# https://django-allauth.readthedocs.io/en/latest/configuration.html
ACCOUNT_SESSION_REMEMBER = True
ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = False
ACCOUNT_USERNAME_REQUIRED = False
ACCOUNT_AUTHENTICATION_METHOD = "email"
ACCOUNT_EMAIL_REQUIRED = True
#ACCOUNT_EMAIL_VERIFICATION = "mandatory"
ACCOUNT_EMAIL_VERIFICATION = "none"
ACCOUNT_CHANGE_EMAIL = True
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_SIGNUP_FORM_HONEYPOT_FIELD = "friend_code"
ACCOUNT_SIGNUP_FORM_HONEYPOT_FIELD = "in_game_username"
ACCOUNT_USERNAME_REQUIRED = False
ACCOUNT_FORMS = {
"signup": "accounts.forms.CustomSignupForm",
}
SOCIALACCOUNT_EMAIL_AUTHENTICATION = True
SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT = True
SOCIALACCOUNT_ONLY = False