Skip to content

Commit

Permalink
fix: v3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Oct 25, 2024
1 parent f3c56e8 commit c8882ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
6 changes: 5 additions & 1 deletion djangocms_link/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c8882ed

Please sign in to comment.