diff --git a/.env b/.env new file mode 100644 index 0000000..8e8b6b2 --- /dev/null +++ b/.env @@ -0,0 +1,6 @@ +DEBUG=on +SECRET_KEY=your-secret-key +DATABASE_URL=psql://urser:un-githubbedpassword@127.0.0.1:8458/database +SQLITE_URL=sqlite:///my-local-sqlite.db +CACHE_URL=memcache://127.0.0.1:11211,127.0.0.1:11212,127.0.0.1:11213 +REDIS_URL=rediscache://127.0.0.1:6379/1?client_class=django_redis.client.DefaultClient&password=ungithubbed-secret diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d30960a..6316716 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,25 +1,12 @@ fail_fast: true repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.1.0 + rev: v3.2.0 hooks: - id: trailing-whitespace - - repo: https://github.com/psf/black - rev: 19.3b0 - hooks: - - id: black + language: python - repo: https://github.com/asottile/blacken-docs - rev: v1.7.0 + rev: v1.8.0 hooks: - id: blacken-docs additional_dependencies: [black==19.3b0] - - repo: local - hooks: - - id: markdownlint - name: markdownlint - description: "Lint Markdown files" - entry: - markdownlint '**/*.md' --fix --ignore node_modules --config - "./.markdownlint.json" - language: node - types: [markdown] diff --git a/Pipfile b/Pipfile index 953f4be..9025785 100644 --- a/Pipfile +++ b/Pipfile @@ -5,20 +5,19 @@ verify_ssl = true [dev-packages] pylint = "*" +pylint-django = "*" autopep8 = "*" rope = "*" safety = "*" -pylint-django = "*" flake8 = "*" -black ="*" pre-commit= "*" [packages] -django = "==3.1.*" -gunicorn = "==20.0.*" -psycopg2 = "==2.8.*" -django-filter = "==2.3.*" -django-guardian = "==2.3.*" +django = ">=3.1.0" +gunicorn = ">=20.0.0" +psycopg2 = ">=2.8.0" +django-filter = ">=2.3.0" +django-guardian = ">=2.3.0" [requires] python_version = "3.8" diff --git a/README.md b/README.md index 60b25f2..1a33607 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # django-template -My personal Django template project +My personal Django template project. + +This a blank django template for my project. Build around [this post](https://victoria.dev/blog/my-django-project-best-practices-for-happy-developers/) and other find online. diff --git a/makefile b/makefile index 4ce972a..b9b8ef9 100644 --- a/makefile +++ b/makefile @@ -6,9 +6,16 @@ include .env help: ## Show this help @egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' +.PHONY: env +env: ## Install pipenv + pip3 install pipenv + pipenv shell --python 3.8 + .PHONY: install -install: ## Make venv and install requirements - $(BIN) pipenv install; pipenv run pre-commit install +install: env ## Make venv and install requirements + pipenv install --development + pipenv run pre-commit install + pre-commit autoupdate migrate: ## Make and run migrations $(PYTHON) manage.py makemigrations