diff --git a/cookbook/views/telegram.py b/cookbook/views/telegram.py
index ae04215de..43c4b5d0c 100644
--- a/cookbook/views/telegram.py
+++ b/cookbook/views/telegram.py
@@ -1,4 +1,5 @@
import json
+import traceback
import requests
from django.db.models import Q
@@ -52,10 +53,10 @@ def hook(request, token):
f = ingredient_parser.get_food(food)
u = ingredient_parser.get_unit(unit)
- ShoppingListEntry.objects.create(food=f, unit=u, amount=amount, original_text=ingredient, created_by=request.user, space=request.space)
+ ShoppingListEntry.objects.create(food=f, unit=u, amount=amount, created_by=request.user, space=request.space)
return JsonResponse({'data': data['message']['text']})
except Exception:
- pass
+ traceback.print_exc()
return JsonResponse({})
diff --git a/docs/install/docker.md b/docs/install/docker.md
index dea392b38..9895d2e7f 100644
--- a/docs/install/docker.md
+++ b/docs/install/docker.md
@@ -14,8 +14,8 @@ It can be run and accessed on port 80 using:
```shell
docker run -d \
- -v ./staticfiles:/opt/recipes/staticfiles \
- -v ./mediafiles:/opt/recipes/mediafiles \
+ -v "$(pwd)"/staticfiles:/opt/recipes/staticfiles \
+ -v "$(pwd)"/mediafiles:/opt/recipes/mediafiles \
-p 80:8080 \
-e SECRET_KEY=YOUR_SECRET_KEY \
-e DB_ENGINE=django.db.backends.postgresql \
@@ -109,6 +109,9 @@ in combination with [jrcs's letsencrypt companion](https://hub.docker.com/r/jrcs
Please refer to the appropriate documentation on how to setup the reverse proxy and networks.
+!!!!!!warning "Adjust client_max_body_size"
+ By using jwilder's Nginx-proxy, uploads will be restricted to 1 MB file size. This can be resolved by adjusting the ```client_max_body_size``` variable in the jwilder nginx configuration.
+
Remember to add the appropriate environment variables to the `.env` file:
```
diff --git a/docs/install/manual.md b/docs/install/manual.md
index e37334dda..3d6231dc6 100644
--- a/docs/install/manual.md
+++ b/docs/install/manual.md
@@ -19,19 +19,44 @@ Give the user permissions: `chown -R recipes:www-data /var/www/recipes`
Create virtual env: `python3.9 -m venv /var/www/recipes`
-Install Javascript Tools
+Install Javascript Tools (nodejs >= 12 required)
+```shell
+### Just use one of these possibilites!
+# Using Ubuntu
+curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
+sudo apt-get install -y nodejs
+
+# Using Debian, as root
+curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
+apt-get install -y nodejs
+
+# Using a RPM based distro
+## ... as root
+curl -fsSL https://rpm.nodesource.com/setup_lts.x | bash -
+
+## ... no root privileges
+curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
+```
```shell
-sudo apt install nodejs
sudo npm install --global yarn
```
+!!! info "NodeJS installation issues"
+ If you run into problems with the NodeJS installation, please refer to the [official documentation](https://github.com/nodesource/distributions/blob/master/README.md).
+
### Install postgresql requirements
```shell
sudo apt install libpq-dev postgresql
```
-###Install project requirements
+### Install LDAP requirements
+
+```shell
+sudo apt install libsasl2-dev python-dev libldap2-dev libssl-dev
+```
+
+### Install project requirements
!!! warning "Update"
Dependencies change with most updates so the following steps need to be re-run with every update or else the application might stop working.
diff --git a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue
index 72e97f7d3..4224b0d96 100644
--- a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue
+++ b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue
@@ -1148,7 +1148,10 @@ export default {
},
showSQL: function () {
let params = this.buildParams()
- this.genericAPI(this.Models.RECIPE, this.Actions.LIST, params).then((result) => {})
+ params.options.query.debug = true
+ this.genericAPI(this.Models.RECIPE, this.Actions.LIST, params).then((result) => {
+ console.log(result.data)
+ })
},
// TODO refactor to combine with load KeywordChildren
loadFoodChildren({ action, parentNode, callback }) {
diff --git a/vue/src/apps/ShoppingListView/ShoppingListView.vue b/vue/src/apps/ShoppingListView/ShoppingListView.vue
index 087bda807..27767d7c7 100644
--- a/vue/src/apps/ShoppingListView/ShoppingListView.vue
+++ b/vue/src/apps/ShoppingListView/ShoppingListView.vue
@@ -105,7 +105,7 @@
class="btn dropdown-toggle btn-link text-decoration-none text-dark pr-2 dropdown-toggle-no-caret"
@click.stop="openContextMenu($event, s, true)"
>
-
+
- {{ i }}
+ {{ i }}
diff --git a/vue/src/components/ShoppingLineItem.vue b/vue/src/components/ShoppingLineItem.vue
index 2a92f42d9..cb3b2366b 100644
--- a/vue/src/components/ShoppingLineItem.vue
+++ b/vue/src/components/ShoppingLineItem.vue
@@ -7,35 +7,35 @@
-
+
-
+
-
+
{{ Object.entries(formatAmount)[0][1] }} {{ Object.entries(formatAmount)[0][0] }}
-
+
{{ x[1] }}
{{ x[0] }}
-
+
{{ formatFood }}
@@ -179,7 +179,7 @@ export default {
formatAmount: function () {
let amount = {}
this.entries.forEach((entry) => {
- let unit = entry?.unit?.name ?? "----"
+ let unit = entry?.unit?.name ?? "---"
if (entry.amount) {
if (amount[unit]) {
amount[unit] += entry.amount
diff --git a/vue/src/locales/pt.json b/vue/src/locales/pt.json
new file mode 100644
index 000000000..737bb6d57
--- /dev/null
+++ b/vue/src/locales/pt.json
@@ -0,0 +1,380 @@
+{
+ "warning_feature_beta": "",
+ "err_fetching_resource": "",
+ "err_creating_resource": "",
+ "err_updating_resource": "",
+ "err_deleting_resource": "",
+ "err_moving_resource": "",
+ "err_merging_resource": "",
+ "success_fetching_resource": "",
+ "success_creating_resource": "",
+ "success_updating_resource": "",
+ "success_deleting_resource": "",
+ "success_moving_resource": "",
+ "success_merging_resource": "",
+ "file_upload_disabled": "",
+ "step_time_minutes": "",
+ "confirm_delete": "",
+ "import_running": "",
+ "all_fields_optional": "",
+ "convert_internal": "",
+ "show_only_internal": "",
+ "show_split_screen": "",
+ "Log_Recipe_Cooking": "",
+ "External_Recipe_Image": "",
+ "Add_to_Shopping": "",
+ "Add_to_Plan": "",
+ "Step_start_time": "",
+ "Sort_by_new": "",
+ "Table_of_Contents": "",
+ "Recipes_per_page": "",
+ "Show_as_header": "",
+ "Hide_as_header": "",
+ "Add_nutrition_recipe": "",
+ "Remove_nutrition_recipe": "",
+ "Copy_template_reference": "",
+ "Save_and_View": "",
+ "Manage_Books": "",
+ "Meal_Plan": "",
+ "Select_Book": "",
+ "Select_File": "",
+ "Recipe_Image": "",
+ "Import_finished": "",
+ "View_Recipes": "",
+ "Log_Cooking": "",
+ "New_Recipe": "",
+ "Url_Import": "",
+ "Reset_Search": "",
+ "Recently_Viewed": "",
+ "Load_More": "",
+ "New_Keyword": "",
+ "Delete_Keyword": "",
+ "Edit_Keyword": "",
+ "Edit_Recipe": "",
+ "Move_Keyword": "",
+ "Merge_Keyword": "",
+ "Hide_Keywords": "",
+ "Hide_Recipes": "",
+ "Move_Up": "",
+ "Move_Down": "",
+ "Step_Name": "",
+ "Step_Type": "",
+ "Make_Header": "",
+ "Make_Ingredient": "",
+ "Enable_Amount": "",
+ "Disable_Amount": "",
+ "Add_Step": "",
+ "Keywords": "",
+ "Books": "",
+ "Proteins": "",
+ "Fats": "",
+ "Carbohydrates": "",
+ "Calories": "",
+ "Energy": "",
+ "Nutrition": "",
+ "Date": "",
+ "Share": "",
+ "Automation": "",
+ "Parameter": "",
+ "Export": "",
+ "Copy": "",
+ "Rating": "",
+ "Close": "",
+ "Cancel": "",
+ "Link": "",
+ "Add": "",
+ "New": "",
+ "Note": "",
+ "Success": "",
+ "Failure": "",
+ "Ingredients": "",
+ "Supermarket": "",
+ "Categories": "",
+ "Category": "",
+ "Selected": "",
+ "min": "",
+ "Servings": "",
+ "Waiting": "",
+ "Preparation": "",
+ "External": "",
+ "Size": "",
+ "Files": "",
+ "File": "",
+ "Edit": "",
+ "Image": "",
+ "Delete": "",
+ "Open": "",
+ "Ok": "",
+ "Save": "",
+ "Step": "",
+ "Search": "",
+ "Import": "",
+ "Print": "",
+ "Settings": "",
+ "or": "",
+ "and": "",
+ "Information": "",
+ "Download": "",
+ "Create": "",
+ "Search Settings": "",
+ "View": "",
+ "Recipes": "",
+ "Move": "",
+ "Merge": "",
+ "Parent": "",
+ "delete_confirmation": "",
+ "move_confirmation": "",
+ "merge_confirmation": "",
+ "create_rule": "",
+ "move_selection": "",
+ "merge_selection": "",
+ "Root": "",
+ "Ignore_Shopping": "",
+ "Shopping_Category": "",
+ "Shopping_Categories": "",
+ "Edit_Food": "",
+ "Move_Food": "",
+ "New_Food": "",
+ "Hide_Food": "",
+ "Food_Alias": "",
+ "Unit_Alias": "",
+ "Keyword_Alias": "",
+ "Delete_Food": "",
+ "No_ID": "",
+ "Meal_Plan_Days": "",
+ "merge_title": "",
+ "move_title": "",
+ "Food": "",
+ "Recipe_Book": "",
+ "del_confirmation_tree": "",
+ "delete_title": "",
+ "create_title": "",
+ "edit_title": "",
+ "Name": "",
+ "Type": "",
+ "Description": "",
+ "Recipe": "",
+ "tree_root": "",
+ "Icon": "",
+ "Unit": "",
+ "No_Results": "",
+ "New_Unit": "",
+ "Create_New_Shopping Category": "",
+ "Create_New_Food": "",
+ "Create_New_Keyword": "",
+ "Create_New_Unit": "",
+ "Create_New_Meal_Type": "",
+ "and_up": "",
+ "and_down": "",
+ "Instructions": "",
+ "Unrated": "",
+ "Automate": "",
+ "Empty": "",
+ "Key_Ctrl": "",
+ "Key_Shift": "",
+ "Time": "",
+ "Text": "",
+ "Shopping_list": "",
+ "Added_by": "",
+ "Added_on": "",
+ "AddToShopping": "",
+ "IngredientInShopping": "",
+ "NotInShopping": "",
+ "OnHand": "",
+ "FoodOnHand": "",
+ "FoodNotOnHand": "",
+ "Undefined": "",
+ "Create_Meal_Plan_Entry": "",
+ "Edit_Meal_Plan_Entry": "",
+ "Title": "",
+ "Week": "",
+ "Month": "",
+ "Year": "",
+ "Planner": "",
+ "Planner_Settings": "",
+ "Period": "",
+ "Plan_Period_To_Show": "",
+ "Periods": "",
+ "Plan_Show_How_Many_Periods": "",
+ "Starting_Day": "",
+ "Meal_Types": "",
+ "Meal_Type": "",
+ "Clone": "",
+ "Drag_Here_To_Delete": "",
+ "Meal_Type_Required": "",
+ "Title_or_Recipe_Required": "",
+ "Color": "",
+ "New_Meal_Type": "",
+ "AddFoodToShopping": "",
+ "RemoveFoodFromShopping": "",
+ "DeleteShoppingConfirm": "",
+ "IgnoredFood": "",
+ "Add_Servings_to_Shopping": "",
+ "Week_Numbers": "",
+ "Show_Week_Numbers": "",
+ "Export_As_ICal": "",
+ "Export_To_ICal": "",
+ "Cannot_Add_Notes_To_Shopping": "",
+ "Added_To_Shopping_List": "",
+ "Shopping_List_Empty": "",
+ "Next_Period": "",
+ "Previous_Period": "",
+ "Current_Period": "",
+ "Next_Day": "",
+ "Previous_Day": "",
+ "Inherit": "",
+ "InheritFields": "",
+ "FoodInherit": "",
+ "ShowUncategorizedFood": "",
+ "GroupBy": "",
+ "SupermarketCategoriesOnly": "",
+ "MoveCategory": "",
+ "CountMore": "",
+ "IgnoreThis": "",
+ "DelayFor": "",
+ "Warning": "",
+ "NoCategory": "",
+ "InheritWarning": "",
+ "ShowDelayed": "",
+ "Completed": "",
+ "OfflineAlert": "",
+ "shopping_share": "",
+ "shopping_auto_sync": "",
+ "mealplan_autoadd_shopping": "",
+ "mealplan_autoexclude_onhand": "",
+ "mealplan_autoinclude_related": "",
+ "default_delay": "",
+ "shopping_share_desc": "",
+ "shopping_auto_sync_desc": "",
+ "mealplan_autoadd_shopping_desc": "",
+ "mealplan_autoexclude_onhand_desc": "",
+ "mealplan_autoinclude_related_desc": "",
+ "default_delay_desc": "",
+ "filter_to_supermarket": "",
+ "Coming_Soon": "",
+ "Auto_Planner": "",
+ "New_Cookbook": "",
+ "Hide_Keyword": "",
+ "Clear": "",
+ "err_move_self": "",
+ "nothing": "",
+ "err_merge_self": "",
+ "show_sql": "",
+ "filter_to_supermarket_desc": "",
+ "CategoryName": "",
+ "SupermarketName": "",
+ "CategoryInstruction": "",
+ "shopping_recent_days_desc": "",
+ "shopping_recent_days": "",
+ "create_shopping_new": "",
+ "download_pdf": "",
+ "download_csv": "",
+ "csv_delim_help": "",
+ "csv_delim_label": "",
+ "SuccessClipboard": "",
+ "copy_to_clipboard": "",
+ "csv_prefix_help": "",
+ "csv_prefix_label": "",
+ "copy_markdown_table": "",
+ "in_shopping": "",
+ "DelayUntil": "",
+ "Pin": "",
+ "mark_complete": "",
+ "QuickEntry": "",
+ "shopping_add_onhand_desc": "",
+ "shopping_add_onhand": "",
+ "related_recipes": "",
+ "today_recipes": "",
+ "sql_debug": "",
+ "remember_search": "",
+ "remember_hours": "",
+ "tree_select": "",
+ "OnHand_help": "",
+ "ignore_shopping_help": "",
+ "shopping_category_help": "",
+ "food_recipe_help": "",
+ "Foods": "",
+ "enable_expert": "",
+ "expert_mode": "",
+ "simple_mode": "",
+ "advanced": "",
+ "fields": "",
+ "show_keywords": "",
+ "show_foods": "",
+ "show_books": "",
+ "show_rating": "",
+ "show_units": "",
+ "show_filters": "",
+ "not": "",
+ "save_filter": "",
+ "filter_name": "",
+ "left_handed": "",
+ "left_handed_help": "",
+ "Custom Filter": "",
+ "shared_with": "",
+ "sort_by": "",
+ "asc": "",
+ "desc": "",
+ "date_viewed": "",
+ "last_cooked": "",
+ "times_cooked": "",
+ "date_created": "",
+ "show_sortby": "",
+ "search_rank": "",
+ "make_now": "",
+ "recipe_filter": "",
+ "book_filter_help": "",
+ "review_shopping": "",
+ "view_recipe": "",
+ "copy_to_new": "",
+ "recipe_name": "",
+ "paste_ingredients_placeholder": "",
+ "paste_ingredients": "",
+ "ingredient_list": "",
+ "explain": "",
+ "filter": "",
+ "search_no_recipes": "",
+ "search_import_help_text": "",
+ "search_create_help_text": "",
+ "warning_duplicate_filter": "",
+ "reset_children": "",
+ "reset_children_help": "",
+ "substitute_help": "",
+ "substitute_siblings_help": "",
+ "substitute_children_help": "",
+ "substitute_siblings": "",
+ "substitute_children": "",
+ "SubstituteOnHand": "",
+ "ChildInheritFields": "",
+ "ChildInheritFields_help": "",
+ "InheritFields_help": "",
+ "last_viewed": "",
+ "created_on": "",
+ "updatedon": "",
+ "advanced_search_settings": "",
+ "nothing_planned_today": "",
+ "no_pinned_recipes": "",
+ "Planned": "",
+ "Pinned": "",
+ "Quick actions": "",
+ "Ratings": "",
+ "Internal": "",
+ "Units": "",
+ "Random Recipes": "",
+ "parameter_count": "",
+ "select_keyword": "",
+ "add_keyword": "",
+ "select_file": "",
+ "select_recipe": "",
+ "select_unit": "",
+ "select_food": "",
+ "remove_selection": "",
+ "empty_list": "",
+ "Select": "",
+ "Supermarkets": "",
+ "User": "",
+ "Keyword": "",
+ "Advanced": "",
+ "Page": "",
+ "Reset": ""
+}