Commit e7702361 authored by Seb's avatar Seb
Browse files

Cleanup

parent df2262e4
...@@ -77,7 +77,7 @@ def get_upload_to(instance, filename): ...@@ -77,7 +77,7 @@ def get_upload_to(instance, filename):
return instance.get_upload_to(filename) return instance.get_upload_to(filename)
class AbstractVideo(CollectionMember, index.Indexed, ClusterableModel): class AbstractVideo(CollectionMember, index.Indexed, models.Model):
title = models.CharField(max_length=255, verbose_name=_('title')) title = models.CharField(max_length=255, verbose_name=_('title'))
file = models.FileField( file = models.FileField(
verbose_name=_('file'), upload_to=get_upload_to) verbose_name=_('file'), upload_to=get_upload_to)
......
...@@ -23,6 +23,8 @@ Video = get_video_model() ...@@ -23,6 +23,8 @@ Video = get_video_model()
class TracksAdmin(ModelAdmin): class TracksAdmin(ModelAdmin):
model = TrackListing model = TrackListing
menu_icon = 'openquote'
menu_label = 'Text tracks'
list_display = ('__str__', 'track_count') list_display = ('__str__', 'track_count')
...@@ -102,7 +104,7 @@ def register_images_menu_item(): ...@@ -102,7 +104,7 @@ def register_images_menu_item():
def hide_track_listing_main(request, menu_items): def hide_track_listing_main(request, menu_items):
# Dumb but we need to remove the auto generated menu item because we add it to the video submenu # Dumb but we need to remove the auto generated menu item because we add it to the video submenu
if is_modeladmin_installed(): if is_modeladmin_installed():
menu_items[:] = [item for item in menu_items if item.name != 'track-listings'] menu_items[:] = [item for item in menu_items if item.name != 'text-tracks']
class VideoSummaryItem(SummaryItem): class VideoSummaryItem(SummaryItem):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment