app/soc/views/models/request.py
changeset 502 e1e24c0a4e82
parent 499 d22e4fe8e64b
child 504 25156c768e7f
equal deleted inserted replaced
501:be89bf307478 502:e1e24c0a4e82
   103     rights = {}
   103     rights = {}
   104 
   104 
   105     params['name'] = "Request"
   105     params['name'] = "Request"
   106     params['name_short'] = "Request"
   106     params['name_short'] = "Request"
   107     params['name_plural'] = "Requests"
   107     params['name_plural'] = "Requests"
       
   108     params['url_name'] = "request"
       
   109     params['module_name'] = "request"
   108 
   110 
   109     params['edit_form'] = EditForm
   111     params['edit_form'] = EditForm
   110     params['create_form'] = CreateForm
   112     params['create_form'] = CreateForm
   111 
   113 
   112     # TODO(tlarsen) Add support for Django style template lookup
   114     # TODO(tlarsen) Add support for Django style template lookup
   121       'list_heading': 'soc/request/list/request_heading.html',
   123       'list_heading': 'soc/request/list/request_heading.html',
   122     }
   124     }
   123 
   125 
   124     params['sidebar_defaults'] = [('/%s/list', 'List %(plural)s')]
   126     params['sidebar_defaults'] = [('/%s/list', 'List %(plural)s')]
   125 
   127 
   126     params['delete_redirect'] = '/request/list'
   128     params['delete_redirect'] = '/' + params['url_name'] + '/list'
   127     params['create_redirect'] = '/request'
   129     params['create_redirect'] = '/'.join(params['url_name'])
   128 
   130 
   129     params['save_message'] = [ugettext_lazy('Request saved.')]
   131     params['save_message'] = [ugettext_lazy('Request saved.')]
   130 
   132 
   131     params['edit_params'] = {
   133     params['edit_params'] = {
   132         self.DEF_SUBMIT_MSG_PARAM_NAME: self.DEF_SUBMIT_MSG_PROFILE_SAVED,
   134         self.DEF_SUBMIT_MSG_PARAM_NAME: self.DEF_SUBMIT_MSG_PROFILE_SAVED,