Beispiel #1
0
def release_notes(request, fx_version, product='Firefox'):
    if product == 'Firefox OS' and fx_version in ('1.0.1', '1.1', '1.2'):
        return l10n_utils.render(request,
                                 'firefox/os/notes-%s.html' % fx_version)

    try:
        release = get_release_or_404(fx_version, product)
    except Http404:
        release = get_release_or_404(fx_version + 'beta', product)
        return HttpResponseRedirect(releasenotes_url(release))

    new_features, known_issues = release.notes(public_only=not settings.DEV)

    return l10n_utils.render(
        request, release_notes_template(release.channel, product), {
            'version':
            fx_version,
            'download_url':
            get_download_url(release),
            'support_url':
            SUPPORT_URLS.get(product, 'https://support.mozilla.org/'),
            'release':
            release,
            'equivalent_release_url':
            equivalent_release_url(release),
            'new_features':
            new_features,
            'known_issues':
            known_issues
        })
Beispiel #2
0
def release_notes(request, version, product='Firefox'):
    try:
        release = get_release_or_404(version, product)
    except Http404:
        release = get_release_or_404(version + 'beta', product)
        return HttpResponseRedirect(releasenotes_url(release))

    new_features, known_issues = release.notes(public_only=not settings.DEV)

    return l10n_utils.render(
        request,
        release_notes_template(release.channel, product,
                               int(release.major_version())),
        {
            'version':
            version,
            'download_url':
            get_download_url(release),
            'support_url':
            SUPPORT_URLS.get(product, 'https://support.mozilla.org/'),
            'release':
            release,
            'equivalent_release_url':
            equivalent_release_url(release),
            'new_features':
            new_features,
            'known_issues':
            known_issues
        })
Beispiel #3
0
def release_notes(request, version, product='Firefox'):
    try:
        release = get_release_or_404(version, product)
    except Http404:
        release = get_release_or_404(version + 'beta', product)
        return HttpResponseRedirect(releasenotes_url(release))

    new_features, known_issues = release.notes(public_only=not settings.DEV)

    return l10n_utils.render(
        request,
        release_notes_template(release.channel, product,
                               int(release.major_version())),
        {
            'version':
            version,
            'download_url':
            get_download_url(release),
            'support_url':
            SUPPORT_URLS.get(product, 'https://support.mozilla.org/'),
            'check_url':
            check_url(product, version),
            'release':
            release,
            'equivalent_release_url':
            equivalent_release_url(release),
            'new_features':
            new_features,
            'known_issues':
            known_issues
        })
Beispiel #4
0
def release_notes(request, fx_version, product="Firefox"):
    if product == "Firefox OS" and fx_version in ("1.0.1", "1.1", "1.2"):
        return l10n_utils.render(request, "firefox/os/notes-%s.html" % fx_version)

    try:
        release = get_release_or_404(fx_version, product)
    except Http404:
        release = get_release_or_404(fx_version + "beta", product)
        return HttpResponseRedirect(releasenotes_url(release))

    new_features, known_issues = release.notes(public_only=not settings.DEV)

    return l10n_utils.render(
        request,
        release_notes_template(release.channel, product, int(release.major_version())),
        {
            "version": fx_version,
            "download_url": get_download_url(release),
            "support_url": SUPPORT_URLS.get(product, "https://support.mozilla.org/"),
            "release": release,
            "equivalent_release_url": equivalent_release_url(release),
            "new_features": new_features,
            "known_issues": known_issues,
        },
    )
Beispiel #5
0
 def test_firefox_os_releasenotes_url(self, mock_reverse):
     """
     Should return the results of reverse with the correct args
     """
     release = Release(version='42.0', product='Firefox OS')
     eq_(releasenotes_url(release), mock_reverse.return_value)
     mock_reverse.assert_called_with('firefox.os.releasenotes',
                                     args=['42.0'])
Beispiel #6
0
 def test_desktop_releasenotes_url(self, mock_reverse):
     """
     Should return the results of reverse with the correct args
     """
     release = Release(version='42.0', product='Firefox')
     eq_(releasenotes_url(release), mock_reverse.return_value)
     mock_reverse.assert_called_with('firefox.desktop.releasenotes',
                                     args=('42.0', 'release'))
Beispiel #7
0
 def test_desktop_releasenotes_url(self, mock_reverse):
     """
     Should return the results of reverse with the correct args
     """
     release = Release(version='42.0', product='Firefox')
     eq_(releasenotes_url(release), mock_reverse.return_value)
     mock_reverse.assert_called_with(
         'firefox.desktop.releasenotes', args=('42.0', 'release'))
Beispiel #8
0
 def test_firefox_os_releasenotes_url(self, mock_reverse):
     """
     Should return the results of reverse with the correct args
     """
     release = Release(version='42.0', product='Firefox OS')
     eq_(releasenotes_url(release), mock_reverse.return_value)
     mock_reverse.assert_called_with(
         'firefox.os.releasenotes', args=['42.0'])
Beispiel #9
0
 def test_aurora_android_releasenotes_url(self, mock_reverse):
     """
     Should return the results of reverse with the correct args
     """
     release = Release(
         channel='Aurora', version='42.0a2', product='Firefox for Android')
     eq_(releasenotes_url(release), mock_reverse.return_value)
     mock_reverse.assert_called_with(
         'firefox.android.releasenotes', args=('42.0a2', 'aurora'))
Beispiel #10
0
 def test_aurora_android_releasenotes_url(self, mock_reverse):
     """
     Should return the results of reverse with the correct args
     """
     release = Release(
         channel='Aurora', version='42.0a2', product='Firefox for Android')
     eq_(releasenotes_url(release), mock_reverse.return_value)
     mock_reverse.assert_called_with(
         'firefox.android.releasenotes', args=('42.0a2', 'aurora'))
Beispiel #11
0
def release_notes(request, fx_version, product='Firefox'):
    if product == 'Firefox OS' and fx_version in ('1.0.1', '1.1', '1.2'):
        return l10n_utils.render(
            request, 'firefox/os/notes-%s.html' % fx_version)

    try:
        release = get_release_or_404(fx_version, product)
    except Http404:
        release = get_release_or_404(fx_version + 'beta', product)
        return HttpResponseRedirect(releasenotes_url(release))

    new_features, known_issues = release.notes()
    return l10n_utils.render(
        request, release_notes_template(release.channel, product), {
            'version': fx_version,
            'download_url': get_download_url(release.channel),
            'release': release,
            'equivalent_release_url': equivalent_release_url(release),
            'new_features': new_features,
            'known_issues': known_issues})
Beispiel #12
0
def release_notes(request, fx_version, product='Firefox'):
    if product == 'Firefox OS' and fx_version in ('1.0.1', '1.1', '1.2'):
        return l10n_utils.render(
            request, 'firefox/os/notes-%s.html' % fx_version)

    try:
        release = get_release_or_404(fx_version, product)
    except Http404:
        release = get_release_or_404(fx_version + 'beta', product)
        return HttpResponseRedirect(releasenotes_url(release))

    new_features, known_issues = release.notes(public_only=not settings.DEV)

    return l10n_utils.render(
        request, release_notes_template(release.channel, product), {
            'version': fx_version,
            'download_url': get_download_url(release),
            'support_url': SUPPORT_URLS.get(product, 'https://support.mozilla.org/'),
            'release': release,
            'equivalent_release_url': equivalent_release_url(release),
            'new_features': new_features,
            'known_issues': known_issues})
Beispiel #13
0
def release_notes(request, fx_version, product="Firefox"):
    if product == "Firefox OS" and fx_version in ("1.0.1", "1.1", "1.2", "1.3"):
        return l10n_utils.render(request, "firefox/os/notes-%s.html" % fx_version)

    try:
        release = get_release_or_404(fx_version, product)
    except Http404:
        release = get_release_or_404(fx_version + "beta", product)
        return HttpResponseRedirect(releasenotes_url(release))

    new_features, known_issues = release.notes()
    return l10n_utils.render(
        request,
        release_notes_template(release.channel, product),
        {
            "version": fx_version,
            "download_url": get_download_url(release.channel),
            "release": release,
            "equivalent_release_url": equivalent_release_url(release),
            "new_features": new_features,
            "known_issues": known_issues,
        },
    )
Beispiel #14
0
def equivalent_release_url(release):
    equivalent_release = (release.equivalent_android_release() or
                          release.equivalent_desktop_release())
    if equivalent_release:
        return releasenotes_url(equivalent_release)
Beispiel #15
0
def equivalent_release_url(release):
    equivalent_release = (release.equivalent_android_release() or
                          release.equivalent_desktop_release())
    if equivalent_release:
        return releasenotes_url(equivalent_release)