equal
deleted
inserted
replaced
386 if 'key_name' in form.fields: |
386 if 'key_name' in form.fields: |
387 form.fields['key_name'].initial = entity.key().name() |
387 form.fields['key_name'].initial = entity.key().name() |
388 |
388 |
389 self._editGet(request, entity, form) |
389 self._editGet(request, entity, form) |
390 else: |
390 else: |
|
391 seed = seed if seed else {} |
|
392 self._editSeed(request, seed) |
|
393 |
391 if seed: |
394 if seed: |
392 self._editSeed(request, seed) |
|
393 form = params['create_form'](initial=seed) |
395 form = params['create_form'](initial=seed) |
394 else: |
396 else: |
395 form = params['create_form']() |
397 form = params['create_form']() |
396 |
398 |
397 return self._constructResponse(request, entity, context, form, params) |
399 return self._constructResponse(request, entity, context, form, params) |
639 Args: |
641 Args: |
640 request: the django request object |
642 request: the django request object |
641 seed: the fields to seed the create page with |
643 seed: the fields to seed the create page with |
642 """ |
644 """ |
643 |
645 |
644 pass |
646 field = request.GET.get('field', None) |
|
647 value = request.GET.get('value', None) |
|
648 |
|
649 if field and value: |
|
650 seed[field] = value |
645 |
651 |
646 def _constructResponse(self, request, entity, context, form, params): |
652 def _constructResponse(self, request, entity, context, form, params): |
647 """Updates the context and returns a response for the specified arguments. |
653 """Updates the context and returns a response for the specified arguments. |
648 |
654 |
649 Args: |
655 Args: |