Exemplo n.º 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})
Exemplo n.º 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})
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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)