2018-06-29 03:16:31 +00:00
|
|
|
"""printer.settings
|
2018-10-20 12:41:33 +00:00
|
|
|
Define variables used in printer app
|
2018-06-29 03:16:31 +00:00
|
|
|
"""
|
|
|
|
|
2018-10-20 12:41:33 +00:00
|
|
|
from preferences.models import OptionalPrinter
|
2018-06-29 03:16:31 +00:00
|
|
|
|
2018-10-20 12:41:33 +00:00
|
|
|
settings = OptionalPrinter.objects.get()
|
2018-06-29 03:16:31 +00:00
|
|
|
|
2018-10-20 12:41:33 +00:00
|
|
|
MAX_PRINTFILE_SIZE = settings.max_size * 1024 * 1024 # 25 MB
|
2018-06-29 03:16:31 +00:00
|
|
|
ALLOWED_TYPES = ['application/pdf']
|
2018-09-08 12:04:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Config
|
|
|
|
|
|
|
|
## Depreciation
|
2018-10-20 12:41:33 +00:00
|
|
|
depr = settings.depreciation_coef
|
2018-09-08 12:04:44 +00:00
|
|
|
|
|
|
|
PRICES = {
|
|
|
|
'Depreciation': depr,
|
2018-10-20 12:41:33 +00:00
|
|
|
'A3': settings.A3_price,
|
|
|
|
'A4': settings.A4_price,
|
|
|
|
'Color': settings.Color_price + depr,
|
|
|
|
'Greyscale': settings.Greyscale_price + depr,
|
|
|
|
'Staples': settings.Staples_price,
|
2018-09-08 12:04:44 +00:00
|
|
|
}
|