Fix cache + problem pdf
This commit is contained in:
parent
85bee3e77c
commit
6dbe3932de
3 changed files with 9 additions and 7 deletions
|
@ -30,7 +30,7 @@
|
|||
{% endif %}
|
||||
<div class="blog-description">
|
||||
<div class='content-description'>
|
||||
{% cache 86400 'problem_html' problem.id MATH_ENGINE LANGUAGE_CODE %}
|
||||
{% cache 86400 'problem_html' problem.id LANGUAGE_CODE %}
|
||||
{{ problem.description|markdown(lazy_load=True)|reference|str|safe }}
|
||||
{% endcache %}
|
||||
{% if problem.pdf_description %}
|
||||
|
|
|
@ -65,13 +65,15 @@
|
|||
e.preventDefault();
|
||||
if (!$('#raw_problem').attr('src')) {
|
||||
$('#raw_problem').attr('src', '{{problem.code}}/raw')
|
||||
$('#raw_problem').on('load', function() {
|
||||
renderKatex(frames['raw_problem'].document);
|
||||
frames['raw_problem'].print();
|
||||
});
|
||||
}
|
||||
// while(!$('.math-loaded', frames['raw_problem'].document).length){
|
||||
// await new Promise(r => setTimeout(r, 200));
|
||||
// }
|
||||
setTimeout(() => {
|
||||
else {
|
||||
frames['raw_problem'].print();
|
||||
}, 1000);
|
||||
return;
|
||||
}
|
||||
});
|
||||
$('#clarification_header').on('click', function() {
|
||||
$('#clarification_header_container').hide();
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<td class="user-problem-count">{{ user.problem_count }}</td>
|
||||
<td>
|
||||
<div class="about-td">
|
||||
{% cache 86400 'user_about' user.id MATH_ENGINE %}
|
||||
{% cache 86400 'user_about' user.id %}
|
||||
{% if user.about %}
|
||||
{{ user.about|markdown(lazy_load=True)|reference|str|safe }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue