From 7c1c20b07ed9046f1b59a9d19d2841c558a08731 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C4=93teris=20Caune?=
Date: Wed, 20 Sep 2017 20:02:24 +0300
Subject: [PATCH] Don't create new checks in the docs page. For examples, use a
dummy "your-uuid-here" value.
---
hc/api/models.py | 1 -
hc/front/views.py | 6 ++----
templates/front/docs.html | 2 +-
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/hc/api/models.py b/hc/api/models.py
index 75505c1f..4439abd5 100644
--- a/hc/api/models.py
+++ b/hc/api/models.py
@@ -8,7 +8,6 @@ from datetime import datetime, timedelta as td
from croniter import croniter
from django.conf import settings
-from django.core.checks import Warning
from django.contrib.auth.models import User
from django.db import models
from django.urls import reverse
diff --git a/hc/front/views.py b/hc/front/views.py
index 7ad2bcce..0173e0c5 100644
--- a/hc/front/views.py
+++ b/hc/front/views.py
@@ -110,14 +110,12 @@ def index(request):
def docs(request):
- check = _welcome_check(request)
-
ctx = {
"page": "docs",
"section": "home",
"ping_endpoint": settings.PING_ENDPOINT,
- "check": check,
- "ping_url": check.url()
+ "ping_email": "your-uuid-here@%s" % settings.PING_EMAIL_DOMAIN,
+ "ping_url": settings.PING_ENDPOINT + "your-uuid-here"
}
return render(request, "front/docs.html", ctx)
diff --git a/templates/front/docs.html b/templates/front/docs.html
index 414dc47b..a13a7d86 100644
--- a/templates/front/docs.html
+++ b/templates/front/docs.html
@@ -167,7 +167,7 @@ using the "-command" argument:
As an alternative to HTTP/HTTPS requests,
you can "ping" this check by sending an
- email message to {{ check.email }}
+ email message to {{ ping_email }}
This is useful for end-to-end testing weekly email delivery.