molo.pwa
An implementation of pwa as a Molo plugin
Installation:
pip install molo.pwa
Django setup:
INSTALLED_APPS = [
...
'molo.pwa',
'fcm_django',
...
]
Configure serviceworker path, app name, description, icons, and FCM:
PWA_SERVICE_WORKER_PATH = join(
PROJECT_ROOT, 'your_app', 'templates', SITE_LAYOUT_BASE, 'serviceworker.js')
PWA_NAME = 'App Name'
PWA_DESCRIPTION = 'App Description'
PWA_THEME_COLOR = '#fff'
PWA_DISPLAY = 'standalone'
PWA_START_URL = '/'
PWA_ICONS = [
{
'src': '/static/img/appicons/app_icon.png',
'sizes': '160x160',
"type": "image/png"
}
]
PWA_FCM_API_KEY = 'FCM API KEY'
PWA_FCM_MSGSENDER_ID = 'FCM MESSAGE SENDER ID'
FCM_DJANGO_SETTINGS = {
"FCM_SERVER_KEY": 'FCM SERVER KEY',
"ONE_DEVICE_PER_USER": True,
"DELETE_INACTIVE_DEVICES": False,
}
In your urls.py:
urlpatterns = [
url(r'', include('molo.pwa.urls')),
...
...
]
In your base.html:
{% load molo_pwa %}
<head>
...
{% molo_pwa_meta %}
...
</head>
Metadata
Release files for molo.pwa 10.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| molo.pwa-10.1.1.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| molo.pwa-10.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.3 kB
Release files / molo.pwa-10.1.1.tar.gz
| Download URL | molo.pwa-10.1.1.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bc121812f6a735637bb4275841fb8c8c36a94d707a51ce62e12084a6017fed4
|
|
BLAKE2b-256 checksum How to use checksums |
91954d658c051b40ef8066742df323abf31f9c97deb52599a7219da23a1c4fef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.7
|
Release files / molo.pwa-10.1.1-py3-none-any.whl
| Download URL | molo.pwa-10.1.1-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7211572c99cc87d66b95d473f22b9879c6eb59bcc56f0557d9dd34e9f22bafcc
|
|
BLAKE2b-256 checksum How to use checksums |
e8f9e8aff22524b63795883b4e353bf03b4e80f4aa0a0d0be3b9a6e1e61e3321
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.7
|