Skip to content

Commit 8a9f2a2

Browse files
matrixiseclaude
andcommitted
fix: Add WAGTAILADMIN_BASE_URL setting to resolve Wagtail warning
Add WAGTAILADMIN_BASE_URL setting to all Django settings files to fix the wagtailadmin.W003 warning that appeared during system checks. The project had a BASE_URL setting but Wagtail expects the setting to be named WAGTAILADMIN_BASE_URL for admin URLs outside the admin interface. Changes: - base.py: Set WAGTAILADMIN_BASE_URL = BASE_URL (https://python.ie) - tests.py: Override with http://testserver for test environment - dev.py: Override with http://localhost:8000 for local development This ensures admin URLs in notification emails and the user bar will display correctly in all environments. Fixes #175 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 25078af commit 8a9f2a2

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

pythonie/pythonie/settings/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
# e.g. in notification emails. Don't include '/admin' or a trailing slash
3535
BASE_URL = "https://python.ie"
3636

37+
# Wagtail admin base URL for admin URLs outside the admin interface
38+
# (e.g. notification emails and the user bar)
39+
WAGTAILADMIN_BASE_URL = BASE_URL
40+
3741
# Application definition
3842

3943
INSTALLED_APPS = (

pythonie/pythonie/settings/dev.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
1212

13+
# Override Wagtail admin base URL for local development
14+
WAGTAILADMIN_BASE_URL = "http://localhost:8000"
15+
1316
# SQLite (simplest install)
1417
DATABASES = {
1518
"default": {

pythonie/pythonie/settings/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
1212

13+
# Override Wagtail admin base URL for tests
14+
WAGTAILADMIN_BASE_URL = "http://testserver"
15+
1316
# SQLite (simplest install)
1417
DATABASES = {
1518
"default": {

0 commit comments

Comments
 (0)