diff --git a/GeneralApp/admin.py b/GeneralApp/admin.py index 0ba1027..1d349b1 100644 --- a/GeneralApp/admin.py +++ b/GeneralApp/admin.py @@ -217,12 +217,12 @@ class Admin_Option(Admin_Trans_BaseModel): (_('Контент'), { 'classes': ['wide'], 'fields': ( - 'name', 'opt_type', 'prefix', 'value', 'picture' + 'name', 'opt_type', 'order', 'prefix', 'value', 'picture' ) }), ] - list_display = ['image_thumb', 'opt_type', 'name', 'prefix', 'value'] + list_display = ['image_thumb', 'opt_type', 'name', 'order', 'value', 'prefix'] list_editable = ['value', 'prefix'] list_filter = ['opt_type'] diff --git a/GeneralApp/funcs.py b/GeneralApp/funcs.py index e41143a..80f6a38 100644 --- a/GeneralApp/funcs.py +++ b/GeneralApp/funcs.py @@ -5,6 +5,13 @@ def get_logo_url(): theme = get_admin_interface_theme() return theme.logo.url + +def get_footer_contacts(): + from .models import Option + options = Option.objects.footer(enable=True, opt_type='footer_contacts') + return options + + def get_inter_Dict(user, context_Dict): form_name = None @@ -36,7 +43,8 @@ def get_inter_Dict(user, context_Dict): Dict.update({ 'sections': sections, 'logo': get_logo_url(), - 'hide_form_field_description': hide_form_field_description + 'hide_form_field_description': hide_form_field_description, + 'footer_contacts': get_footer_contacts(), }) # from SubscribesApp.funcs import get_cur_user_subscribe # user_subscribe = get_cur_user_subscribe(user)