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-6.0.0b1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

molo.pwa-6.0.0b1-py2-none-any.whl (12.8 kB view details)

Uploaded Python 2

File details

Details for the file molo.pwa-6.0.0b1.tar.gz.

File metadata

  • Download URL: molo.pwa-6.0.0b1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for molo.pwa-6.0.0b1.tar.gz
Algorithm Hash digest
SHA256 1e2f42ecf98dd66414d7257946a9f44d8f0bdab2dac6b5a9f593da46317e488a
MD5 c1fce1871547f8d07cc2583d2c213924
BLAKE2b-256 90e90d5691e41310db84526dedc1da8186b7c6ba6ca9c7fa7014d7878c04ea12

See more details on using hashes here.

Provenance

File details

Details for the file molo.pwa-6.0.0b1-py2-none-any.whl.

File metadata

File hashes

Hashes for molo.pwa-6.0.0b1-py2-none-any.whl
Algorithm Hash digest
SHA256 b1f13c209f15b5fd87dbe044b5d43dc94c9d8d804d6048880e0d6e0273844123
MD5 c091b0ccd21b96c2510483eb0bcaf19f
BLAKE2b-256 4ff3d1575d40f98f765b8de6389c44dff9a8a553096182dfedc86e2ffe3dee3c

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