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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 724d02913eeab56480a4f17a1392b661058bc29c560d5bffe1f3a19f38565129 |
|
MD5 | 304bcd5d0d03df8e66beb16664fc6f5c |
|
BLAKE2b-256 | bceae56eb3473b36a1afc48dd1fd455082e925adfc8f9eff103f23b753ea70ce |