Commit 268dbf09 authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Update of webapps model and view



I updated the webapp model and view in order to display only the public
applications. I changed the model to not accept any null value and force
the default to 1 (private).
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent c0b9d983
......@@ -91,6 +91,7 @@ class Webapp(TimeStampModel):
readme = models.IntegerField(blank=True, null=True)
entrypoint = models.CharField(max_length=255, blank=True)
exec_time = models.IntegerField(blank=True, null=True)
private = models.IntegerField(default=1)
access_token = models.CharField(max_length=255, blank=True, null=True)
sandbox_state = models.IntegerField(null=True)
......
......@@ -31,7 +31,7 @@ class WebappList(ListView):
pattern_name = 'webapp_list'
paginate_by = 10
template_name = 'webapp_list.html'
queryset = Webapp.objects.all().order_by('-created_at')
queryset = Webapp.objects.filter(private=0).order_by('created_at')
class WebappDetail(DetailView):
......
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