Redirections
This commit is contained in:
parent
5c3fd60de9
commit
80a1a67643
1 changed files with 6 additions and 6 deletions
|
@ -21,7 +21,7 @@ def refill_balance(request, pk):
|
|||
account.calc_balance()
|
||||
bal = account.balance
|
||||
account.save()
|
||||
return redirect(reverse('index'))
|
||||
return redirect(reverse('account', args=[account.pk,]))
|
||||
|
||||
return render(
|
||||
request,
|
||||
|
@ -45,7 +45,7 @@ def pay(request, pk):
|
|||
sale.save()
|
||||
account.calc_balance()
|
||||
account.save()
|
||||
return redirect(reverse('index'))
|
||||
return redirect(reverse('account', args=[account.pk,]))
|
||||
|
||||
return render(
|
||||
request,
|
||||
|
@ -71,9 +71,9 @@ def reset_balance(request, pk):
|
|||
sale.save()
|
||||
account.calc_balance()
|
||||
account.save()
|
||||
return redirect(reverse('index'))
|
||||
return redirect(reverse('account', args=[account.pk,]))
|
||||
elif account.balance is 0:
|
||||
return redirect(reverse('index'))
|
||||
return redirect(reverse('account', args=[account.pk,]))
|
||||
|
||||
return render(
|
||||
request,
|
||||
|
@ -90,8 +90,8 @@ def create_account(request):
|
|||
form = AccountForm(request.POST or None)
|
||||
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect(reverse('index'))
|
||||
account = form.save()
|
||||
return redirect(reverse('account', args=[account.pk,]))
|
||||
|
||||
return render(
|
||||
request,
|
||||
|
|
Loading…
Reference in a new issue