From af053b9ac4b9b45397b106a7842c19e84afdf7c4 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 23 Feb 2020 19:29:17 +0100 Subject: [PATCH] no more abstract methods --- owrx/controllers/__init__.py | 3 +-- owrx/controllers/template.py | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/owrx/controllers/__init__.py b/owrx/controllers/__init__.py index 99bfad2..6e0be48 100644 --- a/owrx/controllers/__init__.py +++ b/owrx/controllers/__init__.py @@ -1,8 +1,7 @@ -from abc import ABC, abstractmethod from datetime import datetime -class Controller(ABC): +class Controller(object): def __init__(self, handler, request, options): self.handler = handler self.request = request diff --git a/owrx/controllers/template.py b/owrx/controllers/template.py index 3938719..6746012 100644 --- a/owrx/controllers/template.py +++ b/owrx/controllers/template.py @@ -1,10 +1,9 @@ from . import Controller import pkg_resources from string import Template -from abc import ABCMeta -class TemplateController(Controller, metaclass=ABCMeta): +class TemplateController(Controller): def render_template(self, file, **vars): file_content = pkg_resources.resource_string("htdocs", file).decode("utf-8") template = Template(file_content) @@ -18,7 +17,7 @@ class TemplateController(Controller, metaclass=ABCMeta): return {} -class WebpageController(TemplateController, metaclass=ABCMeta): +class WebpageController(TemplateController): def template_variables(self): header = self.render_template("include/header.include.html") return {"header": header}