mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-14 16:47:02 +02:00
added withdrawn status update
This commit is contained in:
parent
25f4ea1843
commit
a38f2a373b
2 changed files with 14 additions and 2 deletions
|
@ -62,6 +62,12 @@ urlpatterns = [
|
|||
views.ApplicationWithdraw.as_view(),
|
||||
name="application-withdraw-confirmation",
|
||||
),
|
||||
path(
|
||||
"application/<int:pk>/withdrawconfirmed",
|
||||
views.ApplicationWithdraw.updatestatus,
|
||||
name="application-withdrawn",
|
||||
|
||||
),
|
||||
path("health/", views.health),
|
||||
path("openid/", include("djangooidc.urls")),
|
||||
path("register/", include((application_urls, APPLICATION_NAMESPACE))),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import logging
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.http import Http404, HttpResponse
|
||||
from django.http import Http404, HttpResponse, HttpResponseRedirect
|
||||
from django.shortcuts import redirect, render
|
||||
from django.urls import resolve, reverse
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
@ -490,4 +490,10 @@ class ApplicationWithdraw(generic.DetailView):
|
|||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ApplicationWithdraw, self).get_context_data(**kwargs)
|
||||
return context
|
||||
return context
|
||||
|
||||
def updatestatus(request, pk):
|
||||
application = DomainApplication.objects.get(id=pk)
|
||||
application.status = "withdrawn"
|
||||
application.save()
|
||||
return HttpResponseRedirect(reverse('home'))
|
Loading…
Add table
Add a link
Reference in a new issue