updated .env file and working now

This commit is contained in:
abhishek
2026-05-26 11:18:35 +00:00
parent 0235ccbaa2
commit 8e936240ee
6335 changed files with 819584 additions and 3 deletions

View File

@@ -0,0 +1,26 @@
"""
Wrapper for loading templates from a plain Python dict.
"""
from django.template import Origin, TemplateDoesNotExist
from .base import Loader as BaseLoader
class Loader(BaseLoader):
def __init__(self, engine, templates_dict):
self.templates_dict = templates_dict
super().__init__(engine)
def get_contents(self, origin):
try:
return self.templates_dict[origin.name]
except KeyError:
raise TemplateDoesNotExist(origin)
def get_template_sources(self, template_name):
yield Origin(
name=template_name,
template_name=template_name,
loader=self,
)