diff --git a/boards/models/attachment/__init__.py b/boards/models/attachment/__init__.py --- a/boards/models/attachment/__init__.py +++ b/boards/models/attachment/__init__.py @@ -7,7 +7,7 @@ from random import random from django.db import models from boards.models.attachment.viewers import AbstractViewer, WebmViewer, \ - AudioViewer + AudioViewer, SvgViewer FILES_DIRECTORY = 'files/' FILE_EXTENSION_DELIMITER = '.' @@ -15,6 +15,7 @@ FILE_EXTENSION_DELIMITER = '.' VIEWERS = ( WebmViewer, AudioViewer, + SvgViewer, ) diff --git a/boards/models/attachment/viewers.py b/boards/models/attachment/viewers.py --- a/boards/models/attachment/viewers.py +++ b/boards/models/attachment/viewers.py @@ -4,6 +4,7 @@ from django.templatetags.static import s FILE_STUB_IMAGE = 'images/file.png' FILE_TYPE_WEBM = 'webm' +FILE_TYPE_SVG = 'svg' FILE_TYPES_AUDIO = ( 'ogg', 'mp3', @@ -48,3 +49,14 @@ class AudioViewer(AbstractViewer): return '