Skip to content

Commit

Permalink
Merge branch 'develop' into feature/vue3
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Dec 22, 2024
2 parents 64a43d3 + 0bcdf5e commit 9b586ae
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 20 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 9 additions & 8 deletions cookbook/locale/it/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>\n"
"Language-Team: Italian <http://translate.tandoor.dev/projects/tandoor/"
"recipes-backend/it/>\n"
Expand All @@ -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 ""
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -1440,8 +1440,9 @@ msgid ""
"\"noreferrer noopener\" target=\"_blank\">this one.</a>"
msgstr ""
"Le tabelle in markdown sono difficili da creare a mano. Si raccomanda "
"l'utilizzo di un editor di come <a href=\"https://www.tablesgenerator.com/"
"markdown_tables\" rel=\"noreferrer noopener\" target=\"_blank\">questo.</a>"
"l'utilizzo di un editor di tabelle come <a href=\"https://www.tablesgenerator"
".com/markdown_tables\" rel=\"noreferrer noopener\" target=\"_blank\""
">questo.</a>"

#: .\cookbook\templates\markdown_info.html:155
#: .\cookbook\templates\markdown_info.html:157
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions cookbook/migrations/0220_recipe_images.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]
2 changes: 2 additions & 0 deletions cookbook/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion docs/install/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions vue/src/locales/sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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.",
Expand All @@ -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.",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 9b586ae

Please sign in to comment.