2021-02-28 22:00:11 +00:00
|
|
|
from django.contrib.auth.decorators import login_required
|
|
|
|
from django.shortcuts import render
|
|
|
|
|
|
|
|
from .models import Membership
|
|
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
def membership_overview(request):
|
|
|
|
memberships = Membership.objects.for_user(request.user)
|
|
|
|
current_membership = memberships.current()
|
|
|
|
previous_memberships = memberships.previous()
|
|
|
|
|
2022-08-09 12:39:02 +00:00
|
|
|
context = {
|
|
|
|
"current_membership": current_membership,
|
|
|
|
"previous_memberships": previous_memberships,
|
|
|
|
}
|
2021-02-28 22:00:11 +00:00
|
|
|
|
2021-02-28 22:03:32 +00:00
|
|
|
return render(request, "membership_overview.html", context)
|