![38% of CISOs Fear They’re Not Moving Fast Enough on AI](https://cdn.sanity.io/images/cgdhsj6q/production/faa0bc28df98f791e11263f8239b34207f84b86f-1024x1024.webp?w=400&fit=max&auto=format)
Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
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.
Library for adding progressive web app functionality in your django project.
Library for adding progressive web app functionality in your django project.
This Django library adds progressive web app functionality in your django project.
When you open your site from your mobile browser, will prompt you to add the site to your home screen as an application.
pip install django-progressive
Add django-progressive django_pwa
to your installed apps INSTALLED_APPS
in django settings.py
INSTALLED_APPS = [
'...',
'django_pwa'
'...'
]
Define STATICFILES_DIRS
In settings.py
using the prefix PWA_ and the keys from the web app manifest
all in capital you can configure the pwa manifest.
PWA_NAME = 'test app'
PWA_SHORT_NAME = 'test_app'
PWA_ICONS = [
{
"src": "/static/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
}, {
"src": "/static/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
}, {
"src": "/static/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
}, {
"src": "/static/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
}, {
"src": "/static/icons/icon-256x256.png",
"sizes": "256x256",
"type": "image/png"
}, {
"src": "/static/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
You can change the default worker location with
PWA_WORKER_LOCATION
.
PWA_WORKER_LOCATION = join('static', 'django_pwa_demo', 'service-worker.js')
Add django_pwa
urls to your urls.py
from django.urls import path, include
urlpatterns = [
'...',
path('', include('django_pwa.urls')),
'...'
]
You can add {% load pwa_extras %}
to use {% load_manifest %}
template tag to load the manifest.json
and {% load_worker %}
to load the worker-app.js
.
{% load pwa_extras %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>PWA Test</title>
{% load_manifest %}
</head>
<body>
<h1>Hello world!!!</h1>
{% load_worker %}
</body>
</html>
FAQs
Library for adding progressive web app functionality in your django project.
We found that django-progressive 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
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.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.