예제 #1
0
파일: views.py 프로젝트: gmist/five-studio
def get_file_w_name(request, file_key, name):
    file_ = Presentation.all().filter('uid =', file_key)
    if file_.count():
        file_ = file_.get()
    else:
        file_ = None
    if not file_ or not file_.blob_key:
        return render_to_response('file/not_found.html')
    return send_blob(file_.blob_key, content_type=file_.content_type)
예제 #2
0
파일: views.py 프로젝트: gmist/five-studio
def index(request):
    files = Presentation.all().order('-created')
    return render_to_response('files/index.html', {'files': files})