Beispiel #1
0
def nightly_feed(request):
    """Serve an Atom feed with the latest changes in Firefox Nightly"""
    notes = {}
    releases = get_releases_or_404('firefox', 'nightly', 5)

    for release in releases:
        link = reverse('firefox.desktop.releasenotes',
                       args=(release.version, 'release'))

        for note in release.notes:
            if note.id in notes:
                continue

            if note.is_public and note.tag:
                note.link = '%s#note-%s' % (link, note.id)
                note.version = release.version
                notes[note.id] = note

    # Sort by date in descending order
    notes = sorted(notes.values(), key=attrgetter('modified'), reverse=True)

    return l10n_utils.render(request,
                             'firefox/releases/nightly-feed.xml',
                             {'notes': notes},
                             content_type='application/atom+xml')
Beispiel #2
0
def nightly_feed(request):
    """Serve an Atom feed with the latest changes in Firefox Nightly"""
    notes = {}
    releases = get_releases_or_404("firefox", "nightly", 5)

    for release in releases:
        try:
            link = reverse("firefox.desktop.releasenotes",
                           args=(release.version, "release"))
        except NoReverseMatch:
            continue

        for note in release.notes:
            if note.id in notes:
                continue

            if note.is_public and note.tag:
                note.link = f"{link}#note-{note.id}"
                note.version = release.version
                notes[note.id] = note

    # Sort by date in descending order
    notes = sorted(notes.values(), key=attrgetter("modified"), reverse=True)

    return l10n_utils.render(request,
                             "firefox/releases/nightly-feed.xml",
                             {"notes": notes},
                             content_type="application/atom+xml")
Beispiel #3
0
def nightly_feed(request):
    """Serve an Atom feed with the latest changes in Firefox Nightly"""
    notes = {}
    releases = get_releases_or_404('firefox', 'nightly', 5)

    for release in releases:
        link = reverse('firefox.desktop.releasenotes',
                        args=(release.version, 'release'))

        for note in release.notes:
            if note.id in notes:
                continue

            if note.is_public and note.tag:
                note.link = '%s#note-%s' % (link, note.id)
                note.version = release.version
                notes[note.id] = note

    # Sort by date in descending order
    notes = sorted(notes.values(), key=attrgetter('modified'), reverse=True)

    return l10n_utils.render(request, 'firefox/releases/nightly-feed.xml',
                             {'notes': notes},
                             content_type='application/atom+xml')