musician webapps/websites description on listview

This commit is contained in:
Jorge Pastor 2024-04-29 21:40:49 +02:00
parent 6ff6a75eda
commit b896dd2262
3 changed files with 28 additions and 7 deletions

View File

@ -4,11 +4,10 @@
{% block content %}
<p>
Una Webapp es el diectorio donde se almacena su web,
mediante SFTP podras acceder a este directorio y subir/editar/eliminar los archivos
{{ description }}
</p>
<p>
Cada Webapp tiene su propio usuario SFTP, este se creara automaticamente al crear la Webapp
{{ description2 }}
</p>
<table class="table service-list">
@ -51,7 +50,6 @@
</tr>
{% endfor %}
</tbody>
{% include "musician/components/table_paginator.html" %}
</table>
{% endblock %}

View File

@ -2,6 +2,9 @@
{% load bootstrap4 i18n %}
{% block content %}
<p>
{{ description }}
</p>
<table class="table service-list table-hover">
<colgroup>
@ -100,7 +103,6 @@
</tr>
{% endfor %}
</tbody>
{% include "musician/components/table_paginator.html" %}
</table>

View File

@ -653,7 +653,7 @@ class SystemUserChangePasswordView(CustomContextMixin, UserTokenRequiredMixin, U
def get_queryset(self):
return self.model.objects.filter(account=self.request.user)
class WebsiteListView(ServiceListView):
class WebsiteListView(CustomContextMixin, UserTokenRequiredMixin, ListView):
model = Website
template_name = "musician/website_list.html"
extra_context = {
@ -661,7 +661,17 @@ class WebsiteListView(ServiceListView):
'title': _('Websites'),
}
class WebappListView(ServiceListView):
def get_queryset(self):
return self.model.objects.filter(account=self.request.user)
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context.update({
'description': _("A website is the place where a domain is associated with the directory where the web files are located. (WebApp)"),
})
return context
class WebappListView(CustomContextMixin, UserTokenRequiredMixin, ListView):
model = WebApp
template_name = "musician/webapp_list.html"
extra_context = {
@ -669,6 +679,17 @@ class WebappListView(ServiceListView):
'title': _('Webapps'),
}
def get_queryset(self):
return self.model.objects.filter(account=self.request.user)
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context.update({
'description': _("A web app is the directory where your website is stored. Through SFTP, you can access this directory and upload/edit/delete files."),
'description2': _("Each Webapp has its own SFTP user, which is created automatically when the Webapp is created.")
})
return context
class WebappDetailView(CustomContextMixin, UserTokenRequiredMixin, DetailView):
template_name = "musician/webapp_detail.html"