From 8fe0e96273537f5d5755903e6d0e35c82f9cc1de Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 5 Nov 2016 02:08:10 -0500 Subject: [PATCH] Remove unused (I think?) `VendorFieldRenderer` --- tailbone/forms/renderers/__init__.py | 3 +-- tailbone/forms/renderers/products.py | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/tailbone/forms/renderers/__init__.py b/tailbone/forms/renderers/__init__.py index d64c5d88..c8725bbd 100644 --- a/tailbone/forms/renderers/__init__.py +++ b/tailbone/forms/renderers/__init__.py @@ -42,8 +42,7 @@ from .users import UserFieldRenderer, PermissionsFieldRenderer from .employees import EmployeeFieldRenderer -from .products import (ProductFieldRenderer, GPCFieldRenderer, - BrandFieldRenderer, VendorFieldRenderer, +from .products import (ProductFieldRenderer, GPCFieldRenderer, BrandFieldRenderer, PriceFieldRenderer, PriceWithExpirationFieldRenderer) from .stores import StoreFieldRenderer diff --git a/tailbone/forms/renderers/products.py b/tailbone/forms/renderers/products.py index 5ae60954..0377fb06 100644 --- a/tailbone/forms/renderers/products.py +++ b/tailbone/forms/renderers/products.py @@ -113,19 +113,6 @@ class BrandFieldRenderer(AutocompleteFieldRenderer): service_route = 'brands.autocomplete' -class VendorFieldRenderer(AutocompleteFieldRenderer): - """ - Renderer for :class:`rattail.db.model.Vendor` instance fields. - """ - service_route = 'vendors.autocomplete' - - def render_readonly(self, **kwargs): - vendor = self.raw_value - if not vendor: - return '' - return "{0} - {1}".format(vendor.id, vendor.name) - - class PriceFieldRenderer(TextFieldRenderer): """ Renderer for fields which reference a :class:`ProductPrice` instance.