On Monday 19 June 2017 21:11:23 jon stan wrote:
> im trying to display the products and service type based on the name
> but i cant figure out how todo that. here's what i have:
>
> views.py
> name =
> food.objects.get(restaurant-name__icontains='burger-place') prod =
> food.objects.filter(restaurant-name__icontains='burger-place').filter(
> products__icontains='burgers') service =
> food.objects.filter(restaurant-name__icontains='burger-place').filter(
> service__icontains='fast food')
>
> but i cant get it to work correctly. i get 'burger-place' for the
> name, prod, and service variables for some reason.
You are confusing attributes and models ("fields vs tables"). Please revisit
the
Django tutorial.
--
Melvyn Sopacua
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/1912686.XJuo2Y9sEq%40devstation.
For more options, visit https://groups.google.com/d/optout.