title: How to add Search_fields in Django
body: <p>I tried to add search fields in Django using python. Followings are the codes that I have used. </p>
  
  <pre><code># admin.py file
  
  from django.db import models
  from blog.models import Blog
  from django.contrib import admin
  admin.site.register(Blog)
  
  class Blog(models.Model):
      title = models.CharField(max_length=60)
      body = models.TextField()
      created = models.DateTimeField("Date Created")
      updated = models.DateTimeField("Date Updated")
      def __unicode__(self):
          return self.title
  
  class Comment(models.Model):
      body = models.TextField()
      author = models.CharField(max_length=60)
      created = models.DateTimeField("Date Created")
      updated = models.DateTimeField("Date Updated")
      post = models.ForeignKey(Blog)
      def __unicode__(self):
          return self.body
  
  class CommentInline(admin.TabularInline):
      model = Comment
  
  
  class BlogAdmin(admin.ModelAdmin):
      list_display = ('title','created', 'updated')
      search_fields = ['title','body']
      list_filter = ('Date Created','Date Updated')
      inlines = [CommentInline]
  
  class CommentAdmin(admin.ModelAdmin):
      list_display = ('post','author','body_first_60','created','updated')
      list_filter = ('Date Created','Date Updated')
  </code></pre>
  
  <p>I tried to add a search_fields for title and body by using Following code. </p>
  
  <pre><code>class BlogAdmin(admin.ModelAdmin):
      . . .
      search_fields = ('title','body')
      . . .
  </code></pre>
  
  <p>When I run this I can't see any search box. Why is that ? I want your help. I'm just a beginner.
  Thanks!</p>