testappproj/templates/code.html~
changeset 0 0b061d58aea3
child 2 654c583fd78e
equal deleted inserted replaced
-1:000000000000 0:0b061d58aea3
       
     1 {%extends "base.html"%}
       
     2 {%block body%}
       
     3 <h2>{{ problem.name }}</h2>
       
     4 
       
     5  
       
     6 {% comment %}
       
     7 {% load pykata_extras %}
       
     8 {% autoescape off %}
       
     9 <p>
       
    10 {{problem.description|force_escape|spacify_code|linebreaksbr}}
       
    11 </p>
       
    12 {% endautoescape %}
       
    13 {% endcomment %}
       
    14 
       
    15 <h3>Examples</h3>
       
    16 <pre>
       
    17 {{ problem.examples }}
       
    18 </pre>
       
    19 
       
    20   <form method="post" action="/run/">
       
    21     <p><strong>Enter your solution here:</strong></p>
       
    22     <p><textarea id="code-area" name="user_code" rows="22" cols="80">
       
    23 {% ifequal pu.classname "ProblemUser" %}{{ pu.solution }}{% else %}{{ problem.skeleton }}{% endifequal %}
       
    24 
       
    25     </textarea></p>
       
    26     <input type="hidden" name="problem_id" value="{{ problem.key.id }}" />
       
    27     <p><input type="submit" name="submit" value="Run" /></p>
       
    28   </form>
       
    29 
       
    30   <script language="javascript" type="text/javascript" src="/static/edit_area_full.js"></script>
       
    31   <script language="javascript" type="text/javascript">
       
    32     editAreaLoader.init({
       
    33       id: "code-area",
       
    34       syntax: "python",
       
    35       start_highlight: true,
       
    36       allow_resize: "both",
       
    37       font_size: 14,
       
    38       toolbar: "new_document, select_font, |, help",
       
    39       replace_tab_by_spaces: 4
       
    40     });
       
    41   </script>
       
    42 {%endblock%}