diff --git a/cookbook/helper/scope_middleware.py b/cookbook/helper/scope_middleware.py index 8c2613c8f..727bcdf9b 100644 --- a/cookbook/helper/scope_middleware.py +++ b/cookbook/helper/scope_middleware.py @@ -12,7 +12,7 @@ class ScopeMiddleware: self.get_response = get_response def __call__(self, request): - prefix = settings.JS_REVERSE_SCRIPT_PREFIX or '' + prefix = settings.SCRIPT_NAME or '' # need to disable scopes for writing requests into userpref and enable for loading ? if request.path.startswith(prefix + '/api/user-preference/'): diff --git a/docs/install/other.md b/docs/install/other.md index b4829f3e3..00b95174c 100644 --- a/docs/install/other.md +++ b/docs/install/other.md @@ -35,7 +35,6 @@ docker-compose: environment: # all the other env - SCRIPT_NAME=/ - - JS_REVERSE_SCRIPT_PREFIX=// - STATIC_URL=//static/ - MEDIA_URL=//media/ labels: @@ -100,7 +99,6 @@ and the relevant section from the docker-compose.yml: image: vabene1111/recipes environment: - SCRIPT_NAME=/tandoor - - JS_REVERSE_SCRIPT_PREFIX=/tandoor - STATIC_URL=/tandoor/static/ - MEDIA_URL=/tandoor/media/ - GUNICORN_MEDIA=0 diff --git a/recipes/settings.py b/recipes/settings.py index a47e5c6bb..439c15b59 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -40,9 +40,6 @@ def extract_comma_list(env_key, default=None): load_dotenv() BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SCRIPT_NAME = os.getenv('SCRIPT_NAME', '') -# path for django_js_reverse to generate the javascript file containing all urls. Only done because the default command (collectstatic_js_reverse) fails to update the manifest -JS_REVERSE_OUTPUT_PATH = os.path.join(BASE_DIR, "cookbook/static/django_js_reverse") -JS_REVERSE_SCRIPT_PREFIX = os.getenv('JS_REVERSE_SCRIPT_PREFIX', SCRIPT_NAME) STATIC_URL = os.getenv('STATIC_URL', '/static/') STATIC_ROOT = os.getenv('STATIC_ROOT', os.path.join(BASE_DIR, "staticfiles")) @@ -86,6 +83,10 @@ LOGGING = { 'handlers': ['console'], 'level': LOG_LEVEL, }, + 'django': { + 'handlers': ['console'], + 'level': LOG_LEVEL, + }, }, } @@ -245,7 +246,6 @@ ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 90 ACCOUNT_LOGOUT_ON_GET = True USERSESSIONS_TRACK_ACTIVITY = True - HEADLESS_SERVE_SPECIFICATION = True try: @@ -674,17 +674,5 @@ ACCOUNT_RATE_LIMITS = { DISABLE_EXTERNAL_CONNECTORS = extract_bool('DISABLE_EXTERNAL_CONNECTORS', False) EXTERNAL_CONNECTORS_QUEUE_SIZE = int(os.getenv('EXTERNAL_CONNECTORS_QUEUE_SIZE', 100)) -# ACCOUNT_SIGNUP_FORM_CLASS = 'cookbook.forms.AllAuthSignupForm' -ACCOUNT_FORMS = {'signup': 'cookbook.forms.AllAuthSignupForm', 'reset_password': 'cookbook.forms.CustomPasswordResetForm'} - -ACCOUNT_EMAIL_UNKNOWN_ACCOUNTS = False -ACCOUNT_RATE_LIMITS = { - "change_password": "1/m/user", - "reset_password": "1/m/ip,1/m/key", - "reset_password_from_key": "1/m/ip", - "signup": "5/m/ip", - "login": "5/m/ip", -} - mimetypes.add_type("text/javascript", ".js", True) mimetypes.add_type("text/javascript", ".mjs", True)