Redirect after adding game/platform/purchase/session
This commit is contained in:
parent
a1309c3738
commit
b8a15e43db
|
@ -1,4 +1,5 @@
|
|||
## Unreleased
|
||||
* Redirect after adding game/platform/purchase/session
|
||||
* Fix display of duration_manual
|
||||
* Fix display of duration_calculated, display durations less than a minute
|
||||
* Make the "Finish now?" button on session list work
|
||||
|
|
|
@ -12,5 +12,5 @@ COPY entrypoint.sh /
|
|||
RUN chmod +x /entrypoint.sh
|
||||
USER timetracker
|
||||
EXPOSE 8000
|
||||
ENV VERSION_NUMBER 0.1.0-16-g12cc902
|
||||
ENV VERSION_NUMBER 0.1.0-17-ga1309c3
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
|
@ -24,6 +24,7 @@ def add_session(request):
|
|||
form = SessionForm(request.POST or None, initial=initial)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect("list_sessions")
|
||||
|
||||
context["form"] = form
|
||||
return render(request, "add_session.html", context)
|
||||
|
@ -62,6 +63,7 @@ def add_purchase(request):
|
|||
form = PurchaseForm(request.POST or None, initial=initial)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect("index")
|
||||
|
||||
context["form"] = form
|
||||
context["title"] = "Add New Purchase"
|
||||
|
@ -73,6 +75,7 @@ def add_game(request):
|
|||
form = GameForm(request.POST or None)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect("index")
|
||||
|
||||
context["form"] = form
|
||||
context["title"] = "Add New Game"
|
||||
|
@ -84,6 +87,7 @@ def add_platform(request):
|
|||
form = PlatformForm(request.POST or None)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect("index")
|
||||
|
||||
context["form"] = form
|
||||
context["title"] = "Add New Platform"
|
||||
|
|
Loading…
Reference in New Issue