Skip to content
Snippets Groups Projects
Commit a83499b3 authored by Samuel GAIST's avatar Samuel GAIST Committed by Flavio TARSETTI
Browse files

[algorithms][templates] Use file field property to read content

Algorithms have properties related to their file fields
that does the proper handling for reading their content
use that.
parent 9e9143cb
No related branches found
No related tags found
2 merge requests!359Fix template FileField reading,!342Django 3 migration
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
{% endwith %}{# groups, uses or parameters #} {% endwith %}{# groups, uses or parameters #}
{% if open_source and not object.is_binary %} {% if open_source and not object.is_binary %}
<textarea class="form-control" id="code-display">{{ object.source_code_file.read }}</textarea> <textarea class="form-control" id="code-display">{{ object.source_code }}</textarea>
<p class="help-block">{{ texts.code|safe }}</p> <p class="help-block">{{ texts.code|safe }}</p>
{% elif object.is_binary %} {% elif object.is_binary %}
{% if object.valid %} {% if object.valid %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment