Compare commits

...

2 commits

9 changed files with 47 additions and 48 deletions

View file

@ -1 +0,0 @@
default_app_config = 'orchestra.contrib.musician.apps.MusicianConfig'

View file

@ -160,25 +160,25 @@ msgstr "Cancel·lar"
msgid "Save"
msgstr "Desar"
#: templates/musician/addresses.html:15
#: templates/musician/address_list.html:15
msgid "Email"
msgstr "Correu electrònic"
#: templates/musician/addresses.html:16
#: templates/musician/address_list.html:16
msgid "Domain"
msgstr "Domini"
#. Translators: This message appears on the page title
#: templates/musician/addresses.html:17 templates/musician/mail_base.html:22
#: templates/musician/address_list.html:17 templates/musician/mail_base.html:22
#: views.py:355
msgid "Mailboxes"
msgstr "Bústies de correu"
#: templates/musician/addresses.html:18
#: templates/musician/address_list.html:18
msgid "Forward"
msgstr "Redirecció"
#: templates/musician/addresses.html:38
#: templates/musician/address_list.html:38
msgid "New mail address"
msgstr "Nova adreça de correu"
@ -350,7 +350,7 @@ msgstr "Obre el gestor de bases de dades"
#. Translators: database page when there isn't any database.
#. Translators: saas page when there isn't any saas.
#: templates/musician/databases.html:58 templates/musician/saas.html:49
#: templates/musician/databases.html:58 templates/musician/saas_list.html:49
msgid "Ooops! Looks like there is nothing here!"
msgstr "Mmmh, sembla que aquí no hi ha res!"
@ -370,15 +370,15 @@ msgstr "Consulta aquí la teva configuració DNS."
msgid "Value"
msgstr "Valor"
#: templates/musician/mail_base.html:6 templates/musician/mailinglists.html:6
#: templates/musician/mail_base.html:6 templates/musician/mailinglist_list.html:6
msgid "Go to global"
msgstr "Totes les adreces"
#: templates/musician/mail_base.html:10 templates/musician/mailinglists.html:9
#: templates/musician/mail_base.html:10 templates/musician/mailinglist_list.html:9
msgid "for"
msgstr "per a"
#: templates/musician/mail_base.html:18 templates/musician/mailboxes.html:16
#: templates/musician/mail_base.html:18 templates/musician/mailbox_list.html:16
msgid "Addresses"
msgstr "Adreces de correu"
@ -415,27 +415,27 @@ msgstr ""
msgid "Close"
msgstr "Tancar"
#: templates/musician/mailboxes.html:14
#: templates/musician/mailbox_list.html:14
msgid "Name"
msgstr "Nom"
#: templates/musician/mailboxes.html:15
#: templates/musician/mailbox_list.html:15
msgid "Filtering"
msgstr "Filtrat"
#: templates/musician/mailboxes.html:27
#: templates/musician/mailbox_list.html:27
msgid "Update password"
msgstr "Actualitza la contrasenya"
#: templates/musician/mailboxes.html:43
#: templates/musician/mailbox_list.html:43
msgid "New mailbox"
msgstr "Nova bústia de correu"
#: templates/musician/mailinglists.html:34
#: templates/musician/mailinglist_list.html:34
msgid "Active"
msgstr "Actiu"
#: templates/musician/mailinglists.html:36
#: templates/musician/mailinglist_list.html:36
msgid "Inactive"
msgstr "Inactiu"
@ -463,19 +463,19 @@ msgstr "mètode de pagament:"
msgid "Check your last bills"
msgstr "Consulta les teves darreres factures"
#: templates/musician/saas.html:18
#: templates/musician/saas_list.html:18
msgid "Installed on"
msgstr "Instal·lat a"
#: templates/musician/saas.html:29
#: templates/musician/saas_list.html:29
msgid "Service info"
msgstr "Informació del servei"
#: templates/musician/saas.html:30
#: templates/musician/saas_list.html:30
msgid "active"
msgstr "actiu"
#: templates/musician/saas.html:37
#: templates/musician/saas_list.html:37
msgid "Open service admin panel"
msgstr "Obre el panell dadministració del servei"

View file

@ -162,25 +162,25 @@ msgstr "Cancelar"
msgid "Save"
msgstr "Guardar"
#: templates/musician/addresses.html:15
#: templates/musician/address_list.html:15
msgid "Email"
msgstr "Correo electrónico"
#: templates/musician/addresses.html:16
#: templates/musician/address_list.html:16
msgid "Domain"
msgstr "Dominio"
#. Translators: This message appears on the page title
#: templates/musician/addresses.html:17 templates/musician/mail_base.html:22
#: templates/musician/address_list.html:17 templates/musician/mail_base.html:22
#: views.py:355
msgid "Mailboxes"
msgstr "Buzones de correo"
#: templates/musician/addresses.html:18
#: templates/musician/address_list.html:18
msgid "Forward"
msgstr "Redirección"
#: templates/musician/addresses.html:38
#: templates/musician/address_list.html:38
msgid "New mail address"
msgstr "Nueva dirección de correo"
@ -352,7 +352,7 @@ msgstr "Abre el gestor de bases de datos"
#. Translators: database page when there isn't any database.
#. Translators: saas page when there isn't any saas.
#: templates/musician/databases.html:58 templates/musician/saas.html:49
#: templates/musician/databases.html:58 templates/musician/saas_list.html:49
msgid "Ooops! Looks like there is nothing here!"
msgstr "Mmmh… ¡parece que aquí no hay nada!"
@ -372,15 +372,15 @@ msgstr "Consulta aquí tu configuración DNS."
msgid "Value"
msgstr "Valor"
#: templates/musician/mail_base.html:6 templates/musician/mailinglists.html:6
#: templates/musician/mail_base.html:6 templates/musician/mailinglist_list.html:6
msgid "Go to global"
msgstr "Todas las direcciones"
#: templates/musician/mail_base.html:10 templates/musician/mailinglists.html:9
#: templates/musician/mail_base.html:10 templates/musician/mailinglist_list.html:9
msgid "for"
msgstr "para"
#: templates/musician/mail_base.html:18 templates/musician/mailboxes.html:16
#: templates/musician/mail_base.html:18 templates/musician/mailbox_list.html:16
msgid "Addresses"
msgstr "Direcciones de correo"
@ -417,27 +417,27 @@ msgstr ""
msgid "Close"
msgstr "Cerrar"
#: templates/musician/mailboxes.html:14
#: templates/musician/mailbox_list.html:14
msgid "Name"
msgstr "Nombre"
#: templates/musician/mailboxes.html:15
#: templates/musician/mailbox_list.html:15
msgid "Filtering"
msgstr "Filtrado"
#: templates/musician/mailboxes.html:27
#: templates/musician/mailbox_list.html:27
msgid "Update password"
msgstr "Actualiza la contraseña"
#: templates/musician/mailboxes.html:43
#: templates/musician/mailbox_list.html:43
msgid "New mailbox"
msgstr "Nuevo buzón de correo"
#: templates/musician/mailinglists.html:34
#: templates/musician/mailinglist_list.html:34
msgid "Active"
msgstr "Activo"
#: templates/musician/mailinglists.html:36
#: templates/musician/mailinglist_list.html:36
msgid "Inactive"
msgstr "Inactivo"
@ -465,19 +465,19 @@ msgstr "método de pago:"
msgid "Check your last bills"
msgstr "Consulta tus últimas facturas"
#: templates/musician/saas.html:18
#: templates/musician/saas_list.html:18
msgid "Installed on"
msgstr "Instalado en"
#: templates/musician/saas.html:29
#: templates/musician/saas_list.html:29
msgid "Service info"
msgstr "Información del servicio"
#: templates/musician/saas.html:30
#: templates/musician/saas_list.html:30
msgid "active"
msgstr "activo"
#: templates/musician/saas.html:37
#: templates/musician/saas_list.html:37
msgid "Open service admin panel"
msgstr "Abre el panel de administración del servicio"

View file

@ -12,7 +12,7 @@ from django.shortcuts import get_object_or_404
from django.urls import reverse_lazy
from django.utils import translation
from django.utils.html import format_html
from django.utils.http import is_safe_url
from django.utils.http import url_has_allowed_host_and_scheme
from django.utils.translation import gettext_lazy as _
from django.views import View
from django.views.generic.base import RedirectView, TemplateView
@ -153,7 +153,7 @@ def profile_set_language(request, code):
translation.activate(user_language)
redirect_to = request.GET.get('next', '')
url_is_safe = is_safe_url(
url_is_safe = url_has_allowed_host_and_scheme(
url=redirect_to,
allowed_hosts={request.get_host()},
require_https=request.is_secure(),
@ -232,7 +232,7 @@ class BillDownloadView(CustomContextMixin, UserTokenRequiredMixin, View):
bill = self.get_object()
# TODO(@slamora): implement download as PDF, now only HTML is reachable via link
content_type = request.META.get('HTTP_ACCEPT')
content_type = request.headers.get('accept')
if content_type == 'application/pdf':
pdf = html_to_pdf(bill.html or bill.render())
return HttpResponse(pdf, content_type='application/pdf')
@ -243,7 +243,7 @@ class BillDownloadView(CustomContextMixin, UserTokenRequiredMixin, View):
class AddressListView(ServiceListView):
service_class = AddressService
model = Address
template_name = "musician/addresses.html"
template_name = "musician/address_list.html"
extra_context = {
# Translators: This message appears on the page title
'title': _('Mail addresses'),
@ -317,7 +317,7 @@ class AddressDeleteView(CustomContextMixin, UserTokenRequiredMixin, DeleteView):
class MailingListsView(ServiceListView):
service_class = MailinglistService
model = List
template_name = "musician/mailinglists.html"
template_name = "musician/mailinglist_list.html"
extra_context = {
# Translators: This message appears on the page title
'title': _('Mailing lists'),
@ -348,7 +348,7 @@ class MailingListsView(ServiceListView):
class MailboxListView(ServiceListView):
service_class = MailboxService
model = Mailbox
template_name = "musician/mailboxes.html"
template_name = "musician/mailbox_list.html"
extra_context = {
# Translators: This message appears on the page title
'title': _('Mailboxes'),
@ -447,7 +447,7 @@ class DatabasesView(ServiceListView):
class SaasListView(ServiceListView):
service_class = SaasService
model = SaaS
template_name = "musician/saas.html"
template_name = "musician/saas_list.html"
extra_context = {
# Translators: This message appears on the page title
'title': _('Software as a Service'),
@ -496,7 +496,7 @@ class DomainUpdateRecordView(CustomContextMixin, UserTokenRequiredMixin, UpdateV
class DomainDeleteRecordView(CustomContextMixin, UserTokenRequiredMixin, DeleteView):
model = Record
template_name = "musician/record_confirm_delete.html"
template_name = "musician/record_check_delete.html"
pk_url_kwarg = "record_pk"
def get_queryset(self):
@ -545,7 +545,7 @@ class LoginView(FormView):
self.redirect_field_name,
self.request.GET.get(self.redirect_field_name, '')
)
url_is_safe = is_safe_url(
url_is_safe = url_has_allowed_host_and_scheme(
url=redirect_to,
allowed_hosts={self.request.get_host()},
require_https=self.request.is_secure(),