Fix flake8 issues
This commit is contained in:
parent
66530351ad
commit
19f5229536
|
@ -19,7 +19,7 @@ urlpatterns = [
|
||||||
path('billing/', views.BillingView.as_view(), name='billing'),
|
path('billing/', views.BillingView.as_view(), name='billing'),
|
||||||
path('bills/<int:pk>/download/', views.BillDownloadView.as_view(), name='bill-download'),
|
path('bills/<int:pk>/download/', views.BillDownloadView.as_view(), name='bill-download'),
|
||||||
path('profile/', views.ProfileView.as_view(), name='profile'),
|
path('profile/', views.ProfileView.as_view(), name='profile'),
|
||||||
path('profile/setLang/<code>', views.ProfileSetLang, name='profile-set-lang'),
|
path('profile/setLang/<code>', views.profile_set_language, name='profile-set-lang'),
|
||||||
path('address/', views.MailView.as_view(), name='address-list'),
|
path('address/', views.MailView.as_view(), name='address-list'),
|
||||||
path('address/new/', views.MailCreateView.as_view(), name='address-create'),
|
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>/', views.MailUpdateView.as_view(), name='address-update'),
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
from audioop import reverse
|
|
||||||
import logging
|
import logging
|
||||||
from os import stat
|
|
||||||
import smtplib
|
import smtplib
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
@ -8,7 +6,6 @@ from django.contrib import messages
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
from django.core.mail import mail_managers
|
from django.core.mail import mail_managers
|
||||||
from django.http import HttpResponse, HttpResponseNotFound, HttpResponseRedirect
|
from django.http import HttpResponse, HttpResponseNotFound, HttpResponseRedirect
|
||||||
from django.shortcuts import render
|
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils import translation
|
from django.utils import translation
|
||||||
from django.utils.html import format_html
|
from django.utils.html import format_html
|
||||||
|
@ -21,7 +18,7 @@ from django.views.generic.edit import DeleteView, FormView
|
||||||
from django.views.generic.list import ListView
|
from django.views.generic.list import ListView
|
||||||
from requests.exceptions import HTTPError
|
from requests.exceptions import HTTPError
|
||||||
|
|
||||||
from . import api, get_version
|
from . import get_version
|
||||||
from .auth import login as auth_login
|
from .auth import login as auth_login
|
||||||
from .auth import logout as auth_logout
|
from .auth import logout as auth_logout
|
||||||
from .forms import LoginForm, MailboxChangePasswordForm, MailboxCreateForm, MailboxUpdateForm, MailForm
|
from .forms import LoginForm, MailboxChangePasswordForm, MailboxCreateForm, MailboxUpdateForm, MailForm
|
||||||
|
@ -126,7 +123,8 @@ class ProfileView(CustomContextMixin, UserTokenRequiredMixin, TemplateView):
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
def ProfileSetLang(request, code):
|
|
||||||
|
def profile_set_language(request, code):
|
||||||
# set user language as active language
|
# set user language as active language
|
||||||
|
|
||||||
if any(x[0] == code for x in settings.LANGUAGES):
|
if any(x[0] == code for x in settings.LANGUAGES):
|
||||||
|
@ -313,7 +311,6 @@ class MailingListsView(ServiceListView):
|
||||||
'title': _('Mailing lists'),
|
'title': _('Mailing lists'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
domain_id = self.request.GET.get('domain')
|
domain_id = self.request.GET.get('domain')
|
||||||
|
|
Loading…
Reference in New Issue