app/soc/views/models/base.py
changeset 409 9d24850db88f
parent 407 3cf5630d86d1
child 410 2af7f84f4fc7
equal deleted inserted replaced
408:7cd6bdfbf95c 409:9d24850db88f
    24 
    24 
    25 from django import http
    25 from django import http
    26 from django.utils.translation import ugettext_lazy
    26 from django.utils.translation import ugettext_lazy
    27 
    27 
    28 import soc.logic
    28 import soc.logic
       
    29 import soc.logic.dicts
    29 import soc.logic.out_of_band
    30 import soc.logic.out_of_band
    30 import soc.views.helper.lists
    31 import soc.views.helper.lists
    31 import soc.views.helper.responses
    32 import soc.views.helper.responses
    32 import soc.views.out_of_band
    33 import soc.views.out_of_band
    33 
    34 
   286     entity = None
   287     entity = None
   287 
   288 
   288     try:
   289     try:
   289       entity = self._logic.getIfFields(**kwargs)
   290       entity = self._logic.getIfFields(**kwargs)
   290     except soc.logic.out_of_band.ErrorResponse, error:
   291     except soc.logic.out_of_band.ErrorResponse, error:
   291       template = self._params['create_template']
   292       template = self._params['edit_template']
   292       error.message = error.message + self.DEF_CREATE_NEW_ENTITY_MSG % {
   293       error.message = error.message + self.DEF_CREATE_NEW_ENTITY_MSG % {
   293           'entity_type_lower' : self._params['name'].lower(),
   294           'entity_type_lower' : self._params['name'].lower(),
   294           'entity_type' : self._params['name'],
   295           'entity_type' : self._params['name'],
   295           'create' : self._params['create_redirect']
   296           'create' : self._params['create_redirect']
   296           }
   297           }