-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
WIP grants/index: search functionality #2522
WIP grants/index: search functionality #2522
Conversation
|
||
_grants = Grant.objects.all().order_by(sort) | ||
if keyword: | ||
_grants = Grant.objects.filter(title__icontains = keyword).order_by(sort) |
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.
E251 unexpected spaces around keyword / parameter equals
Codecov Report
@@ Coverage Diff @@
## grants-search #2522 +/- ##
================================================
Coverage ? 29.63%
================================================
Files ? 154
Lines ? 12148
Branches ? 1621
================================================
Hits ? 3600
Misses ? 8430
Partials ? 118
Continue to review full report at Codecov.
|
414ade5
to
8c12f35
Compare
@@ -17,6 +17,7 @@ | |||
along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
|
|||
""" | |||
from django.conf.urls import include, url |
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.
F401 'django.conf.urls.include' imported but unused
F401 'django.conf.urls.url' imported but unused
@@ -30,12 +30,14 @@ | |||
from django.template.response import TemplateResponse | |||
from django.urls import reverse | |||
from django.utils.translation import gettext_lazy as _ | |||
from django.http import HttpResponse, JsonResponse |
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.
F401 'django.http.JsonResponse' imported but unused
grants_by_title = Grant.objects.filter(title__icontains=keyword) | ||
grants_by_desc = Grant.objects.filter(description__icontains=keyword) | ||
grants_by_url = Grant.objects.filter(reference_url__icontains=keyword) | ||
grants_pks = (grants_by_desc | grants_by_title | grants_by_url).values_list('pk', flat=True) |
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.
F841 local variable 'grants_pks' is assigned to but never used
@thelostone-mc Is there anything I can do to help keep this moving? |
@captnseagraves I'm a lil confused on how to proceed with this! I belive @mbeacom had some concerns using the API route , so I'm not too sure on what the right thing to do here is. |
@thelostone-mc Sure thing! I'll take a look! |
url(r'^api/v0.1/kudos_search/', dashboard.views.get_kudos, name='kudos_search'), | ||
|
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.
W293 blank line contains whitespace
@captnseagraves This was a WIP? 🤔 |
Description
WIP
Checklist
Affected core subsystem(s)