mirror of
https://github.com/kennethreitz-archive/django-mediasync.git
synced 2026-06-17 05:50:58 +00:00
12 lines
357 B
Python
12 lines
357 B
Python
from django.conf import settings
|
|
from django.http import HttpResponse
|
|
from django.shortcuts import render_to_response
|
|
|
|
MIMETYPES = {
|
|
'css': 'text/css',
|
|
'js': 'text/javascript',
|
|
}
|
|
|
|
def static(request, filename, extension):
|
|
path = "%s.%s" % (filename, extension)
|
|
return render_to_response(path, mimetype=MIMETYPES.get(extension, 'text/plain')) |