Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Django Formsets with ECMAScript 6
Installation is easy using pip and the only requirement is a recent version of Django.
python -m pip install django-easy-formset
Then to add the Django Easy Formset to your project add the app easy_formset
to
your INSTALLED_APPS
.
INSTALLED_APPS = [
# ...
"easy_formset",
]
{% load static %}
<head>
<link rel="stylesheet" href="{% static 'easy_formset/easy_formset.css' %}">
</head>
<body>
<div id="{{ formset.prefix }}">
{{ formset.management_form }}
<template formset-empty-form="{{ formset.prefix }}">
{{ formset.empty_form.as_p }}
<a formset-form-delete="{{ formset.empty_form.prefix }}>Delete</a>
</template>
<div formset-forms="{{ formset.prefix }}">
{% for form in formset.forms %}
<div formset-form>
{{ form.as_p }}
<a formset-form-delete="{{ form.prefix }}>Delete</a>
</div>
{% endfor %}
</div>
<button formset-add="{{ formset.prefix }}">Add Formset</button>
</div>
...
<script src="{% static 'easy_formset/easy_formset.js' %}"></script>
<script>
const formset = new Formset("{{ formset.prefix }}")
</script>
</body>
// add one root element...
Formset.revertHTML = '<a href="#">Custom undo link...</a>'
const formset = new Formset("{{ formset.prefix }}")
document.addEventListener('formset:add', (event) => {
// access the form with event.detail.form
})
document.addEventListener('formset:deleted', (event) => {
// access the form with event.detail.form
})
See examples in tests.testapp
.
python -m pip -r requirements.txt
pytest
python manage.py runserver
FAQs
Django Formsets with ECMAScript 6.
We found that django-easy-formset 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.