From 45f0e88446bec34916fada002e2b915be2162295 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Tue, 26 Sep 2023 12:55:54 +0100 Subject: [PATCH] allow custom path (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * allow custom path --------- Co-authored-by: dni ⚡ --- __init__.py | 4 +--- config.json | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/__init__.py b/__init__.py index b7e2b96..a13ecc7 100644 --- a/__init__.py +++ b/__init__.py @@ -1,5 +1,4 @@ from fastapi import APIRouter -from fastapi.staticfiles import StaticFiles from lnbits.db import Database from lnbits.helpers import template_renderer @@ -11,14 +10,13 @@ tipjar_static_files = [ { "path": "/tipjar/static", - "app": StaticFiles(directory="lnbits/extensions/tipjar/static"), "name": "tipjar_static", } ] def tipjar_renderer(): - return template_renderer(["lnbits/extensions/tipjar/templates"]) + return template_renderer(["tipjar/templates"]) from .views import * # noqa: F401,F403 diff --git a/config.json b/config.json index 90f634e..048fdea 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,7 @@ { "name": "Tip Jar", "short_description": "Accept Bitcoin donations, with messages attached!", - "tile": "/tipjar/static/image/tipjar.png", - "contributors": ["Fittiboy"] + "tile": "/tipjar/static/image/tipjar.png", + "contributors": ["Fittiboy"], + "min_lnbits_version": "0.11.0" }