File tree Expand file tree Collapse file tree 6 files changed +17
-15
lines changed Expand file tree Collapse file tree 6 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ django-simple-menu changelog
3
3
4
4
Unreleased
5
5
- Test on Python 3.12
6
+ - Fix deprecation notice appearing whe it shouldn't (#153)
6
7
7
8
Version 2.1.3 - Released October 4th, 2023
8
9
- Stop testing under Python 3.6, 3.7, and Django 4.0 (#138, #140)
Original file line number Diff line number Diff line change 3
3
from simple_menu .menu import *
4
4
5
5
warnings .warn (
6
- "Importing from 'menu' will be removed in django-simple-menu v2.3 and/or "
7
- "v3.0. Use imports from 'simple_menu' package instead." ,
6
+ "Importing from 'menu' is deprecated. Import from 'simple_menu' instead. "
7
+ "The old import will be removed in django-simple-menu v3, but no earlier "
8
+ "than on 2024-04-01." ,
8
9
DeprecationWarning ,
9
10
stacklevel = 2
10
11
)
Original file line number Diff line number Diff line change 1
- from simple_menu .templatetags .menu import *
1
+ import warnings
2
+
3
+ from simple_menu .templatetags .simple_menu import *
4
+
5
+ warnings .warn (
6
+ "Loading from 'menu' is deprecated. Use '{% load simple_menu %}' instead. "
7
+ "The old template library will be removed in django-simple-menu v3, but "
8
+ "no earlier than on 2024-04-01." ,
9
+ DeprecationWarning ,
10
+ stacklevel = 2
11
+ )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ def test_template_tag(self):
217
217
"""
218
218
request = self .factory .get ('/parent3/kids3-1' )
219
219
out = Template (
220
- "{% load menu %}"
220
+ "{% load simple_menu %}"
221
221
"{% generate_menu %}"
222
222
"{% for item in menus.test %}"
223
223
"{{ item.title }},"
@@ -240,7 +240,7 @@ def test_template_tag_missing_attribute(self):
240
240
"""
241
241
request = self .factory .get ('/parent2/kids2-1' )
242
242
out = Template (
243
- "{% load menu %}"
243
+ "{% load simple_menu %}"
244
244
"{% generate_menu %}"
245
245
"{% for item in menus.test %}"
246
246
"{{ item.title }}{{ item.doesntexist }},"
You can’t perform that action at this time.
0 commit comments