I've got a really simple blog application and I want to add a really simple search feature to it.
There are 3 key fields to my model.
class BlogPost(models.Model):
title = models.CharField(max_length=100) # the title
intro = models.TextField(blank=True, null=True) # an extract
content = models.TextField(blank=True, null=True) # full post
I don't need a Google. I don't want to search comments (which are held on Disqus anyway). I just want a date-ranked, keyword filtered set of posts.
Everything I find on Google for some form of "django" and "search" comes back with hideously complicated Haystack+backend solutions. I don't need all that. I don't want to eat up more resources on a low-usage feature (I used to have a search box before I ported to Django and it had perhaps 4 searches a month).
The reason I'm taking time to ask on here (rather than just writing a messy little script) is this already exists in the admin. You can set the columns to search on and then just search and it "just works".
Is there some way of getting a handle on the admin-provided search and pulling it into my user-facing app?