Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
django /
forms /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
jinja2
[ DIR ]
drwxr-xr-x
templates
[ DIR ]
drwxr-xr-x
__init__.py
368
B
-rw-r--r--
boundfield.py
10.01
KB
-rw-r--r--
fields.py
46.22
KB
-rw-r--r--
forms.py
19.34
KB
-rw-r--r--
formsets.py
19.4
KB
-rw-r--r--
models.py
56.72
KB
-rw-r--r--
renderers.py
1.87
KB
-rw-r--r--
utils.py
5.86
KB
-rw-r--r--
widgets.py
37.43
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : renderers.py
import functools from pathlib import Path from django.conf import settings from django.template.backends.django import DjangoTemplates from django.template.loader import get_template from django.utils.functional import cached_property from django.utils.module_loading import import_string ROOT = Path(__file__).parent @functools.lru_cache() def get_default_renderer(): renderer_class = import_string(settings.FORM_RENDERER) return renderer_class() class BaseRenderer: def get_template(self, template_name): raise NotImplementedError('subclasses must implement get_template()') def render(self, template_name, context, request=None): template = self.get_template(template_name) return template.render(context, request=request).strip() class EngineMixin: def get_template(self, template_name): return self.engine.get_template(template_name) @cached_property def engine(self): return self.backend({ 'APP_DIRS': True, 'DIRS': [ROOT / self.backend.app_dirname], 'NAME': 'djangoforms', 'OPTIONS': {}, }) class DjangoTemplates(EngineMixin, BaseRenderer): """ Load Django templates from the built-in widget templates in django/forms/templates and from apps' 'templates' directory. """ backend = DjangoTemplates class Jinja2(EngineMixin, BaseRenderer): """ Load Jinja2 templates from the built-in widget templates in django/forms/jinja2 and from apps' 'jinja2' directory. """ @cached_property def backend(self): from django.template.backends.jinja2 import Jinja2 return Jinja2 class TemplatesSetting(BaseRenderer): """ Load templates using template.loader.get_template() which is configured based on settings.TEMPLATES. """ def get_template(self, template_name): return get_template(template_name)
Close