mirror of
https://github.com/wrabit/django-cotton.git
synced 2025-07-24 09:53:48 +00:00
benchmarks fixes
This commit is contained in:
parent
5fb5b359f6
commit
b321d0f4bf
3 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
{% extends "cotton/benchmarks/partials/native_main.html" %}
|
||||
{% extends "benchmarks/native_main.html" %}
|
||||
|
||||
{% block top %}
|
||||
I'm top
|
||||
|
|
|
@ -46,7 +46,7 @@ settings.configure(
|
|||
django.setup()
|
||||
|
||||
|
||||
def benchmark_template_rendering(template_name, iterations=1000):
|
||||
def benchmark_template_rendering(template_name, iterations=1):
|
||||
start_time = time.time()
|
||||
for _ in range(iterations):
|
||||
render_to_string(template_name)
|
||||
|
|
|
@ -103,6 +103,7 @@ class CottonTemplateProcessor:
|
|||
content = self._replace_syntax_with_placeholders(content)
|
||||
content = self._compile_cotton_to_django(content, component_key)
|
||||
content = self._replace_placeholders_with_syntax(content)
|
||||
print(content)
|
||||
return self._revert_bs4_attribute_empty_attribute_fixing(content)
|
||||
|
||||
def _replace_syntax_with_placeholders(self, content):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue