Reusable Wagtail Admin URL package to manage wagtail admin login url.
Project description
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.
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.)
🔒 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wagtail_admin_login_url-0.1.0.tar.gz.
File metadata
- Download URL: wagtail_admin_login_url-0.1.0.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
855b4d11f57d71f491040be4ffcc13a3214a1f21f1f393dfcb3dda26a2a7b967
|
|
| MD5 |
8416bb7f4554adf7a36f8cf3ad8c87d6
|
|
| BLAKE2b-256 |
162bd47d86796780dadbf9f8ccc8d3943711b9e71cb463c6b40f1c9a43440c49
|
File details
Details for the file wagtail_admin_login_url-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wagtail_admin_login_url-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f7bad4d297e8e3ff33f977a879b5d8c73f43d7568aaa85747408ad427738fb3
|
|
| MD5 |
13ea47407fa2acad24bf86e1fa7d6782
|
|
| BLAKE2b-256 |
4bc04300fb50adecf58298ea7dcd895a911e17dd7a76185a1aac31d8b686a0a3
|