A Django app providing ingredient handling.
Project description
Quick start
Add “dj_ingredient_field” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'dj_ingredient_field', ]
Run python manage.py migrate to create the models.
Usage
Simply add the fields you need to your model:
from dj_ingredient_field import IngredientField, MeasurementUnitField class MyModel(models.Model): ingredient = IngredientField() unit = MeasurementUnitField()
The fields map to Ingredient and MeasurementUnit classes:
from dj_ingredient_field import IngredientName, Ingredient, MeasurementUnit, INGREDIENT_UNITS model.ingredient = Ingredient(IngredientName.I_ARUGULA) model.unit = MeasurementUnit(**INGREDIENT_UNITS["Killogram"])
All the available ingredients can be found in the IngredientName enum
Ingredients and units can be customized, see ‘Settings’
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-ingredient-field-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f38561ed1fc634865baa2fe749a297a7215395db4fc742ab82c1c858662c69e5 |
|
MD5 | ee4e6ede58452ca165e5b2f2271b74e9 |
|
BLAKE2b-256 | 9037384cf8fee44b21351ab4946cb5be2d4bd8703084e202a2f55b1c94d6e746 |