Skip to content

Conversation

@matrixise
Copy link
Contributor

Summary

This PR fixes the wagtailadmin.W003 warning that appeared during Django system checks by adding the WAGTAILADMIN_BASE_URL setting to all Django settings files.

Problem

When running tests or Django system checks, a warning appeared:

WARNINGS:
?: (wagtailadmin.W003) The WAGTAILADMIN_BASE_URL setting is not defined
	HINT: This should be the base URL used to access the Wagtail admin site. Without this, admin URLs outside of the admin (e.g. notification emails and the user bar) will not display correctly.

Changes

  • pythonie/pythonie/settings/base.py: Added WAGTAILADMIN_BASE_URL = BASE_URL to use the existing production URL (https://python.ie)
  • pythonie/pythonie/settings/tests.py: Override with http://testserver for the test environment
  • pythonie/pythonie/settings/dev.py: Override with http://localhost:8000 for local development

Testing

All 33 tests pass with no warnings:

System check identified no issues (0 silenced).
Ran 33 tests in 0.620s

OK

Impact

This ensures admin URLs appearing outside the admin interface (such as in notification emails and the user bar) will display correctly in all environments.

Fixes #175

🤖 Generated with Claude Code

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>
@matrixise matrixise requested a review from ArcaneIRE December 24, 2025 09:36
@matrixise matrixise self-assigned this Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix WAGTAILADMIN_BASE_URL warning in Django system checks

3 participants