mirror of
https://github.com/basicswap/basicswap.git
synced 2024-12-23 03:49:25 +00:00
Use PackageLoader for templates.
This commit is contained in:
parent
1ce87bb58d
commit
900358e7c3
3 changed files with 5 additions and 3 deletions
|
@ -5,3 +5,4 @@ include *.md
|
||||||
include LICENSE.txt
|
include LICENSE.txt
|
||||||
|
|
||||||
recursive-include doc *
|
recursive-include doc *
|
||||||
|
recursive-include basicswap/templates *
|
||||||
|
|
|
@ -13,7 +13,7 @@ import threading
|
||||||
import http.client
|
import http.client
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
from http.server import BaseHTTPRequestHandler, HTTPServer
|
from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||||
from jinja2 import Environment, FileSystemLoader
|
from jinja2 import Environment, PackageLoader
|
||||||
|
|
||||||
from . import __version__
|
from . import __version__
|
||||||
from .util import (
|
from .util import (
|
||||||
|
@ -36,8 +36,8 @@ from .basicswap import (
|
||||||
ABS_LOCK_TIME,
|
ABS_LOCK_TIME,
|
||||||
)
|
)
|
||||||
|
|
||||||
file_loader = FileSystemLoader('basicswap/templates')
|
|
||||||
env = Environment(loader=file_loader)
|
env = Environment(loader=PackageLoader('basicswap', 'templates'))
|
||||||
|
|
||||||
|
|
||||||
def getCoinName(c):
|
def getCoinName(c):
|
||||||
|
|
1
setup.py
1
setup.py
|
@ -17,6 +17,7 @@ setuptools.setup(
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
url="https://github.com/tecnovert/basicswap",
|
url="https://github.com/tecnovert/basicswap",
|
||||||
packages=setuptools.find_packages(),
|
packages=setuptools.find_packages(),
|
||||||
|
include_package_data=True,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"License :: OSI Approved :: MIT License",
|
"License :: OSI Approved :: MIT License",
|
||||||
|
|
Loading…
Reference in a new issue