fix github 3
This commit is contained in:
parent
51822816f6
commit
caed5f0227
6
Aptfile
Normal file
6
Aptfile
Normal file
@ -0,0 +1,6 @@
|
||||
libgobject-2.0-0
|
||||
libpango-1.0-0
|
||||
libcairo2
|
||||
libharfbuzz0b
|
||||
libfontconfig1
|
||||
libpangoft2-1.0-0
|
||||
Binary file not shown.
@ -22,6 +22,20 @@ except ImportError:
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
|
||||
|
||||
# Patch for WeasyPrint libraries
|
||||
try:
|
||||
import ctypes
|
||||
import ctypes.util
|
||||
for lib in ['gobject-2.0', 'pango-1.0', 'cairo', 'harfbuzz', 'fontconfig']:
|
||||
path = ctypes.util.find_library(lib)
|
||||
if path:
|
||||
try:
|
||||
ctypes.CDLL(path)
|
||||
except OSError:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
application = get_wsgi_application()
|
||||
Binary file not shown.
15
manage.py
15
manage.py
@ -15,6 +15,21 @@ def main():
|
||||
pass
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
|
||||
|
||||
# Patch for WeasyPrint libraries
|
||||
try:
|
||||
import ctypes
|
||||
import ctypes.util
|
||||
for lib in ['gobject-2.0', 'pango-1.0', 'cairo', 'harfbuzz', 'fontconfig']:
|
||||
path = ctypes.util.find_library(lib)
|
||||
if path:
|
||||
try:
|
||||
ctypes.CDLL(path)
|
||||
except OSError:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user