From 88fe195615d2ef75e94f73755919d9395c4acb4b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 4 Feb 2018 10:46:27 -0600 Subject: [PATCH] Refactor all "easy" views per master4 --- tailbone/views/bouncer.py | 4 ++-- tailbone/views/brands.py | 4 ++-- tailbone/views/categories.py | 4 ++-- tailbone/views/customergroups.py | 4 ++-- tailbone/views/custorders/items.py | 2 +- tailbone/views/datasync.py | 4 ++-- tailbone/views/departments.py | 4 ++-- tailbone/views/depositlinks.py | 3 +-- tailbone/views/email.py | 2 +- tailbone/views/employees.py | 4 ++-- tailbone/views/exports.py | 4 ++-- tailbone/views/families.py | 2 +- tailbone/views/inventory.py | 2 +- tailbone/views/labels/profiles.py | 2 +- tailbone/views/messages.py | 4 ++-- tailbone/views/people.py | 4 ++-- tailbone/views/principal.py | 4 ++-- tailbone/views/products.py | 4 ++-- tailbone/views/purchases/credits.py | 2 +- tailbone/views/reportcodes.py | 2 +- tailbone/views/settings.py | 4 ++-- tailbone/views/shifts/core.py | 4 ++-- tailbone/views/stores.py | 4 ++-- tailbone/views/subdepartments.py | 4 ++-- tailbone/views/tables.py | 2 +- tailbone/views/taxes.py | 2 +- tailbone/views/tempmon/core.py | 2 +- tailbone/views/upgrades.py | 4 ++-- tailbone/views/users.py | 4 ++-- tailbone/views/vendors/catalogs.py | 2 +- tailbone/views/vendors/core.py | 4 ++-- tailbone/views/vendors/invoices.py | 2 +- 32 files changed, 51 insertions(+), 52 deletions(-) diff --git a/tailbone/views/bouncer.py b/tailbone/views/bouncer.py index 343d6da0..861f6a86 100644 --- a/tailbone/views/bouncer.py +++ b/tailbone/views/bouncer.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -37,7 +37,7 @@ from pyramid.response import FileResponse from webhelpers2.html import HTML, tags from tailbone import grids -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class EmailBouncesView(MasterView): diff --git a/tailbone/views/brands.py b/tailbone/views/brands.py index 40ecf83f..3a0b177f 100644 --- a/tailbone/views/brands.py +++ b/tailbone/views/brands.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -28,7 +28,7 @@ from __future__ import unicode_literals, absolute_import from rattail.db import model -from tailbone.views import MasterView3 as MasterView, AutocompleteView +from tailbone.views import MasterView4 as MasterView, AutocompleteView class BrandsView(MasterView): diff --git a/tailbone/views/categories.py b/tailbone/views/categories.py index c2a46a77..f5a7731e 100644 --- a/tailbone/views/categories.py +++ b/tailbone/views/categories.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -28,7 +28,7 @@ from __future__ import unicode_literals, absolute_import from rattail.db import model -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class CategoriesView(MasterView): diff --git a/tailbone/views/customergroups.py b/tailbone/views/customergroups.py index 74ba59c2..0ee806b2 100644 --- a/tailbone/views/customergroups.py +++ b/tailbone/views/customergroups.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -29,7 +29,7 @@ from __future__ import unicode_literals, absolute_import from rattail.db import model from tailbone.db import Session -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class CustomerGroupsView(MasterView): diff --git a/tailbone/views/custorders/items.py b/tailbone/views/custorders/items.py index 7963763f..e075e1d8 100644 --- a/tailbone/views/custorders/items.py +++ b/tailbone/views/custorders/items.py @@ -33,7 +33,7 @@ from sqlalchemy import orm from rattail.db import model from rattail.time import localtime -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView from tailbone.util import raw_datetime diff --git a/tailbone/views/datasync.py b/tailbone/views/datasync.py index 0b568f01..6d602666 100644 --- a/tailbone/views/datasync.py +++ b/tailbone/views/datasync.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -31,7 +31,7 @@ import logging from rattail.db import model -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView log = logging.getLogger(__name__) diff --git a/tailbone/views/departments.py b/tailbone/views/departments.py index 4fa33edd..29c6ea4e 100644 --- a/tailbone/views/departments.py +++ b/tailbone/views/departments.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -33,7 +33,7 @@ from rattail.db import model from deform import widget as dfwidget from tailbone import grids -from tailbone.views import MasterView3 as MasterView, AutocompleteView +from tailbone.views import MasterView4 as MasterView, AutocompleteView class DepartmentsView(MasterView): diff --git a/tailbone/views/depositlinks.py b/tailbone/views/depositlinks.py index 340cf818..9be6260c 100644 --- a/tailbone/views/depositlinks.py +++ b/tailbone/views/depositlinks.py @@ -28,8 +28,7 @@ from __future__ import unicode_literals, absolute_import from rattail.db import model -from tailbone import forms -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class DepositLinksView(MasterView): diff --git a/tailbone/views/email.py b/tailbone/views/email.py index e3240b9a..932840b4 100644 --- a/tailbone/views/email.py +++ b/tailbone/views/email.py @@ -37,7 +37,7 @@ from deform import widget as dfwidget from webhelpers2.html import HTML from tailbone.db import Session -from tailbone.views import View, MasterView3 as MasterView +from tailbone.views import View, MasterView4 as MasterView class ProfilesView(MasterView): diff --git a/tailbone/views/employees.py b/tailbone/views/employees.py index dd6626d9..42025eba 100644 --- a/tailbone/views/employees.py +++ b/tailbone/views/employees.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -37,7 +37,7 @@ from webhelpers2.html import tags, HTML from tailbone import grids from tailbone.db import Session -from tailbone.views import MasterView3 as MasterView, AutocompleteView +from tailbone.views import MasterView4 as MasterView, AutocompleteView class EmployeesView(MasterView): diff --git a/tailbone/views/exports.py b/tailbone/views/exports.py index 5f583013..8dc7c1ae 100644 --- a/tailbone/views/exports.py +++ b/tailbone/views/exports.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -36,7 +36,7 @@ from pyramid.response import FileResponse from webhelpers2.html import HTML, tags from tailbone import forms2 as forms -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class ExportMasterView(MasterView): diff --git a/tailbone/views/families.py b/tailbone/views/families.py index 02c370b6..72feba3b 100644 --- a/tailbone/views/families.py +++ b/tailbone/views/families.py @@ -28,7 +28,7 @@ from __future__ import unicode_literals, absolute_import from rattail.db import model -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class FamiliesView(MasterView): diff --git a/tailbone/views/inventory.py b/tailbone/views/inventory.py index 7b20e452..83a2474d 100644 --- a/tailbone/views/inventory.py +++ b/tailbone/views/inventory.py @@ -42,7 +42,7 @@ import formencode as fe from webhelpers2.html import HTML, tags from tailbone import forms, grids -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView from tailbone.views.batch import BatchMasterView3 as BatchMasterView diff --git a/tailbone/views/labels/profiles.py b/tailbone/views/labels/profiles.py index 7a71913e..d2b821dc 100644 --- a/tailbone/views/labels/profiles.py +++ b/tailbone/views/labels/profiles.py @@ -31,7 +31,7 @@ from rattail.db import model from pyramid.httpexceptions import HTTPFound from tailbone.db import Session -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class ProfilesView(MasterView): diff --git a/tailbone/views/messages.py b/tailbone/views/messages.py index 8b978ad2..d216e8ce 100644 --- a/tailbone/views/messages.py +++ b/tailbone/views/messages.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -37,7 +37,7 @@ from pyramid import httpexceptions from webhelpers2.html import tags, HTML from tailbone.db import Session -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView from tailbone.util import raw_datetime diff --git a/tailbone/views/people.py b/tailbone/views/people.py index 65b9a8e8..3a3f1773 100644 --- a/tailbone/views/people.py +++ b/tailbone/views/people.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -34,7 +34,7 @@ from rattail.db import model, api from pyramid.httpexceptions import HTTPFound, HTTPNotFound from webhelpers2.html import HTML, tags -from tailbone.views import MasterView3 as MasterView, AutocompleteView +from tailbone.views import MasterView4 as MasterView, AutocompleteView class PeopleView(MasterView): diff --git a/tailbone/views/principal.py b/tailbone/views/principal.py index f68f1036..494fda2d 100644 --- a/tailbone/views/principal.py +++ b/tailbone/views/principal.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -35,7 +35,7 @@ import wtforms from webhelpers2.html import HTML from tailbone.db import Session -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class PrincipalMasterView(MasterView): diff --git a/tailbone/views/products.py b/tailbone/views/products.py index bdb46be8..f8e07a6d 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -47,7 +47,7 @@ from webhelpers2.html import tags, HTML from tailbone import forms2 as forms, grids from tailbone.db import Session -from tailbone.views import MasterView3 as MasterView, AutocompleteView +from tailbone.views import MasterView4 as MasterView, AutocompleteView from tailbone.progress import SessionProgress from tailbone.util import raw_datetime diff --git a/tailbone/views/purchases/credits.py b/tailbone/views/purchases/credits.py index b32c6172..2188df3d 100644 --- a/tailbone/views/purchases/credits.py +++ b/tailbone/views/purchases/credits.py @@ -31,7 +31,7 @@ from rattail.db import model from webhelpers2.html import tags from tailbone import grids -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class PurchaseCreditView(MasterView): diff --git a/tailbone/views/reportcodes.py b/tailbone/views/reportcodes.py index c60dbfe9..db82a743 100644 --- a/tailbone/views/reportcodes.py +++ b/tailbone/views/reportcodes.py @@ -28,7 +28,7 @@ from __future__ import unicode_literals, absolute_import from rattail.db import model -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class ReportCodesView(MasterView): diff --git a/tailbone/views/settings.py b/tailbone/views/settings.py index 7c1b021c..5eff7d34 100644 --- a/tailbone/views/settings.py +++ b/tailbone/views/settings.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -32,7 +32,7 @@ from rattail.db import model import colander -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class SettingsView(MasterView): diff --git a/tailbone/views/shifts/core.py b/tailbone/views/shifts/core.py index 10d9f3e3..0a15aa05 100644 --- a/tailbone/views/shifts/core.py +++ b/tailbone/views/shifts/core.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -33,7 +33,7 @@ import humanize from rattail.db import model from rattail.time import localtime -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView def render_shift_length(shift, field): diff --git a/tailbone/views/stores.py b/tailbone/views/stores.py index bf8f2a6e..7fd989b4 100644 --- a/tailbone/views/stores.py +++ b/tailbone/views/stores.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -32,7 +32,7 @@ from rattail.db import model import colander -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class StoresView(MasterView): diff --git a/tailbone/views/subdepartments.py b/tailbone/views/subdepartments.py index 36ae1b53..31b6a43d 100644 --- a/tailbone/views/subdepartments.py +++ b/tailbone/views/subdepartments.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -29,7 +29,7 @@ from __future__ import unicode_literals, absolute_import from rattail.db import model from tailbone.db import Session -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class SubdepartmentsView(MasterView): diff --git a/tailbone/views/tables.py b/tailbone/views/tables.py index 4fb08008..e8ddfc77 100644 --- a/tailbone/views/tables.py +++ b/tailbone/views/tables.py @@ -26,7 +26,7 @@ Views with info about the underlying Rattail tables from __future__ import unicode_literals, absolute_import -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class TablesView(MasterView): diff --git a/tailbone/views/taxes.py b/tailbone/views/taxes.py index 1f53de5e..4a26dd35 100644 --- a/tailbone/views/taxes.py +++ b/tailbone/views/taxes.py @@ -28,7 +28,7 @@ from __future__ import unicode_literals, absolute_import from rattail.db import model -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView class TaxesView(MasterView): diff --git a/tailbone/views/tempmon/core.py b/tailbone/views/tempmon/core.py index f32c596a..11a8cb55 100644 --- a/tailbone/views/tempmon/core.py +++ b/tailbone/views/tempmon/core.py @@ -32,7 +32,7 @@ from tailbone import views from tailbone.db import TempmonSession -class MasterView(views.MasterView3): +class MasterView(views.MasterView4): """ Base class for tempmon views. """ diff --git a/tailbone/views/upgrades.py b/tailbone/views/upgrades.py index 8b9cd265..13447ff7 100644 --- a/tailbone/views/upgrades.py +++ b/tailbone/views/upgrades.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -43,7 +43,7 @@ from rattail.upgrades import get_upgrade_handler from deform import widget as dfwidget from webhelpers2.html import tags, HTML -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView from tailbone.progress import SessionProgress, get_progress_session diff --git a/tailbone/views/users.py b/tailbone/views/users.py index b98b485b..48e05315 100644 --- a/tailbone/views/users.py +++ b/tailbone/views/users.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -40,7 +40,7 @@ from webhelpers2.html import HTML, tags from tailbone import forms2 as forms from tailbone.db import Session -from tailbone.views import MasterView3 as MasterView +from tailbone.views import MasterView4 as MasterView from tailbone.views.principal import PrincipalMasterView, PermissionsRenderer diff --git a/tailbone/views/vendors/catalogs.py b/tailbone/views/vendors/catalogs.py index 632601a9..16e8417a 100644 --- a/tailbone/views/vendors/catalogs.py +++ b/tailbone/views/vendors/catalogs.py @@ -39,7 +39,7 @@ from webhelpers2.html import tags from tailbone import forms2 as forms from tailbone.db import Session -from tailbone.views.batch import FileBatchMasterView3 as FileBatchMasterView +from tailbone.views.batch import FileBatchMasterView4 as FileBatchMasterView log = logging.getLogger(__name__) diff --git a/tailbone/views/vendors/core.py b/tailbone/views/vendors/core.py index 34869422..c36bcb25 100644 --- a/tailbone/views/vendors/core.py +++ b/tailbone/views/vendors/core.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -32,7 +32,7 @@ from rattail.db import model from webhelpers2.html import tags -from tailbone.views import MasterView3 as MasterView, AutocompleteView +from tailbone.views import MasterView4 as MasterView, AutocompleteView class VendorsView(MasterView): diff --git a/tailbone/views/vendors/invoices.py b/tailbone/views/vendors/invoices.py index 7ee6ed6e..ad7dee11 100644 --- a/tailbone/views/vendors/invoices.py +++ b/tailbone/views/vendors/invoices.py @@ -33,7 +33,7 @@ from rattail.vendors.invoices import iter_invoice_parsers, require_invoice_parse import colander from deform import widget as dfwidget -from tailbone.views.batch import FileBatchMasterView3 as FileBatchMasterView +from tailbone.views.batch import FileBatchMasterView4 as FileBatchMasterView class VendorInvoicesView(FileBatchMasterView):