<commit_before>from django.db import models

# Create your models here.<commit_msg>init Video model<commit_after>from django.db import models
from django.utils.html import format_html


class Video(models.Model):
    title = models.CharField(
        max_length=50,
        verbose_name="제목",
    )
    writer = models.CharField(
        max_length=30,
        verbose_name="작성자",
    )
    youtube_id = models.CharField(
        max_length=40,
        verbose_name="유튜브 ID",
    )

    def get_youtube_original_url(self):
        youtube_original_url = "https://www.youtube.com/watch?v={youtube_id}".format(
            youtube_id=self.youtube_id,
        )
        return format_html(
            "<a href='{}' target='_blank'>{}</a>",
            youtube_original_url,
            youtube_original_url,
        )
    get_youtube_original_url.short_description = "유투브 URL"

    class Meta:
        verbose_name = "Video"
        verbose_name_plural = "Video"
{'fraction_non_alphanumeric': 0.10520833333333333, 'fraction_numerical': 0.00625, 'mean_word_length': 2.5724907063197024, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1046419', 'n_tokens_mistral': 320, 'n_tokens_neox': 311, 'n_words': 53}