Skip to main content

molo.pwa

https://img.shields.io/travis/praekelt/molo.pwa.svg https://img.shields.io/pypi/v/molo.pwa.svg Code Coverage

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)

Source distribution for molo.pwa 10.1.1
File Size Uploaded
molo.pwa-10.1.1.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for molo.pwa 10.1.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

10.1.1 This release

2 release files

10.0.0

2 release files

8.0.0

2 release files

7.0.0

3 release files

6.2.0

3 release files

6.1.2

3 release files

6.1.1

3 release files

6.1.0

2 release files

6.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page