diff --git a/README.rst b/README.rst index 468022f5..35587038 100644 --- a/README.rst +++ b/README.rst @@ -143,9 +143,9 @@ You can run tests by executing:: .. |coverage| image:: https://codecov.io/gh/divio/djangocms-link/branch/master/graph/badge.svg :target: https://codecov.io/gh/divio/djangocms-link -.. |python| image:: https://img.shields.io/badge/python-3.5+-blue.svg +.. |python| image:: https://img.shields.io/badge/python-3.10+-blue.svg :target: https://pypi.org/project/djangocms-link/ -.. |django| image:: https://img.shields.io/badge/django-2.2,%203.0,%203.1-blue.svg +.. |django| image:: https://img.shields.io/badge/django-4.2,%205.0,%205.1-blue.svg :target: https://www.djangoproject.com/ .. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.7%2B-blue.svg :target: https://www.django-cms.org/ diff --git a/djangocms_link/admin.py b/djangocms_link/admin.py index 07b83dba..f2d83464 100644 --- a/djangocms_link/admin.py +++ b/djangocms_link/admin.py @@ -6,13 +6,17 @@ from django.views.generic.list import BaseListView from cms import __version__ -from cms.models import Page, PageContent +from cms.models import Page from cms.utils import get_language_from_request from . import models _version = int(__version__.split(".")[0]) +if _version >= 4: + from cms.models import PageContent +else: + from cms.models import Title as PageContent class UrlsJsonView(BaseListView):