hi all, i have a big question.
how can i perform search queries like on following modelsRESTAURANT_TYPES = (
('C', 'Chinese'),
('A', 'American'),
('J', 'Japanese'),
)
class city (models.Model):
name = models.CharField(max_length=200)
class restaurants(models.Model):
name = models.CharField(max_length=456)
city = models.ForeignKey(city)
type = models.CharField(max_length=10, choices=RESTAURANT_TYPES)
is_veg = models.BooleanField(default=True)
search queries:
- restaurants in city1
- city1 restaurants
- Chinese restaurants
- Chinese restaurants in city1
- vegetarian restaurants in city1
- vegetarian american restaurants
- and so on...
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment