Skip to content

Commit

Permalink
fix poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-Crow committed Nov 21, 2023
1 parent feef92f commit 2fdbaa1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SECRET_KEY=
DEBUG=False
HOST_PROTO=http
HOST_URL="0.0.0.0"
HOST_ALLOWED_URLS="localhost, 0.0.0.0"
ALLOWED_HOSTS="localhost, 0.0.0.0"
HOST_PORT=8000

USE_DOCKER=0 # Set 1 to use Docker
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Loading environment variables
ifneq (,$(wildcard ./.env))
include .env
export
endif

ifeq ($(USE_DOCKER),1)
EXEC_CMD := docker-compose exec -ti web
else
Expand Down Expand Up @@ -29,3 +35,6 @@ quality:
fix:
$(EXEC_CMD) black --exclude=venv .
$(EXEC_CMD) isort --skip-glob="**/migrations" --extend-skip-glob="venv" .

runserver:
$(EXEC_CMD) poetry run python manage.py runserver $(HOST_URL):$(HOST_PORT)
4 changes: 1 addition & 3 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True if os.getenv("DEBUG") == "True" else False

HOST_ALLOWED_URLS = os.getenv("HOST_ALLOWED_URLS", "127.0.0.1, localhost")

ALLOWED_HOSTS = HOST_ALLOWED_URLS.replace(" ", "").split(",")
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "127.0.0.1, localhost").replace(" ", "").split(",")

# Application definition

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[tool.poetry]
name = "content-manager"
dynamic = ["version"]
version = "0.1"
description = "Gestionnaire de contenu permettant de créer et gérer un site internet basé sur le Système de design de l'État, accessible et responsive"
authors = [
{name = "Sébastien Reuiller", email = "[email protected]"},
{name = "Sylvain Boissel", email = "sylvain@boissel.dev"},
"Sébastien Reuiller <[email protected]>",
"Sylvain Boissel <sylvain.boissel@beta.gouv.fr>",
]
maintainers = [
{name = "Sylvain Boissel", email = "sylvain@boissel.dev"}
"Sylvain Boissel <sylvain.boissel@beta.gouv.fr>",
]
readme = "README.md"

Expand Down

0 comments on commit 2fdbaa1

Please sign in to comment.