feat: add navigation context processor and update header template
All checks were successful
Build and Push Docker Image / build (push) Successful in 27s
All checks were successful
Build and Push Docker Image / build (push) Successful in 27s
- Created `navigation` context processor to manage `active` context
- Integrated the processor into Django settings
- Simplified `header.html` by removing `{% with %}` for `active` management
This commit is contained in:
2
santehray/context_processors.py
Normal file
2
santehray/context_processors.py
Normal file
@@ -0,0 +1,2 @@
|
||||
def navigation(request):
|
||||
return {"active": ""}
|
||||
@@ -205,6 +205,7 @@ TEMPLATES = [
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'santehray.context_processors.navigation',
|
||||
],
|
||||
'debug': DEBUG
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user