Skip to main content

This is the molo.pwa project.

Project description

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>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

molo.pwa-8.0.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

molo.pwa-8.0.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file molo.pwa-8.0.0.tar.gz.

File metadata

  • Download URL: molo.pwa-8.0.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

File hashes

Hashes for molo.pwa-8.0.0.tar.gz
Algorithm Hash digest
SHA256 45efaa8aa8f93654e0703cf7e37120d0af9680e4e108ca436f9ebcc1190a37ad
MD5 d609a7a8da50b72fe233cee2128e51c2
BLAKE2b-256 1eeabc4e01577b2c257e0eec14064d051cd157cbcc0683fa5bb08a9bb27c534b

See more details on using hashes here.

Provenance

File details

Details for the file molo.pwa-8.0.0-py3-none-any.whl.

File metadata

  • Download URL: molo.pwa-8.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

File hashes

Hashes for molo.pwa-8.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9919c6d29480b8c8ed8b9242b4b880585816c9931d1dddbe2a492b5668591017
MD5 8286b926b980eb71d0291bae6e6cb7d7
BLAKE2b-256 3dd3bc575de20d99181e30df479b59bb6a80eed979bf6eeafc6ca0aaf7ec03d3

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page