Added new page(Choice ssh key generate/upload), changed design of generate ssh form

This commit is contained in:
Siarhei Puhach 2017-07-05 16:57:49 +03:00
commit 7cc70a95ac
7 changed files with 249 additions and 22 deletions

View file

@ -368,6 +368,15 @@ class SSHKeyListView(LoginRequiredMixin, ListView):
return super(SSHKeyListView, self).render_to_response(context, **response_kwargs)
class SSHKeyChoiceView(LoginRequiredMixin, View):
template_name = "hosting/choice_ssh_keys.html"
login_url = reverse_lazy('hosting:login')
def get(self, request, *args, **kwargs):
context = {}
return render(request, self.template_name, context)
class SSHKeyCreateView(LoginRequiredMixin, FormView):
form_class = UserHostingKeyForm
model = UserHostingKey