From baa65e859f909d459bafbdc5670de49b057e989e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=BChler=20Ma=C3=ABlys?= Date: Fri, 29 Mar 2024 12:18:39 +0100 Subject: [PATCH 1/2] change default image path --- api/masteriqapp/migrations/0005_category_image_path.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/masteriqapp/migrations/0005_category_image_path.py b/api/masteriqapp/migrations/0005_category_image_path.py index 1022252..3524835 100644 --- a/api/masteriqapp/migrations/0005_category_image_path.py +++ b/api/masteriqapp/migrations/0005_category_image_path.py @@ -1,5 +1,7 @@ # Generated by Django 5.0.2 on 2024-03-08 08:42 +from os import path +from django.conf import settings from django.db import migrations, models @@ -13,6 +15,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='category', name='image_path', - field=models.CharField(default='data\\images\\default.jpeg', max_length=255), + field=models.CharField(default=path.join(settings.IMAGES_FOLDER, 'default.jpeg'), max_length=255), ), ] From 3474359199eaf2c94aa500ba46c65fc40f06eb2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=BChler=20Ma=C3=ABlys?= Date: Fri, 29 Mar 2024 12:20:52 +0100 Subject: [PATCH 2/2] add .env to gitignore --- .gitignore | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 19e63ac..52e206b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,12 @@ .idea db.sqlite3 __pycache__ - +*.env # Capistrano /config/ Capfile Gemfile Gemfile.lock capistrano.log +<<<<<<< HEAD -# api -/api/.env