An extensible Django app that displays system version information in the admin interface
Project description
Django About
An extensible Django app that displays system version information in the Django admin interface.
Features
- 📊 Version Display: Shows versions of Django, Python, PostgreSQL, Celery, and Redis
- 🔍 Git Information: Displays git commit hash, deployment date, and repository URL
- 📦 Third Party Apps: Automatically detects and displays Django apps and Python integrations
- 📈 Cache Statistics: View Redis cache statistics (read-only, no clearing)
- 🎨 Clean Admin Integration: Seamlessly integrates with Django's admin interface
- ⚙️ Highly Configurable: Customize what information is shown and section display order
- 🔌 Optional Dependencies: Gracefully handles missing Celery or Redis
- 🛠️ Extensible: Add custom information sections
- ⚡ Performance Optimized: Lazy-loading for large package lists keeps initial page load fast
Screenshots
The About dashboard integrates seamlessly with Django's admin interface, providing a clean and organized view of your system information.
Normal Django Admin View
Top of About Page
Shows the page_title and page_intro customizable sections in use and default version of "show_dashboard_description": True,. Also shows the Code Information Section (shows git commit hash and deployment date) and Software Version Information (Displays major software versions with links to documentation)
Third Party Apps
Django apps grouped by their distribution package:
Third Party Integrations
Important integrations highlighted, with others in a collapsible section:
Custom Sections (Optional)
Example custom section showing environment configuration:
Example of how settings.py can be edited to show a custom section showing environment info:
The interface uses Django admin's native styling for a consistent, professional appearance.
Installation
Install using pip:
pip install django-about
Quick Start
1. Add to INSTALLED_APPS
Add about and django.contrib.humanize to your INSTALLED_APPS in settings.py:
INSTALLED_APPS = [
# ...
'django.contrib.admin',
'django.contrib.humanize', # Required for template filters
# ...
'about', # Add this
]
2. Add URL Pattern
Include the about URLs in your project's urls.py:
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/about/', include('about.urls')), # Add before admin
path('admin/', admin.site.urls),
# ... other patterns
]
3. Access the Dashboard
- Start your Django development server
- Login to the Django admin at
/admin/ - Click on "About" in the admin index
- Or navigate directly to
/admin/about/
That's it! The about dashboard should now be accessible.
Configuration
All configuration is optional. Add a ABOUT_CONFIG dictionary to your settings.py to customize:
ABOUT_CONFIG = {
# What to display (all default to True)
'show_django_version': True,
'show_python_version': True,
'show_database_version': True,
'show_celery_version': True,
'show_redis_version': True,
'show_git_info': True,
'show_cache_stats': True,
'show_third_party_apps': True,
'show_dashboard_description': True, # Show default description text
# Page customization
'page_title': 'About',
'page_intro': 'This project does this and that really well.',
# Where to get release version (checked in order)
'release_env_vars': [
'HEROKU_SLUG_COMMIT',
'GIT_COMMIT',
'COMMIT_SHA',
'CI_COMMIT_SHA',
],
# Where to get release date (checked in order)
'release_date_env_vars': [
'HEROKU_RELEASE_CREATED_AT',
'DEPLOY_DATE',
'RELEASE_DATE',
],
# Highlight important integrations at the top
'important_integrations': {
'sentry-sdk',
'rollbar',
'scout-apm',
'redis',
'django-redis',
'whitenoise',
},
# Custom sections (list of callables)
'custom_sections': [],
# Control the order of sections (optional)
'section_order': None, # Use None for default order
# Show section IDs as badges (helpful for configuring section_order)
'show_section_ids': False, # Set to True to display section IDs next to titles
}
Page Intro
Add a custom introduction at the top of the dashboard to describe your project:
ABOUT_CONFIG = {
'page_intro': """
This project does this and that really well.
<strong>Use this dashboard to check in on the software that runs your site/project.</strong>
""",
}
The intro text appears in a highlighted box at the top of the page, before the standard dashboard description. HTML is supported, so you can use tags like <strong>, <em>, <a>, <ul>, etc. for formatting.
Tip: If you provide a custom page_intro, you can hide the default dashboard description by setting show_dashboard_description: False in your config.
Adding Custom Sections
You can add custom information sections to the dashboard to display application-specific data. Each section function should return a dict with title and content keys:
from django.conf import settings
def environment_info():
"""Display current environment and feature flags."""
env = settings.ENVIRONMENT_NAME
debug = settings.DEBUG
content = f"""
<ul>
<li><strong>Environment:</strong> {env}</li>
<li><strong>Debug Mode:</strong> {'Enabled' if debug else 'Disabled'}</li>
<li><strong>Allowed Hosts:</strong> {', '.join(settings.ALLOWED_HOSTS)}</li>
</ul>
"""
return {
'title': 'Environment Configuration',
'content': content,
}
def external_services():
"""Show configured external services."""
services = [
('Stripe API', settings.STRIPE_PUBLISHABLE_KEY[:20] + '...'),
('SendGrid API', 'Configured' if settings.SENDGRID_API_KEY else 'Not configured'),
('S3 Bucket', settings.AWS_STORAGE_BUCKET_NAME),
]
rows = ''.join([
f'<tr><td><strong>{name}</strong></td><td>{value}</td></tr>'
for name, value in services
])
content = f'<table style="width: 100%;"><tbody>{rows}</tbody></table>'
return {
'title': 'External Services',
'content': content,
}
ABOUT_CONFIG = {
'custom_sections': [environment_info, external_services],
}
Use cases for custom sections:
- Display environment-specific configuration
- Show feature flags and their current state
- List configured external services (APIs, S3, email providers)
- Display application-specific metrics
- Show active background jobs or scheduled tasks
- List custom middleware or installed plugins
Controlling Section Order
By default, sections appear in a standard order. You can customize the order by specifying section_order in your config:
ABOUT_CONFIG = {
'page_intro': 'Welcome to our application!',
'custom_sections': [environment_info, external_services],
'section_order': [
'page_intro', # Show intro first
'software_versions', # Then software versions
'environment_info', # Custom section (by function name)
'cache_stats', # Then cache stats
'external_services', # Another custom section
'third_party_apps', # Django apps
'third_party_integrations', # Other integrations
],
'show_section_ids': False, # Set to True to display section IDs next to titles
}
Available section IDs:
page_intro- Your custom intro messagedashboard_description- Default description blockcode_info- Git commit and deployment infosoftware_versions- Django, Python, database, etc.cache_stats- Cache statisticsthird_party_apps- Django apps from INSTALLED_APPSthird_party_integrations- Other Python packages- Custom sections: Use the function name (e.g.,
environment_infofor a function namedenvironment_info), or specify with'id'key in the returned dict
Important: Sections not listed in section_order will still appear if enabled - they'll just be added at the end in default order. This "forgiving" behavior ensures you don't accidentally hide important information.
Discovering Section IDs
To help you configure section_order without reading source code, you can enable section ID display:
ABOUT_CONFIG = {
'show_section_ids': True,
}
When enabled, each section title will show its ID as a small gray badge, like:
Code Information [code_info]
This makes it easy to see which section IDs you can use in your section_order configuration. The feature is disabled by default to keep the interface clean in production.
Git Integration
Django About can display git commit information in several ways:
From Environment Variables (Recommended for Production)
Set environment variables before deploying:
export GIT_COMMIT=$(git rev-parse HEAD)
export DEPLOY_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
Heroku
Enable dyno metadata:
heroku labs:enable runtime-dyno-metadata -a your-app-name
Django About will automatically detect HEROKU_SLUG_COMMIT and HEROKU_RELEASE_CREATED_AT.
Automatic Git Detection (Development)
If no environment variables are set, Django About will try to run git commands to detect the current commit. This works in development but won't work in production (git is typically not installed in production containers).
Requirements
-
Required:
- Python 3.8+
- Django 3.2+
-
Optional (auto-detected):
- Celery (for Celery version display)
- Redis / django-redis (for cache statistics)
- Git (for automatic commit detection in development)
Version Detection
Django About detects versions for:
- Django: Via
django.get_version() - Python: Via
sys.version - PostgreSQL: Via
SELECT version()SQL query - MySQL/MariaDB: Via
SELECT version()SQL query - SQLite: Via
SELECT version()SQL query - Celery: Via
celery.__version__(graceful fallback if not installed) - Redis: Via Redis INFO command (graceful fallback if not available)
All version detection includes graceful error handling - if a component can't be detected, it simply won't be displayed.
Permissions
The about view is restricted to staff users only (users with is_staff=True). This is enforced via Django's @staff_member_required decorator.
Cache Statistics
When Redis is configured as your cache backend, Django About displays:
- Cache backend type
- Total number of cache keys
- Used memory / Max memory
- Redis server version
- Connected clients
- Redis uptime
Note: Cache statistics are read-only. This package does NOT provide cache clearing functionality for safety reasons.
Third Party Apps & Integrations
Django About automatically detects and displays information about third-party packages in your project:
Django Apps
Shows third-party Django apps (from INSTALLED_APPS) grouped by their distribution package, including:
- Package name and version
- Homepage/documentation links
- All Django app labels provided by that package
Example: django-allauth would show with all its apps: allauth, account, socialaccount, etc.
Integrations
Shows Python packages that don't require INSTALLED_APPS registration but may be actively used by your application (like sentry-sdk, redis, requests, etc.), separated into:
- Important Integrations: Packages you specify in
important_integrationsconfig (e.g., Sentry, monitoring tools) - always loaded on page load - Other Integrations: All other installed packages, collapsed by default in an accordion with lazy-loading
Performance: Lazy Loading
For performance, "Other Integrations" are not scanned on initial page load. Instead, users see a button to "Click to scan X integrations" when they expand that section. This keeps page load times fast (typically under 100ms) even in projects with 100+ installed packages.
When the button is clicked, the integrations are scanned via AJAX and displayed dynamically. This approach provides the best of both worlds:
- Fast initial page load for most users
- Full package information available on-demand for those who need it
Customizing Important Integrations
ABOUT_CONFIG = {
'important_integrations': {
'sentry-sdk', # Error tracking
'rollbar', # Alternative error tracking
'scout-apm', # Performance monitoring
'redis', # Redis client
'django-redis', # Django Redis integration
'whitenoise', # Static file serving
},
}
This helps you quickly identify critical integrations while keeping the interface clean.
Compatibility
| Django Version | Python Version | Status |
|---|---|---|
| 5.2 | 3.10 - 3.12 | ✅ Tested |
| 5.1 | 3.10 - 3.12 | ✅ Tested |
| 5.0 | 3.10 - 3.12 | ✅ Supported |
| 4.2 (LTS) | 3.8 - 3.12 | ✅ Supported |
| 4.1 | 3.8 - 3.11 | ✅ Supported |
| 4.0 | 3.8 - 3.10 | ✅ Supported |
| 3.2 (LTS) | 3.6 - 3.10 | ✅ Supported |
Development
To set up for development:
# Clone the repository
git clone https://github.com/markcerv/django-about.git
cd django-about
# Create virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Credits
Created for use in Django projects that need to display system version information.
Changelog
See CHANGELOG.md for version history.
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 django_about-0.1.3.tar.gz.
File metadata
- Download URL: django_about-0.1.3.tar.gz
- Upload date:
- Size: 284.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2054cae60c0a0feff2e06a057d1541086f2d6f812aa2110a69c6c9ce64368128
|
|
| MD5 |
4e95f9e570b1e6d9c367ce61692f21a2
|
|
| BLAKE2b-256 |
5fe54ad76484c623d855056fdb8244cbebb0582e3018ec8037a53373a670ff11
|
File details
Details for the file django_about-0.1.3-py3-none-any.whl.
File metadata
- Download URL: django_about-0.1.3-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
758419841896f7defb4e332bdc658b67522fbcb101756e7dd2c02a8d8fbf7165
|
|
| MD5 |
bb2b4e14618557c1a0448cbb0f1b95c3
|
|
| BLAKE2b-256 |
44fc86fd49d238de2b85de40aa796ba603c436d570765f594535204a726820ce
|