Use PackageLoader for templates.

2024-05-20_merge
tecnovert 5 years ago
parent 1ce87bb58d
commit 900358e7c3
No known key found for this signature in database
GPG Key ID: 8ED6D8750C4E3F93
  1. 1
      MANIFEST.in
  2. 6
      basicswap/http_server.py
  3. 1
      setup.py

@ -5,3 +5,4 @@ include *.md
include LICENSE.txt
recursive-include doc *
recursive-include basicswap/templates *

@ -13,7 +13,7 @@ import threading
import http.client
import urllib.parse
from http.server import BaseHTTPRequestHandler, HTTPServer
from jinja2 import Environment, FileSystemLoader
from jinja2 import Environment, PackageLoader
from . import __version__
from .util import (
@ -36,8 +36,8 @@ from .basicswap import (
ABS_LOCK_TIME,
)
file_loader = FileSystemLoader('basicswap/templates')
env = Environment(loader=file_loader)
env = Environment(loader=PackageLoader('basicswap', 'templates'))
def getCoinName(c):

@ -17,6 +17,7 @@ setuptools.setup(
long_description_content_type="text/markdown",
url="https://github.com/tecnovert/basicswap",
packages=setuptools.find_packages(),
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",

Loading…
Cancel
Save