2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

Allow for parent directories to be created when created photos.

This commit is contained in:
Expo on server 2023-07-08 22:42:06 +01:00
parent b1c5b03104
commit 3d43c0ec12

View File

@ -95,7 +95,7 @@ def new_image_form(request, path):
# Create directories if required # Create directories if required
for full_path in image_path, thumb_path, desc_path: for full_path in image_path, thumb_path, desc_path:
print(full_path, full_path.parent) print(full_path, full_path.parent)
full_path.parent.mkdir(parents=False, exist_ok=True) full_path.parent.mkdir(parents=True, exist_ok=True)
try: try:
change_message = form.cleaned_data["change_message"] change_message = form.cleaned_data["change_message"]
write_and_commit( write_and_commit(