def rank(self, request): data = request.POST.copy() data['rank'] = Ads.get_rank(request.POST) return Response(data)
def show_ads(context, category=None): ads = Ads.get_ads(context.request, category) # update the log Ads.update_log_bulk(ads, context.request) return {'ads': ads}