From 087ee666e53a9408a4f4ce9191d5b6f967da55e4 Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 18:01:02 -0700 Subject: [PATCH 01/15] Update Django to 4.0.10 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1dd8ccb8..caab78fc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django>=3.2.23,==3.2.* +Django==4.0.10 django-contact-form==2.1.0 # current django-easy-pjax==1.3.0 # current retrying==1.3.4 # current From f790631610dba2b7aceedb17813395ad452b5227 Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 18:01:41 -0700 Subject: [PATCH 02/15] https://docs.djangoproject.com/en/5.1/releases/4.0/#securitymiddleware-no-longer-sets-the-x-xss-protection-header --- public_interface/settings.py | 1 - 1 file changed, 1 deletion(-) diff --git a/public_interface/settings.py b/public_interface/settings.py index debc13bd..5db6e0f7 100644 --- a/public_interface/settings.py +++ b/public_interface/settings.py @@ -130,7 +130,6 @@ def getenv(variable, default): EMAIL_USE_TLS = bool(getenv('EMAIL_USE_TLS', '')) CSRF_COOKIE_SECURE = bool(getenv('CSRF_COOKIE_SECURE', '')) -SECURE_BROWSER_XSS_FILTER = True SECURE_CONTENT_TYPE_NOSNIFF = True DEFAULT_FROM_EMAIL = getenv('DEFAULT_FROM_EMAIL', 'project@example.edu') From cb548a2b626c1c36a2e23e5c58e97c3ce848726d Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 18:12:31 -0700 Subject: [PATCH 03/15] https://docs.djangoproject.com/en/5.1/releases/4.0/#time-zone-support --- public_interface/settings.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/public_interface/settings.py b/public_interface/settings.py index 5db6e0f7..e6ae594f 100644 --- a/public_interface/settings.py +++ b/public_interface/settings.py @@ -338,8 +338,6 @@ def getenv(variable, default): USE_L10N = True -USE_TZ = True - FILE_UPLOAD_HANDLERS = [ "django.core.files.uploadhandler.MemoryFileUploadHandler", "django.core.files.uploadhandler.TemporaryFileUploadHandler" From 7116dfcb4a8fb5dfc07f0e6e4e9d4ae402dbeeae Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 18:13:07 -0700 Subject: [PATCH 04/15] https://docs.djangoproject.com/en/5.1/releases/4.0/#localization --- public_interface/settings.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/public_interface/settings.py b/public_interface/settings.py index e6ae594f..b334c66d 100644 --- a/public_interface/settings.py +++ b/public_interface/settings.py @@ -336,8 +336,6 @@ def getenv(variable, default): USE_I18N = True -USE_L10N = True - FILE_UPLOAD_HANDLERS = [ "django.core.files.uploadhandler.MemoryFileUploadHandler", "django.core.files.uploadhandler.TemporaryFileUploadHandler" From 2c757a5386ee6fbd363d98c9e05b4cd5b0c9f952 Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 18:28:24 -0700 Subject: [PATCH 05/15] django.conf.urls.url() alias of django.urls.re_path() is deprecated. https://docs.djangoproject.com/en/5.1/releases/3.1/#id2 --- calisphere/urls.py | 90 ++++++++++++++++++++-------------------- public_interface/urls.py | 24 +++++------ 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/calisphere/urls.py b/calisphere/urls.py index 3a7d2827..4be389e3 100644 --- a/calisphere/urls.py +++ b/calisphere/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import url +from django.urls import re_path from django.views.generic import TemplateView from django.views.generic.base import RedirectView from django.conf import settings @@ -10,128 +10,128 @@ app_name = 'calisphere' urlpatterns = [ - url(r'^$', HomeView.as_view(), name='home'), - url(r'^select-index/(?P.*)/', views.select_index, name='select_index'), - url(r'^search/$', views.search, name='search'), - url(r'^item/(?P.*)/$', views.item_view, name='itemView'), - url(r'^collections/$', + re_path(r'^$', HomeView.as_view(), name='home'), + re_path(r'^select-index/(?P.*)/', views.select_index, name='select_index'), + re_path(r'^search/$', views.search, name='search'), + re_path(r'^item/(?P.*)/$', views.item_view, name='itemView'), + re_path(r'^collections/$', collection_views.collections_directory, name='collectionsDirectory'), - url(r'^collections/(?P[a-zA-Z]{1})/$', + re_path(r'^collections/(?P[a-zA-Z]{1})/$', collection_views.collections_az, name='collectionsAZ'), - url(r'^collections/(?Pnum)/$', + re_path(r'^collections/(?Pnum)/$', collection_views.collections_az, name='collectionsAZ'), - url(r'^collections/(?P\d*)/$', + re_path(r'^collections/(?P\d*)/$', collection_views.collection_search, name='collectionView'), - url(r'^collections/(?P\d*)/reports/(?P[^/].*)/(?P.*)/$', + re_path(r'^collections/(?P\d*)/reports/(?P[^/].*)/(?P.*)/$', views.report_collection_facet_value, name='reportCollectionFacetValue'), - url(r'^collections/(?P\d*)/reports/(?P.*)/$', + re_path(r'^collections/(?P\d*)/reports/(?P.*)/$', views.report_collection_facet, name='reportCollectionFacet'), - url(r'^collections/(?P\d*)/(?P[^/].*)/(?P.*)/$', + re_path(r'^collections/(?P\d*)/(?P[^/].*)/(?P.*)/$', collection_views.collection_facet_value, name='collectionFacetValue'), - url(r'^collections/(?P\d*)/(?P.*)/$', + re_path(r'^collections/(?P\d*)/(?P.*)/$', collection_views.collection_facet, name='collectionFacet'), - url(r'^collections/(?P\d*)/(?P.*).json$', + re_path(r'^collections/(?P\d*)/(?P.*).json$', collection_views.collection_facet_json, name='collectionFacetJson'), # Redirects to new 'exhibitions' - url(r'^collections/themed/$', + re_path(r'^collections/themed/$', RedirectView.as_view(url='/exhibitions/'), name='themedCollections'), - url(r'^collections/cal-cultures/$', + re_path(r'^collections/cal-cultures/$', RedirectView.as_view(url='/cal-cultures/'), name='calCultures'), - url(r'^collections/jarda/$', + re_path(r'^collections/jarda/$', RedirectView.as_view(url='/exhibitions/t11/jarda/'), name='jarda'), - url(r'^collections/titleSearch/$', + re_path(r'^collections/titleSearch/$', collection_views.collections_search, name='collectionsTitleSearch'), - url(r'^collections/titles.json$', + re_path(r'^collections/titles.json$', collection_views.collections_titles, name='collectionsTitleData'), - url(r'^institution/(?P\d*)/$', + re_path(r'^institution/(?P\d*)/$', institution_views.repository_collections, name='repositoryCollections'), - url(r'^institution/(?P\d*)/collections/$', + re_path(r'^institution/(?P\d*)/collections/$', institution_views.repository_collections, name='repositoryCollections'), - url(r'^institution/(?P\d*)/items/$', + re_path(r'^institution/(?P\d*)/items/$', institution_views.repository_search, name='repositorySearch'), - url(r'^(?PUC\w{1,2})/$', + re_path(r'^(?PUC\w{1,2})/$', institution_views.campus_collections, name='campusCollections'), - url(r'^(?PUC\w{1,2})/collections/$', + re_path(r'^(?PUC\w{1,2})/collections/$', institution_views.campus_collections, name='campusCollections'), - url(r'^(?PUC\w{1,2})/items/$', + re_path(r'^(?PUC\w{1,2})/items/$', institution_views.campus_search, name='campusSearch'), - url(r'^(?PUC\w{1,2})/institutions/$', + re_path(r'^(?PUC\w{1,2})/institutions/$', institution_views.campus_institutions, name='campusInstitutions'), - url(r'^institutions/$', institution_views.campus_directory, name='campusDirectory'), - url(r'^institutions/statewide-partners/$', + re_path(r'^institutions/$', institution_views.campus_directory, name='campusDirectory'), + re_path(r'^institutions/statewide-partners/$', institution_views.statewide_directory, name='statewideDirectory'), - url(r'about/$', + re_path(r'about/$', TemplateView.as_view(template_name='calisphere/about.html'), name='about'), - url(r'help/$', + re_path(r'help/$', TemplateView.as_view(template_name='calisphere/help.html'), name='help'), - url(r'terms/$', + re_path(r'terms/$', TemplateView.as_view(template_name='calisphere/termsOfUse.html'), name='termsOfUse'), - url(r'privacy/$', + re_path(r'privacy/$', TemplateView.as_view(template_name='calisphere/privacyStatement.html'), name='privacyStatement'), - url(r'outreach/$', + re_path(r'outreach/$', TemplateView.as_view(template_name='calisphere/outreach.html'), name='outreach'), - url(r'contribute/$', + re_path(r'contribute/$', TemplateView.as_view(template_name='calisphere/contribute.html'), name='contribute'), - url(r'jobs/$', + re_path(r'jobs/$', TemplateView.as_view(template_name='calisphere/jobs.html'), name='jobs'), - url(r'overview/$', + re_path(r'overview/$', TemplateView.as_view(template_name='calisphere/overview.html'), name='overview'), - url(r'posters/$', views.posters, name='posters'), - url(r'sitemap-(?P
.*).xml$', views.sitemap_section), - url(r'sitemap-(?P
.*).xml.gz$', views.sitemap_section_zipped), + re_path(r'posters/$', views.posters, name='posters'), + re_path(r'sitemap-(?P
.*).xml$', views.sitemap_section), + re_path(r'sitemap-(?P
.*).xml.gz$', views.sitemap_section_zipped), # AJAX HELPERS - url(r'^relatedCollections/', + re_path(r'^relatedCollections/', views.related_collections, name='relatedCollections'), - url(r'^relatedExhibitions', + re_path(r'^relatedExhibitions', views.related_exhibitions, name='relatedExhibitions'), - url(r'^carousel/', views.item_view_carousel, name='carousel'), - url(r'^contactOwner/', views.contact_owner, name='contactOwner'), + re_path(r'^carousel/', views.item_view_carousel, name='carousel'), + re_path(r'^contactOwner/', views.contact_owner, name='contactOwner'), ] if settings.UCLDC_METADATA_SUMMARY: urlpatterns.insert(0, - url(r'^collections/(?P\d*)/metadata/$', + re_path(r'^collections/(?P\d*)/metadata/$', collection_views.collection_metadata, name='collectionMetadata'), ) urlpatterns.insert(0, - url(r'^collections/(?P\d*)/browse/$', + re_path(r'^collections/(?P\d*)/browse/$', collection_views.collection_browse, name='collectionBrowse'),) diff --git a/public_interface/urls.py b/public_interface/urls.py index 291b968e..0856b229 100644 --- a/public_interface/urls.py +++ b/public_interface/urls.py @@ -1,5 +1,5 @@ -from django.conf.urls import include, url +from django.urls import include, re_path from django.contrib import admin from django.http import HttpResponse from django.views.generic import TemplateView @@ -25,24 +25,24 @@ } urlpatterns = [ - url(r'^', include('calisphere.urls', namespace="calisphere")), - url(r'^exhibitions/', include('exhibits.urls', namespace="exhibits")), - url(r'^for-educators/', include(('exhibits.teacher_urls', 'for-teachers'), namespace="for-teachers")), - url(r'^cal-cultures/', calCultures, name="cal-cultures"), + re_path(r'^', include('calisphere.urls', namespace="calisphere")), + re_path(r'^exhibitions/', include('exhibits.urls', namespace="exhibits")), + re_path(r'^for-educators/', include(('exhibits.teacher_urls', 'for-teachers'), namespace="for-teachers")), + re_path(r'^cal-cultures/', calCultures, name="cal-cultures"), - url(r'^admin/', admin.site.urls), - url(r'^contact/$', + re_path(r'^admin/', admin.site.urls), + re_path(r'^contact/$', CalisphereContactFormView.as_view(), name='contact_form'), - url(r'^contact/sent/$', + re_path(r'^contact/sent/$', TemplateView.as_view( template_name='django_contact_form/contact_form_sent.html'), name='contact_form_sent'), - url(r'^robots.txt$', + re_path(r'^robots.txt$', lambda r: HttpResponse("User-agent: *\nDisallow: /", content_type="text/plain") ), - url(r'', include('static_sitemaps.urls')), - url(r'^sitemaps/', include('calisphere.urls', namespace="sitemaps")), - url(r'^healthcheck/', include('health_check.urls')), + re_path(r'', include('static_sitemaps.urls')), + re_path(r'^sitemaps/', include('calisphere.urls', namespace="sitemaps")), + re_path(r'^healthcheck/', include('health_check.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) From c0d9647f5830bfed5b3a01466fbe8363a84a1358 Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 18:34:27 -0700 Subject: [PATCH 06/15] Redis cache backend added to Django core https://docs.djangoproject.com/en/5.1/releases/4.0/#redis-cache-backend --- public_interface/settings.py | 7 ++----- requirements.txt | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/public_interface/settings.py b/public_interface/settings.py index b334c66d..975a1fe7 100644 --- a/public_interface/settings.py +++ b/public_interface/settings.py @@ -295,11 +295,8 @@ def getenv(variable, default): # DJANGO_REDIS_IGNORE_EXCEPTIONS = True CACHES = { 'default': { - 'BACKEND': 'django_redis.cache.RedisCache', - 'LOCATION': UCLDC_REDIS_URL, - 'OPTIONS': { - 'CLIENT_CLASS': 'django_redis.client.DefaultClient', - } + 'BACKEND': 'django.core.cache.backends.redis.RedisCache', + 'LOCATION': UCLDC_REDIS_URL } } SESSION_ENGINE = 'django.contrib.sessions.backends.cache' diff --git a/requirements.txt b/requirements.txt index caab78fc..31910607 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,9 +4,8 @@ django-easy-pjax==1.3.0 # current retrying==1.3.4 # current requests==2.31.0 # current whitenoise==6.6.0 # current -django-redis==4.7.0 # 5.4.0 is current -redis==2.10.5 # 5.0.3 is current -hiredis==0.2.0 # 2.3.2 is current +redis==5.1.1 # 5.1.1 is current +hiredis==3.0.0 # 3.0.0 is current django-static-sitemaps==4.6.0 # 5.0.0 is current django-health-check==3.18.1 # current aws-xray-sdk==0.93 # 2.13.0 is current From 1024440d975bf028723bcbea2d177eea00ade95d Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 18:55:09 -0700 Subject: [PATCH 07/15] Update Django to 4.1.13 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 31910607..4d969566 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django==4.0.10 +Django==4.1.13 django-contact-form==2.1.0 # current django-easy-pjax==1.3.0 # current retrying==1.3.4 # current From 86eaaf6615154ce5dd3a1b42e0ddb33e5182afbe Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 18:55:24 -0700 Subject: [PATCH 08/15] The cached template loader is enabled in development, when DEBUG is True https://docs.djangoproject.com/en/5.1/releases/4.1/#templates-4-1 --- public_interface/settings.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/public_interface/settings.py b/public_interface/settings.py index 975a1fe7..4ee5d270 100644 --- a/public_interface/settings.py +++ b/public_interface/settings.py @@ -238,14 +238,7 @@ def getenv(variable, default): 'public_interface.context_processors.settings', 'exhibits.context_processors.settings' ], - "debug": - UCLDC_DEVEL, - 'loaders': [ - ('django.template.loaders.cached.Loader', [ - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', - ]), - ], + "debug": UCLDC_DEVEL, } }] From d17047982d30ba36f9baca3376ab39fb6c4205d7 Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 19:01:06 -0700 Subject: [PATCH 09/15] default_app_config is deprecated https://docs.djangoproject.com/en/5.1/releases/3.2/#automatic-appconfig-discovery --- calisphere/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calisphere/__init__.py b/calisphere/__init__.py index feff467b..10d40e56 100644 --- a/calisphere/__init__.py +++ b/calisphere/__init__.py @@ -23,4 +23,4 @@ def new_render(cls, context): URLNode.render = new_render -default_app_config = 'calisphere.apps.CalisphereAppConfig' + From f87b46e13b7002acc1432d8a9b41142835c26bde Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 22:10:45 -0700 Subject: [PATCH 10/15] django-easy-pjax is incompatible with Django 4.0 - ugettext_lazy is removed https://docs.djangoproject.com/en/5.1/releases/4.0/#features-removed-in-4-0 File "/site-packages/easy_pjax/apps.py", line 6, in from django.utils.translation import ugettext_lazy as _ --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4d969566..76de34dc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ Django==4.1.13 django-contact-form==2.1.0 # current -django-easy-pjax==1.3.0 # current retrying==1.3.4 # current requests==2.31.0 # current whitenoise==6.6.0 # current From 7827d479eff90d549f878a2a0511337d1f760207 Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 22:13:44 -0700 Subject: [PATCH 11/15] Stripping out django-easy-pjax --- public_interface/settings.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public_interface/settings.py b/public_interface/settings.py index 4ee5d270..ec977c69 100644 --- a/public_interface/settings.py +++ b/public_interface/settings.py @@ -200,8 +200,9 @@ def getenv(variable, default): 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django.contrib.humanize', 'django.contrib.sitemaps', - 'easy_pjax', 'calisphere', 'static_sitemaps', 'health_check', - 'health_check.cache', 'health_check.storage', 'snowpenguin.django.recaptcha2', ) + 'calisphere', 'static_sitemaps', 'health_check', + 'health_check.cache', 'health_check.storage', + 'snowpenguin.django.recaptcha2', ) MIDDLEWARE = ( 'django.middleware.security.SecurityMiddleware', @@ -229,8 +230,7 @@ def getenv(variable, default): "DIRS": [], "APP_DIRS": True, "OPTIONS": { - "builtins": ["easy_pjax.templatetags.pjax_tags", - "exhibits.templatetags.exhibit_extras"], + "builtins": ["exhibits.templatetags.exhibit_extras"], "context_processors": [ "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", From b5cca75bbadd96d0b1b7a3c4f2a3a6b5eb633acb Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 23:15:58 -0700 Subject: [PATCH 12/15] Removed |pjax template tag from use --- calisphere/templates/calisphere/2col.html | 2 +- calisphere/templates/calisphere/about.html | 2 +- calisphere/templates/calisphere/campusDirectory.html | 2 +- calisphere/templates/calisphere/collections/collectionsAZ.html | 2 +- .../calisphere/collections/collectionsRandomExplore.html | 2 +- .../calisphere/collections/collectionsTitleSearch.html | 2 +- calisphere/templates/calisphere/contribute.html | 2 +- calisphere/templates/calisphere/facetValues.html | 2 +- calisphere/templates/calisphere/help.html | 2 +- calisphere/templates/calisphere/itemView.html | 2 +- calisphere/templates/calisphere/itemViewer.html | 2 +- calisphere/templates/calisphere/jobs.html | 2 +- calisphere/templates/calisphere/outreach.html | 2 +- calisphere/templates/calisphere/overview.html | 2 +- calisphere/templates/calisphere/posters.html | 2 +- calisphere/templates/calisphere/privacyStatement.html | 2 +- calisphere/templates/calisphere/searchResults.html | 2 +- calisphere/templates/calisphere/statewideDirectory.html | 2 +- calisphere/templates/calisphere/termsOfUse.html | 2 +- public_interface/settings.py | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/calisphere/templates/calisphere/2col.html b/calisphere/templates/calisphere/2col.html index 46b9755c..c977194e 100644 --- a/calisphere/templates/calisphere/2col.html +++ b/calisphere/templates/calisphere/2col.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% load calisphere-extras %} {% load humanize %} {% load static %} diff --git a/calisphere/templates/calisphere/about.html b/calisphere/templates/calisphere/about.html index 6a5cc386..eeb16517 100644 --- a/calisphere/templates/calisphere/about.html +++ b/calisphere/templates/calisphere/about.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% block page-metadata %} {% include "calisphere/microdata.html" with title='About' %} diff --git a/calisphere/templates/calisphere/campusDirectory.html b/calisphere/templates/calisphere/campusDirectory.html index d0657166..2e339432 100644 --- a/calisphere/templates/calisphere/campusDirectory.html +++ b/calisphere/templates/calisphere/campusDirectory.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% load calisphere-extras %} {% load static %} diff --git a/calisphere/templates/calisphere/collections/collectionsAZ.html b/calisphere/templates/calisphere/collections/collectionsAZ.html index 76acf03b..5443dee4 100644 --- a/calisphere/templates/calisphere/collections/collectionsAZ.html +++ b/calisphere/templates/calisphere/collections/collectionsAZ.html @@ -1,4 +1,4 @@ -{% extends "calisphere/collections/collectionsDirectory.html,calisphere/pjaxTemplates/collectionsDirectory.html"|pjax:request %} +{% extends "calisphere/collections/collectionsDirectory.html" %} {% load calisphere-extras %} {% load static %} diff --git a/calisphere/templates/calisphere/collections/collectionsRandomExplore.html b/calisphere/templates/calisphere/collections/collectionsRandomExplore.html index 9e6cb08a..7b46d04f 100644 --- a/calisphere/templates/calisphere/collections/collectionsRandomExplore.html +++ b/calisphere/templates/calisphere/collections/collectionsRandomExplore.html @@ -1,4 +1,4 @@ -{% extends "calisphere/collections/collectionsDirectory.html,calisphere/pjaxTemplates/collectionsDirectory.html"|pjax:request %} +{% extends "calisphere/collections/collectionsDirectory.html" %} {% load calisphere-extras %} {% load static %} diff --git a/calisphere/templates/calisphere/collections/collectionsTitleSearch.html b/calisphere/templates/calisphere/collections/collectionsTitleSearch.html index 9be4d153..4f5f9a0b 100644 --- a/calisphere/templates/calisphere/collections/collectionsTitleSearch.html +++ b/calisphere/templates/calisphere/collections/collectionsTitleSearch.html @@ -1,4 +1,4 @@ -{% extends "calisphere/collections/collectionsDirectory.html,calisphere/pjaxTemplates/collectionsDirectory.html"|pjax:request %} +{% extends "calisphere/collections/collectionsDirectory.html" %} {% load calisphere-extras %} {% load static %} diff --git a/calisphere/templates/calisphere/contribute.html b/calisphere/templates/calisphere/contribute.html index 48b46809..8397ad3f 100644 --- a/calisphere/templates/calisphere/contribute.html +++ b/calisphere/templates/calisphere/contribute.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% block page-metadata %} {% include "calisphere/microdata.html" with title='For Contributors' %} diff --git a/calisphere/templates/calisphere/facetValues.html b/calisphere/templates/calisphere/facetValues.html index 44a75a9e..087c8032 100644 --- a/calisphere/templates/calisphere/facetValues.html +++ b/calisphere/templates/calisphere/facetValues.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% load calisphere-extras %} {% load humanize %} {% load static %} diff --git a/calisphere/templates/calisphere/help.html b/calisphere/templates/calisphere/help.html index 50eca6ce..e3260ace 100644 --- a/calisphere/templates/calisphere/help.html +++ b/calisphere/templates/calisphere/help.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% block page-metadata %} {% include "calisphere/microdata.html" with title='Frequently Asked Questions' %} diff --git a/calisphere/templates/calisphere/itemView.html b/calisphere/templates/calisphere/itemView.html index f2678445..88bac6d8 100644 --- a/calisphere/templates/calisphere/itemView.html +++ b/calisphere/templates/calisphere/itemView.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% load calisphere-extras %} {% block page-metadata %} diff --git a/calisphere/templates/calisphere/itemViewer.html b/calisphere/templates/calisphere/itemViewer.html index 1784936c..bcf5d55a 100644 --- a/calisphere/templates/calisphere/itemViewer.html +++ b/calisphere/templates/calisphere/itemViewer.html @@ -1,4 +1,4 @@ -{% extends "calisphere/itemView.html,calisphere/pjaxTemplates/pjax-item.html"|pjax:request %} +{% extends "calisphere/itemView.html" %} {% block title %}: {{ item.title.0 }}{% endblock %} {% block page-metadata %} diff --git a/calisphere/templates/calisphere/jobs.html b/calisphere/templates/calisphere/jobs.html index ae35f945..13ac2a46 100644 --- a/calisphere/templates/calisphere/jobs.html +++ b/calisphere/templates/calisphere/jobs.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% block page-metadata %} {% include "calisphere/microdata.html" with title='Jobs' description='The California Digital Library is seeking an energetic, media-savvy individual to help us develop a social media strategy for Calisphere. This is a unique, short-term opportunity.'%} diff --git a/calisphere/templates/calisphere/outreach.html b/calisphere/templates/calisphere/outreach.html index 03d405df..fb8943ff 100644 --- a/calisphere/templates/calisphere/outreach.html +++ b/calisphere/templates/calisphere/outreach.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% block page-metadata %} {% include "calisphere/microdata.html" with title='Outreach Materials' %} diff --git a/calisphere/templates/calisphere/overview.html b/calisphere/templates/calisphere/overview.html index afab915d..10518225 100644 --- a/calisphere/templates/calisphere/overview.html +++ b/calisphere/templates/calisphere/overview.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% block page-metadata %} {% include "calisphere/microdata.html" with title='About the Collections in Calisphere' %} diff --git a/calisphere/templates/calisphere/posters.html b/calisphere/templates/calisphere/posters.html index 751233cb..99328e73 100644 --- a/calisphere/templates/calisphere/posters.html +++ b/calisphere/templates/calisphere/posters.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% block page-metadata %} {% include "calisphere/microdata.html" with title='Posters' %} diff --git a/calisphere/templates/calisphere/privacyStatement.html b/calisphere/templates/calisphere/privacyStatement.html index 2f3319ba..db95adc2 100644 --- a/calisphere/templates/calisphere/privacyStatement.html +++ b/calisphere/templates/calisphere/privacyStatement.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% block page-metadata %} {% include "calisphere/microdata.html" with title='Privacy Statement' %} diff --git a/calisphere/templates/calisphere/searchResults.html b/calisphere/templates/calisphere/searchResults.html index 9b63e256..d19be44b 100644 --- a/calisphere/templates/calisphere/searchResults.html +++ b/calisphere/templates/calisphere/searchResults.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% load calisphere-extras %} {% load humanize %} {% load static %} diff --git a/calisphere/templates/calisphere/statewideDirectory.html b/calisphere/templates/calisphere/statewideDirectory.html index ef160586..e0530a06 100644 --- a/calisphere/templates/calisphere/statewideDirectory.html +++ b/calisphere/templates/calisphere/statewideDirectory.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% load calisphere-extras %} {% load static %} diff --git a/calisphere/templates/calisphere/termsOfUse.html b/calisphere/templates/calisphere/termsOfUse.html index f5d4200e..2fb21e63 100644 --- a/calisphere/templates/calisphere/termsOfUse.html +++ b/calisphere/templates/calisphere/termsOfUse.html @@ -1,4 +1,4 @@ -{% extends "calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html"|pjax:request %} +{% extends "calisphere/base.html" %} {% block page-metadata %} {% include "calisphere/microdata.html" with title='Terms of Use and Copyright Information' %} diff --git a/public_interface/settings.py b/public_interface/settings.py index ec977c69..d9236e59 100644 --- a/public_interface/settings.py +++ b/public_interface/settings.py @@ -151,7 +151,7 @@ def getenv(variable, default): # When EXHIBIT_PREVIEW = False, show only exhibits, themes, lesson plans, and essays marked 'published' # When EXHIBIT_PREVIEW = True, show ALL exhibits, themes, lesson plans, and essays EXHIBIT_PREVIEW = bool(os.environ.get('UCLDC_EXHIBIT_PREVIEW')) -EXHIBIT_TEMPLATE = 'calisphere/base.html,calisphere/pjaxTemplates/pjax-base.html' +EXHIBIT_TEMPLATE = 'calisphere/base.html' CALISPHERE = True # https://dryan.com/articles/elb-django-allowed-hosts/ From e5cb0f1e8fae56f22f199ad1551470de3012e8e5 Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Wed, 9 Oct 2024 23:21:09 -0700 Subject: [PATCH 13/15] Remove data-pjax html attribute --- app/components/sidebar-component.html | 2 +- app/components/static-about-component.html | 12 ++++---- app/components/static-outreach-component.html | 2 +- calisphere/templates/404.html | 30 +++++++++---------- calisphere/templates/calisphere/about.html | 16 +++++----- calisphere/templates/calisphere/base.html | 8 ++--- .../templates/calisphere/campusDirectory.html | 4 +-- .../calisphere/carouselContainer.html | 14 ++++----- .../collections/collectionBrowse.html | 18 +++++------ .../collections/collectionFacet.html | 26 +++++++--------- .../collections/collectionFacetValue.html | 17 +++++------ .../collections/collectionMetadata.html | 5 +--- .../collections/collectionPreview.html | 4 +-- .../collections/collectionView.html | 14 ++++----- .../calisphere/collections/collectionsAZ.html | 4 +-- .../collections/collectionsHeader.html | 8 ++--- .../calisphere/component-metadata.html | 2 -- calisphere/templates/calisphere/footer.html | 18 +++++------ calisphere/templates/calisphere/help.html | 26 ++++++++-------- .../templates/calisphere/institutionView.html | 6 ++-- .../institutionViewInstitutions.html | 2 +- .../calisphere/institutionViewSidebar.html | 10 +++---- .../calisphere/institutionsHeader.html | 6 ++-- .../templates/calisphere/item-metadata.html | 2 -- calisphere/templates/calisphere/item.html | 10 +++---- .../templates/calisphere/itemButtons.html | 1 - calisphere/templates/calisphere/outreach.html | 2 +- calisphere/templates/calisphere/overview.html | 8 ++--- .../calisphere/privacyStatement.html | 2 +- .../calisphere/related-collections.html | 2 +- .../calisphere/related-exhibitions.html | 2 +- .../calisphere/reportCollectionFacet.html | 5 +--- .../reportCollectionFacetValue.html | 8 ++--- .../calisphere/statewideDirectory.html | 3 +- .../templates/calisphere/termsOfUse.html | 8 ++--- .../django_contact_form/contact_form.html | 10 +++---- .../contact_form_sent.html | 2 +- 37 files changed, 147 insertions(+), 172 deletions(-) diff --git a/app/components/sidebar-component.html b/app/components/sidebar-component.html index c8acdc34..681d0c75 100644 --- a/app/components/sidebar-component.html +++ b/app/components/sidebar-component.html @@ -1,4 +1,4 @@ diff --git a/app/components/static-about-component.html b/app/components/static-about-component.html index d9ddacf1..a85f28c2 100644 --- a/app/components/static-about-component.html +++ b/app/components/static-about-component.html @@ -7,14 +7,14 @@

Welcome to Calisphere: your gateway to California’s remarkable digital collections. Calisphere provides free access to unique and historically important artifacts for research, teaching, and curious exploration. Discover over one million photographs, documents, letters, artwork, diaries, oral histories, films, advertisements, musical recordings, and more.

-

The collections on Calisphere have been digitized and contributed by all ten campuses of the University of California and other important libraries, archives, and museums throughout the state.

+

The collections on Calisphere have been digitized and contributed by all ten campuses of the University of California and other important libraries, archives, and museums throughout the state.

Using Calisphere

-

For more information about how to use Calisphere and the materials you find here, please consult the help page and terms of use. Special information about using Calisphere in the classroom can be found on our For Educators page.

+

For more information about how to use Calisphere and the materials you find here, please consult the help page and terms of use. Special information about using Calisphere in the classroom can be found on our For Educators page.

Add your collections

-

Calisphere aggregates digital collections from libraries, archives, museums, historical societies, and other cultural heritage organizations in California. If you represent such an organization and are interested in contributing digital content to Calisphere, click here to learn more.

+

Calisphere aggregates digital collections from libraries, archives, museums, historical societies, and other cultural heritage organizations in California. If you represent such an organization and are interested in contributing digital content to Calisphere, click here to learn more.

Subscribe to our newsletter

@@ -22,16 +22,16 @@

Subscribe to our newsletter

Free posters!

-

We offer free posters for students, teachers, and librarians. Visit the poster order page for more details.

+

We offer free posters for students, teachers, and librarians. Visit the poster order page for more details.

Spread the word

-

Love Calisphere? Help us spread the word! Check out our outreach tips and tools for sharing Calisphere with others.

+

Love Calisphere? Help us spread the word! Check out our outreach tips and tools for sharing Calisphere with others.

Our organization

Calisphere is a project of the University of California Libraries, developed and maintained by the California Digital Library.

-

Information about Calisphere's technical framework can be found on our help page.

+

Information about Calisphere's technical framework can be found on our help page.

diff --git a/app/components/static-outreach-component.html b/app/components/static-outreach-component.html index 300a396e..4c957b45 100644 --- a/app/components/static-outreach-component.html +++ b/app/components/static-outreach-component.html @@ -64,7 +64,7 @@

Small banner

Let’s work together

-

We welcome opportunities to introduce Calisphere to diverse audiences. We are happy to supply language for articles and blog posts, and can be available for virtual and in-person presentations (subject to travel and staff resource considerations). Please contact us with your outreach ideas.

+

We welcome opportunities to introduce Calisphere to diverse audiences. We are happy to supply language for articles and blog posts, and can be available for virtual and in-person presentations (subject to travel and staff resource considerations). Please contact us with your outreach ideas.

diff --git a/calisphere/templates/404.html b/calisphere/templates/404.html index 3ca6962e..d74d17eb 100644 --- a/calisphere/templates/404.html +++ b/calisphere/templates/404.html @@ -53,16 +53,16 @@ @@ -95,11 +95,11 @@

404: Not Found

If you think this is a problem with Calisphere, please - + contact us.
- Or return to the homepage. + Or return to the homepage.

@@ -139,42 +139,42 @@

404: Not Found