Django - Global navigation in base.html using model
问题 I have a number of templates that extend base.html . I want the base.html template to house my global navigation and have the text and links in the global navigation be based on a model Division (i.e. the CharField in the model will be used as the button text in the global nav, and the id will be used to build the URL). I thought tags might work, but what I end up with is this (yes, I'm new to Django and Python): current_tags.py from django import template # Import your model from libs