Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prod merge: Update SourceType options in YouTubeTrafficSource #167

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions okr/migrations/0087_alter_youtubetrafficsource_source_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Generated by Django 4.2.5 on 2024-07-17 11:41

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("okr", "0086_alter_youtubetrafficsource_source_type_and_more"),
]

operations = [
migrations.AlterField(
model_name="youtubetrafficsource",
name="source_type",
field=models.CharField(
choices=[
("advertising", "Werbung"),
("annotation", "Annotation"),
("campaign_card", "Kampagnenkarte"),
("end_screen", "Endscreen"),
("ext_url", "Externe URL"),
("hashtags", "Hashtags"),
("live_redirect", "Live-Weiterleitung"),
("no_link_embedded", "Kein Link (eingebettet)"),
("no_link_other", "Kein Link (sonstiges)"),
("notification", "Benachrichtigung"),
("playlist", "Playlist"),
("product_page", "Produktseite"),
("promoted", "Promoted"),
("related_video", "Related"),
("shorts", "Shorts"),
("sound_page", "Soundpage"),
("subscriber", "Abonnent*in"),
("yt_channel", "Youtube-Kanal"),
("yt_other_page", "Sonstige Youtube-Seite"),
("yt_search", "Youtube-Suche"),
("video_remixes", "Video-Remixes"),
("yt_playlist_page", "Youtube Playlist-Seite"),
("shorts_content_links", "Shorts Content Links"),
],
max_length=40,
verbose_name="Source Type",
),
),
]
2 changes: 1 addition & 1 deletion okr/models/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ class Meta:
)

def __str__(self):
return f'{self.key_result} ({dt.datetime.strftime(self.date, "%d.%m.%Y")})'
return f'{self.key_result} ({dt.date.strftime(self.date, "%d.%m.%Y")})'
9 changes: 6 additions & 3 deletions okr/models/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,23 @@ class SourceType(models.TextChoices):
CAMPAIGN_CARD = "campaign_card", "Kampagnenkarte"
END_SCREEN = "end_screen", "Endscreen"
EXT_URL = "ext_url", "Externe URL"
HASHTAGS = "hashtags", "Hashtags"
LIVE_REDIRECT = "live_redirect", "Live-Weiterleitung"
NO_LINK_EMBEDDED = "no_link_embedded", "Kein Link (eingebettet)"
NO_LINK_OTHER = "no_link_other", "Kein Link (sonstiges)"
NOTIFICATION = "notification", "Benachrichtigung"
PLAYLIST = "playlist", "Playlist"
PRODUCT_PAGE = "product_page", "Produktseite"
PROMOTED = "promoted", "Promoted"
RELATED_VIDEO = "related_video", "Related"
SHORTS = "shorts", "Shorts"
SOUND_PAGE = "sound_page", "Soundpage"
SUBSCRIBER = "subscriber", "Abonnent*in"
YT_CHANNEL = "yt_channel", "Youtube-Kanal"
YT_OTHER_PAGE = "yt_other_page", "Sonstige Youtube-Seite"
YT_PLAYLIST_PAGE = "yt_playlist_page", "Youtube Playlist-Seite"
YT_SEARCH = "yt_search", "Youtube-Suche"
HASHTAGS = "hashtags", "Hashtags"
VIDEO_REMIXES = "video_remixes", "Video-Remixes"
YT_PLAYLIST_PAGE = "yt_playlist_page", "Youtube Playlist-Seite"
SHORTS_CONTENT_LINKS = (
"shorts_content_links",
"Shorts Content Links",
Expand Down Expand Up @@ -559,4 +562,4 @@ class Meta:
last_updated = models.DateTimeField(verbose_name="Zuletzt upgedated", auto_now=True)

def __str__(self):
return f"{self.youtube_video.youtube.name} - {self.youtube_video.title}: {self.search_term}"
return f"{self.youtube_video.youtube.name} - {self.youtube_video.title}: {self.name}"
Loading