def latest_notes(request, product='firefox', platform=None, channel=None): if not platform: platform = 'desktop' if not channel: channel = 'release' if channel in ['aurora', 'developer']: channel = 'alpha' if channel == 'organizations': channel = 'esr' if product == 'thunderbird': version = thunderbird_get_latest_version(channel) elif platform == 'android': version = firefox_android.latest_version(channel) else: version = firefox_desktop.latest_version(channel) if channel == 'beta': version = re.sub(r'b\d+$', 'beta', version) if channel == 'esr': version = re.sub(r'esr$', '', version) dir = 'auroranotes' if channel == 'alpha' else 'releasenotes' path = [product, version, dir] locale = getattr(request, 'locale', None) if product == 'firefox' and platform != 'desktop': path.insert(1, platform) if locale: path.insert(0, locale) return HttpResponseRedirect('/' + '/'.join(path) + '/')
def latest_notes(request, product='firefox', channel='release'): if product == 'firefox' and channel == 'developer': channel = 'alpha' if product == 'mobile' and channel == 'aurora': channel = 'alpha' if channel == 'organizations': channel = 'esr' if product == 'thunderbird': version = thunderbird_get_latest_version(channel) elif product == 'mobile': version = firefox_android.latest_version(channel) else: version = firefox_desktop.latest_version(channel) if channel == 'beta': version = re.sub(r'b\d+$', 'beta', version) if channel == 'esr': version = re.sub(r'esr$', '', version) dir = 'auroranotes' if channel == 'alpha' else 'releasenotes' path = [product, version, dir] locale = getattr(request, 'locale', None) if locale: path.insert(0, locale) return HttpResponseRedirect('/' + '/'.join(path) + '/')
def latest_sysreq(request, channel, product): if product == 'thunderbird': version = thunderbird_get_latest_version(product, channel) else: version = firefox_get_latest_version(product, channel) if channel == 'beta': version = re.sub(r'b\d+$', 'beta', version) if channel == 'organizations': version = re.sub(r'^(\d+).+', r'\1.0', version) dir = 'system-requirements' path = [product, version, dir] locale = getattr(request, 'locale', None) if locale: path.insert(0, locale) return HttpResponseRedirect('/' + '/'.join(path) + '/')
def latest_notes(request, product='firefox', channel='release'): if product == 'thunderbird': version = thunderbird_get_latest_version(product, channel) else: version = firefox_get_latest_version(product, channel) if channel == 'beta': version = re.sub(r'b\d+$', 'beta', version) if channel == 'organizations': version = re.sub(r'esr$', '', version) dir = 'auroranotes' if channel == 'aurora' else 'releasenotes' path = [product, version, dir] locale = getattr(request, 'locale', None) if locale: path.insert(0, locale) return HttpResponseRedirect('/' + '/'.join(path) + '/')
def latest_sysreq(request, channel, product): if product == 'firefox' and channel == 'developer': channel = 'aurora' if product == 'thunderbird': version = thunderbird_get_latest_version(product, channel) else: version = firefox_get_latest_version(product, channel) if channel == 'beta': version = re.sub(r'b\d+$', 'beta', version) if channel == 'organizations': version = re.sub(r'^(\d+).+', r'\1.0', version) dir = 'system-requirements' path = [product, version, dir] locale = getattr(request, 'locale', None) if locale: path.insert(0, locale) return HttpResponseRedirect('/' + '/'.join(path) + '/')