You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

hs-django-admin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hs-django-admin

Customized Django admin panel with advanced UI and real-time system insights.

1.0.0
pipPyPI
Maintainers
1

Himosoft Django Admin

Customized Django admin panel with advanced UI and real-time system insights

Preview

Features

  • Custom admin site
  • System information display (OS, Python version, Django version, database engine)
  • SSL status indicator
  • Custom CSS styling
  • Responsive design
  • NEW: Full compatibility with default Django admin.site.register()

Installation

Option 1: Copy the app to your project

  • Copy the hs_django_admin directory to your Django project
  • Add 'hs_django_admin' to your INSTALLED_APPS in settings.py
  • Update your main urls.py to use the custom admin site

Option 2: Use as a reusable app

  • Add 'hs_django_admin' to your INSTALLED_APPS in settings.py
  • Import and use the custom admin site in your urls.py

Usage

Basic Integration

In you main settings.py

INSTALLED_APPS = [
    'hs_django_admin', # it must be at top
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # ... your other apps
]

In your main urls.py:

from django.urls import path
from hs_django_admin.admin import hs_admin

urlpatterns = [
    path('admin/', hs_admin.urls),
    # ... your other URL patterns
]

Model Registration (Multiple Options)

# your_app/admin.py
from django.contrib import admin
from .models import Product

# This automatically works with the custom admin site!
admin.site.register(Product)

Option 2: Use the custom admin site directly

from hs_django_admin.admin import get_admin_site
from your_app.models import YourModel

admin_site = get_admin_site()
admin_site.register(YourModel)

Option 3: Import the admin site instance directly

from hs_django_admin.admin import hs_admin
from your_app.models import YourModel

hs_admin.register(YourModel)

Option 4: Create your own admin site instance

from hs_django_admin.admin import HSDjangoAdmin
from your_app.models import YourModel

custom_admin = HSDjangoAdmin(name='my_custom_admin')
custom_admin.site_header = "My Custom Admin"
custom_admin.site_title = "My Custom Admin Portal"
custom_admin.register(YourModel)

Advanced ModelAdmin Usage

Using the Mixin

from django.contrib import admin
from hs_django_admin.admin import HSDjangoAdminMixin
from .models import Product

class ProductAdmin(HSDjangoAdminMixin, admin.ModelAdmin):
    list_display = ['name', 'price']
    search_fields = ['name']

admin.site.register(Product, ProductAdmin)

Custom Admin Classes

from hs_django_admin.admin import get_admin_site
from django.contrib import admin
from .models import Product

class ProductAdmin(admin.ModelAdmin):
    list_display = ['name', 'price']
    search_fields = ['name']

admin_site = get_admin_site()
admin_site.register(Product, ProductAdmin)

Manual Compatibility Control

If you need to control when compatibility is enabled:

from hs_django_admin.admin import enable_default_admin_compatibility, disable_default_admin_compatibility

# Enable compatibility
original_register = enable_default_admin_compatibility()

# Your admin registrations here
from django.contrib import admin
from .models import Product
admin.site.register(Product)

# Disable compatibility (optional)
disable_default_admin_compatibility(original_register)

Configuration

The app automatically provides:

  • System information in the admin context
  • Custom styling via static files
  • Enhanced admin templates
  • Automatic compatibility with default admin.site.register()

No additional configuration is required for basic functionality.

Your own branding

  • In in your django settings.py
        # Django Admin Settings
        ADMIN_SITE_HEADER = "Your Own Admin"
        ADMIN_SITE_TITLE = "Your Own Admin"
        ADMIN_INDEX_TITLE = "Welcome to Your Own Admin"
        ADMIN_LOGO_URL = "https://example.com/logo.png" # this will also work as admin shortcut icon
        ADMIN_FOOTER_ENABLED = False # this is a footer of himosoft info. You can disable it ❤️
    

Dependencies

  • Django 5.2+ (tested with Django 5.2.3)
  • No additional Python packages required

Notes

  • The app includes a TestModel for demonstration purposes
  • Custom admin templates override the default Django admin templates
  • Static files are automatically collected when running python manage.py collectstatic
  • Default admin compatibility is automatically enabled when the app loads
  • All existing admin.site.register() calls will work without modification

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If you encounter any issues or have questions, please open an issue on GitHub.

Keywords

django

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts