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.
1 sam_djtools.DbUtils, 2 sam_djtools.EmailUtils, 3. sam_djtools.GeneralUtils 4. Primary key based form navigation to explore next/prev records.
Installation
pip install sam-djtools
Add sam_djtools
in installed apps in settings.py
of django project
INSTALLED_APPS = [ 'sam_djtools', # ... ] (at the top)
Description
It adds Next and Prev buttons to the top of each edit form of django admin site
for all the models of all the apps in your project, without need to do anything
except installing the module with pip plus adding to the top of INSTALLED_APPS
in settings.py
Instructions to run the sample usage
git clone https://github.com/humblesami/sam-djtools.git
cd sample_usage
pip install -r requirements.txt
python manage.py resetdb
admin@localhost
with password 123
ModelWithUpdateLog
python manage.py runsever
GeneralUtils, EmailUtils, DbUtils
having variety of methods
which we commonly would need to write in django projectFIXTURES_PATH = str(BASE_DIR) + '/fixtures.json'
to your existing data
so all can be reset using a single commandSamModel
and
the SamModel
is set to maintain all the update logs automaticallyfrom django.db import models
from sam_djtools.admin_models import SamModel
class ModelWithUpdateLog(SamModel):
name = models.CharField(max_length=100)
def __str__(self):
return self.name
and an admin as
from django.contrib import admin
from sam_djtools.admin_models import SamAdmin
from .models import ModelWithUpdateLog
class ModelUpdateLogAdmin(SamAdmin):
pass
admin.site.register(ModelWithUpdateLog, ModelUpdateLogAdmin)
This admin will show all record update logs in form because we have set
ADMIN_UPDATE_LOGS = True
in settings.py
Open following url in your browser and login with given username admin@localhost
and password 123
http://localhost:8000/admin/sample_app/modelwithupdatelog/1/change/
to explore the update logs
and navigation
feature
FAQs
1 sam_djtools.DbUtils, 2 sam_djtools.EmailUtils, 3. sam_djtools.GeneralUtils 4. Primary key based form navigation to explore next/prev records.
We found that sam-djtools 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.