mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 10:16:13 +02:00
fix linting errors
This commit is contained in:
parent
10185553de
commit
a277336a06
3 changed files with 14 additions and 10 deletions
|
@ -6,7 +6,6 @@ from django.shortcuts import redirect, render
|
|||
from django.urls import resolve, reverse
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.generic import TemplateView
|
||||
from django.views import generic
|
||||
from django.contrib import messages
|
||||
|
||||
from registrar.forms import application_wizard as forms
|
||||
|
@ -494,13 +493,13 @@ class ApplicationWithdrawConfirmation(DomainApplicationPermissionView):
|
|||
|
||||
class ApplicationWithdrawn(DomainApplicationPermissionView):
|
||||
# this view renders no template
|
||||
template_name = None
|
||||
template_name = ""
|
||||
|
||||
def get(self, *args, **kwargs):
|
||||
"""View class that does the actual withdrawing.
|
||||
|
||||
If user click on withdraw confirm button, this view updates the status to withdraw
|
||||
and send back to homepage.
|
||||
If user click on withdraw confirm button, this view updates the status
|
||||
to withdraw and send back to homepage.
|
||||
"""
|
||||
application = DomainApplication.objects.get(id=self.kwargs["pk"])
|
||||
application.status = "withdrawn"
|
||||
|
|
|
@ -12,10 +12,9 @@ from django.contrib.messages.views import SuccessMessageMixin
|
|||
from django.db import IntegrityError
|
||||
from django.shortcuts import redirect
|
||||
from django.urls import reverse
|
||||
from django.views.generic import DetailView
|
||||
from django.views.generic.edit import DeleteView, FormMixin
|
||||
from django.views.generic.edit import FormMixin
|
||||
|
||||
from registrar.models import Domain, DomainInvitation, User, UserDomainRole
|
||||
from registrar.models import DomainInvitation, User, UserDomainRole
|
||||
|
||||
from ..forms import DomainAddUserForm, NameserverFormset, DomainSecurityEmailForm
|
||||
from ..utility.email import send_templated_email, EmailSendingError
|
||||
|
@ -235,7 +234,11 @@ class DomainAddUserView(DomainPermissionView, FormMixin):
|
|||
return redirect(self.get_success_url())
|
||||
|
||||
|
||||
class DomainInvitationDeleteView(DomainInvitationPermissionDeleteView):
|
||||
class DomainInvitationDeleteView(
|
||||
DomainInvitationPermissionDeleteView, SuccessMessageMixin
|
||||
):
|
||||
object: DomainInvitation # workaround for type mismatch in DeleteView
|
||||
|
||||
def get_success_url(self):
|
||||
return reverse("domain-users", kwargs={"pk": self.object.domain.id})
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@ class DomainPermissionView(DomainPermission, DetailView, abc.ABC):
|
|||
|
||||
"""Abstract base view for domains that enforces permissions.
|
||||
|
||||
This abstract view cannot be instantiated. Actual views must specify `template_name`.
|
||||
This abstract view cannot be instantiated. Actual views must specify
|
||||
`template_name`.
|
||||
"""
|
||||
|
||||
# DetailView property for what model this is viewing
|
||||
|
@ -36,7 +37,8 @@ class DomainApplicationPermissionView(DomainApplicationPermission, DetailView, a
|
|||
|
||||
"""Abstract base view for domain applications that enforces permissions
|
||||
|
||||
This abstract view cannot be instantiated. Actual views must specify `template_name`.
|
||||
This abstract view cannot be instantiated. Actual views must specify
|
||||
`template_name`.
|
||||
"""
|
||||
|
||||
# DetailView property for what model this is viewing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue