mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 13:19:16 -05:00
removed JS_REVERSE_SCRIPT_PREFIX config variable
This commit is contained in:
@@ -12,7 +12,7 @@ class ScopeMiddleware:
|
|||||||
self.get_response = get_response
|
self.get_response = get_response
|
||||||
|
|
||||||
def __call__(self, request):
|
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 ?
|
# need to disable scopes for writing requests into userpref and enable for loading ?
|
||||||
if request.path.startswith(prefix + '/api/user-preference/'):
|
if request.path.startswith(prefix + '/api/user-preference/'):
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ docker-compose:
|
|||||||
environment:
|
environment:
|
||||||
# all the other env
|
# all the other env
|
||||||
- SCRIPT_NAME=/<sub path>
|
- SCRIPT_NAME=/<sub path>
|
||||||
- JS_REVERSE_SCRIPT_PREFIX=/<sub path>/
|
|
||||||
- STATIC_URL=/<www path>/static/
|
- STATIC_URL=/<www path>/static/
|
||||||
- MEDIA_URL=/<www path>/media/
|
- MEDIA_URL=/<www path>/media/
|
||||||
labels:
|
labels:
|
||||||
@@ -100,7 +99,6 @@ and the relevant section from the docker-compose.yml:
|
|||||||
image: vabene1111/recipes
|
image: vabene1111/recipes
|
||||||
environment:
|
environment:
|
||||||
- SCRIPT_NAME=/tandoor
|
- SCRIPT_NAME=/tandoor
|
||||||
- JS_REVERSE_SCRIPT_PREFIX=/tandoor
|
|
||||||
- STATIC_URL=/tandoor/static/
|
- STATIC_URL=/tandoor/static/
|
||||||
- MEDIA_URL=/tandoor/media/
|
- MEDIA_URL=/tandoor/media/
|
||||||
- GUNICORN_MEDIA=0
|
- GUNICORN_MEDIA=0
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ def extract_comma_list(env_key, default=None):
|
|||||||
load_dotenv()
|
load_dotenv()
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
SCRIPT_NAME = os.getenv('SCRIPT_NAME', '')
|
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_URL = os.getenv('STATIC_URL', '/static/')
|
||||||
STATIC_ROOT = os.getenv('STATIC_ROOT', os.path.join(BASE_DIR, "staticfiles"))
|
STATIC_ROOT = os.getenv('STATIC_ROOT', os.path.join(BASE_DIR, "staticfiles"))
|
||||||
@@ -86,6 +83,10 @@ LOGGING = {
|
|||||||
'handlers': ['console'],
|
'handlers': ['console'],
|
||||||
'level': LOG_LEVEL,
|
'level': LOG_LEVEL,
|
||||||
},
|
},
|
||||||
|
'django': {
|
||||||
|
'handlers': ['console'],
|
||||||
|
'level': LOG_LEVEL,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,7 +246,6 @@ ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 90
|
|||||||
ACCOUNT_LOGOUT_ON_GET = True
|
ACCOUNT_LOGOUT_ON_GET = True
|
||||||
|
|
||||||
USERSESSIONS_TRACK_ACTIVITY = True
|
USERSESSIONS_TRACK_ACTIVITY = True
|
||||||
|
|
||||||
HEADLESS_SERVE_SPECIFICATION = True
|
HEADLESS_SERVE_SPECIFICATION = True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -674,17 +674,5 @@ ACCOUNT_RATE_LIMITS = {
|
|||||||
DISABLE_EXTERNAL_CONNECTORS = extract_bool('DISABLE_EXTERNAL_CONNECTORS', False)
|
DISABLE_EXTERNAL_CONNECTORS = extract_bool('DISABLE_EXTERNAL_CONNECTORS', False)
|
||||||
EXTERNAL_CONNECTORS_QUEUE_SIZE = int(os.getenv('EXTERNAL_CONNECTORS_QUEUE_SIZE', 100))
|
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", ".js", True)
|
||||||
mimetypes.add_type("text/javascript", ".mjs", True)
|
mimetypes.add_type("text/javascript", ".mjs", True)
|
||||||
|
|||||||
Reference in New Issue
Block a user