}
}
-# FileBrowser settings
+#######################
+# FILEBROWSER settings
+#######################
#
# Max. Upload Size in Bytes:
# 10MB - 10485760
# 500MB - 429916160
FILEBROWSER_MAX_UPLOAD_SIZE = 104857600
+# EXTENSIONS AND FORMATS
+# Allowed Extensions for File Upload. Lower case is important.
+FILEBROWSER_EXTENSIONS = {
+ 'Folder': [''],
+ 'Image': ['.jpg', '.jpeg', '.gif', '.png', '.tif', '.tiff'],
+ 'Document': ['.pdf', '.doc', '.rtf', '.txt', '.xls', '.csv', '.docx'],
+ 'Video': ['.mov', '.wmv', '.mpeg', '.mpg', '.avi', '.rm'],
+ 'Audio': ['.mp3', '.mp4', '.wav', '.aiff', '.midi', '.m4p']
+ }
+# Define different formats for allowed selections.
+# This has to be a subset of EXTENSIONS.
+# e.g., add ?type=image to the browse-URL ...
+FILEBROWSER_SELECT_FORMATS = {
+ 'file': ['Folder', 'Image', 'Document', 'Video', 'Audio'],
+ 'image': ['Image'],
+ 'document': ['Document'],
+ 'media': ['Video', 'Audio'],
+ 'audio': ['Audio'],
+ }
+
+
###################
# DEPLOY SETTINGS #
###################
--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('records', '0005_auto_20150824_1547'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='record',
+ name='new',
+ field=models.IntegerField(default=1, choices=[(0, ''), (1, 'New'), (2, 'On Hold'), (3, 'Just Sold')]),
+ ),
+ ]
# categories --> shop.theme
# price --> shop.prix
# status --> shop.published
-
+ NEW = 1
+ ON_HOLD = 2
+ JUST_SOLD = 3
+ NOVELTY_CHOICES = (
+ (0, ''),
+ (NEW, 'New'),
+ (ON_HOLD, 'On Hold'),
+ (JUST_SOLD, 'Just Sold')
+ )
+ #GRADINGS_CHOICES = ()
+
artist = models.ForeignKey(Artist)
- new = models.IntegerField()
+ new = models.IntegerField(choices=NOVELTY_CHOICES, default=NEW)
label = models.ForeignKey(Label)
date = models.CharField(max_length=8)
country = models.ForeignKey(Country)
desc = models.TextField()
cover = models.IntegerField() # TODO : choices=GRADINGS)
vinyl = models.IntegerField() # TODO : choices=GRADING)
- audio = FileField(_("Audio File"), max_length=200, format="media",
+ audio = FileField(_("Audio File"), max_length=200, format="audio",
upload_to=upload_to("records.Record.audio", "audio/records"))
def __unicode__(self):
class Podcast(BlogPost):
- audio = FileField(verbose_name=_("Audio File"), max_length=200, format="media",
+ audio = FileField(verbose_name=_("Audio File"), max_length=200, format="audio",
upload_to=upload_to("records.Podcast.audio", "audio/mixes"))