{"id":16417399,"url":"https://github.com/silviolleite/django-pwa","last_synced_at":"2026-02-21T01:31:11.097Z","repository":{"id":33384475,"uuid":"157887219","full_name":"silviolleite/django-pwa","owner":"silviolleite","description":"Looks like an app, feels like an app, but IS NOT an app. ","archived":false,"fork":false,"pushed_at":"2025-09-17T23:58:46.000Z","size":755,"stargazers_count":618,"open_issues_count":31,"forks_count":117,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-10-21T20:07:43.973Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/silviolleite.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-11-16T15:38:52.000Z","updated_at":"2025-10-18T19:42:41.000Z","dependencies_parsed_at":"2025-05-26T22:23:17.748Z","dependency_job_id":"e8e56a5f-d727-4af3-a54d-94cd990337bf","html_url":"https://github.com/silviolleite/django-pwa","commit_stats":{"total_commits":73,"total_committers":18,"mean_commits":4.055555555555555,"dds":"0.36986301369863017","last_synced_commit":"5ea629263f5d9c820faed44729bb0f3808470da5"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/silviolleite/django-pwa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silviolleite%2Fdjango-pwa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silviolleite%2Fdjango-pwa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silviolleite%2Fdjango-pwa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silviolleite%2Fdjango-pwa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silviolleite","download_url":"https://codeload.github.com/silviolleite/django-pwa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silviolleite%2Fdjango-pwa/sbom","scorecard":{"id":824149,"data":{"date":"2025-08-11","repo":{"name":"github.com/silviolleite/django-pwa","commit":"838d9dd664debdeb01c6483d49e0446aed2a2b49"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 4/16 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":5,"reason":"6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/release.yml:8","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/silviolleite/django-pwa/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/silviolleite/django-pwa/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/silviolleite/django-pwa/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/silviolleite/django-pwa/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/silviolleite/django-pwa/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/silviolleite/django-pwa/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/silviolleite/django-pwa/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:27","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:11"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T16:16:50.263Z","repository_id":33384475,"created_at":"2025-08-23T16:16:50.263Z","updated_at":"2025-08-23T16:16:50.263Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29670124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"ssl_error","status_checked_at":"2026-02-20T23:52:33.807Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T07:11:29.235Z","updated_at":"2026-02-21T01:31:11.063Z","avatar_url":"https://github.com/silviolleite.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"django-pwa\n=====\n[![Build Status](https://travis-ci.org/silviolleite/django-pwa.svg)](https://travis-ci.org/silviolleite/django-pwa)\n[![Maintainability](https://api.codeclimate.com/v1/badges/246542ea921058c4f76f/maintainability)](https://codeclimate.com/github/silviolleite/django-pwa/maintainability)\n[![codecov](https://codecov.io/gh/silviolleite/django-pwa/branch/master/graph/badge.svg)](https://codecov.io/gh/silviolleite/django-pwa)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/django-pwa.svg)](https://pypi.org/project/django-pwa/)\n[![PyPI - Downloads](https://img.shields.io/pypi/v/django-pwa.svg)](https://pypi.org/project/django-pwa)\n[![PyPI - Downloads](https://img.shields.io/pypi/djversions/django-pwa.svg)](https://pypi.org/project/django-pwa)\n\nThis Django app turns your project into a [progressive web app](https://developers.google.com/web/progressive-web-apps/).  Navigating to your site on an Android phone will prompt you to add the app to your home screen.\n\n![Prompt for install](https://github.com/silviolleite/django-pwa/raw/master/images/screenshot1.png)\n\nLaunching the app from your home screen will display your app [without browser chrome](https://github.com/silviolleite/django-pwa/raw/master/images/screenshot2.png).  As such, it's critical that your application provides all navigation within the HTML (no reliance on the browser back or forward button).\n\nRequirements\n=====\nProgressive Web Apps require HTTPS unless being served from localhost.  If you're not already using HTTPS on your site, check out [Let's Encrypt](https://letsencrypt.org/) and [ZeroSSL](https://zerossl.com/).\n\nInstallation\n=====\nInstall from PyPI:\n\n```\npip install django-pwa\n```\n\nConfiguration\n=====\nAdd `pwa` to your list of `INSTALLED_APPS` in settings.py:\n\n```python\nINSTALLED_APPS = [\n    ...\n    'pwa',\n    ...\n]\n```\nDefine STATICFILES_DIRS for your custom PWA_APP_ICONS\n```python\nSTATICFILES_DIRS = [\n    os.path.join(BASE_DIR, 'static'),\n]\n```\n\nConfigure your app name, description, icons, splash screen images, screenshots and shortcuts in settings.py:\n```python\n\nPWA_APP_NAME = 'My App'\nPWA_APP_DESCRIPTION = \"My app description\"\nPWA_APP_THEME_COLOR = '#0A0302'\nPWA_APP_BACKGROUND_COLOR = '#ffffff'\nPWA_APP_DISPLAY = 'standalone'\nPWA_APP_SCOPE = '/'\nPWA_APP_ORIENTATION = 'any'\nPWA_APP_START_URL = '/'\nPWA_APP_STATUS_BAR_COLOR = 'default'\nPWA_APP_ICONS = [\n    {\n        'src': '/static/images/my_app_icon.png',\n        'sizes': '160x160'\n    }\n]\nPWA_APP_ICONS_APPLE = [\n    {\n        'src': '/static/images/my_apple_icon.png',\n        'sizes': '160x160'\n    }\n]\nPWA_APP_SPLASH_SCREEN = [\n    {\n        'src': '/static/images/icons/splash-640x1136.png',\n        'media': '(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)'\n    }\n]\nPWA_APP_DIR = 'ltr'\nPWA_APP_LANG = 'en-US'\nPWA_APP_SHORTCUTS = [\n    {\n        'name': 'Shortcut',\n        'url': '/target',\n        'description': 'Shortcut to a page in my application'\n    }\n]\nPWA_APP_SCREENSHOTS = [\n    {\n      'src': '/static/images/icons/splash-750x1334.png',\n      'sizes': '750x1334',\n      \"type\": \"image/png\"\n    }\n]\n\n```\n#### Show console.log\nSet the `PWA_APP_DEBUG_MODE = False` to disable the the `console.log` on browser.\n\nAll settings are optional, and the app will work fine with its internal defaults.  Highly recommend setting at least `PWA_APP_NAME`, `PWA_APP_DESCRIPTION`, `PWA_APP_ICONS` and `PWA_APP_SPLASH_SCREEN`.\nIn order to not use one of the internal defaults, a setting can be set to an empty string or list, whichever one is applicable.\n\nAdd the progressive web app URLs to urls.py:\n```python\nfrom django.urls import url, include\n\nurlpatterns = [\n    ...\n    url('', include('pwa.urls')),  # You MUST use an empty string as the URL prefix\n    ...\n]\n```\n\nInject the required meta tags in your base.html (or wherever your HTML \u0026lt;head\u0026gt; is defined):\n```html\n{% load pwa %}\n\n\u003chead\u003e\n    ...\n    {% progressive_web_app_meta %}\n    ...\n\u003c/head\u003e\n```\n\nTroubleshooting\n=====\nWhile running the Django test server:\n\n1. Verify that `/manifest.json` is being served\n2. Verify that `/serviceworker.js` is being served\n3. Verify that `/offline` is being served\n4. Use the Application tab in the Chrome Developer Tools to verify the progressive web app is configured correctly.\n5. Use the \"Add to homescreen\" link on the Application Tab to verify you can add the app successfully.\n\n\nThe Service Worker\n=====\nBy default, the service worker implemented by this app is:\n```js\n// Base Service Worker implementation.  To use your own Service Worker, set the PWA_SERVICE_WORKER_PATH variable in settings.py\n\nvar staticCacheName = \"django-pwa-v\" + new Date().getTime();\nvar filesToCache = [\n    '/offline',\n    '/css/django-pwa-app.css',\n    '/images/icons/icon-72x72.png',\n    '/images/icons/icon-96x96.png',\n    '/images/icons/icon-128x128.png',\n    '/images/icons/icon-144x144.png',\n    '/images/icons/icon-152x152.png',\n    '/images/icons/icon-192x192.png',\n    '/images/icons/icon-384x384.png',\n    '/images/icons/icon-512x512.png',\n    '/static/images/icons/splash-640x1136.png',\n    '/static/images/icons/splash-750x1334.png',\n    '/static/images/icons/splash-1242x2208.png',\n    '/static/images/icons/splash-1125x2436.png',\n    '/static/images/icons/splash-828x1792.png',\n    '/static/images/icons/splash-1242x2688.png',\n    '/static/images/icons/splash-1536x2048.png',\n    '/static/images/icons/splash-1668x2224.png',\n    '/static/images/icons/splash-1668x2388.png',\n    '/static/images/icons/splash-2048x2732.png'\n];\n\n// Cache on install\nself.addEventListener(\"install\", event =\u003e {\n    this.skipWaiting();\n    event.waitUntil(\n        caches.open(staticCacheName)\n            .then(cache =\u003e {\n                return cache.addAll(filesToCache);\n            })\n    )\n});\n\n// Clear cache on activate\nself.addEventListener('activate', event =\u003e {\n    event.waitUntil(\n        caches.keys().then(cacheNames =\u003e {\n            return Promise.all(\n                cacheNames\n                    .filter(cacheName =\u003e (cacheName.startsWith(\"django-pwa-\")))\n                    .filter(cacheName =\u003e (cacheName !== staticCacheName))\n                    .map(cacheName =\u003e caches.delete(cacheName))\n            );\n        })\n    );\n});\n\n// Serve from Cache\nself.addEventListener(\"fetch\", event =\u003e {\n    event.respondWith(\n        caches.match(event.request)\n            .then(response =\u003e {\n                return response || fetch(event.request);\n            })\n            .catch(() =\u003e {\n                return caches.match('offline');\n            })\n    )\n});\n```\n\nAdding Your Own Service Worker\n=====\nTo add service worker functionality, you'll want to create a `serviceworker.js` or similarly named template in a template directory, and then point at it using the PWA_SERVICE_WORKER_PATH variable (PWA_APP_FETCH_URL is passed through).\n\n```python\nPWA_SERVICE_WORKER_PATH = os.path.join(BASE_DIR, 'my_app', 'serviceworker.js')\n\n```\n\nThe offline view\n=====\nBy default, the offline view is implemented in `templates/offline.html`\nYou can overwrite it in a template directory if you continue using the default `serviceworker.js`.\n\n\nFeedback\n=====\nI welcome your feedback and pull requests.  Enjoy!\n\nLicense\n=====\nAll files in this repository are distributed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilviolleite%2Fdjango-pwa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilviolleite%2Fdjango-pwa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilviolleite%2Fdjango-pwa/lists"}