diff --git a/contest/views.py b/contest/views.py index 246ab26..f46983b 100644 --- a/contest/views.py +++ b/contest/views.py @@ -37,6 +37,9 @@ def contestIndex(request): @login_required def log(request): + if not request.user.ref: + return HttpResponseRedirect(reverse("contest:index")) + form = None qsos = QSO.objects.filter(owner=request.user).order_by("-ownNo") @@ -74,6 +77,9 @@ def log(request): @login_required def logEdit(request, qsoid): + if not request.user.ref: + return HttpResponseRedirect(reverse("contest:index")) + qso = QSO.objects.get(id=qsoid, owner=request.user) form = None @@ -90,6 +96,9 @@ def logEdit(request, qsoid): return render(request, 'contest/logEdit.html', {'form': form, "qso": qso}) def logDelete(request, qsoid): + if not request.user.ref: + return HttpResponseRedirect(reverse("contest:index")) + qso = QSO.objects.get(id=qsoid, owner=request.user) if request.method == 'POST':