예제 #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
        })
예제 #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
        })
예제 #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
        })
예제 #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,
        },
    )
예제 #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'])
예제 #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'))
예제 #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'))
예제 #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'])
예제 #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'))
예제 #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'))
예제 #11
0
파일: views.py 프로젝트: tsharman/bedrock
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})
예제 #12
0
파일: views.py 프로젝트: NIRVIT/bedrock
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})
예제 #13
0
파일: views.py 프로젝트: josiah2595/bedrock
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,
        },
    )
예제 #14
0
파일: views.py 프로젝트: alicoding/bedrock
def equivalent_release_url(release):
    equivalent_release = (release.equivalent_android_release() or
                          release.equivalent_desktop_release())
    if equivalent_release:
        return releasenotes_url(equivalent_release)
예제 #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)