<commit_before>{% load i18n %}

{% get_current_language as LANGUAGE_CODE %}

<div id="django_log" lang="{{ LANGUAGE_CODE|escape }}">

	<hr />
	<h1>{% trans "Request Log" %}</h1>

	<div class="django_log_messages">

	{% if records %}
		<table cellspacing="0">
			<thead>
				<tr>
					<th>{% trans "Level" %}</th>
					<th>{% trans "Timestamp" %}</th>
					<th>{% trans "Location" %}</th>
					<th>{% trans "Message" %}</th>
					<th>{% trans "Time" %}</th>
				</tr>
			</thead>
			<tbody>
			{% for record in records %}
				<tr class="{{ record.levelname|lower|escape }}">
					<td class="level" rowspan="2">{{ record.levelname|escape }}</td>
					<td class="timestamp" rowspan="2">{{ record.formatted_timestamp|escape }}</td>
					<td class="location"><a href="#">&#x25b6;&nbsp;{{ record.module|escape }}{% if record.funcName %}.{{ record.funcName|escape }}{% endif %}:{{ record.lineno|escape }}</a></td>
					{% if record.sqltime %}
						<td class="message">{{ record.formatted_message }}</td>
						<td class="time">{{ record.sqltime }} <abbr title="milliseconds">ms</abbr></td>
					{% else %}
						<td class="message">{{ record.formatted_message }}</td>
						<td class="time">&nbsp;</td>
					{% endif %}
				</tr>
				<tr class="{{ record.levelname|lower|escape }}">
					<td class="trace trace-hidden" colspan="3">
						<div class="source">
							<h3>{{ record.pathname|escape|addslashes }} {% if record.funcName %}: {{ record.funcName|escape }} {% endif %}: {{ record.lineno|escape }}</h3>
							{{ record.source_lines|escape }}
							<h3>Local variables</h3>
							<dl class="local_variables">
								{% for var in record.local_variables %}
									<dt>{{ var.0|escape }}</dt>
									<dd>{{ var.1|pprint|escape }}</dd>
								{% endfor %}
							</dl>
						</div>
					</td>
				</tr>
			{% endfor %}
			</tbody>
		</table>

		{% if logging_show_metrics %}		
			<div class="metrics">
				{% blocktrans with elapsed_time|floatformat as elapsed_time %}Completed in {{ elapsed_time }} <abbr title="milliseconds">ms</abbr>{% endblocktrans %}
				{% ifnotequal query_count -1 %}
					{% blocktrans count query_count as query_count %}with {{ query_count }} database query{% plural %}with {{ query_count }} database queries{% endblocktrans %}
					{% if query_count %}
						{% blocktrans with query_time|floatformat as query_time and query_percentage|floatformat as query_percentage %}which took {{ query_time }} <abbr title="milliseconds">ms</abbr> ({{ query_percentage }}&#37; of total time){% endblocktrans %}{% endif %}{% if not logging_log_sql %}.
					{% blocktrans %}If you set <code>LOGGING_LOG_SQL</code> to <code>True</code> in your Django settings file, you'll see all the individual database queries{% endblocktrans %}{% endif %}{% endifnotequal %}.<commit_msg>Removed escape filter which was causing problems in Django 0.96. This is OK as the variable is escaped within the Python code.<commit_after>{% load i18n %}

{% get_current_language as LANGUAGE_CODE %}

<div id="django_log" lang="{{ LANGUAGE_CODE|escape }}">

	<hr />
	<h1>{% trans "Request Log" %}</h1>

	<div class="django_log_messages">

	{% if records %}
		<table cellspacing="0">
			<thead>
				<tr>
					<th>{% trans "Level" %}</th>
					<th>{% trans "Timestamp" %}</th>
					<th>{% trans "Location" %}</th>
					<th>{% trans "Message" %}</th>
					<th>{% trans "Time" %}</th>
				</tr>
			</thead>
			<tbody>
			{% for record in records %}
				<tr class="{{ record.levelname|lower|escape }}">
					<td class="level" rowspan="2">{{ record.levelname|escape }}</td>
					<td class="timestamp" rowspan="2">{{ record.formatted_timestamp|escape }}</td>
					<td class="location"><a href="#">&#x25b6;&nbsp;{{ record.module|escape }}{% if record.funcName %}.{{ record.funcName|escape }}{% endif %}:{{ record.lineno|escape }}</a></td>
					{% if record.sqltime %}
						<td class="message">{{ record.formatted_message }}</td>
						<td class="time">{{ record.sqltime }} <abbr title="milliseconds">ms</abbr></td>
					{% else %}
						<td class="message">{{ record.formatted_message }}</td>
						<td class="time">&nbsp;</td>
					{% endif %}
				</tr>
				<tr class="{{ record.levelname|lower|escape }}">
					<td class="trace trace-hidden" colspan="3">
						<div class="source">
							<h3>{{ record.pathname|escape|addslashes }} {% if record.funcName %}: {{ record.funcName|escape }} {% endif %}: {{ record.lineno|escape }}</h3>
							{{ record.source_lines }}
							<h3>Local variables</h3>
							<dl class="local_variables">
								{% for var in record.local_variables %}
									<dt>{{ var.0|escape }}</dt>
									<dd>{{ var.1|pprint|escape }}</dd>
								{% endfor %}
							</dl>
						</div>
					</td>
				</tr>
			{% endfor %}
			</tbody>
		</table>

		{% if logging_show_metrics %}		
			<div class="metrics">
				{% blocktrans with elapsed_time|floatformat as elapsed_time %}Completed in {{ elapsed_time }} <abbr title="milliseconds">ms</abbr>{% endblocktrans %}
				{% ifnotequal query_count -1 %}
					{% blocktrans count query_count as query_count %}with {{ query_count }} database query{% plural %}with {{ query_count }} database queries{% endblocktrans %}
					{% if query_count %}
						{% blocktrans with query_time|floatformat as query_time and query_percentage|floatformat as query_percentage %}which took {{ query_time }} <abbr title="milliseconds">ms</abbr> ({{ query_percentage }}&#37; of total time){% endblocktrans %}{% endif %}{% if not logging_log_sql %}.
					{% blocktrans %}If you set <code>LOGGING_LOG_SQL</code> to <code>True</code> in your Django settings file, you'll see all the individual database queries{% endblocktrans %}{% endif %}{% endifnotequal %}.
{'fraction_non_alphanumeric': 0.19444444444444445, 'fraction_numerical': 0.007559774964838256, 'mean_word_length': 3.651676206050695, 'pattern_counts': {'":': 0, '<': 139, '<?xml version=': 0, '>': 139, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4874730', 'n_tokens_mistral': 2383, 'n_tokens_neox': 1839, 'n_words': 451}