Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit 579e874

Browse files
make accept update form
1 parent 3d4034c commit 579e874

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

suborg/views.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,26 @@ def accept_application(request, application_id):
158158
email=email
159159
)
160160

161+
form = SubOrgApplicationForm(request.POST, request.FILES, instance=instance)
162+
if form.is_valid():
163+
suborg_details = form.save()
164+
suborg_details.changed = True
165+
suborg_details.updated_at = timezone.now()
166+
suborg_details.save()
167+
suborg_details.send_update_notification()
168+
s = Scheduler.objects.filter(
169+
command="update_site_template",
170+
data=json.dumps({"template": "ideas.html"}),
171+
success=None,
172+
).all()
173+
if len(s) == 0:
174+
time = timezone.now()
175+
Scheduler.objects.create(
176+
command="update_site_template",
177+
data=json.dumps({"template": "ideas.html"}),
178+
activation_date=time,
179+
)
180+
161181
return redirect(reverse("admin:gsoc_suborgdetails_change", args=[application_id]))
162182

163183

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy