File: admin.py

package info (click to toggle)
django-haystack 3.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,512 kB
  • sloc: python: 23,577; xml: 1,708; makefile: 71; sh: 65
file content (14 lines) | stat: -rw-r--r-- 307 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django.contrib import admin

from haystack.admin import SearchModelAdmin

from .models import MockModel


class MockModelAdmin(SearchModelAdmin):
    haystack_connection = "solr"
    date_hierarchy = "pub_date"
    list_display = ("author", "pub_date")


admin.site.register(MockModel, MockModelAdmin)