def create(request): form, handled = CreateKeypair.maybe_handle(request) if handled: return handled return shortcuts.render(request, 'nova/keypairs/create.html', {'create_form': form})
def create(request): form, handled = CreateKeypair.maybe_handle(request) if handled: return handled return shortcuts.render(request, 'nova/keypairs/create.html', { 'create_form': form})
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)
def index(request): delete_form, handled = DeleteKeypair.maybe_handle(request) if handled: return handled create_form = CreateKeypair() import_form = ImportKeypair() try: keypairs = api.keypair_list(request) except novaclient_exceptions.ClientException, e: keypairs = [] LOG.exception("ClientException in keypair index") messages.error(request, _('Error fetching keypairs: %s') % e.message)