예제 #1
0
 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))
예제 #2
0
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})
예제 #3
0
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})