def manifest(request): ctx = RequestContext(request) data = { "name": getattr(settings, "WEBAPP_MANIFEST_NAME", "Firefox Marketplace"), "description": "The Firefox Marketplace", "developer": {"name": "Mozilla", "url": "http://mozilla.org"}, "icons": { # Using the default addon image until we get a marketplace logo. "128": media(ctx, "img/mkt/logos/128.png"), "64": media(ctx, "img/mkt/logos/64.png"), "32": media(ctx, "img/mkt/logos/32.png"), }, "activities": { "marketplace-app": {"href": "/"}, "marketplace-app-rating": {"href": "/"}, "marketplace-category": {"href": "/"}, "marketplace-search": {"href": "/"}, }, } if get_carrier(): data["launch_path"] = urlparams("/", carrier=get_carrier()) manifest_content = json.dumps(data) manifest_etag = hashlib.sha256(manifest_content).hexdigest() @etag(lambda r: manifest_etag) def _inner_view(request): response = HttpResponse(manifest_content, content_type="application/x-web-app-manifest+json") return response return _inner_view(request)
def manifest(request): ctx = RequestContext(request) use_appcache = 'skip_appcache' not in request.GET data = { 'name': getattr(settings, 'WEBAPP_MANIFEST_NAME', 'Firefox Marketplace'), 'description': 'The Firefox Marketplace', 'developer': { 'name': 'Mozilla', 'url': 'http://mozilla.org', }, 'icons': { # Using the default addon image until we get a marketplace logo. '128': media(ctx, 'img/mkt/logos/128.png'), '64': media(ctx, 'img/mkt/logos/64.png'), '32': media(ctx, 'img/mkt/logos/32.png'), }, # TODO: when we have specific locales, add them in here. 'locales': {}, 'default_locale': 'en-US' } if use_appcache: data['appcache_path'] = reverse('django_appcache.manifest') if settings.CARRIER_URLS: data['launch_path'] = '/%s/' % settings.CARRIER_URLS[0] return HttpResponse(json.dumps(data), mimetype='application/x-web-app-manifest+json')
def manifest(request): ctx = RequestContext(request) data = { 'name': getattr(settings, 'WEBAPP_MANIFEST_NAME', 'Firefox Marketplace'), 'description': 'The Firefox Marketplace', 'developer': { 'name': 'Mozilla', 'url': 'http://mozilla.org', }, 'icons': { # Using the default addon image until we get a marketplace logo. '128': media(ctx, 'img/mkt/logos/128.png'), '64': media(ctx, 'img/mkt/logos/64.png'), '32': media(ctx, 'img/mkt/logos/32.png'), }, 'activities': { 'marketplace-app': { 'href': '/' }, 'marketplace-app-rating': { 'href': '/' }, 'marketplace-category': { 'href': '/' }, 'marketplace-search': { 'href': '/' }, }, 'orientation': ['portrait-primary'] } if settings.USE_APPCACHE: data['appcache_path'] = reverse('django_appcache.manifest') if get_carrier(): data['launch_path'] = urlparams('/', carrier=get_carrier()) manifest_content = json.dumps(data) manifest_etag = hashlib.sha256(manifest_content).hexdigest() @etag(lambda r: manifest_etag) def _inner_view(request): response = HttpResponse(manifest_content, mimetype='application/x-web-app-manifest+json') return response return _inner_view(request)
def manifest(request): ctx = RequestContext(request) data = { "name": getattr(settings, "WEBAPP_MANIFEST_NAME", "Mozilla Marketplace"), "description": "The Mozilla Marketplace", "developer": {"name": "Mozilla", "url": "http://mozilla.org"}, "icons": { # Using the default addon image until we get a marketplace logo. "32": media(ctx, "img/mkt/logos/32.png"), "64": media(ctx, "img/mkt/logos/64.png"), "128": media(ctx, "img/mkt/logos/128.png"), }, # TODO: when we have specific locales, add them in here. "locales": {}, "default_locale": "en-US", } return HttpResponse(json.dumps(data), mimetype="application/x-web-app-manifest+json")
def manifest(request): ctx = RequestContext(request) data = { 'name': 'Mozilla Marketplace', 'description': 'The Mozilla Marketplace', 'developer': { 'name': 'Mozilla', 'url': 'http://mozilla.org', }, 'icons': { # Using the default addon image until we get a marketplace logo. '32': media(ctx, 'img/addon-icons/default-32.png'), '64': media(ctx, 'img/addon-icons/default-64.png'), }, # TODO: when we have specific locales, add them in here. 'locales': {}, 'default_locale': 'en-US' } return HttpResponse(json.dumps(data), mimetype='application/x-web-app-manifest+json')
def manifest(request): ctx = RequestContext(request) data = { 'name': getattr(settings, 'WEBAPP_MANIFEST_NAME', 'Firefox Marketplace'), 'description': 'The Firefox Marketplace', 'developer': { 'name': 'Mozilla', 'url': 'http://mozilla.org', }, 'icons': { # Using the default addon image until we get a marketplace logo. '32': media(ctx, 'img/mkt/logos/32.png'), '64': media(ctx, 'img/mkt/logos/64.png'), '128': media(ctx, 'img/mkt/logos/128.png'), }, # TODO: when we have specific locales, add them in here. 'locales': {}, 'default_locale': 'en-US' } return HttpResponse(json.dumps(data))
def manifest(request): ctx = RequestContext(request) data = { 'name': getattr(settings, 'WEBAPP_MANIFEST_NAME', 'Firefox Marketplace'), 'description': 'The Firefox Marketplace', 'developer': { 'name': 'Mozilla', 'url': 'http://mozilla.org', }, 'icons': { # Using the default addon image until we get a marketplace logo. '128': media(ctx, 'img/mkt/logos/128.png'), '64': media(ctx, 'img/mkt/logos/64.png'), '32': media(ctx, 'img/mkt/logos/32.png'), }, 'activities': { 'marketplace-app': {'href': '/'}, 'marketplace-app-rating': {'href': '/'}, 'marketplace-category': {'href': '/'}, 'marketplace-search': {'href': '/'}, }, 'orientation': ['portrait-primary'] } if settings.USE_APPCACHE: data['appcache_path'] = reverse('django_appcache.manifest') if settings.CARRIER_URLS: data['launch_path'] = '/%s/' % (get_carrier() or settings.CARRIER_URLS[0]) manifest_content = json.dumps(data) manifest_etag = hashlib.md5(manifest_content).hexdigest() @etag(lambda r: manifest_etag) def _inner_view(request): response = HttpResponse(manifest_content, mimetype='application/x-web-app-manifest+json') return response return _inner_view(request)
def manifest(request): ctx = RequestContext(request) data = { 'name': getattr(settings, 'WEBAPP_MANIFEST_NAME', 'Mozilla Marketplace'), 'description': 'The Mozilla Marketplace', 'developer': { 'name': 'Mozilla', 'url': 'http://mozilla.org', }, 'icons': { # Using the default addon image until we get a marketplace logo. '32': media(ctx, 'img/mkt/logos/32.png'), '64': media(ctx, 'img/mkt/logos/64.png'), '128': media(ctx, 'img/mkt/logos/128.png'), }, # TODO: when we have specific locales, add them in here. 'locales': {}, 'default_locale': 'en-US' } return HttpResponse(json.dumps(data), mimetype='application/x-web-app-manifest+json')
def manifest(request): ctx = RequestContext(request) data = { 'name': getattr(settings, 'WEBAPP_MANIFEST_NAME', 'Firefox Marketplace'), 'description': 'The Firefox Marketplace', 'developer': { 'name': 'Mozilla', 'url': 'http://mozilla.org', }, 'icons': { # Using the default addon image until we get a marketplace logo. '128': media(ctx, 'img/mkt/logos/128.png'), '64': media(ctx, 'img/mkt/logos/64.png'), '32': media(ctx, 'img/mkt/logos/32.png'), }, 'activities': { 'marketplace-app': {'href': '/'}, 'marketplace-app-rating': {'href': '/'}, 'marketplace-category': {'href': '/'}, 'marketplace-search': {'href': '/'}, } } if get_carrier(): data['launch_path'] = urlparams('/', carrier=get_carrier()) manifest_content = json.dumps(data) manifest_etag = hashlib.sha256(manifest_content).hexdigest() @etag(lambda r: manifest_etag) def _inner_view(request): response = HttpResponse(manifest_content, content_type='application/x-web-app-manifest+json') return response return _inner_view(request)