Skip to main content

Wagtail Admin Login URL

A Wagtail package to enhance the security of the Wagtail admin login page by allowing administrators to configure a custom login URL, apply IP whitelisting/blacklisting, enable optional throttling, and view detailed login logs directly from the admin dashboard.

✨ Features

  • 🔒 Custom Admin Login URL Hide the default /admin/login/ endpoint by specifying your own secure path. Example: /secret-portal/

  • ⚙️ Enable/Disable from Dashboard Easily toggle the custom login URL setting without touching code.

  • 🛡️ IP Whitelisting & Blacklisting Restrict access to the admin login page by allowing or blocking specific IP ranges.

  • ⏳ Optional Login Throttling Protect against brute force attacks by limiting repeated login attempts.

  • 📑 Login Logs Track login activity, including failed attempts, directly from Wagtail’s Reports menu.

📦 Installation

pip install wagtail-admin-login-url

Add to your INSTALLED_APPS in settings.py:

INSTALLED_APPS = [
    ...
    'wagtail_admin_login_url',
    ...
]

⚙️ Configuration

Middleware

Add the middleware to your MIDDLEWARE list:

MIDDLEWARE = [
    ...
    "wagtail_admin_login_url.middleware.AdminLoginURLMiddleware",
]

Migrate Wagtail Admin URL

python manage.py migrate wagtail_admin_login_url

⚙️ Usage

Settings

In Wagtail Admin > Settings > Admin Login URL, you can configure:

  • Enable Custom URL: Toggle to enable or disable custom login URL.
  • Custom Admin Path: Set your custom path (e.g. /my-secret-admin/).
  • IP Whitelist: Allow access only from specified IPs (optional).
  • IP Blacklist: Block access from specified IPs (optional).
  • Throttling: Limit login attempts per IP (optional).
  • Logging: Enable or disable login attempt logging.

Wagtail Admin URL Settings Screenshot

Reports

  • Login activity is available under Reports > Admin Login Logs.

  • Includes details such as:

    • IP Address
    • Timestamp
    • Username (if provided)
    • Success/Failure status
    • Reason (blocked, throttled, etc.)

Wagtail Admin Screenshot

🔒 Security Notes

  • Use this package as an additional security-through-obscurity layer.

  • Always combine with:

    • Strong passwords
    • Multi-Factor Authentication (MFA)
    • Proper server-level hardening

⚙️ Testing

python -m unittest discover tests

📜 License

This project is licensed under the MIT License.

🙌 Contributing

Contributions are welcome! Please open issues and pull requests on the GitHub repository.

Metadata

Release files for wagtail-admin-login-url 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-admin-login-url 0.1.0
File Size Uploaded
wagtail_admin_login_url-0.1.0.tar.gz 17.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-admin-login-url 0.1.0
File Interpreter ABI Platform
wagtail_admin_login_url-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.1 kB

Release files / wagtail_admin_login_url-0.1.0.tar.gz

Download URL wagtail_admin_login_url-0.1.0.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
855b4d11f57d71f491040be4ffcc13a3214a1f21f1f393dfcb3dda26a2a7b967
BLAKE2b-256 checksum
How to use checksums
162bd47d86796780dadbf9f8ccc8d3943711b9e71cb463c6b40f1c9a43440c49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Release files / wagtail_admin_login_url-0.1.0-py3-none-any.whl

Download URL wagtail_admin_login_url-0.1.0-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f7bad4d297e8e3ff33f977a879b5d8c73f43d7568aaa85747408ad427738fb3
BLAKE2b-256 checksum
How to use checksums
4bc04300fb50adecf58298ea7dcd895a911e17dd7a76185a1aac31d8b686a0a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page