Views

class tube.views.UploadVideoView(**kwargs)[source]

Bases: View, MessageMixin

A class-based view for handling the uploading of videos.

The class has the following attributes:

  • ABSOLUTE_UPLOAD_URL (str): The absolute path to the upload directory.

  • OUTPUT_FILENAME (str): The name of the output file.

  • template_name (str): The name of the template to be

ABSOLUTE_UPLOAD_URL = 'media/videos/'
OUTPUT_FILENAME = '%(title)s.%(ext)s'
get(request, *args, **kwargs)
post(request, *args, **kwargs)
template_name = 'tube/upload_video.html'
class tube.views.VideoCollectionsListView(**kwargs)[source]

Bases: View

A class-based view for handling the video collections.

The class has the following att ributes:

  • template_name (str): The name of the template to be rendered.

get(request, *args, **kwargs)
template_name = 'tube/video_list.html'
class tube.views.WatchVideoView(**kwargs)[source]

Bases: View

A class-based view for handling the watching of videos.

The class has the following attributes:

  • template_name (str): The name of the template to be rendered.

get(request, *args, **kwargs)
template_name = 'tube/watch.html'