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