add basic product search

This commit is contained in:
Seth Ladygo
2019-05-13 18:59:13 -07:00
parent e902aa524a
commit 3990774de3
8 changed files with 185 additions and 0 deletions

View File

@ -48,6 +48,12 @@ LOGGING = {
#'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
'propagate': True,
},
'products': {
'handlers': ['console', 'file'],
'level': 'DEBUG',
#'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
'propagate': True,
},
'catalogedit': {
'handlers': ['console', 'file'],
'level': 'DEBUG',
@ -84,6 +90,7 @@ INSTALLED_APPS = [
'webpack_loader',
'procat2',
'dashboard',
'products',
]
MIDDLEWARE = [
@ -146,6 +153,8 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
DATABASE_ROUTERS = ('products.dbrouters.ProductDBRouter',)
# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/
LANGUAGE_CODE = 'en-us'

View File

@ -22,6 +22,7 @@ from lazysignup.views import convert
from dashboard.views import dashboard
from cataloglist.views import cataloglist, my_catalogs, public_catalogs
from catalogedit.views import catalogedit, get_catalog, save_catalog
from products.views import search_products
from .forms import UserCreationForm
from .views import login_guest, lazy_convert_done
@ -41,6 +42,8 @@ urlpatterns = [
path('api/v1/catalogs/id/<int:id>', get_catalog, name='get_catalog'),
path('api/v1/catalogs/save', save_catalog, name='save_catalog'),
path('api/v1/products/search', search_products, name='search_products'),
path('admin/', admin.site.urls),
path("account/", include("account.urls")),
path('convert/', convert, { 'form_class': UserCreationForm }, name='lazysignup_convert'),