Skip to content

Commit

Permalink
Redirect the user if signature is not required
Browse files Browse the repository at this point in the history
  • Loading branch information
danniel committed Jan 28, 2024
1 parent c66730d commit e589a28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/donations/views/ngo.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,15 @@ def get_context_data(self, ngo_url, **kwargs):
ngo = None

context["ngo"] = ngo
context["title"] = u"Donație - semnătura"
return context

def get(self, request, ngo_url):
context = self.get_context_data(ngo_url)

if not request.session.get("signature_required", False):
return redirect( reverse("twopercent", kwargs={"ngo_url": ngo_url}) )

return render(self.request, self.template_name, context)

def post(self, request, ngo_url):
Expand Down

0 comments on commit e589a28

Please sign in to comment.