Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
django-singleton-admin
Advanced tools
This package provides a way to ensure singleton classes can only have one instance in the Django admin panel. It is taken from Mezzanine by Stephen McDonald.
This package provides a way to ensure singleton classes can only have one instance in the Django admin panel. The package contains:
The admin.py file is taken directly from Mezzanine by Stephen McDonald, https://bitbucket.org/stephenmcd/mezzanine/src/
The template file is taken from a talk at SyDjango by Stephen McDonald, http://blog.jupo.org/2012/10/26/sydjango-talk-django-admin-missing-manual/
See Mezzanine for more details.
Add the app to your INSTALLED_APPS setting like this::
INSTALLED_APPS = (
...
'django_singleton_admin',
)
In your singleton model's admin.py file, register it with the admin using this class, e.g.::
from django_singleton_admin.admin import SingletonAdmin
class GlobalSettingsAdmin(SingletonAdmin):
pass
admin.site.register(BSGlobalSettings, GlobalSettingsAdmin)
Extend the admin template "admin/base_site.py" using the provided base instead of of the usual "admin/base.html", i.e. using:
{% extends "admin/singleton_enabled_base.html" %}
Note that this template uses the "extrastyle" block, so if you also override that, you will need to copy the contents of the provided template into your code instead. (In that case you may not need to add the app to your installed apps either.)
FAQs
This package provides a way to ensure singleton classes can only have one instance in the Django admin panel. It is taken from Mezzanine by Stephen McDonald.
We found that django-singleton-admin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.