Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passage à Poetry 2.0 #253

Merged
merged 13 commits into from
Jan 21, 2025
Prev Previous commit
Next Next commit
Fix test issues
Ash-Crow committed Jan 16, 2025
commit c92172009131f4ea805c943303a84eca01b1fb70
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
@@ -4,5 +4,5 @@ DATABASE_USER=dju
DATABASE_PASSWORD=djpwd
DATABASE_HOST=127.0.0.1
DATABASE_PORT=5432
DEBUG=True
DEBUG=False
DATABASE_URL=postgres://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
2 changes: 0 additions & 2 deletions blog/tests/test_views.py
Original file line number Diff line number Diff line change
@@ -107,6 +107,4 @@ def test_deep_blog_works(self):
self.assertPageIsRenderable(new_blog_post)

response = self.client.get(deep_blog_index_page.url + "rss/")
print(deep_blog_index_page.url + "rss/")
print(response)
self.assertEqual(response.status_code, 200)
2 changes: 0 additions & 2 deletions content_manager/blocks.py
Original file line number Diff line number Diff line change
@@ -757,8 +757,6 @@ def enlarge_link(self):
if len(call_to_action):
enlarge = False
elif len(tags):
print(tags)
print(tags.raw_data)
tags_list = tags.raw_data
for tag in tags_list:
if (
6 changes: 4 additions & 2 deletions content_manager/management/commands/import_dsfr_pictograms.py
Original file line number Diff line number Diff line change
@@ -33,7 +33,9 @@ def handle(self, *args, **kwargs):
image_exists = Image.objects.filter(title=full_image_title).first()
if image_exists:
file_hash = image_exists.get_file_hash()
print(f"A file named {full_image_title} already exists, skipping (file_hash: {file_hash})")
self.stdout.write(
f"A file named {full_image_title} already exists, skipping (file_hash: {file_hash})"
)
else:
image = import_image(
full_path=os.path.join(folder_path, filename),
@@ -49,4 +51,4 @@ def handle(self, *args, **kwargs):
image.tags.add("DSFR")
image.tags.add("Pictogrammes")
image.tags.add(folder_title)
print(f"File {full_image_title} imported")
self.stdout.write(f"File {full_image_title} imported")
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ dev = [
]

[build-system]
requires = ["poetry-core"]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.black]