equal
deleted
inserted
replaced
149 params: a dict with params for this View |
149 params: a dict with params for this View |
150 kwargs: the Key Fields for the specified entity |
150 kwargs: the Key Fields for the specified entity |
151 """ |
151 """ |
152 |
152 |
153 # find the application |
153 # find the application |
154 key_fields = club_app_logic.logic.getKeyFieldsFromDict(kwargs) |
154 key_fields = club_app_logic.logic.getKeyFieldsFromFields(kwargs) |
155 application = club_app_logic.logic.getFromFields(**key_fields) |
155 application = club_app_logic.logic.getFromKeyFields(key_fields) |
156 |
156 |
157 # extract the application fields |
157 # extract the application fields |
158 field_names = application.properties().keys() |
158 field_names = application.properties().keys() |
159 fields = dict( [(i, getattr(application, i)) for i in field_names] ) |
159 fields = dict( [(i, getattr(application, i)) for i in field_names] ) |
160 |
160 |
190 # fill in the founder of the club |
190 # fill in the founder of the club |
191 user = user_logic.logic.getForCurrentAccount() |
191 user = user_logic.logic.getForCurrentAccount() |
192 fields['founder'] = user |
192 fields['founder'] = user |
193 |
193 |
194 if not key_name: |
194 if not key_name: |
195 key_fields = self._logic.getKeyFieldsFromDict(fields) |
195 key_fields = self._logic.getKeyFieldsFromFields(fields) |
196 key_name = self._logic.getKeyNameForFields(key_fields) |
196 key_name = self._logic.getKeyNameFromFields(key_fields) |
197 |
197 |
198 # create the club entity |
198 # create the club entity |
199 entity = self._logic.updateOrCreateFromKeyName(fields, key_name) |
199 entity = self._logic.updateOrCreateFromKeyName(fields, key_name) |
200 |
200 |
201 # redirect to notifications list to see the admin invite |
201 # redirect to notifications list to see the admin invite |