Merge master into task/3530/upgrade_to_django_1.11

This commit is contained in:
PCoder 2018-03-03 12:58:45 +01:00
commit c89f76cb42
168 changed files with 3378 additions and 27435 deletions

View file

@ -487,7 +487,7 @@ class SSHKeyCreateView(LoginRequiredMixin, FormView):
def form_valid(self, form):
form.save()
if 'dcl-generated-key-' in form.instance.name:
if settings.DCL_SSH_KEY_NAME_PREFIX in form.instance.name:
content = ContentFile(form.cleaned_data.get('private_key'))
filename = form.cleaned_data.get(
'name') + '_' + str(uuid.uuid4())[:8] + '_private.pem'