Attention une mise à jour du service Gitlab va être effectuée le mardi 14 décembre entre 13h30 et 14h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit b7f1b67c authored by sebastien letort's avatar sebastien letort
Browse files

Published status of version can now be updated.

I used @transaction atomic to make all the update in one access to the DB (so speed up). But there is no constraint for that.
parent ddf2cf17
......@@ -599,6 +599,21 @@ class WebappVersionList(UserAccessMixin, ListView):
return super().get_context_data(**kwargs)
def post(self, request, *args, **kwargs):" {} - {}".format(request.POST, kwargs))
for version_id,values in request.POST.items():
if 'csrfmiddlewaretoken' == version_id:
o_version = WebappVersion.objects.get(id=version_id)
o_version.published = values
messages.success(request, "Published status have been updated.\n")
return redirect('main:webapp_version_list', kwargs['docker_name'])
class WebappJson(UserAccessMixin, DetailView):
"""json variant of the application details
......@@ -10,6 +10,10 @@
<li class="breadcrumb-item active" aria-current="page">versions</li>
{% endblock %}
{% block messages %}
{{ block.super }}
{% endblock %}
{% block content %}
<div class="container">
<div class="allgo-page">
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment