finished conversion to tailwind
This commit is contained in:
parent
6e2843c60e
commit
d62956d465
50 changed files with 2490 additions and 1273 deletions
|
|
@ -18,8 +18,9 @@ RESEND_API_KEY = "re_BBXJWctP_8gb4iNpfaHuau7Na95mc3feu"
|
|||
DEBUG = True
|
||||
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
||||
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "pkmntradeclub.fly.dev", "pkmntrade.club"]
|
||||
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "pkmntrade-club.fly.dev", "pkmntrade.club"]
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = ["https://pkmntrade-club.fly.dev", "https://pkmntrade.club"]
|
||||
# Application definition
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
|
||||
INSTALLED_APPS = [
|
||||
|
|
@ -46,7 +47,6 @@ INSTALLED_APPS = [
|
|||
"cards",
|
||||
"home",
|
||||
"trades.apps.TradesConfig",
|
||||
"widget_tweaks",
|
||||
]
|
||||
|
||||
TAILWIND_APP_NAME = 'theme'
|
||||
|
|
@ -64,7 +64,7 @@ MIDDLEWARE = [
|
|||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||
"allauth.account.middleware.AccountMiddleware", # django-allauth
|
||||
"django_browser_reload.middleware.BrowserReloadMiddleware",
|
||||
"django_project.middleware.AutoLoginMiddleware",
|
||||
#"django_project.middleware.AutoLoginMiddleware",
|
||||
]
|
||||
|
||||
DAISY_SETTINGS = {
|
||||
|
|
@ -96,51 +96,43 @@ TEMPLATES = [
|
|||
]
|
||||
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#databases
|
||||
#DATABASES = {
|
||||
# "default": {
|
||||
# "ENGINE": "django.db.backends.sqlite3",
|
||||
# "NAME": BASE_DIR / "db.sqlite3",
|
||||
# }
|
||||
#}
|
||||
|
||||
# For Docker/PostgreSQL usage uncomment this and comment the DATABASES config above
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"local": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": "postgres",
|
||||
"USER": "postgres",
|
||||
"PASSWORD": "",
|
||||
"HOST": "db", # set in docker-compose.yml
|
||||
"HOST": "localhost", # set in docker-compose.yml
|
||||
"PORT": 5432, # default postgres port
|
||||
},
|
||||
"neon": {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": "pocket-trade",
|
||||
"NAME": "dev",
|
||||
"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"
|
||||
},
|
||||
"sslmode": "require"
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/dev/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",
|
||||
},
|
||||
# {
|
||||
# "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",
|
||||
# },
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -179,7 +171,7 @@ STORAGES = {
|
|||
"BACKEND": "django.core.files.storage.FileSystemStorage",
|
||||
},
|
||||
"staticfiles": {
|
||||
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
|
||||
"BACKEND": "whitenoise.storage.CompressedStaticFilesStorage",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -189,11 +181,11 @@ 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 = 'tailwind'#'bootstrap5'
|
||||
CRISPY_TEMPLATE_PACK = "tailwind"#"bootstrap5"
|
||||
CRISPY_ALLOWED_TEMPLATE_PACKS = 'tailwind'
|
||||
CRISPY_TEMPLATE_PACK = "tailwind"
|
||||
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
|
||||
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
||||
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
|
||||
EMAIL_HOST = "smtp.resend.com"
|
||||
EMAIL_PORT = 587
|
||||
EMAIL_HOST_USER = "resend"
|
||||
|
|
@ -206,9 +198,12 @@ DEFAULT_FROM_EMAIL = "noreply@pkmntrade.club"
|
|||
# django-debug-toolbar
|
||||
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#internal-ips
|
||||
INTERNAL_IPS = [
|
||||
"127.0.0.1",
|
||||
]
|
||||
import socket
|
||||
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
||||
INTERNAL_IPS = [ip[:-1] + "1" for ip in ips]
|
||||
INTERNAL_IPS.append([ip[:-1] + "1" for ip in ips])
|
||||
|
||||
# https://docs.djangoproject.com/en/dev/topics/auth/customizing/#substituting-a-custom-user-model
|
||||
AUTH_USER_MODEL = "accounts.CustomUser"
|
||||
|
|
@ -230,17 +225,18 @@ AUTHENTICATION_BACKENDS = (
|
|||
)
|
||||
# https://django-allauth.readthedocs.io/en/latest/configuration.html
|
||||
ACCOUNT_SESSION_REMEMBER = True
|
||||
ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = False
|
||||
ACCOUNT_AUTHENTICATION_METHOD = "email"
|
||||
ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = True
|
||||
ACCOUNT_AUTHENTICATION_METHOD = "username_email"
|
||||
ACCOUNT_EMAIL_REQUIRED = True
|
||||
#ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
||||
ACCOUNT_EMAIL_VERIFICATION = "none"
|
||||
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
||||
#ACCOUNT_EMAIL_VERIFICATION = "none"
|
||||
ACCOUNT_CHANGE_EMAIL = True
|
||||
ACCOUNT_UNIQUE_EMAIL = True
|
||||
ACCOUNT_SIGNUP_FORM_HONEYPOT_FIELD = "in_game_username"
|
||||
ACCOUNT_USERNAME_REQUIRED = False
|
||||
ACCOUNT_LOGIN_BY_CODE_ENABLED = True
|
||||
ACCOUNT_SIGNUP_FORM_HONEYPOT_FIELD = "in-game-username"
|
||||
ACCOUNT_USERNAME_REQUIRED = True
|
||||
ACCOUNT_FORMS = {
|
||||
"signup": "accounts.forms.CustomSignupForm",
|
||||
"signup": "accounts.forms.CustomUserCreationForm",
|
||||
}
|
||||
SOCIALACCOUNT_EMAIL_AUTHENTICATION = True
|
||||
SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue