app/soc/views/models/site.py
changeset 708 89f1a8c2ea59
parent 706 19f55eb5f194
child 710 edb5dbb1dea7
equal deleted inserted replaced
707:26a95753cd99 708:89f1a8c2ea59
    67 
    67 
    68     Params:
    68     Params:
    69       params: a dict with params for this View
    69       params: a dict with params for this View
    70     """
    70     """
    71 
    71 
       
    72     rights = {}
       
    73     rights['unspecified'] = [access.checkIsDeveloper]
       
    74     rights['any_access'] = [access.allow]
       
    75     rights['public'] = [access.allow]
       
    76 
    72     new_params = {}
    77     new_params = {}
    73     new_params['logic'] = soc.logic.models.site.logic
    78     new_params['logic'] = soc.logic.models.site.logic
       
    79     new_params['rights'] = rights
    74 
    80 
    75     # TODO(alturin): add ugettext_lazy ?
    81     # TODO(alturin): add ugettext_lazy ?
    76     new_params['name'] = "Site Settings"
    82     new_params['name'] = "Site Settings"
    77     new_params['name_short'] = "Site"
    83     new_params['name_short'] = "Site"
    78     new_params['name_plural'] = "Site Settings"
    84     new_params['name_plural'] = "Site Settings"
    85 
    91 
    86     new_params['sidebar_defaults'] = [('/%s/edit', 'Edit %(name)s', 'edit')]
    92     new_params['sidebar_defaults'] = [('/%s/edit', 'Edit %(name)s', 'edit')]
    87     new_params['sidebar_heading'] = new_params['name_short']
    93     new_params['sidebar_heading'] = new_params['name_short']
    88 
    94 
    89     new_params['public_template'] = 'soc/home/public.html'
    95     new_params['public_template'] = 'soc/home/public.html'
    90 
       
    91     new_params['rights'] = {
       
    92       'unspecified': [access.checkIsDeveloper],
       
    93       'any_access': [access.allow],
       
    94       'public': [access.allow]
       
    95       }
       
    96 
    96 
    97     patterns = []
    97     patterns = []
    98 
    98 
    99     page_name = "Home Page"
    99     page_name = "Home Page"
   100     patterns += [(r'^$', 'soc.views.models.%(module_name)s.main_public', 
   100     patterns += [(r'^$', 'soc.views.models.%(module_name)s.main_public',