diff --git a/CHANGES.rst b/CHANGES.rst index a0e6220..580055d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,6 @@ .. This file is part of Invenio. - Copyright (C) 2015-2023 CERN. + Copyright (C) 2015-2024 CERN. Invenio is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. @@ -9,6 +9,26 @@ Changes ======= +Version 4.0.0 (released 2024-03-21) + +- Major release because of fundamental change in the way the module is + expected to be used for registering pages. +- global: remove `has_custom_view` model field +- views: allow passing Jinja context to `render_page` +- ext: remove finalize_app usage + - The previous design of the module had some major usability issues: + - The assumption that we have views that are dynamically registered + without the need to redeploy/reload the application for code + changes is fundamentally flawed. In reality order for such views + to be accessible/discoverable, one has to be able to reference + them in Jinja templates, which in turn means one has to make code + changes. + - The way we were registering page views, required having a + connection to an already initialized database. This imposes having + to perform checks at application initialization that go against + well-established principles of the Flask/Invenio app lifecycle. +- fix: before_app_first_request deprecation + Version 3.3.0 (released 2024-02-21): ------------------------------------ diff --git a/invenio_pages/__init__.py b/invenio_pages/__init__.py index ad55c36..2d80d74 100644 --- a/invenio_pages/__init__.py +++ b/invenio_pages/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of Invenio. -# Copyright (C) 2015-2023 CERN. +# Copyright (C) 2015-2024 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. @@ -11,6 +11,6 @@ from .ext import InvenioPages, InvenioPagesREST from .records.models import PageList, PageModel -__version__ = "3.3.0" +__version__ = "4.0.0" __all__ = ("__version__", "InvenioPages", "InvenioPagesREST", "PageModel", "PageList") diff --git a/invenio_pages/ext.py b/invenio_pages/ext.py index cbd7c88..be10609 100644 --- a/invenio_pages/ext.py +++ b/invenio_pages/ext.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of Invenio. -# Copyright (C) 2015-2022 CERN. +# Copyright (C) 2015-2024 CERN. # Copyright (C) 2023-2024 Graz University of Technology. # # Invenio is free software; you can redistribute it and/or modify it diff --git a/invenio_pages/records/models.py b/invenio_pages/records/models.py index 8dc8e6c..1d2517a 100644 --- a/invenio_pages/records/models.py +++ b/invenio_pages/records/models.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of Invenio. -# Copyright (C) 2015-2022 CERN. +# Copyright (C) 2015-2024 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. diff --git a/invenio_pages/services/schemas.py b/invenio_pages/services/schemas.py index 0cede5b..42e818e 100644 --- a/invenio_pages/services/schemas.py +++ b/invenio_pages/services/schemas.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (C) 2023 CERN. +# Copyright (C) 2023-2024 CERN. # Copyright (C) 2023 KTH Royal Institute of Technology. # # Invenio-Pages is free software; you can redistribute it and/or modify it diff --git a/invenio_pages/views.py b/invenio_pages/views.py index 79a451b..98d1c55 100644 --- a/invenio_pages/views.py +++ b/invenio_pages/views.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of Invenio. -# Copyright (C) 2015-2022 CERN. +# Copyright (C) 2015-2024 CERN. # Copyright (C) 2023-2024 Graz University of Technology. # # Invenio is free software; you can redistribute it and/or modify it diff --git a/tests/records/test_records.py b/tests/records/test_records.py index 0e7e530..a025bac 100644 --- a/tests/records/test_records.py +++ b/tests/records/test_records.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of Invenio. -# Copyright (C) 2015-2022 CERN. +# Copyright (C) 2015-2024 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. diff --git a/tests/resources/test_resources.py b/tests/resources/test_resources.py index fcbe37e..4deaa98 100644 --- a/tests/resources/test_resources.py +++ b/tests/resources/test_resources.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of Invenio. -# Copyright (C) 2022 CERN. +# Copyright (C) 2022-2024 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. diff --git a/tests/services/test_services.py b/tests/services/test_services.py index 1b30b67..062b485 100644 --- a/tests/services/test_services.py +++ b/tests/services/test_services.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of Invenio. -# Copyright (C) 2022 CERN. +# Copyright (C) 2022-2024 CERN. # Copyright (C) 2023 KTH Royal Institute of Technology. # # Invenio is free software; you can redistribute it and/or modify it diff --git a/tests/test_views.py b/tests/test_views.py index 463064b..427c077 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of Invenio. -# Copyright (C) 2015-2022 CERN. +# Copyright (C) 2015-2024 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details.