Compare commits

..

No commits in common. "d7e8a411cd0a31f01582b5d964d0b299cc00de31" and "790ac0074a93cc2b7290dd129eb2f540a4707e6d" have entirely different histories.

4 changed files with 12 additions and 18 deletions

View File

@ -70,7 +70,7 @@
<h4>{% trans "Mail" %}</h4>
<p class="card-text"><i class="fas fa-envelope fa-3x"></i></p>
<p class="card-text text-dark">
{{ domain.addresses.count }} {% trans "mail addresses created" %}
{{ domain.addresses|length }} {% trans "mail addresses created" %}
</p>
<a class="stretched-link" href="{% url 'musician:address-list' %}?domain={{ domain.id }}"></a>
</div>

View File

@ -31,12 +31,12 @@ urlpatterns = [
path('address/new/', views.MailCreateView.as_view(), name='address-create'),
path('address/<int:pk>/', views.MailUpdateView.as_view(), name='address-update'),
path('address/<int:pk>/delete/', views.AddressDeleteView.as_view(), name='address-delete'),
path('mailboxes/', views.MailboxListView.as_view(), name='mailbox-list'),
path('mailboxes/', views.MailboxesView.as_view(), name='mailbox-list'),
path('mailboxes/new/', views.MailboxCreateView.as_view(), name='mailbox-create'),
path('mailboxes/<int:pk>/', views.MailboxUpdateView.as_view(), name='mailbox-update'),
path('mailboxes/<int:pk>/delete/', views.MailboxDeleteView.as_view(), name='mailbox-delete'),
path('mailboxes/<int:pk>/change-password/', views.MailboxChangePasswordView.as_view(), name='mailbox-password'),
path('mailing-lists/', views.MailingListsView.as_view(), name='mailing-lists'),
path('databases/', views.DatabasesView.as_view(), name='database-list'),
path('saas/', views.SaasListView.as_view(), name='saas-list'),
path('saas/', views.SaasView.as_view(), name='saas-list'),
]

View File

@ -340,7 +340,7 @@ class MailingListsView(ServiceListView):
return {}
class MailboxListView(ServiceListView):
class MailboxesView(ServiceListView):
service_class = MailboxService
model = Mailbox
template_name = "musician/mailboxes.html"
@ -388,9 +388,6 @@ class MailboxUpdateView(CustomContextMixin, UserTokenRequiredMixin, UpdateView):
success_url = reverse_lazy("musician:mailbox-list")
extra_context = {'service': service_class}
def get_queryset(self):
return self.model.objects.filter(account=self.request.user)
class MailboxDeleteView(CustomContextMixin, UserTokenRequiredMixin, DeleteView):
model = Mailbox
@ -425,9 +422,6 @@ class MailboxChangePasswordView(CustomContextMixin, UserTokenRequiredMixin, Upda
form_class = MailboxChangePasswordForm
success_url = reverse_lazy("musician:mailbox-list")
def get_queryset(self):
return self.model.objects.filter(account=self.request.user)
class DatabasesView(ServiceListView):
template_name = "musician/databases.html"
@ -439,7 +433,7 @@ class DatabasesView(ServiceListView):
}
class SaasListView(ServiceListView):
class SaasView(ServiceListView):
service_class = SaasService
model = SaaS
template_name = "musician/saas.html"

View File

@ -1,14 +1,14 @@
import sys
from contextlib import ContextDecorator
from threading import local
from django.contrib.admin.models import LogEntry
from django.db.models.signals import m2m_changed, post_save, pre_delete
from django.db.models.signals import pre_delete, post_save, m2m_changed
from django.dispatch import receiver
from django.utils.decorators import ContextDecorator
from orchestra.utils.python import OrderedSet
from . import Operation, helpers, manager
from . import manager, Operation, helpers
from .middlewares import OperationsMiddleware
from .models import BackendLog, BackendOperation