-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds generic search thumbnail retrieval #10266
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Just a couple unused imports to remove and I think adding that setting to the project template would be nice.
@@ -66,6 +66,7 @@ | |||
|
|||
ELASTICSEARCH_HTTP_PORT = 9200 # this should be in increments of 200, eg: 9400, 9600, 9800 | |||
SEARCH_BACKEND = "arches.app.search.search.SearchEngine" | |||
SEARCH_THUMBNAILS = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be added to the project template's settings file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
arches/app/views/thumbnail.py
Outdated
@@ -0,0 +1,34 @@ | |||
from arches.app.models.resource import Resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused import
arches/app/views/thumbnail.py
Outdated
from arches.app.models.resource import Resource | ||
from django.views.generic import View | ||
from django.http import HttpResponse, HttpResponseNotFound | ||
from django.utils.translation import get_language |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused import
arches/app/views/thumbnail.py
Outdated
from django.views.generic import View | ||
from django.http import HttpResponse, HttpResponseNotFound | ||
from django.utils.translation import get_language | ||
import requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused import
@@ -0,0 +1,39 @@ | |||
from logging import Logger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger is unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is used on line 17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On 17 you are using 'logging' which is defined on line 8 imported from line 2. Logger itself is unused. I wouldn't have caught it myself had vscode not flagged it.
@@ -0,0 +1,16 @@ | |||
import base64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nice to have an example, but because this file isn't yet wired in as a default, I think it would be better to remove this here and add it to the docs.
Adds search thumbnails - to be implemented at the project level.