def handle_noargs(self, **options): from youtube_timer.utils import publish_entries entries = publish_entries() if not entries: return return 'Could not publish these videos (look them up in the db): %s' % (', '.join(entries))
def force_unpublish(request): """ Remove "public" status from a video. """ video_id = request.GET.get('video_id') entry = YouTubeEntry.objects.get(id=video_id) unpublished = publish_entries([entry], reverse=True) entry.processed = True entry.save() return render_to_response('youtube_timer/publish_status.html', {'entry': entry})
def force_publish(request): """ Force publishing of a video. """ video_id = request.GET.get('video_id') entry = YouTubeEntry.objects.get(id=video_id) published = publish_entries([entry]) entry.processed = True entry.save() return render_to_response('youtube_timer/publish_status.html', {'entry': entry})