Source

pinyomi / www / views.py

# -*- coding: utf-8 -*-
# 
#  views.py
#  trunk
#  
#  Created by Lars Yencken on 2008-07-11.
#  Copyright 2008 Lars Yencken. All rights reserved.
# 

from django.views import static

def media(request):
    """Serves static media. Not to be used in deployment."""
    return static.serve(
            request, request.path[len(settings.MEDIA_URL):],
            document_root=settings.MEDIA_DIR,
        )