Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,30 @@
"0.0.0.0:8000",
"--settings=settings_local"
],
"django": true
"django": true,
"presentation": {
"hidden": false,
"group": "main",
"order": 1
}
},
{
"name": "Run Server in Vite Dev Mode",
"type": "python",
"request": "launch",
"python": "/usr/local/bin/python",
"program": "${workspaceFolder}/ietf/manage.py",
"args": [
"runserver",
"0.0.0.0:8000",
"--settings=settings_local_vite"
],
"django": true,
"presentation": {
"hidden": false,
"group": "main",
"order": 1
}
},
{
"name": "Run Server with Debug Toolbar",
Expand All @@ -28,7 +51,12 @@
"0.0.0.0:8000",
"--settings=settings_local_debug"
],
"django": true
"django": true,
"presentation": {
"hidden": false,
"group": "main",
"order": 1
}
}
]
}
}
33 changes: 31 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"${workspaceFolder}/ietf/manage.py",
"test",
"--settings=settings_local_sqlitetest",
"--pattern=tests_js.py",
"--pattern=tests_js.py"
],
"group": "test",
"presentation": {
Expand Down Expand Up @@ -103,7 +103,14 @@
"label": "Run SMTP Debugging Server",
"type": "shell",
"command": "/usr/local/bin/python",
"args": ["-m", "smtpd", "-n", "-c", "DebuggingServer", "localhost:2025"],
"args": [
"-m",
"smtpd",
"-n",
"-c",
"DebuggingServer",
"localhost:2025"
],
"presentation": {
"echo": true,
"reveal": "always",
Expand Down Expand Up @@ -165,6 +172,28 @@
"clear": false
},
"problemMatcher": []
},
{
"label": "Run Vite Dev Server",
"type": "shell",
"command": "yarn",
"args": [
"dev"
],
"isBackground": true,
"presentation": {
"group": "main",
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false
},
"runOptions": {
"instanceLimit": 1
},
"problemMatcher": []
}
]
}
2 changes: 0 additions & 2 deletions docker/configs/settings_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,3 @@
SLIDE_STAGING_PATH = 'test/staging/'

DE_GFM_BINARY = '/usr/local/bin/de-gfm'

DJANGO_VITE_DEV_MODE = True
6 changes: 6 additions & 0 deletions docker/configs/settings_local_vite.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright The IETF Trust 2007-2019, All Rights Reserved
# -*- coding: utf-8 -*-

from ietf.settings_local import * # pyflakes:ignore

DJANGO_VITE_DEV_MODE = True
11 changes: 11 additions & 0 deletions docker/scripts/app-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ else
fi
fi

if [ ! -f "$WORKSPACEDIR/ietf/settings_local_vite.py" ]; then
echo "Setting up a default settings_local_vite.py ..."
cp $WORKSPACEDIR/docker/configs/settings_local_vite.py $WORKSPACEDIR/ietf/settings_local_vite.py
else
echo "Using existing ietf/settings_local_vite.py file"
if ! cmp -s $WORKSPACEDIR/docker/configs/settings_local_vite.py $WORKSPACEDIR/ietf/settings_local_vite.py; then
echo "NOTE: Differences detected compared to docker/configs/settings_local_vite.py!"
echo "We'll assume you made these deliberately."
fi
fi

# Create data directories

echo "Creating data directories..."
Expand Down
1 change: 1 addition & 0 deletions ietf/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/settings_local.py
/settings_local_debug.py
/settings_local_sqlitetest.py
/settings_local_vite.py
/ietfdb.sql.gz
5 changes: 1 addition & 4 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ export default defineConfig({
],
publicDir: 'ietf/static/public',
server: {
host: true,
watch: {
usePolling: true
}
host: true
}
})