
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
django-singleton-admin-2
Advanced tools
In dynamic applications, it can be somewhat of a pain to have static settings that have to be set in settings.py
. Django Singleton Admin adds an easy way to edit singleton models (e.g a SiteSetting model) to allow administrators to change configuration on the fly.
This is great for things like OAuth settings for third parties, or dynamic settings that you need to pull for your site.
pip install django-singleton-admin-2
django_singleton_admin
to INSTALLED_APPS
# models.py
from django.db import models
class SiteSettings(models.Model):
site_title = models.CharField(max_length=32)
site_domain = models.CharField(max_length=32)
site_description = models.CharField(max_length=32)
@staticmethod
def get_instance():
return SiteSettings.objects.get_or_create(pk=0)
def __str__(self):
return "Site settings"
# admin.py
from django.contrib import admin
from .models import SiteSettings
from django_singleton_admin.admin import DjangoSingletonModelAdmin
admin.site.register(SiteSettings, DjangoSingletonModelAdmin)
FAQs
Easily edit singleton models in the Django admin site
We found that django-singleton-admin-2 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.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.