diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bd727ffd3..9d6c4fac1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,23 @@ Change Log ========== +4.20 +---- + +- public site + - As a public user, I want a keyword search in the people module so that I can easily find people entries. + - As a public user, I want to see related places on a place page on the main individual place page (not in a separate tab) so that I can see associated neighborhoods and also places that have similar names but are distinct + - As a public site user, I want any JA or Arabic search to link to the equivalent search on the Arabic Papyrology Database website, so that I can find additional content not present in the PGP. + - As a public user and content admin, I want to see two separate automatic date fields for people: one of only documents where they are mentioned as deceased and one with all other dated person-doc relations, so that I have a better understanding of a person's active dates and their afterlives in the documentary record. + - bugfix: Translations in Hebrew script do not pick up correct Hebrew font + +- admin + - As a content admin, I want to be able to merge person-to-person relationship types, so that I can combine duplicates or revise categorization. + - As a content admin, I want to merge person-document relationship types, so that I can keep the website current as our thinking changes (but without losing data) + - As a content editor, I want to be able to tag people with various group names so that I can sort them in another way/portray more information on the public site. + - As a content admin, I want the ability to enter asymmetrical place-place relations, so that I can adapt to changes in the way we sort and represent data (e.g. representing a neighborhood within a place). + - As a content admin, when merging documents (for joins) I want to see image thumbnails of each document so I can be sure the join is correct. + 4.19 ---- diff --git a/DEPLOYNOTES.md b/DEPLOYNOTES.md index 304e17ba7..a862144ab 100644 --- a/DEPLOYNOTES.md +++ b/DEPLOYNOTES.md @@ -1,5 +1,10 @@ # Deploy Notes +## 4.20 + +- Solr configuration has changed. Ensure Solr configset has been updated + and then reindex all content: `python manage.py index` + ## 4.19 - Indexing logic has changed. Reindex all content: `python manage.py index`. diff --git a/geniza/__init__.py b/geniza/__init__.py index bdefd609b..18c6f94b9 100644 --- a/geniza/__init__.py +++ b/geniza/__init__.py @@ -1,4 +1,4 @@ -__version_info__ = (4, 19, 0, None) +__version_info__ = (4, 20, 0, None) # Dot-connect all but the last. Last is dash-connected if not None. diff --git a/geniza/common/models.py b/geniza/common/models.py index 4d8b2a019..cd5bb788e 100644 --- a/geniza/common/models.py +++ b/geniza/common/models.py @@ -2,6 +2,7 @@ from django.contrib.auth.models import User from django.db import models +from django.db.models.functions.text import Lower from django.utils.safestring import mark_safe from modeltranslation.utils import fallbacks @@ -110,3 +111,17 @@ def objects_by_label(cls): (obj.display_label_en or obj.name_en): obj for obj in cls.objects.all() } + + +class TaggableMixin: + """Mixin for taggable models with convenience functions for generating lists of tags""" + + def all_tags(self): + """comma delimited string of all tags for this instance""" + return ", ".join(t.name for t in self.tags.all()) + + all_tags.short_description = "tags" + + def alphabetized_tags(self): + """tags in alphabetical order, case-insensitive sorting""" + return self.tags.order_by(Lower("name")) diff --git a/geniza/corpus/models.py b/geniza/corpus/models.py index c056cf875..0e1b91f06 100644 --- a/geniza/corpus/models.py +++ b/geniza/corpus/models.py @@ -18,7 +18,6 @@ from django.core.validators import RegexValidator from django.db import models from django.db.models.functions import Concat -from django.db.models.functions.text import Lower from django.db.models.query import Prefetch from django.db.models.signals import pre_delete from django.dispatch import receiver @@ -41,6 +40,7 @@ from geniza.annotations.models import Annotation from geniza.common.models import ( DisplayLabelMixin, + TaggableMixin, TrackChangesModel, cached_class_property, ) @@ -521,7 +521,7 @@ def permalink(self): return absolutize_url(self.get_absolute_url().replace(f"/{lang}/", "/")) -class Document(ModelIndexable, DocumentDateMixin, PermalinkMixin): +class Document(ModelIndexable, DocumentDateMixin, PermalinkMixin, TaggableMixin): """A unified document such as a letter or legal document that appears on one or more fragments.""" @@ -749,16 +749,6 @@ def formatted_citation(self): f"{long_name}. {available_at} {self.permalink}, accessed {today}." ) - def all_tags(self): - """comma delimited string of all tags for this document""" - return ", ".join(t.name for t in self.tags.all()) - - all_tags.short_description = "tags" - - def alphabetized_tags(self): - """tags in alphabetical order, case-insensitive sorting""" - return self.tags.order_by(Lower("name")) - def is_public(self): """admin display field indicating if doc is public or suppressed""" return self.status == self.PUBLIC diff --git a/geniza/corpus/templates/corpus/document_list.html b/geniza/corpus/templates/corpus/document_list.html index d47a68366..61e43fd1f 100644 --- a/geniza/corpus/templates/corpus/document_list.html +++ b/geniza/corpus/templates/corpus/document_list.html @@ -157,6 +157,12 @@