Skip to content

Commit

Permalink
update pre-commit-hook, rename ci workflow, add database credentials …
Browse files Browse the repository at this point in the history
…in setting
  • Loading branch information
jh-RLI committed Sep 20, 2023
1 parent e7b1c6b commit fad8abe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI-djnago-htmx

# Enable Buildkit and let compose use it to speed up image building
env:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: '^docs/|/migrations/'
exclude: '^docs/|/htmxdj/docs/|/migrations/|/flask_app/|/fastapi_app/|/task_queue/|/tests/'
default_stages: [commit]

repos:
Expand Down
19 changes: 12 additions & 7 deletions htmxdj/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# though not all of them may be available with every OS.
# In Windows, this must be set to your system time zone.
TIME_ZONE = "UTC +2"
TIME_ZONE = "Europe/Berlin"
# https://docs.djangoproject.com/en/dev/ref/settings/#language-code
LANGUAGE_CODE = "en-us"
# https://docs.djangoproject.com/en/dev/ref/settings/#languages
Expand All @@ -47,10 +47,13 @@
# https://docs.djangoproject.com/en/dev/ref/settings/#databases

DATABASES = {
"default": env.db(
"DATABASE_URL",
default="postgres://localhost/htmxdj",
),
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "htmx_dj",
"USER": "postgres",
"PASSWORD": "123",
"HOST": "localhost",
}
}
DATABASES["default"]["ATOMIC_REQUESTS"] = True
# https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-DEFAULT_AUTO_FIELD
Expand Down Expand Up @@ -119,14 +122,16 @@
# https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers
PASSWORD_HASHERS = [
# https://docs.djangoproject.com/en/dev/topics/auth/passwords/#using-argon2-with-django
"django.contrib.auth.hashers.Argon2PasswordHasher",
# "django.contrib.auth.hashers.Argon2PasswordHasher",
"django.contrib.auth.hashers.PBKDF2PasswordHasher",
"django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher",
"django.contrib.auth.hashers.BCryptSHA256PasswordHasher",
]
# 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.UserAttributeSimilarityValidator"
},
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
Expand Down
4 changes: 2 additions & 2 deletions htmxdj/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
python-slugify==8.0.1 # https://github.com/un33k/python-slugify
Pillow==10.0.1 # https://github.com/python-pillow/Pillow
rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
argon2-cffi==23.1.0 # https://github.com/hynek/argon2_cffi
# rcssmin==1.1.1 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
# argon2-cffi==23.1.0 # https://github.com/hynek/argon2_cffi
whitenoise==6.5.0 # https://github.com/evansd/whitenoise
redis==5.0.0 # https://github.com/redis/redis-py

Expand Down

0 comments on commit fad8abe

Please sign in to comment.