mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-24 08:14:13 +03:00
Add context processor for settings variables (#2203)
Add context processor for settings variables
This commit is contained in:
commit
bb6320efc8
|
@ -187,6 +187,7 @@ TEMPLATES = [
|
|||
"django.template.context_processors.static",
|
||||
"django.template.context_processors.tz",
|
||||
"django.contrib.messages.context_processors.messages",
|
||||
"{{ cookiecutter.project_slug }}.utils.context_processors.settings_context",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
from django.conf import settings
|
||||
|
||||
|
||||
def settings_context(_request):
|
||||
return {"settings": settings}
|
Loading…
Reference in New Issue
Block a user