Exemplo n.º 1
0
class InventoryFermentable(BaseFermentable):
    inventory = models.ForeignKey(
        "brewery.Inventory",
        verbose_name=_("Inventory"),
        on_delete=models.CASCADE,
        related_name="fermentables",
    )
    amount = MassField(verbose_name=_("Amount"), unit_choices=MASS_UNITS)
    comment = models.TextField(_("Comment"))
Exemplo n.º 2
0
Arquivo: hops.py Projeto: guma44/brivo
class InventoryHop(BaseHop):
    inventory = models.ForeignKey(
        "brewery.Inventory",
        verbose_name=_("Inventory"),
        on_delete=models.CASCADE,
        related_name="hops",
    )
    year = models.IntegerField(_("Year"), validators=[MinValueValidator(0)])
    form = models.CharField(_("Form"), max_length=1000, choices=HOP_FORM)
    amount = MassField(verbose_name=_("Amount"), unit_choices=MASS_UNITS)
    comment = models.TextField(_("Comment"))
Exemplo n.º 3
0
class IngredientExtra(BaseExtra):
    recipe = ParentalKey(
        "brewery.Recipe",
        verbose_name=_("Recipe"),
        on_delete=models.CASCADE,
        related_name="extras",
    )
    amount = MassField(verbose_name=_("Amount"), unit_choices=MASS_UNITS)
    time = models.DecimalField(_("Time"), max_digits=10, decimal_places=5)
    time_unit = models.CharField(_("Time Unit"),
                                 max_length=1000,
                                 choices=TIME_CHOICE)
Exemplo n.º 4
0
class IngredientFermentable(BaseFermentable):
    recipe = ParentalKey(
        "brewery.Recipe",
        verbose_name=_("Recipe"),
        on_delete=models.CASCADE,
        related_name="fermentables",
    )
    amount = MassField(
        verbose_name=_("Amount"),
        unit_choices=MASS_UNITS,
        help_text=_("Weight of the fermentable, extract or sugar."),
    )
    use = models.CharField(
        _("Fermentable Use"), max_length=1000, choices=FERMENTABLE_USE
    )
Exemplo n.º 5
0
Arquivo: hops.py Projeto: guma44/brivo
class IngredientHop(BaseHop):
    recipe = ParentalKey(
        "brewery.Recipe",
        verbose_name=_("Recipe"),
        on_delete=models.CASCADE,
        related_name="hops",
    )
    use = models.CharField(_("Use"), max_length=1000, choices=HOP_USE)
    amount = MassField(verbose_name=_("Amount"), unit_choices=MASS_UNITS)
    time = models.DecimalField(_("Time"),
                               max_digits=5,
                               decimal_places=2,
                               validators=[MinValueValidator(0)])
    time_unit = models.CharField(_("Time Unit"),
                                 max_length=1000,
                                 choices=TIME_CHOICE)
Exemplo n.º 6
0
class IngredientYeast(BaseYeast):
    recipe = ParentalKey(
        "brewery.Recipe",
        verbose_name=_("brewery.models.Recipe"),
        on_delete=models.CASCADE,
        related_name="yeasts",
    )
    amount = MassField(verbose_name=_("Amount"), unit_choices=MASS_UNITS)
    attenuation = models.DecimalField(
        _("Attenuation"),
        max_digits=5,
        decimal_places=2,
        blank=True,
        default=75.0,
        validators=[MinValueValidator(0),
                    MaxValueValidator(100)],
    )
    form = models.CharField(_("Form"), max_length=1000, choices=YEAST_FORM)
Exemplo n.º 7
0
class InventoryYeast(BaseYeast):
    inventory = models.ForeignKey(
        "brewery.Inventory",
        verbose_name=_("Inventory"),
        on_delete=models.CASCADE,
        related_name="yeasts",
    )
    expiration_date = models.DateField(_("Expiration Date"),
                                       auto_now=False,
                                       auto_now_add=False)
    collected_at = models.DateField(_("Collected At"),
                                    auto_now=False,
                                    auto_now_add=False,
                                    blank=True)
    generation = models.CharField(_("Generation"), max_length=50, blank=True)
    form = models.CharField(_("Form"), max_length=1000, choices=YEAST_FORM)
    amount = MassField(verbose_name=_("Amount"), unit_choices=MASS_UNITS)
    comment = models.TextField(_("Comment"))