예제 #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)