hey im trying to import one set of info from a database based on the name of something else if that makes sense.
basically in the database its setup like this: food----------------------------------------------------------------- restaurant-name products type of service (burger-place) (burgers) (fast food) ----------------------------------------------------------------------- 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. would i have to create completely separate models or is there a way i can get these variables based on the restaurant name? -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/14d6d935-63c7-4417-9944-f47bbf3dbd35%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.