add service

This commit is contained in:
ilia 2022-10-21 23:37:26 +03:00
parent 17e1c066a4
commit 0cfbc38eda

View File

@ -0,0 +1,8 @@
from search.models import Product, Category
def get_hints(content: str) -> str:
category = 'Unknown'
if content in list(map(lambda product: product.name, Product.objects.all())):
category = 'Name'
return category