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

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

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

    context = {'form': form}

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

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

    context = {'form': form}

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

    return shortcuts.render(request, template, context)