From e4c20bfe4fc984ba423315fc649c4dfe242ef62a Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Wed, 19 Aug 2015 19:00:56 +0200 Subject: [PATCH] Fix FileBrowser selection for audio files --- diggersdigest/diggersdigest/settings.py | 2 +- diggersdigest/records/models.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/diggersdigest/diggersdigest/settings.py b/diggersdigest/diggersdigest/settings.py index 4e9926e..8d379b7 100644 --- a/diggersdigest/diggersdigest/settings.py +++ b/diggersdigest/diggersdigest/settings.py @@ -149,7 +149,7 @@ from django.utils.translation import ugettext_lazy as _ # Setting to turn on featured images for blog posts. Defaults to False. # -# BLOG_USE_FEATURED_IMAGE = True +BLOG_USE_FEATURED_IMAGE = True # If True, the django-modeltranslation will be added to the # INSTALLED_APPS setting. diff --git a/diggersdigest/records/models.py b/diggersdigest/records/models.py index be7ab1b..f0f5cfc 100644 --- a/diggersdigest/records/models.py +++ b/diggersdigest/records/models.py @@ -193,7 +193,7 @@ class Record(Product): desc = models.TextField() cover = models.IntegerField() # TODO : choices=GRADINGS) vinyl = models.IntegerField() # TODO : choices=GRADING) - audio = FileField(_("Audio File"), max_length=200, format="Audio", + audio = FileField(_("Audio File"), max_length=200, format="media", upload_to=upload_to("records.Record.audio", "audio/records")) def __unicode__(self): @@ -201,5 +201,5 @@ class Record(Product): class Podcast(BlogPost): - audio = FileField(_("Audio File"), max_length=200, format="Audio", + audio = FileField(verbose_name=_("Audio File"), max_length=200, format="media", upload_to=upload_to("records.Podcast.audio", "audio/mixes")) -- 2.39.5