示例#1
0
def create(request):
    form, handled = CreateKeypair.maybe_handle(request)
    if handled:
        return handled

    return shortcuts.render(request, 'nova/keypairs/create.html',
                            {'create_form': form})
示例#2
0
def create(request):
    form, handled = CreateKeypair.maybe_handle(request)
    if handled:
        return handled

    return shortcuts.render(request,
                            'nova/keypairs/create.html', {
                                'create_form': form})
示例#3
0
文件: views.py 项目: termie/horizon
def create(request):
    form, handled = CreateKeypair.maybe_handle(request)
    if handled:
        return handled

    context = {'form': form}

    if request.is_ajax():
        template = 'nova/keypairs/_create.html'
        context['hide'] = True
    else:
        template = 'nova/keypairs/create.html'

    return shortcuts.render(request, template, context)
示例#4
0
文件: views.py 项目: termie/horizon
def create(request):
    form, handled = CreateKeypair.maybe_handle(request)
    if handled:
        return handled

    context = {'form': form}

    if request.is_ajax():
        template = 'nova/keypairs/_create.html'
        context['hide'] = True
    else:
        template = 'nova/keypairs/create.html'

    return shortcuts.render(request, template, context)