mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
PEP 8 fixes
This commit is contained in:
@@ -15,7 +15,7 @@ from .... import models
|
||||
class ExportCommand(BaseCommand):
|
||||
"""Command class."""
|
||||
|
||||
help = "Export domains or identities using CSV format"
|
||||
help = "Export domains or identities using CSV format" # noqa:A003
|
||||
|
||||
def add_arguments(self, parser):
|
||||
"""Add arguments to command."""
|
||||
|
||||
@@ -21,7 +21,7 @@ class ImportCommand(BaseCommand):
|
||||
"""Command class."""
|
||||
|
||||
args = "csvfile"
|
||||
help = "Import identities from a csv file"
|
||||
help = "Import identities from a csv file" # noqa:A003
|
||||
|
||||
def add_arguments(self, parser):
|
||||
"""Add extra arguments to command."""
|
||||
|
||||
@@ -84,16 +84,16 @@ def import_domains(request):
|
||||
if request.method == "POST":
|
||||
return importdata(request)
|
||||
|
||||
ctx = dict(
|
||||
title=_("Import domains"),
|
||||
action_label=_("Import"),
|
||||
action_classes="submit",
|
||||
action=reverse("admin:domain_import"),
|
||||
formid="importform",
|
||||
enctype="multipart/form-data",
|
||||
target="import_target",
|
||||
form=ImportDataForm()
|
||||
)
|
||||
ctx = {
|
||||
"title": _("Import domains"),
|
||||
"action_label": _("Import"),
|
||||
"action_classes": "submit",
|
||||
"action": reverse("admin:domain_import"),
|
||||
"formid": "importform",
|
||||
"enctype": "multipart/form-data",
|
||||
"target": "import_target",
|
||||
"form": ImportDataForm(),
|
||||
}
|
||||
return render(request, "admin/import_domains_form.html", ctx)
|
||||
|
||||
|
||||
@@ -106,14 +106,14 @@ def import_identities(request):
|
||||
if request.method == "POST":
|
||||
return importdata(request, ImportIdentitiesForm)
|
||||
|
||||
ctx = dict(
|
||||
title=_("Import identities"),
|
||||
action_label=_("Import"),
|
||||
action_classes="submit",
|
||||
action=reverse("admin:identity_import"),
|
||||
formid="importform",
|
||||
enctype="multipart/form-data",
|
||||
target="import_target",
|
||||
form=ImportIdentitiesForm()
|
||||
)
|
||||
ctx = {
|
||||
"title": _("Import identities"),
|
||||
"action_label": _("Import"),
|
||||
"action_classes": "submit",
|
||||
"action": reverse("admin:identity_import"),
|
||||
"formid": "importform",
|
||||
"enctype": "multipart/form-data",
|
||||
"target": "import_target",
|
||||
"form": ImportIdentitiesForm()
|
||||
}
|
||||
return render(request, "admin/import_identities_form.html", ctx)
|
||||
|
||||
Reference in New Issue
Block a user