<commit_before>{% extends 'base.html' %}
{% load crispy_forms_tags %}

{% block content %}
<div class="row">
  <div class="page-header">
    <h2>可以兑换的奖品</h2>
  </div>
  {% for prize in prizes %}
  <div class="col-sm-6 col-md-3">
    <a title="兑换奖品" href="/prize/{{ prize.name }}" class="thumbnail">
      <div class="caption">
        <h3>{{ prize.name }}</h4>
        <h4>分类：{{ prize.category }}</h3>
        <p>价格：{{ prize.value }}</p>
        <p>数量：{{ prize.amount }}</p>
        <p>加入时间：{{ prize.date | date }}</p>
      </div>
    </a>
  </div>
  {% endfor %}
</div>

{% if user.teacher %}
<div class="row">
  <div class="page-header">
    <h2>教师可见：管理奖品</h2>
  </div>
<div class="col-lg-3">
<div class="well">
<form class="bs-example form-horizontal" method="post" action="{% url 'prize' %}">
  {% csrf_token %}
  <legend>新增奖品</legend>
  {{ form|crispy }}
  <div class="control-group">
    <div class="controls">
      <button type="submit" class="btn">XXX</button>
    </div>
  </div>
</form>
</div>
</div>
</div>
{% endif %}

{% endblock %}<commit_msg>template: implement XXX<commit_after>{% extends 'base.html' %}
{% load crispy_forms_tags %}

{% block content %}
<div class="row">
  <div class="page-header">
    <h2>可以兑换的奖品</h2>
  </div>
  {% for prize in prizes %}
  <div class="col-sm-6 col-md-3">
    <a title="兑换奖品" href="/prize/{{ prize.name }}" class="thumbnail">
      <div class="caption">
        <h3>{{ prize.name }}</h4>
        <h4>分类：{{ prize.category }}</h3>
        <p>价格：{{ prize.value }}</p>
        <p>数量：{{ prize.amount }}</p>
        <p>加入时间：{{ prize.date | date }}</p>
      </div>
    </a>
  </div>
  {% endfor %}
</div>

{% if user.teacher %}
<div class="row">
  <div class="page-header">
    <h2>教师可见：管理奖品</h2>
  </div>
<div class="col-lg-3">
<div class="well">
<form class="bs-example form-horizontal" method="post" action="{% url 'prize' %}">
  {% csrf_token %}
  <legend>新增奖品</legend>
  {% crispy form %}
  <div class="control-group">
    <div class="controls">
      <button type="submit" class="btn btn-primary">新增奖品</button>
    </div>
  </div>
</form>
</div>
</div>
</div>
{% endif %}

{% endblock %}
{'fraction_non_alphanumeric': 0.24521251751517983, 'fraction_numerical': 0.010275572162540868, 'mean_word_length': 3.0877862595419847, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, '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': '418985', 'n_tokens_mistral': 937, 'n_tokens_neox': 899, 'n_words': 174}