0001-templates-pass-full-sentence-to-translation-code-398.patch
tests/test_backoffice_pages.py | ||
---|---|---|
5577 | 5577 |
resp = resp.click('Import data from a CSV file') |
5578 | 5578 | |
5579 | 5579 |
assert 'Map, File are required but cannot be filled from CSV.' in resp |
5580 |
assert 'Download sample file' not in resp |
|
5580 |
assert 'Download sample file for this card' not in resp
|
|
5581 | 5581 |
carddef.fields[0].required = False |
5582 | 5582 |
carddef.fields[6].required = False |
5583 | 5583 |
carddef.store() |
5584 | 5584 | |
5585 | 5585 |
resp = app.get(carddef.get_url()) |
5586 | 5586 |
resp = resp.click('Import data from a CSV file') |
5587 |
sample_resp = resp.click('Download sample file') |
|
5587 |
sample_resp = resp.click('Download sample file for this card')
|
|
5588 | 5588 |
today = datetime.date.today() |
5589 | 5589 |
assert sample_resp.text == 'Map,Test,Boolean,List,Date,Title,File\r\nwill be ignored - type Map not supported,value,Yes,value,%s,will be ignored - type Title not supported,will be ignored - type File Upload not supported\r\n' % today |
5590 | 5590 |
wcs/templates/wcs/backoffice/card-data-import-form.html | ||
---|---|---|
48 | 48 |
</div> |
49 | 49 |
{% else %} |
50 | 50 |
<p>{% trans "You can add data to this card by uploading a file." %}</p> |
51 |
<p><a href="data-sample-csv">{% trans 'Download sample file' %}</a> {% trans "for this card" %}</p>
|
|
51 |
<p><a href="data-sample-csv">{% trans "Download sample file for this card" %}</a></p>
|
|
52 | 52 |
{{ form.render|safe }} |
53 | 53 |
{% endif %} |
54 | 54 |
{% endif %} |
55 |
- |