From 8c7d3570a58ea4dc7da2843c4b612862ad76f4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Tue, 7 Apr 2020 10:08:20 +0300 Subject: [PATCH] Remove unused imports, cleanup. --- hc/api/views.py | 1 - hc/front/admin.py | 4 +--- hc/front/models.py | 4 +--- hc/front/tests/test_copy.py | 2 +- hc/front/views.py | 1 - hc/payments/models.py | 1 - 6 files changed, 3 insertions(+), 10 deletions(-) diff --git a/hc/api/views.py b/hc/api/views.py index fed66d6c..d3728e1a 100644 --- a/hc/api/views.py +++ b/hc/api/views.py @@ -19,7 +19,6 @@ from hc.api import schemas from hc.api.decorators import authorize, authorize_read, cors, validate_json from hc.api.models import Check, Notification, Channel from hc.lib.badges import check_signature, get_badge_svg -from hc.lib.jsonschema import ValidationError, validate class BadChannelException(Exception): diff --git a/hc/front/admin.py b/hc/front/admin.py index 8c38f3f3..ad8af2ef 100644 --- a/hc/front/admin.py +++ b/hc/front/admin.py @@ -1,3 +1 @@ -from django.contrib import admin - -# Register your models here. +# The front app has no models. diff --git a/hc/front/models.py b/hc/front/models.py index 71a83623..ad8af2ef 100644 --- a/hc/front/models.py +++ b/hc/front/models.py @@ -1,3 +1 @@ -from django.db import models - -# Create your models here. +# The front app has no models. diff --git a/hc/front/tests/test_copy.py b/hc/front/tests/test_copy.py index da8ff8d8..1b91bd1d 100644 --- a/hc/front/tests/test_copy.py +++ b/hc/front/tests/test_copy.py @@ -1,4 +1,4 @@ -from hc.api.models import Channel, Check +from hc.api.models import Check from hc.test import BaseTestCase diff --git a/hc/front/views.py b/hc/front/views.py index 20e21308..dac50101 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -291,7 +291,6 @@ def serve_doc(request, doc="introduction"): ctx = { "page": "docs", - "section": "home", "section": doc, "content": content, "first_line": content.split("\n")[0], diff --git a/hc/payments/models.py b/hc/payments/models.py index e7713b80..50aa19c4 100644 --- a/hc/payments/models.py +++ b/hc/payments/models.py @@ -1,7 +1,6 @@ from django.conf import settings from django.contrib.auth.models import User from django.db import models -from django.template.loader import render_to_string if settings.USE_PAYMENTS: import braintree