def link(self, query):
        slugs = {}

        if 'product' in query:
            slugs['product'] = query['product'].slug

            if 'topic' in query:
                slugs['topic'] = query['topic'].slug

        url = reverse('questions.list', args=[slugs.get('product', 'all')],
                      locale=query.get('locale'))
        return urlparams(url, **slugs)
dataset/ETHPy150Open mozilla/kitsune/kitsune/questions/feeds.py/QuestionsFeed.link/original