import all button, migration

This commit is contained in:
Kaibu 2019-11-14 00:34:35 +01:00
parent 3d3e598e2c
commit c3f62dd469
3 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.7 on 2019-11-13 23:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0004_auto_20191113_2238'),
]
operations = [
migrations.AddField(
model_name='recipeingredients',
name='amount',
field=models.DecimalField(decimal_places=2, default=0, max_digits=16),
),
]

View File

@ -15,6 +15,10 @@
{% endif %} {% endif %}
</h3> </h3>
{% render_table table %} {% render_table table %}
{% if import_btn %}
<a href="{% url 'data_batch_import' %}" class="btn btn-warning">{% trans 'Import all' %}</a>
{% endif %}
</div> </div>
{% endblock content %} {% endblock content %}

View File

@ -31,7 +31,7 @@ def recipe_import(request):
RequestConfig(request, paginate={'per_page': 25}).configure(table) RequestConfig(request, paginate={'per_page': 25}).configure(table)
return render(request, 'generic/list_template.html', {'title': _("Import"), 'table': table}) return render(request, 'generic/list_template.html', {'title': _("Import"), 'table': table, 'import_btn': True})
@login_required @login_required