Skip to content
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

New search all page #126

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
5 changes: 4 additions & 1 deletion backend/cic/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(os.path.dirname(BASE_DIR), 'templates')],
'DIRS': [
os.path.join(os.path.dirname(BASE_DIR), 'templates'),
os.path.join(os.path.dirname(BASE_DIR), 'grants/templates')
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down
4 changes: 2 additions & 2 deletions backend/cic/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
urlpatterns = [
path('admin/', admin.site.urls),
path('grants/', index, name='index'),
path('grants/<int:grant_id>', detail),
path('grants/pi/<int:pi_id>', pi_detail),
path('search/grants/<int:grant_id>', detail),
path('search/pi/<int:pi_id>', pi_detail),
path('v1/', include('apis.urls')),
path('survey/', include('pi_survey.urls')),
path('o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
Expand Down
2 changes: 1 addition & 1 deletion backend/cic/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

def index(request):
"""Home view callable, for the home page."""
return render(request, 'index.html', {'keywords': request.GET.get('keywords', '')})
return render(request, 'grants/index.html', {'keywords': request.GET.get('keywords', '')})


def detail(request, grant_id):
Expand Down
67 changes: 0 additions & 67 deletions backend/create_aws_creds.py

This file was deleted.

63 changes: 0 additions & 63 deletions backend/deploy.sh

This file was deleted.

2 changes: 1 addition & 1 deletion backend/pi_survey/static/pi_survey/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion backend/search/documents/publication.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def prepare_affiliations(self, instance):
)
return people

authors = fields.ObjectField(
authors = fields.NestedField(
properties = get_person_properties.__func__())
# grants = fields.NestedField(
# properties = get_grant_properties.__func__())
Expand Down
6 changes: 6 additions & 0 deletions backend/search/urls.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
from django.urls import path
from . import views
from search.views import index, pi_detail

urlpatterns = [
path('', index),
path('grants', views.search_grants, name='search_grants'),
path('facets', views.get_facet_by_field, name='search_grants'),
path('facets/people', views.get_people_facet_by_field, name='people_facet'),
path('facets/publications/authors', views.get_pub_author_facet, name='pub_author_facet'),
path('facets/datasets/authors', views.get_dataset_author_facet, name='dataset_author_facet'),
path('publications', views.search_publications, name='search_publications'),
path('people', views.search_people, name='search_people'),
path('people/pi/<int:pi_id>', pi_detail),
path('datasets', views.search_datasets, name='search_datasets'),
path('assets', views.search_assets, name='search_assets')
]
Loading