Add core View.make_progress() method

so callers no longer need to import `SessionProgress` and create directly
This commit is contained in:
Lance Edgar 2019-09-25 00:10:17 -05:00
parent f0a5265a65
commit ff9700e23a
10 changed files with 31 additions and 14 deletions

View file

@ -49,7 +49,6 @@ from webhelpers2.html import tags, HTML
from tailbone import forms, grids
from tailbone.db import Session
from tailbone.views import MasterView, AutocompleteView
from tailbone.progress import SessionProgress
from tailbone.util import raw_datetime
@ -1090,7 +1089,7 @@ class ProductsView(MasterView):
handler = supported[batch_key]
products = self.get_products_for_batch(batch_key)
progress = SessionProgress(self.request, 'products.batch')
progress = self.make_progress('products.batch')
thread = Thread(target=self.make_batch_thread,
args=(handler, self.request.user.uuid, products, params, progress))
thread.start()