Fix some imports etc. regarding new batch system.
This commit is contained in:
parent
b05f30d9fe
commit
7c761bee99
|
@ -29,13 +29,6 @@ Backoffice Web Application for Rattail
|
||||||
from ._version import __version__
|
from ._version import __version__
|
||||||
|
|
||||||
|
|
||||||
# TODO: Ugh, hack to get batch models loaded before views can complain...
|
|
||||||
from rattail.db import model
|
|
||||||
from rattail.db.batch.vendorcatalog.model import VendorCatalog, VendorCatalogRow
|
|
||||||
model.VendorCatalog = VendorCatalog
|
|
||||||
model.VendorCatalogRow = VendorCatalogRow
|
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def includeme(config):
|
||||||
config.include('tailbone.static')
|
config.include('tailbone.static')
|
||||||
config.include('tailbone.subscribers')
|
config.include('tailbone.subscribers')
|
||||||
|
|
11
tailbone/views/vendors/catalogs.py
vendored
11
tailbone/views/vendors/catalogs.py
vendored
|
@ -28,7 +28,8 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
from rattail.db import model
|
from rattail.db import model
|
||||||
from rattail.db.api import get_vendor
|
from rattail.db.api import get_vendor
|
||||||
from rattail.db.batch.vendorcatalog import VendorCatalogHandler
|
from rattail.db.batch.vendorcatalog import VendorCatalog, VendorCatalogRow
|
||||||
|
from rattail.db.batch.vendorcatalog.handler import VendorCatalogHandler
|
||||||
from rattail.vendors.catalogs import iter_catalog_parsers, require_catalog_parser
|
from rattail.vendors.catalogs import iter_catalog_parsers, require_catalog_parser
|
||||||
|
|
||||||
import formalchemy
|
import formalchemy
|
||||||
|
@ -41,7 +42,7 @@ class VendorCatalogGrid(FileBatchGrid):
|
||||||
"""
|
"""
|
||||||
Grid view for vendor catalogs.
|
Grid view for vendor catalogs.
|
||||||
"""
|
"""
|
||||||
batch_class = model.VendorCatalog
|
batch_class = VendorCatalog
|
||||||
batch_display = "Vendor Catalog"
|
batch_display = "Vendor Catalog"
|
||||||
route_prefix = 'vendors.catalogs'
|
route_prefix = 'vendors.catalogs'
|
||||||
|
|
||||||
|
@ -75,7 +76,7 @@ class VendorCatalogCrud(FileBatchCrud):
|
||||||
"""
|
"""
|
||||||
CRUD view for vendor catalogs.
|
CRUD view for vendor catalogs.
|
||||||
"""
|
"""
|
||||||
batch_class = model.VendorCatalog
|
batch_class = VendorCatalog
|
||||||
batch_handler_class = VendorCatalogHandler
|
batch_handler_class = VendorCatalogHandler
|
||||||
route_prefix = 'vendors.catalogs'
|
route_prefix = 'vendors.catalogs'
|
||||||
|
|
||||||
|
@ -116,7 +117,7 @@ class VendorCatalogRowGrid(BatchRowGrid):
|
||||||
"""
|
"""
|
||||||
Grid view for vendor catalog rows.
|
Grid view for vendor catalog rows.
|
||||||
"""
|
"""
|
||||||
row_class = model.VendorCatalogRow
|
row_class = VendorCatalogRow
|
||||||
route_prefix = 'vendors.catalogs'
|
route_prefix = 'vendors.catalogs'
|
||||||
|
|
||||||
def filter_map_extras(self):
|
def filter_map_extras(self):
|
||||||
|
@ -150,7 +151,7 @@ class VendorCatalogRowGrid(BatchRowGrid):
|
||||||
|
|
||||||
|
|
||||||
class VendorCatalogRowCrud(BatchRowCrud):
|
class VendorCatalogRowCrud(BatchRowCrud):
|
||||||
row_class = model.VendorCatalogRow
|
row_class = VendorCatalogRow
|
||||||
route_prefix = 'vendors.catalogs'
|
route_prefix = 'vendors.catalogs'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue