Major redesign #73

Merged
lukas merged 45 commits from manage-purchases into main 2024-09-02 15:47:44 +00:00
2 changed files with 1 additions and 13 deletions
Showing only changes of commit 020e12e20b - Show all commits

View File

@ -82,12 +82,6 @@ urlpatterns = [
name="list_sessions_end_session",
),
path("session/list", sessionviews.list_sessions, name="list_sessions"),
path(
"session/list/recent",
views.list_sessions,
{"filter": "recent"},
name="list_sessions_recent",
),
path(
"session/list/by-purchase/<int:purchase_id>",
views.list_sessions,

View File

@ -342,12 +342,6 @@ def list_sessions(
elif filter == "ownership_type":
dataset = all_sessions.filter(purchase__ownership_type=ownership_type)
context["ownership_type"] = dict(Purchase.OWNERSHIP_TYPES)[ownership_type]
elif filter == "recent":
current_year = timezone.now().year
first_day_of_year = timezone.make_aware(datetime(current_year, 1, 1))
dataset = all_sessions.filter(timestamp_start__gte=first_day_of_year).order_by(
"-timestamp_start"
)
context["title"] = "This year"
else:
dataset = all_sessions
@ -949,4 +943,4 @@ def add_device(request: HttpRequest) -> HttpResponse:
@login_required
def index(request: HttpRequest) -> HttpResponse:
return redirect("list_sessions_recent")
return redirect("list_sessions")