-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from joshyu/feat/django-42-compatible
Feat/django 42 compatible
- Loading branch information
Showing
12 changed files
with
101 additions
and
17 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
==================== | ||
djangocms-navigation | ||
djangocms-navigation | ||
==================== | ||
|
||
Installation | ||
|
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import django | ||
|
||
from packaging.version import Version | ||
from treebeard import __version__ as treebeard_version | ||
|
||
|
||
DJANGO_4_2 = Version(django.get_version()) >= Version('4.2') | ||
TREEBEARD_4_5 = Version(treebeard_version) < Version('4.6') |
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
45 changes: 45 additions & 0 deletions
45
djangocms_navigation/templates/admin/djangocms_navigation/menuitem/tree_change_list.html
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,45 @@ | ||
{# copy from djangocms-treebeard tree_change_list.html to override media files #} | ||
{% extends "admin/change_list.html" %} | ||
{% load static admin_list admin_tree admin_urls navigation_admin_tree i18n djangocms_versioning %} | ||
|
||
{% block extrastyle %} | ||
{{ block.super }} | ||
<link rel="stylesheet" type="text/css" href="{% static 'treebeard/treebeard-admin.css' %}" /> | ||
<link rel="stylesheet" type="text/css" href="{% static 'djangocms_navigation/css/navigation_admin_overrides.css' %}"/> | ||
{% endblock %} | ||
|
||
{% block extrahead %} | ||
{{ block.super }} | ||
<script src="{% url 'admin:jsi18n' %}"></script> | ||
<script data-csrftoken="{{ csrf_token }}" src="{% static 'djangocms_navigation/js/navigation-tree-admin.js' %}"></script> | ||
{% endblock %} | ||
|
||
{% block result_list %} | ||
{% if action_form and actions_on_top and cl.full_result_count %} | ||
{% admin_actions %} | ||
{% endif %} | ||
{% result_tree cl request %} | ||
{% if action_form and actions_on_bottom and cl.full_result_count %} | ||
{% admin_actions %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block object-tools-items %} | ||
<li> | ||
<a href="{% url opts|admin_urlname:'add' menu_content.pk %}" class="addlink"> | ||
{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %} | ||
</a> | ||
</li> | ||
<li> | ||
<a href="{% url opts|admin_urlname:'preview' menu_content.pk %}" class="cms-btn-group"> | ||
{% trans "Preview" %} | ||
</a> | ||
</li> | ||
{% if versioning_enabled_for_nav %} | ||
<li> | ||
<a href="{{ menu_content|url_version_list|safe }}"> | ||
{% trans "Versions" %} | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% endblock %} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
-r ./requirements_base.txt | ||
|
||
Django>=3.2,<4.0 | ||
django-treebeard<=4.5.1 |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
-r ./requirements_base.txt | ||
|
||
Django>=4.2,<5.0 | ||
django-treebeard>=4.6.0 |
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