Add SiteSettings model with currency_symbol field and replace hardcoded currency symbols in templates
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from .models import FooterSettings
|
||||
from .models import FooterSettings, SiteSettings
|
||||
|
||||
|
||||
def footer_settings(request):
|
||||
@@ -11,3 +11,12 @@ def footer_settings(request):
|
||||
return {
|
||||
'footer_settings': footer
|
||||
}
|
||||
|
||||
|
||||
def site_settings(request):
|
||||
"""Context processor для глобальных настроек сайта"""
|
||||
settings = SiteSettings.get_settings()
|
||||
return {
|
||||
'site_settings': settings,
|
||||
'currency_symbol': settings.currency_symbol,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user