app/soc/views/helper/responses.py
changeset 534 c31cfbf1a20f
parent 513 3c1e16637ad7
child 578 0f34318f5693
equal deleted inserted replaced
533:ba3309b2fd30 534:c31cfbf1a20f
    28 from django import http
    28 from django import http
    29 from django.template import loader
    29 from django.template import loader
    30 
    30 
    31 from soc.logic import accounts
    31 from soc.logic import accounts
    32 from soc.logic import system
    32 from soc.logic import system
    33 from soc.logic.models import site_settings
    33 from soc.logic.models import site
    34 from soc.views import helper
    34 from soc.views import helper
    35 from soc.views.sitemap import sidebar
    35 from soc.views.sitemap import sidebar
    36 
    36 
    37 import soc.logic
    37 import soc.logic
    38 import soc.logic.models.user
    38 import soc.logic.models.user
   105   context['is_debug'] = system.isDebug()
   105   context['is_debug'] = system.isDebug()
   106   context['sign_in'] = users.create_login_url(request.path)
   106   context['sign_in'] = users.create_login_url(request.path)
   107   context['sign_out'] = users.create_logout_url(request.path)
   107   context['sign_out'] = users.create_logout_url(request.path)
   108   context['sidebar_menu_items'] = sidebar.SIDEBAR
   108   context['sidebar_menu_items'] = sidebar.SIDEBAR
   109 
   109 
   110   settings = site_settings.logic.getFromFields(
   110   settings = site.logic.getFromFields(
   111       scope_path=site_settings.logic.DEF_SITE_SETTINGS_SCOPE_PATH,
   111       scope_path=site.logic.DEF_SITE_SCOPE_PATH,
   112       link_id=site_settings.logic.DEF_SITE_SETTINGS_LINK_ID)
   112       link_id=site.logic.DEF_SITE_LINK_ID)
   113   
   113   
   114   if settings:
   114   if settings:
   115     context['ga_tracking_num'] = settings.ga_tracking_num
   115     context['ga_tracking_num'] = settings.ga_tracking_num
   116   
   116   
   117   return context
   117   return context