[videos] Clean up admin stuff
This commit is contained in:
@ -21,17 +21,16 @@ class SeriesAdmin(admin.ModelAdmin):
|
|||||||
@admin.register(Video)
|
@admin.register(Video)
|
||||||
class VideoAdmin(admin.ModelAdmin):
|
class VideoAdmin(admin.ModelAdmin):
|
||||||
date_hierarchy = "created"
|
date_hierarchy = "created"
|
||||||
raw_id_fields = ("tv_series",)
|
raw_id_fields = ("tv_series","channel",)
|
||||||
list_display = (
|
list_display = (
|
||||||
"title",
|
"title",
|
||||||
"video_type",
|
"video_type",
|
||||||
"year",
|
"year",
|
||||||
"tv_series",
|
"tv_series",
|
||||||
"season_number",
|
"channel",
|
||||||
"episode_number",
|
|
||||||
"imdb_rating",
|
"imdb_rating",
|
||||||
)
|
)
|
||||||
list_filter = ("year", "tv_series", "video_type")
|
list_filter = ("year", "tv_series", "channel", "video_type")
|
||||||
ordering = ("-created",)
|
ordering = ("-created",)
|
||||||
inlines = [
|
inlines = [
|
||||||
ScrobbleInline,
|
ScrobbleInline,
|
||||||
|
|||||||
21
vrobbler/apps/videos/migrations/0020_channel_youtube_id.py
Normal file
21
vrobbler/apps/videos/migrations/0020_channel_youtube_id.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Generated by Django 4.2.16 on 2024-11-06 16:07
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
(
|
||||||
|
"videos",
|
||||||
|
"0019_rename_youtube_url_video_youtube_id_channel_and_more",
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="channel",
|
||||||
|
name="youtube_id",
|
||||||
|
field=models.CharField(blank=True, max_length=255, null=True),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -39,6 +39,7 @@ class Channel(TimeStampedModel):
|
|||||||
format="JPEG",
|
format="JPEG",
|
||||||
options={"quality": 75},
|
options={"quality": 75},
|
||||||
)
|
)
|
||||||
|
youtube_id = models.CharField(max_length=255, **BNULL)
|
||||||
genre = TaggableManager(through=ObjectWithGenres)
|
genre = TaggableManager(through=ObjectWithGenres)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user