move mimetype mappings to separate file

This commit is contained in:
rra 2019-09-04 16:11:02 +02:00
parent 9b8be7c761
commit 1611144f72

13
distribusi/mappings.py Normal file
View File

@ -0,0 +1,13 @@
CODE_TYPES = ['x-c', 'html']
FILE_TYPES = {
'image': '<figure><img class="image" src="{}"><figcaption>{}</figcaption></figure>',
'pdf': (
'<object data="{}" class="pdf" type="application/pdf">'
'<embed src="{}" type="application/pdf" /></object>'
),
'text': '<a href="{}" class="text">{}</a>',
'video': ('<video class="video" controls>' '<source src="{}"></source></video>'),
'audio': ('<audio controls class="audio">' '<source src="{}"></source></audio>'),
}