import all button, migration
This commit is contained in:
parent
3d3e598e2c
commit
c3f62dd469
18
cookbook/migrations/0005_recipeingredients_amount.py
Normal file
18
cookbook/migrations/0005_recipeingredients_amount.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
@ -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 %}
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user