v0.7.0
This is a pretty big release, with a major refactor of the internals of the library and a number of breaking changes, which you can find below. Please read the CHANGELOG
for more info.
🚨 Breaking Changes 🚨
There are a handful of breaking changes in this release.
- Django 3.2 support has been dropped. (#91)
- Internals of library have been refactored to slightly simplify it, including
Nav
,NavGroup
,NavItem
and thedjango_simple_nav
templatetag. (#89, #95) - The
extra_context
attribute ofNavItem
andNavGroup
now only renders the contents of the dictionary to the template context. Previously it did that as well as providedextra_context
to the context. If this sounds confusing, that's because it kinda is. 😅 This basically just means instead of two places to get the extra context (extra_context
and the keys provided within theextra_context
attribute), there is now just one (the keys provided within theextra_context
attribute). (#89) NavGroup
is now marked as active if the request path matches its URL (if set) or one of its items' URLs. (#105)Nav.get_items
now returns a list ofNavGroup
orNavItem
, instead of a list ofRenderedNavItem
. (#89)RenderedNavItem
has been removed and it's functionality refactored into bothNavItem
andNavGroup
. This should not affect the public API of this library, but I thought it should be noted. (#89)django_simple_nav.permissions
module has been removed and it's functionality refactored intoNavItem
. (#89)
What's Changed
- move
request.user
check to earlier incheck_item_permissions
by @joshuadavidthomas in #76 - [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #77
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #78
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #80
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #81
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #82
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #83
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #84
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #85
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #86
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #87
- add basedpyright config and convert
Any
toobject
hints by @joshuadavidthomas in #88 - simplify
Nav
rendering by @joshuadavidthomas in #89 - bump template to v2024.20 and drop support for Django 3.2 by @joshuadavidthomas in #91
- add ability for permission to be a callable by @joshuadavidthomas in #92
- Update README to include required setting changes by @joshuadavidthomas in #94
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #93
- refactor templatetag and add type hints by @joshuadavidthomas in #95
- add
get_template
toNav
by @joshuadavidthomas in #96 - fix active url detection by @joshuadavidthomas in #98
- fix permission checks for multiple perms and
NavGroup
by @joshuadavidthomas in #99 - refactor and shore up test suite by @joshuadavidthomas in #100
- refactor
get_context_data
by @joshuadavidthomas in #103 - add
NavItem.get_items
by @joshuadavidthomas in #104 NavGroup
now marked as active if any item URLs are active by @joshuadavidthomas in #105- add
_templates.get_template_engine
tests by @joshuadavidthomas in #106 - add tests for
django_simple_nav
templatetag to round out coverage by @joshuadavidthomas in #107 - 🔖 bump version 0.6.0 -> 0.7.0 by @joshuadavidthomas in #108
Full Changelog: v0.6.0...v0.7.0