Project

General

Profile

0001-show-cube-warnings-36576.patch

Benjamin Dauvergne, 17 Jan 2020 03:01 PM

Download (1.59 KB)

View differences:

Subject: [PATCH] show cube warnings (#36576)

 bijoe/templates/bijoe/cube.html | 9 +++++++++
 tests/test_schema1.py           | 2 ++
 2 files changed, 11 insertions(+)
bijoe/templates/bijoe/cube.html
45 45
    {% block buttons %}
46 46
      <input type="submit" name="visualize" value="{% trans "Visualiser" %}">
47 47
    {% endblock %}
48
    {% if cube.warnings %}
49
       {% block warnings %}
50
          <ul class="messages cube-warnings">
51
              {% for message in cube.warnings %}
52
                  <li class="warning">{{ message }}</li>
53
              {% endfor %}
54
          </ul>
55
       {% endblock %}
56
    {% endif %}
48 57
  </form>
49 58
  <div id="data" {% if visualization %}class="visualization-{{visualization.representation}}"{% endif %}>
50 59
  {% if visualization %}
tests/test_schema1.py
13 13
    response = app.get('/').follow()
14 14
    response = response.click('Facts 1')
15 15
    assert 'big-msg-info' in response
16
    assert u'le champ « pouët »' in response
17
    assert 'warning2' in response
16 18
    form = response.form
17 19
    form.set('representation', 'table')
18 20
    form.set('measure', 'simple_count')
19
-