def _get_addons(request, addons, addon_id, action):
    items = []

    a = MenuItem()
    a.selected = (not addon_id)
    (a.text, a.url) = (_('All My Add-ons'), reverse('devhub.feed_all'))
    if action:
        a.url += '?action=' + action
    items.append(a)

    for addon in addons:
        item = MenuItem()
        try:
            item.selected = (addon_id and addon.id == int(addon_id))
        except ValueError:
            pass  # We won't get here... EVER
        url = reverse('devhub.feed', args=[addon.slug])
        if action:
            url += '?action=' + action
        item.text, item.url = addon.name, url
        items.append(item)

    return items
Initialize the sql backend after timeseries has processed the configuration.
dataset/ETHPy150Open mozilla/addons-server/src/olympia/devhub/views.py/_get_addons--crossover with--dataset/ETHPy150Open agoragames/kairos/kairos/sql_backend.py/SqlBackend.__init__