westerveltco / django-simple-nav

A simple, flexible, and extensible navigation menu for Django
https://django-simple-nav.westervelt.dev
MIT License
11 stars 0 forks source link

add `get_context_data` and `render` methods to `Nav` #39

Closed joshuadavidthomas closed 7 months ago

joshuadavidthomas commented 7 months ago

closes #35

joshuadavidthomas commented 7 months ago

Could also just do away with render_from_request class method and instantiate the nav in the template tag here, as it's the only place using it:

https://github.com/westerveltco/django-simple-nav/blob/cf7312f752fe1a0c5a6ce889226c2e2bae8a5421/src/django_simple_nav/templatetags/django_simple_nav.py#L48

return nav().render(context["request"], self.template_name)