-
-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
6,610 additions
and
755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,40 @@ | ||
import traceback | ||
|
||
from django.apps import AppConfig | ||
from django.conf import settings | ||
from django.db import OperationalError, ProgrammingError | ||
from django_scopes import scopes_disabled | ||
|
||
from recipes.settings import DEBUG | ||
|
||
|
||
class CookbookConfig(AppConfig): | ||
name = 'cookbook' | ||
|
||
def ready(self): | ||
# post_save signal is only necessary if using full-text search on postgres | ||
if settings.DATABASES['default']['ENGINE'] in ['django.db.backends.postgresql_psycopg2', 'django.db.backends.postgresql']: | ||
if settings.DATABASES['default']['ENGINE'] in ['django.db.backends.postgresql_psycopg2', | ||
'django.db.backends.postgresql']: | ||
import cookbook.signals # noqa | ||
|
||
# when starting up run fix_tree to: | ||
# a) make sure that nodes are sorted when switching between sort modes | ||
# b) fix problems, if any, with tree consistency | ||
with scopes_disabled(): | ||
try: | ||
from cookbook.models import Keyword, Food | ||
Keyword.fix_tree(fix_paths=True) | ||
Food.fix_tree(fix_paths=True) | ||
except OperationalError: | ||
pass # if model does not exist there is no need to fix it | ||
except ProgrammingError: | ||
pass # if migration has not been run database cannot be fixed yet | ||
if not settings.DISABLE_TREE_FIX_STARTUP: | ||
# when starting up run fix_tree to: | ||
# a) make sure that nodes are sorted when switching between sort modes | ||
# b) fix problems, if any, with tree consistency | ||
with scopes_disabled(): | ||
try: | ||
from cookbook.models import Keyword, Food | ||
Keyword.fix_tree(fix_paths=True) | ||
Food.fix_tree(fix_paths=True) | ||
except OperationalError: | ||
if DEBUG: | ||
traceback.print_exc() | ||
pass # if model does not exist there is no need to fix it | ||
except ProgrammingError: | ||
if DEBUG: | ||
traceback.print_exc() | ||
pass # if migration has not been run database cannot be fixed yet | ||
except Exception: | ||
if DEBUG: | ||
traceback.print_exc() | ||
pass # dont break startup just because fix could not run, need to investigate cases when this happens |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,10 @@ msgstr "" | |
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2021-11-08 16:27+0100\n" | ||
"PO-Revision-Date: 2021-11-07 17:14+0000\n" | ||
"Last-Translator: Kaibu <[email protected]>\n" | ||
"Language-Team: German <http://translate.tandoor.dev/projects/tandoor/recipes-" | ||
"backend/de/>\n" | ||
"PO-Revision-Date: 2021-11-12 20:06+0000\n" | ||
"Last-Translator: A. L. <[email protected]>\n" | ||
"Language-Team: German <http://translate.tandoor.dev/projects/tandoor/" | ||
"recipes-backend/de/>\n" | ||
"Language: de\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
|
@@ -261,10 +261,6 @@ msgid "Email address already taken!" | |
msgstr "Email-Adresse ist bereits vergeben!" | ||
|
||
#: .\cookbook\forms.py:367 | ||
#, fuzzy | ||
#| msgid "" | ||
#| "An email address is not required but if present the invite link will be " | ||
#| "send to the user." | ||
msgid "" | ||
"An email address is not required but if present the invite link will be sent " | ||
"to the user." | ||
|
Oops, something went wrong.