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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a4cf95d182d1ed7079c88248b3f4ab4afcdfe624b7963a0f9213826165d64fb |
|
MD5 | 5a5d8b572506b565dad5f622d3270dad |
|
BLAKE2b-256 | a2e7221a3bef41d79a9e53f2156f1d5dfcabda080fc22d2776e0f214cc53cd73 |