# Set to false to disable registrations
allow_registration = true
+## Uncomment this to turn on video or enable other media types
+# media_types = mediagoblin.media_types.image, mediagoblin.media_types.video
+
## Uncomment this to put some user-overriding templates here
#local_templates = %(here)s/user_dev/templates/
# HTML title of the pages
html_title = string(default="GNU MediaGoblin")
+# Enabled media types
+media_types = string_list(default=list("mediagoblin.media_types.image"))
+
# database stuff
db_host = string()
db_name = string(default="mediagoblin")
db_port = integer()
-
# Where temporary files used in processing and etc are kept
workbench_path = string(default="%(here)s/user_dev/media/workbench")
-
# Where mediagoblin-builtin static assets are kept
direct_remote_path = string(default="/mgoblin_static/")
class InvalidFileType(Exception):
pass
-# This should be more dynamic in the future. Perhaps put it in the .ini?
-# -- Joar
-MEDIA_TYPES = [
- 'mediagoblin.media_types.image']
-
-if mg_globals.app_config['enable_video']:
- MEDIA_TYPES.append('mediagoblin.media_types.video')
-
def get_media_types():
- '''
+ """
Generator that returns the available media types
- '''
- for media_type in MEDIA_TYPES:
+ """
+ for media_type in mg_globals.app_config['media_types']:
yield media_type