mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-22 06:03:23 +02:00
refactor: Remove setup_django from html.py
This commit is contained in:
@@ -23,7 +23,6 @@ from ..config import (
|
|||||||
GIT_SHA,
|
GIT_SHA,
|
||||||
FOOTER_INFO,
|
FOOTER_INFO,
|
||||||
HTML_INDEX_FILENAME,
|
HTML_INDEX_FILENAME,
|
||||||
setup_django,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
MAIN_INDEX_TEMPLATE = 'main_index.html'
|
MAIN_INDEX_TEMPLATE = 'main_index.html'
|
||||||
@@ -111,7 +110,6 @@ def render_django_template(template: str, context: Mapping[str, str]) -> str:
|
|||||||
"""render a given html template string with the given template content"""
|
"""render a given html template string with the given template content"""
|
||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
|
|
||||||
setup_django(check_db=False)
|
|
||||||
return render_to_string(template, context)
|
return render_to_string(template, context)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user