def admin_channel_list(request): page = 'channel_list' title = 'Channels' page = util.paging_get_page(request) offset = util.paging_get_offset(page, ITEMS_BY_PAGE) filter = request.GET.get('filter', 'all') #owner = api.actor_lookup_nick(request.user, util.get_owner(request)) new_link = '/admin/channels/new' size, items = api.admin_get_channels(api.ROOT, ITEMS_BY_PAGE, offset, filter) start, end, next, prev, first, last = util.paging(page, ITEMS_BY_PAGE, size) base_url = '/admin/channels?' if filter is not None: filter_url = '&filter=%s' % filter group_menuitem = 'channel' menuitem = 'channel-list' channel_types = api.get_config_values(api.ROOT, 'channel_type') c = template.RequestContext(request, locals()) return render_to_response('administration/templates/channel_list.html', c)
def admin_auto(request, action): page = util.paging_get_page(request) offset = util.paging_get_offset(page, ITEMS_BY_PAGE) next = str(int(page)+1) redirect_url = 'admin/auto/%s?page=%s' % (action, next) action = "administration.actions.%s" % action __import__(action) action_call = sys.modules[action] redirect, output = action_call.process(page, ITEMS_BY_PAGE, offset) c = template.RequestContext(request, locals()) t = loader.get_template('administration/templates/auto.html') return http.HttpResponse(t.render(c))