0001-pwa-allow-custom-title-32371.patch
combo/apps/pwa/templates/combo/manifest.json | ||
---|---|---|
1 | 1 |
{% load static thumbnail %}{ |
2 |
"name": "{% firstof global_title "Compte Citoyen" %}", |
|
3 |
"short_name": "{% firstof global_title "Compte Citoyen" %}", |
|
2 |
"name": "{% firstof pwa_title global_title "Compte Citoyen" %}",
|
|
3 |
"short_name": "{% firstof pwa_title global_title "Compte Citoyen" %}",
|
|
4 | 4 |
"start_url": "{% firstof pwa_start_url "/" %}", |
5 | 5 |
{% if theme_color %} |
6 | 6 |
"background_color": "{{ theme_color }}", |
tests/test_pwa.py | ||
---|---|---|
32 | 32 |
with override_settings(TEMPLATE_VARS={'global_title': 'FooBar'}): |
33 | 33 |
assert app.get('/manifest.json', status=200).json['name'] == 'FooBar' |
34 | 34 | |
35 |
with override_settings(TEMPLATE_VARS={'pwa_title': 'CustomTitle', 'global_title': 'FooBar'}): |
|
36 |
assert app.get('/manifest.json', status=200).json['name'] == 'CustomTitle' |
|
37 | ||
35 | 38 |
def test_service_worker(app): |
36 | 39 |
app.get('/service-worker.js', status=200) |
37 | 40 |
app.get('/service-worker-registration.js', status=200) |
38 |
- |