mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
added v3 beta setting
This commit is contained in:
15
.github/workflows/build-docker.yml
vendored
15
.github/workflows/build-docker.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
|||||||
# Build Vue frontend
|
# Build Vue frontend
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '20'
|
||||||
cache: yarn
|
cache: yarn
|
||||||
cache-dependency-path: vue/yarn.lock
|
cache-dependency-path: vue/yarn.lock
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -47,6 +47,19 @@ jobs:
|
|||||||
working-directory: ./vue
|
working-directory: ./vue
|
||||||
run: yarn build
|
run: yarn build
|
||||||
|
|
||||||
|
# Build Vue 3 frontend
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
cache: yarn
|
||||||
|
cache-dependency-path: vue3/yarn.lock
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: ./vue3
|
||||||
|
run: yarn install --frozen-lockfile
|
||||||
|
- name: Build dependencies
|
||||||
|
working-directory: ./vue3
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Buildx
|
- name: Set up Buildx
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ from recipes.settings import PLUGINS
|
|||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
|
if settings.V3_BETA:
|
||||||
|
return HttpResponseRedirect(reverse('vue3'))
|
||||||
|
|
||||||
with scopes_disabled():
|
with scopes_disabled():
|
||||||
if not request.user.is_authenticated:
|
if not request.user.is_authenticated:
|
||||||
if User.objects.count() < 1 and 'django.contrib.auth.backends.RemoteUserBackend' not in settings.AUTHENTICATION_BACKENDS:
|
if User.objects.count() < 1 and 'django.contrib.auth.backends.RemoteUserBackend' not in settings.AUTHENTICATION_BACKENDS:
|
||||||
@@ -52,6 +55,9 @@ def index(request):
|
|||||||
|
|
||||||
|
|
||||||
def search(request):
|
def search(request):
|
||||||
|
if settings.V3_BETA:
|
||||||
|
return HttpResponseRedirect(reverse('vue3'))
|
||||||
|
|
||||||
if has_group_permission(request.user, ('guest', )):
|
if has_group_permission(request.user, ('guest', )):
|
||||||
return render(request, 'search.html', {})
|
return render(request, 'search.html', {})
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ SECRET_KEY = os.getenv('SECRET_KEY', 'INSECURE_STANDARD_KEY_SET_IN_ENV')
|
|||||||
DEBUG = extract_bool('DEBUG', True)
|
DEBUG = extract_bool('DEBUG', True)
|
||||||
DEBUG_TOOLBAR = extract_bool('DEBUG_TOOLBAR', True)
|
DEBUG_TOOLBAR = extract_bool('DEBUG_TOOLBAR', True)
|
||||||
|
|
||||||
|
V3_BETA = extract_bool('V3_BETA', False)
|
||||||
|
|
||||||
LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING")
|
LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING")
|
||||||
|
|
||||||
SOCIAL_DEFAULT_ACCESS = bool(int(os.getenv('SOCIAL_DEFAULT_ACCESS', False)))
|
SOCIAL_DEFAULT_ACCESS = bool(int(os.getenv('SOCIAL_DEFAULT_ACCESS', False)))
|
||||||
|
|||||||
Reference in New Issue
Block a user