generated from nationalarchives/django-application-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into FIND-137-Migration-of-DO-from-ds-wagtail-to-…
…ds-search
- Loading branch information
Showing
23 changed files
with
324 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import sentry_sdk | ||
from django.conf import settings | ||
from sentry_sdk.integrations.django import DjangoIntegration | ||
|
||
if settings.SENTRY_DSN: | ||
sentry_sdk.init( | ||
dsn=settings.SENTRY_DSN, | ||
environment=settings.ENVIRONMENT_NAME, | ||
release=settings.BUILD_VERSION, | ||
integrations=[DjangoIntegration()], | ||
sample_rate=settings.SENTRY_SAMPLE_RATE, | ||
traces_sample_rate=settings.SENTRY_SAMPLE_RATE, | ||
profiles_sample_rate=settings.SENTRY_SAMPLE_RATE, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# format <record_field_name> : <human readable label name> | ||
FIELD_LABELS = { | ||
"reference_number": "Reference", | ||
"title": "Title", | ||
"summary_title": "Summary title", | ||
"date_covering": "Date", | ||
"creator": "Creator", | ||
"dimensions": "Dimensions", | ||
"former_department_reference": "Former reference in its original department", | ||
"former_pro_reference": "Former reference in The National Archives", | ||
"language": "Language", | ||
"legal_status": "Legal status", | ||
"map_designation": "Map designation", | ||
"map_scale": "Map scale", | ||
"note": "Note", | ||
"physical_condition": "Physical condition", | ||
"physical_description": "Physical description", | ||
"held_by": "Held by", | ||
"access_condition": "Access conditions", | ||
"closure_status": "Closure status", | ||
"record_opening": "Record opening date", | ||
"accruals": "Accruals", | ||
"accumulation_dates": "Accumulation dates", | ||
"appraisal_information": "Selection and destruction information", | ||
"copies_information": "Copies information", | ||
"custodial_history": "Custodial history", | ||
"immediate_source_of_acquisition": "Immediate source of acquisition", | ||
"location_of_originals": "Originals held at", | ||
"restrictions_on_use": "Restrictions on use", | ||
"administrative_background": "Administrative / biographical background", | ||
"arrangement": "Arrangement", | ||
"publication_note": "Publication note", | ||
"related_materials": "Related material", | ||
"description": "Description", | ||
"separated_materials": "Separated material", | ||
"unpublished_finding_aids": "Unpublished finding aids", | ||
"hierarchy": "Where am I in the catalogue?", | ||
"next": "Next", | ||
"previous": "Previous", | ||
"parent": "This record is in", | ||
"related_records": "Related records", | ||
"related_articles": "Related content", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from app.records.field_labels import FIELD_LABELS | ||
|
||
|
||
def record_field_label(record_field_name: str) -> str: | ||
"""returns human readable label for pre configured record field name, otherwise Invalid name""" | ||
return FIELD_LABELS.get(record_field_name, "UNRECOGNISED FIELD NAME") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.