mirror of
https://github.com/jazzband/django-ddp.git
synced 2026-05-04 21:54:52 +00:00
Merge branch 'release/0.9.4'
This commit is contained in:
commit
f3c506411a
4 changed files with 12 additions and 8 deletions
|
|
@ -1,6 +1,11 @@
|
|||
Change Log
|
||||
==========
|
||||
|
||||
0.9.4
|
||||
-----
|
||||
* Use mimetypes module to correctly guess mime types for Meteor files
|
||||
being served.
|
||||
|
||||
0.9.3
|
||||
-----
|
||||
* Include ROOT_URL_PATH_PREFIX in ROOT_URL when serving Meteor build
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import print_function, absolute_import, unicode_literals
|
||||
|
||||
import io
|
||||
import mimetypes
|
||||
import os.path
|
||||
|
||||
from django.apps import AppConfig
|
||||
|
|
@ -58,6 +59,7 @@ class ServerConfig(AppConfig):
|
|||
|
||||
def ready(self):
|
||||
"""Configure Django DDP server app."""
|
||||
mimetypes.init() # read and process /etc/mime.types
|
||||
self.url_map = {}
|
||||
|
||||
try:
|
||||
|
|
@ -147,12 +149,9 @@ class ServerConfig(AppConfig):
|
|||
self.client_map[item['url']] = item
|
||||
self.url_map[item['url']] = (
|
||||
item['path_full'],
|
||||
{
|
||||
'js': 'text/javascript',
|
||||
'css': 'text/css',
|
||||
}.get(
|
||||
item['type'], 'application/octet-stream',
|
||||
),
|
||||
mimetypes.guess_type(
|
||||
item['path_full'],
|
||||
)[0] or 'application/octet-stream',
|
||||
)
|
||||
elif item['where'] == 'internal':
|
||||
self.internal_map[item['type']] = item
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
"""Django DDP Server views."""
|
||||
from __future__ import print_function, absolute_import
|
||||
from __future__ import print_function, absolute_import, unicode_literals
|
||||
from ejson import dumps
|
||||
from django.apps import apps
|
||||
from django.conf import settings
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -5,7 +5,7 @@ from setuptools import setup, find_packages
|
|||
|
||||
setup(
|
||||
name='django-ddp',
|
||||
version='0.9.3',
|
||||
version='0.9.4',
|
||||
description=__doc__,
|
||||
long_description=open('README.rst').read(),
|
||||
author='Tyson Clugg',
|
||||
|
|
|
|||
Loading…
Reference in a new issue