Here are the examples of the python api django.views.static.static_serve taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
3
Example 1
def serve(request, path, docuement_root=None, show_indexes=False):
"""
Static file serving for Forge releases; should only be used when DEBUG
is set -- it deletes 'Content-Encoding' header so that module tarball
data isn't extracted twice by the Puppet module tool.
"""
response = static_serve(request, path,
docuement_root=docuement_root,
show_indexes=show_indexes)
if path.endswith('.tar.gz'):
del response['Content-Encoding']
return response
0
Example 2
def serve_media(*args, **kwargs):
response = static_serve(*args, **kwargs)
response['Access-Control-Allow-Origin'] = '*'
return response