X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ad422879d55a62e02c71024531aa4a2277dedaf3..da0fee096a166c7fd97857af84d99fe2facfe7f3:/src/isbn/product_forms.py diff --git a/src/isbn/product_forms.py b/src/isbn/product_forms.py index 206ca1d2..1d81c10d 100644 --- a/src/isbn/product_forms.py +++ b/src/isbn/product_forms.py @@ -1,10 +1,14 @@ +from collections import namedtuple + +FormConfig = namedtuple('FormConfig', ['book', 'parent', 'product_form', 'product_form_detail']) + FORMS = [ - ('html', ('EC', 'E105')), - ('txt', ('EB', 'E112')), - ('pdf', ('EB', 'E107')), - ('epub', ('ED', 'E101')), - ('mobi', ('ED', 'E127')), - ('mp3', ('AN', 'A103')), - ('paperback', ('BC', '')), + ('html', FormConfig(True, False, 'EC', 'E105')), + ('txt', FormConfig(True, False, 'EB', 'E112')), + ('pdf', FormConfig(True, True, 'EB', 'E107')), + ('epub', FormConfig(True, True, 'ED', 'E101')), + ('mobi', FormConfig(True, True, 'ED', 'E127')), + ('mp3', FormConfig(False, False, 'AN', 'A103')), + ('paperback', FormConfig(False, False, 'BC', '')), ]