Use PackageLoader for templates.
This commit is contained in:
		
							parent
							
								
									1ce87bb58d
								
							
						
					
					
						commit
						900358e7c3
					
				@ -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):
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								setup.py
									
									
									
									
									
								
							@ -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…
	
		Reference in New Issue
	
	Block a user