示例#1
0
文件: views.py 项目: advatar/thevault
def create_release(request):
    form = ReleaseForm()
    if form.validate(request.form):
        form.save()
        return redirect(url_for('vault/list_releases'))
    return render_to_response('vault/new_release.html',
            {'form': form.as_widget()})
示例#2
0
文件: views.py 项目: advatar/thevault
def new_release(request):
    form = ReleaseForm()
    return render_to_response('vault/new_release.html',
            {'form': form.as_widget()})