File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,11 @@ A very simple index could look something like this:
52
52
).distinct()
53
53
54
54
def prepare (self , instance : PageContent) -> dict :
55
- request = self .get_request_instance(current_language)
56
55
self .prepared_data = super ().prepare(instance)
57
56
self .prepared_data[" url" ] = instance.page.get_absolute_url()
58
57
self .prepared_data[" title" ] = instance.title
59
58
self .prepared_data[" text" ] = (
60
- self .prepared_data[" title" ] + instance.page. meta_description or " "
59
+ self .prepared_data[" title" ] + ( instance.meta_description or " " )
61
60
)
62
61
return self .prepared_data
63
62
@@ -129,4 +128,4 @@ You can inspect your index using a ``SearchQuerySet``:
129
128
print (result.text)
130
129
131
130
Now it's up to you to add custom indexes to your own models, build views for your
132
- ``SearchQuerySet `` to implement a search form and much more.
131
+ ``SearchQuerySet `` to implement a search form and much more.
You can’t perform that action at this time.
0 commit comments