mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 22:58:19 -05:00
Merge branch 'develop' of https://github.com/TandoorRecipes/recipes into develop
This commit is contained in:
@@ -415,8 +415,8 @@ def parse_keywords(keyword_json, request):
|
||||
# if alias exists use that instead
|
||||
|
||||
if len(kw) != 0:
|
||||
automation_engine.apply_keyword_automation(kw)
|
||||
if k := Keyword.objects.filter(name=kw, space=request.space).first():
|
||||
kw = automation_engine.apply_keyword_automation(kw)
|
||||
if k := Keyword.objects.filter(name__iexact=kw, space=request.space).first():
|
||||
keywords.append({'label': str(k), 'name': k.name, 'id': k.id})
|
||||
else:
|
||||
keywords.append({'label': kw, 'name': kw})
|
||||
|
||||
19
docs/faq.md
19
docs/faq.md
@@ -117,6 +117,21 @@ that I can spend on this project besides work, family and other life things.
|
||||
Due to the countless problems that can occur when manually installing I simply do not have
|
||||
the time to help solving each one.
|
||||
|
||||
You can install Tandoor manually but please do not expect me or anyone to help you with that.
|
||||
As a general advice: If you do it manually do NOT change anything at first and slowly work yourself
|
||||
You can install Tandoor manually but please do not expect me or anyone to help you with that.
|
||||
As a general advice: If you do it manually do NOT change anything at first and slowly work yourself
|
||||
to your dream setup.
|
||||
|
||||
## How can I upgrade postgres (major versions)?
|
||||
Postgres requires manual intervention when updating from one major version to another. The steps are roughly
|
||||
|
||||
1. use `pg_dumpall` to dump your database into SQL (for Docker `docker-compose exec -T <database_container_name> pg_dumpall -U <postgres_user_name> -f /path/to/dump.sql`)
|
||||
2. stop the DB / down the container
|
||||
3. move your postgres directory in order to keep it as a backup (e.g. `mv postgres postgres_old`)
|
||||
4. update postgres to the new major version (for Docker just change the version number and pull)
|
||||
5. start the db / up the container (do not start tandoor as it will automatically perform the database migrations which will conflict with loading the dump)
|
||||
6. if not using docker, you might need to create the same postgres user you had in the old database
|
||||
7. load the postgres dump (for Docker `'/usr/local/bin/docker-compose exec -T <database_container_name> psql -U <postgres_user_name> postgres < /path/to/dump.sql`)
|
||||
|
||||
If anything fails, go back to the old postgres version and data directory and try again.
|
||||
|
||||
There are many articles and tools online that might provide a good starting point to help you upgrade [1](https://thomasbandt.com/postgres-docker-major-version-upgrade), [2](https://github.com/tianon/docker-postgres-upgrade), [3](https://github.com/vabene1111/DockerPostgresBackups).
|
||||
|
||||
@@ -218,6 +218,7 @@ MIDDLEWARE = [
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'cookbook.helper.scope_middleware.ScopeMiddleware',
|
||||
'allauth.account.middleware.AccountMiddleware',
|
||||
]
|
||||
|
||||
if DEBUG_TOOLBAR:
|
||||
|
||||
@@ -29,7 +29,7 @@ microdata==0.8.0
|
||||
Jinja2==3.1.2
|
||||
django-webpack-loader==1.8.1
|
||||
git+https://github.com/BITSOLVER/django-js-reverse@071e304fd600107bc64bbde6f2491f1fe049ec82
|
||||
django-allauth==0.54.0
|
||||
django-allauth==0.58.1
|
||||
recipe-scrapers==14.52.0
|
||||
django-scopes==2.0.0
|
||||
pytest==7.4.3
|
||||
|
||||
@@ -363,20 +363,26 @@ export default {
|
||||
}
|
||||
},
|
||||
mobileSimpleGrid() {
|
||||
let grid = []
|
||||
|
||||
if (this.current_period !== null) {
|
||||
for (const x of Array(7).keys()) {
|
||||
let moment_date = moment(this.current_period.periodStart).add(x, "d")
|
||||
grid.push({
|
||||
date: moment_date,
|
||||
create_default_date: moment_date.format("YYYY-MM-DD"), // improve meal plan edit modal to do formatting itself and accept dates
|
||||
date_label: moment_date.format("dd") + " " + moment_date.format("ll"),
|
||||
plan_entries: this.plan_items.filter((m) => moment_date.isBetween(moment(m.startDate), moment(m.endDate), 'day', '[]'))
|
||||
})
|
||||
}
|
||||
let grid = [];
|
||||
let currentDate = moment();
|
||||
for (let x = 0; x < 7; x++) {
|
||||
let moment_date = currentDate.clone().add(x, "d");
|
||||
grid.push({
|
||||
date: moment_date,
|
||||
create_default_date: moment_date.format("YYYY-MM-DD"),
|
||||
date_label: moment_date.format("dd") + " " + moment_date.format("ll"),
|
||||
plan_entries: this.plan_items.filter(
|
||||
(m) =>
|
||||
moment_date.isBetween(
|
||||
moment(m.startDate),
|
||||
moment(m.endDate),
|
||||
'day',
|
||||
'[]'
|
||||
)
|
||||
),
|
||||
});
|
||||
}
|
||||
return grid
|
||||
return grid;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
Reference in New Issue
Block a user