diff --git a/Dockerfile b/Dockerfile index c631331f5..30d99eb22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,12 @@ RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-de #Copy project and execute it. COPY . ./ +HEALTHCHECK --interval=30s \ + --timeout=5s \ + --start-period=10s \ + --retries=3 \ + CMD [ "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:8080/openapi" ] + # collect information from git repositories RUN /opt/recipes/venv/bin/python version.py # delete git repositories to reduce image size diff --git a/cookbook/locale/it/LC_MESSAGES/django.po b/cookbook/locale/it/LC_MESSAGES/django.po index cc06bd4ae..e66531254 100644 --- a/cookbook/locale/it/LC_MESSAGES/django.po +++ b/cookbook/locale/it/LC_MESSAGES/django.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-08-01 15:04+0200\n" -"PO-Revision-Date: 2024-11-01 06:58+0000\n" +"PO-Revision-Date: 2024-12-09 00:58+0000\n" "Last-Translator: Vincenzo Reale \n" "Language-Team: Italian \n" @@ -21,7 +21,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.6.2\n" +"X-Generator: Weblate 5.8.4\n" #: .\cookbook\forms.py:45 msgid "" @@ -520,7 +520,7 @@ msgstr "Web" #: .\cookbook\models.py:1411 .\cookbook\templates\search_info.html:47 msgid "Raw" -msgstr "Raw" +msgstr "Crudo" #: .\cookbook\models.py:1467 msgid "Food Alias" @@ -1440,8 +1440,9 @@ msgid "" "\"noreferrer noopener\" target=\"_blank\">this one." msgstr "" "Le tabelle in markdown sono difficili da creare a mano. Si raccomanda " -"l'utilizzo di un editor di come questo." +"l'utilizzo di un editor di tabelle come questo." #: .\cookbook\templates\markdown_info.html:155 #: .\cookbook\templates\markdown_info.html:157 @@ -2203,8 +2204,8 @@ msgstr "" " Le migrazioni non andate a buon fine probabilmente causeranno il " "malfunzionamento di parti importanti dell'applicazione.\n" " Se una migrazione non riesce, assicurati di avere la versione " -"più recente e, in tal caso, pubblica il registro della migrazione e la " -"panoramica di seguito in una segnalazione di problema su GitHub.\n" +"più recente e, in tal caso, pubblica il registro della migrazione e il " +"riepilogo che segue in una segnalazione di problema su GitHub.\n" " " #: .\cookbook\templates\system.html:182 @@ -2765,7 +2766,7 @@ msgid "" "but not recommended as some features only work with postgres databases." msgstr "" "Questa applicazione non è in esecuzione con un database Postgres. Va bene, " -"ma non è consigliato perché alcune funzionalità sono disponibili solo con un " +"ma non è consigliato perché alcune funzionalità sono disponibili solo con " "database Postgres." #: .\cookbook\views\views.py:360 diff --git a/cookbook/migrations/0220_recipe_images.py b/cookbook/migrations/0220_recipe_images.py new file mode 100644 index 000000000..7e03a9763 --- /dev/null +++ b/cookbook/migrations/0220_recipe_images.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.17 on 2024-12-22 11:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cookbook', '0219_connectorconfig_supports_description_field'), + ] + + operations = [ + migrations.AddField( + model_name='recipe', + name='images', + field=models.ManyToManyField(blank=True, to='cookbook.userfile'), + ), + ] diff --git a/cookbook/models.py b/cookbook/models.py index 2a069330f..7915fa037 100644 --- a/cookbook/models.py +++ b/cookbook/models.py @@ -1007,6 +1007,7 @@ class Recipe(ExportModelOperationsMixin('recipe'), models.Model, PermissionModel servings = models.IntegerField(default=1) servings_text = models.CharField(default='', blank=True, max_length=32) image = models.ImageField(upload_to='recipes/', blank=True, null=True) + images = models.ManyToManyField("UserFile", blank=True) storage = models.ForeignKey(Storage, on_delete=models.PROTECT, blank=True, null=True) file_uid = models.CharField(max_length=256, default="", blank=True) file_path = models.CharField(max_length=512, default="", blank=True) @@ -1435,6 +1436,7 @@ class UserFile(ExportModelOperationsMixin('user_files'), models.Model, Permissio name = models.CharField(max_length=128) file = models.FileField(upload_to='files/') file_size_kb = models.IntegerField(default=0, blank=True) + is_image = models.BooleanField(default=False) created_at = models.DateTimeField(auto_now_add=True) created_by = models.ForeignKey(User, on_delete=models.CASCADE) diff --git a/docs/install/manual.md b/docs/install/manual.md index c6ec34aba..c5cd7412b 100644 --- a/docs/install/manual.md +++ b/docs/install/manual.md @@ -3,7 +3,7 @@ These instructions are inspired from a standard django/gunicorn/postgresql instructions ([for example](https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04)) !!! warning - Make sure to use Python 3.10 or higher, and ensure that `pip` is associated with Python 3. Depending on your system configuration, using `python` or `pip` might default to Python 2. Make sure your machine has at least 2048 MB of memory; otherwise, the `yarn build` process may fail with the error: `FATAL ERROR: Reached heap limit - Allocation failed: JavaScript heap out of memory`. + Make sure to use at least Python 3.10 (although 3.12 is preferred) or higher, and ensure that `pip` is associated with Python 3. Depending on your system configuration, using `python` or `pip` might default to Python 2. Make sure your machine has at least 2048 MB of memory; otherwise, the `yarn build` process may fail with the error: `FATAL ERROR: Reached heap limit - Allocation failed: JavaScript heap out of memory`. ## Prerequisites diff --git a/requirements.txt b/requirements.txt index b17acf49a..7bb92bc7b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ -Django==4.2.16 +Django==4.2.17 cryptography===43.0.1 django-annoying==0.10.6 django-cleanup==8.0.0 django-crispy-forms==2.3 -crispy-bootstrap4==2024.1 +crispy-bootstrap4==2024.10 django-tables2==2.7.0 djangorestframework==3.15.2 drf-writable-nested==0.7.0 @@ -22,7 +22,7 @@ requests==2.32.3 six==1.16.0 webdavclient3==3.14.6 whitenoise==6.7.0 -icalendar==5.0.11 +icalendar==6.1.0 pyyaml==6.0.2 uritemplate==4.1.1 beautifulsoup4==4.12.3 @@ -52,9 +52,9 @@ google-generativeai==0.5.3 # Development pytest==8.0.0 -pytest-django==4.8.0 +pytest-django==4.9.0 pytest-cov===5.0.0 -pytest-factoryboy==2.6.0 +pytest-factoryboy==2.7.0 pytest-html==4.1.1 pytest-asyncio==0.23.5 pytest-xdist==3.6.1 diff --git a/vue/src/locales/sl.json b/vue/src/locales/sl.json index 44ea4174e..a94d80da6 100644 --- a/vue/src/locales/sl.json +++ b/vue/src/locales/sl.json @@ -203,7 +203,7 @@ "Next_Day": "Naslednji Dan", "Previous_Day": "Prejšnji Dan", "Coming_Soon": "Kmalu", - "Auto_Planner": "Avto-planer", + "Auto_Planner": "Samodejni planer", "New_Cookbook": "Nova kuharska knjiga", "Hide_Keyword": "Skrij ključne besede", "Clear": "Počisti", @@ -215,7 +215,7 @@ "RemoveFoodFromShopping": "Odstrani {food} iz nakupovalnega listka", "SupermarketCategoriesOnly": "Prikaži samo trgovinske kategorije", "DelayFor": "Zamakni za {hours} ur", - "OfflineAlert": "Si v offline načinu, nakupovalni listek se mogoče ne bo sinhroniziral.", + "OfflineAlert": "Si v načinu brez povezave, nakupovalni listek se mogoče ne bo sinhroniziral.", "shopping_share_desc": "Uporabniki bodo videli vse elemente, ki si jih dodal v nakupovalni listek. Morajo te dodati, da vidiš njihove elemente na listku.", "shopping_auto_sync_desc": "Nastavitev na 0 bo onemogoča avtomatsko sinhronizacijo. Pri ogledu nakupovalnega seznama se seznam posodablja vsakih nekaj sekund za sinhronizacijo sprememb, ki jih je morda naredil nekdo drug. Uporabno pri nakupovanju z več ljudmi, vendar bo uporabljalo mobilne podatke.", "filter_to_supermarket_desc": "Privzeto, razvrsti nakupovalni listek, da vključi samo označene trgovine.", @@ -225,7 +225,7 @@ "success_moving_resource": "Premikanje vira je bilo uspešno!", "success_merging_resource": "Združevanje vira je bilo uspešno!", "Added_by": "Dodano s strani", - "AddToShopping": "Dodaj nakupovlanemu listku", + "AddToShopping": "Dodaj nakupovalnemu listku", "NotInShopping": "{food} ni v tvojem nakupovalnem listku.", "OnHand": "Trenutno imam v roki", "FoodOnHand": "Imaš {food} v roki.", @@ -247,8 +247,8 @@ "ShowDelayed": "Pokaži odložene elemente", "Completed": "Končano", "shopping_share": "Deli nakupovalni listek", - "shopping_auto_sync": "Avtomatska sinhronizacija", - "mealplan_autoadd_shopping": "Avtomatsko dodaj obrok v načrt", + "shopping_auto_sync": "Samodejna sinhronizacija", + "mealplan_autoadd_shopping": "Samodejno dodaj obrok v načrt", "mealplan_autoexclude_onhand": "Izključi hrano v roki", "mealplan_autoinclude_related": "Dodaj povezane recepte", "default_delay": "Privzete ure za zamik", @@ -275,7 +275,7 @@ "copy_markdown_table": "Kopiraj kot Markdown tabela", "in_shopping": "V nakupovalnem listku", "DelayUntil": "Zamakni do", - "shopping_add_onhand": "Avtomatsko v roki", + "shopping_add_onhand": "Samodejno v roki", "related_recipes": "Povezani recepti", "today_recipes": "Današnji recepti", "mark_complete": "Označi končano",