Dj Error Panel
Monitor errors and stacktraces right fromn the django admin
Compatible with dj-control-room. Register this panel in the Control Room to manage it from a centralized dashboard.
- Official site: djangocontrolroom.com
- Project repo: dj-control-room
Docs
https://yassi.github.io/dj-error-panel/
Features
- TBD: Add your main features here
Project Structure
dj-error-panel/
├── dj_error_panel/ # Main package
│ ├── templates/ # Django templates
│ ├── views.py # Django views
│ └── urls.py # URL patterns
├── example_project/ # Example Django project
├── tests/ # Test suite
├── images/ # Screenshots for README
└── requirements.txt # Development dependencies
Requirements
- Python 3.9+
- Django 4.2+
Screenshots
Django Admin Integration
Seamlessly integrated into your Django admin interface. A new section for dj-error-panel will appear in the same places where your models appear.
NOTE: This application does not actually introduce any model or migrations.
Installation
1. Install the Package
pip install dj-error-panel
2. Add to Django Settings
Add dj_error_panel to your INSTALLED_APPS:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'dj_error_panel', # Add this line
# ... your other apps
]
3. Configure Settings (Optional)
Add any custom configuration to your Django settings if needed:
# Optional: Add custom settings for dj_error_panel
DJ_ERROR_PANEL_SETTINGS = {
# Add your configuration here
}
4. Include URLs
Add the Panel URLs to your main urls.py:
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/dj-error-panel/', include('dj_error_panel.urls')), # Add this line
path('admin/', admin.site.urls),
]
5. Run Migrations and Create Superuser
python manage.py migrate
python manage.py createsuperuser # If you don't have an admin user
6. Access the Panel
-
Start your Django development server:
python manage.py runserver
-
Navigate to the Django admin at
http://127.0.0.1:8000/admin/ -
Look for the "DJ ERROR PANEL" section in the admin interface
DJ Control Room Integration
This panel is designed to work seamlessly with DJ Control Room, a centralized dashboard for managing Django admin panels.
Integration
register your panel in django's installed apps
-
Add
dj_control_roomtoINSTALLED_APPS:INSTALLED_APPS = [ # ... other apps 'dj_control_room', 'dj_error_panel', ]
-
Include the Control Room URLs in your
urls.py:urlpatterns = [ path('', include('dj_error_panel.urls')), # Panel URLs path('admin/dj-control-room/', include('dj_control_room.urls')), # Control Room path('admin/', admin.site.urls), ]
-
Visit
/admin/dj-control-room/to see all your panels in one place!
Panel Configuration
The panel is configured via the panel.py file with the following attributes:
- ID:
dj_error_panel - Name: Dj Error Panel
- Description: Monitor errors and stacktraces right fromn the django admin
- Icon: cog
You can customize these values by editing dj_error_panel/panel.py.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Development Setup
If you want to contribute to this project or set it up for local development:
Prerequisites
- Python 3.9 or higher
- Redis server running locally
- Git
- Autoconf
- Docker
It is reccommended that you use docker since it will automate much of dev env setup
1. Clone the Repository
git clone https://github.com/yassi/dj-error-panel.git
cd dj-error-panel
2a. Set up dev environment using virtualenv
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e . # install dj-error-panel package locally
pip intall -r requirements.txt # install all dev requirements
# Alternatively
make install # this will also do the above in one single command
2b. Set up dev environment using docker
make docker_up # bring up all services (redis, memached) and dev environment container
make docker_shell # open up a shell in the docker conatiner
3. Set Up Example Project
The repository includes an example Django project for development and testing
cd example_project
python manage.py migrate
python manage.py createsuperuser
4. Populate Test Data (Optional)
Add any custom management commands for populating test data if needed.
6. Run the Development Server
python manage.py runserver
Visit http://127.0.0.1:8000/admin/ to access the Django admin with Dj Error Panel.
7. Running Tests
The project includes a comprehensive test suite. You can run them by using make or by invoking pytest directly:
# build and install all dev dependencies and run all tests inside of docker container
make test_docker
# Test without the docker on your host machine.
# note that testing always requires a redis and memcached service to be up.
# these are mostly easily brought up using docker
make test_local
Metadata
Release files for dj-error-panel 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dj_error_panel-0.1.0.tar.gz | 14.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dj_error_panel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.0 kB
Release files / dj_error_panel-0.1.0.tar.gz
| Download URL | dj_error_panel-0.1.0.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2452f7faf8ee3c1469ae23b6cde700eb9015ebedc084826e505a7db3ba486228
|
|
BLAKE2b-256 checksum How to use checksums |
a0074b67aa9b52c55144af053af591c5c5bde70b314f85cc6becef5aaee2a550
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.7
|
Release files / dj_error_panel-0.1.0-py3-none-any.whl
| Download URL | dj_error_panel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0961dfaf5176817c493da5ff9c1664caab976c75a16887e72d5955e88045c8cc
|
|
BLAKE2b-256 checksum How to use checksums |
1a4320f755b42786de0dbd5407e12ca097fb711fb34b5305378bb610df3ad2f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.7
|