Fetch fresh calibration on every print
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from django.shortcuts import render, redirect, get_object_or_404
|
||||
from django.views.decorators.cache import never_cache
|
||||
from .calibration import css_vars, load_calibration
|
||||
from .models import Product, Order
|
||||
from .print_layout import build_print_pages
|
||||
@@ -26,6 +27,7 @@ def print_queue(request):
|
||||
})
|
||||
|
||||
|
||||
@never_cache
|
||||
def print_page(request, order_id):
|
||||
order = get_object_or_404(Order.objects.select_related('product'), id=order_id)
|
||||
pages = build_print_pages(order)
|
||||
@@ -40,6 +42,7 @@ def print_page(request, order_id):
|
||||
})
|
||||
|
||||
|
||||
@never_cache
|
||||
def calibrate(request):
|
||||
cal = load_calibration()
|
||||
return render(request, 'slips/calibrate.html', {
|
||||
|
||||
Reference in New Issue
Block a user