Compare commits
3 Commits
1eab86e5ae
...
1a4d352d85
Author | SHA1 | Date | |
---|---|---|---|
1a4d352d85 | |||
b05f486f19 | |||
cd66ff1f50 |
@ -45,6 +45,14 @@ BREWFATHER_CONVERT_LOOKUP = { # local_name: brewfather_name
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def BF_from_local(category, name):
|
||||||
|
return BREWFATHER_CONVERT_LOOKUP[category][name]
|
||||||
|
|
||||||
|
def local_from_BF(category, name):
|
||||||
|
local_keys = list(BREWFATHER_CONVERT_LOOKUP[category].keys())
|
||||||
|
bf_keys = list(BREWFATHER_CONVERT_LOOKUP[category].values())
|
||||||
|
return local_keys[bf_keys.index(name)]
|
||||||
|
|
||||||
def get_batches(api_user, api_key, batch=''):
|
def get_batches(api_user, api_key, batch=''):
|
||||||
auth_string = api_user + ':' + api_key
|
auth_string = api_user + ':' + api_key
|
||||||
|
|
||||||
|
24
beer/migrations/0005_recipehop_time_recipehop_use.py
Normal file
24
beer/migrations/0005_recipehop_time_recipehop_use.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Generated by Django 5.0.6 on 2024-06-17 18:24
|
||||||
|
|
||||||
|
import django.core.validators
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('beer', '0004_fermentable_hop_mash_misc_supplier_unit_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='recipehop',
|
||||||
|
name='time',
|
||||||
|
field=models.IntegerField(default=60, validators=[django.core.validators.MinValueValidator(0)]),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='recipehop',
|
||||||
|
name='use',
|
||||||
|
field=models.IntegerField(choices=[(1, 'Boil'), (2, 'Dry Hop'), (3, 'Aroma (Hop Stand)'), (4, 'Mash'), (5, 'First Wort')], default=1),
|
||||||
|
),
|
||||||
|
]
|
@ -6,6 +6,7 @@
|
|||||||
input, label {
|
input, label {
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}Recipea{% endblock %}
|
{% block title %}Recipea{% endblock %}
|
||||||
@ -13,6 +14,126 @@ input, label {
|
|||||||
{% block jumbotron %}Recipe Manager {% endblock %}
|
{% block jumbotron %}Recipe Manager {% endblock %}
|
||||||
{% block jumbotronsub %}{% endblock %}
|
{% block jumbotronsub %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Comming Soon?</h1>
|
<div class="container" id="main">
|
||||||
|
<h1>Comming Soon?</h1>
|
||||||
|
|
||||||
|
{% for recipe in recipes %}
|
||||||
|
<div class="container-fluid">
|
||||||
|
<h3>{{ recipe.name }}</h3>
|
||||||
|
|
||||||
|
<!-- Ferm and Hop Row -->
|
||||||
|
<div class="row">
|
||||||
|
<!-- Fermentables -->
|
||||||
|
<div class="col-md">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="container-fluid bg-dark text-white">Fermentables (xx.x lbs)</div>
|
||||||
|
<table class="table table-sm ">
|
||||||
|
<tbody>
|
||||||
|
{% for f in recipe.recipefermentable_set.all %}
|
||||||
|
<tr><td>{{ f.quantity }}</td><td>{{ f.fermentable.name }}</td></tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p class="text-end small">
|
||||||
|
Pre-Boil Gravity: <b>1.XXX</b><br>
|
||||||
|
Original Gravity: <b>1.XXX</b><br>
|
||||||
|
Color: <b>XXX SRM</b>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Hops -->
|
||||||
|
<div class="col-md">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="container-fluid bg-dark text-white">Hops (xx.x oz)</div>
|
||||||
|
<table class="table table-sm ">
|
||||||
|
<tbody>
|
||||||
|
{% for h in recipe.recipehop_set.all %}
|
||||||
|
<tr><td>{{ h.quantity }}</td><td>{{ h.hop.name }}</td><td>{{ h.time }}</td></tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p class="text-end small">
|
||||||
|
Total IBU: <b>XX</b><br>
|
||||||
|
BU/GU: <b>0.XX</b><br>
|
||||||
|
RBR: <b>0.XX</b>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Misc and Yeast Row -->
|
||||||
|
<div class="row">
|
||||||
|
<!-- Misc -->
|
||||||
|
<div class="col-md">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="container-fluid bg-dark text-white">Misc.</div>
|
||||||
|
<table class="table table-sm">
|
||||||
|
<tbody>
|
||||||
|
{% for m in recipe.recipemisc_set.all %}
|
||||||
|
<tr><td>{{ m.misc.name }}</td><td>{{ m.misc.quantity }}</td></tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Yeast -->
|
||||||
|
<div class="col-md">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="container-fluid bg-dark text-white">Yeast</div>
|
||||||
|
<table class="table table-sm">
|
||||||
|
<tbody>
|
||||||
|
{% for y in recipe.recipeyeast_set.all %}
|
||||||
|
<tr><td>{{ y.yeast.name }}</td></tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Mash and Fermentation Row -->
|
||||||
|
<div class="row">
|
||||||
|
<!-- Mash -->
|
||||||
|
<div class="col-md">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="container-fluid bg-dark text-white">Mash Profile {{ recipe.mash.name }}</div>
|
||||||
|
<table class="table table-sm ">
|
||||||
|
<tbody>
|
||||||
|
{% for step in recipe.mash.mashstep_set.all %}
|
||||||
|
<tr><td>{{ step.name }}</td><td>{{ step.step_temp }} °F</td><td>{{ step.step_time }} min</td></tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Fermentation -->
|
||||||
|
<div class="col-md">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="container-fluid bg-dark text-white">Fermentation Profile</div>
|
||||||
|
<table class="table table-sm">
|
||||||
|
<tbody>
|
||||||
|
<!-- {% for y in recipe.recipeyeast_set.all %} -->
|
||||||
|
<!-- <tr><td>{{ y.yeast.name }}</td></tr> -->
|
||||||
|
<!-- {% endfor %} -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -35,4 +35,4 @@ def home(request):
|
|||||||
|
|
||||||
batch_obj.save()
|
batch_obj.save()
|
||||||
|
|
||||||
return render(request, 'beer/home.html',{'batches':BatchRecipe.objects.all()})
|
return render(request, 'beer/home.html',{'recipes':BatchRecipe.objects.all()})
|
||||||
|
Loading…
Reference in New Issue
Block a user