Skip to content
Advertisement

Tag: django-views

django FieldError: Cannot resolve keyword ‘category_name_contains’ into field. Choices are: category, description, id, image, name, order, price

I want to build a food delivering app, but facing this error. “FieldError: Cannot resolve keyword ‘category_name_contains’ into field. Choices are: catego ry, description, id, image, name, order, price”. This is the query.py: This is the views.py This is my models.py: Here’s the traceback: So this my problem I have tried many solutions still not getting the problem here. As

type object ‘PizzaMenu’ has no attribute ‘_default_manager’

I have following error while i try to reach PizzaDetailView on template: AttributeError at /pizza/6/ type object ‘PizzaMenu’ has no attribute ‘_default_manager’. Where is the problem? models.py views.py urls.py Answer Don’t name your view PizzaMenu, it will override the reference to the PizzaMenu for the other views. Usually class-based views have a …View suffix, so:

Advertisement