Changes between Initial Version and Version 1 of Ticket #27240


Ignore:
Timestamp:
Sep 18, 2016, 11:58:52 PM (8 years ago)
Author:
Alexey Rogachev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27240 – Description

    initial v1  
    99}}}
    1010
    11 I need to fill this parameter with `request.user` value. In frontend I use the method recommended in [https://docs.djangoproject.com/en/1.9/topics/forms/formsets/#passing-custom-parameters-to-formset-forms docs]
     11I need to fill this parameter with `request.user` value. In frontend I use the method recommended in [https://docs.djangoproject.com/en/1.9/topics/forms/formsets/#passing-custom-parameters-to-formset-forms docs] (code omitted for brevity).
    1212
    1313{{{#!python
     
    1515AttachmentFormSet = generic_inlineformset_factory(Attachment, form=AttachmentForm, max_num=3, validate_max=True)
    1616if request.method == 'POST':
    17     form = EnterpriseForm(request.POST, request.FILES, instance=enterprise, user=request.user)
    1817    attachment_formset = AttachmentFormSet(request.POST, request.FILES, instance=enterprise, form_kwargs = {'user': request.user})
    19     # ...
    2018else:
    21     form = EnterpriseForm(instance=enterprise, user=request.user)
    2219    attachment_formset = AttachmentFormSet(instance=enterprise, form_kwargs = {'user': request.user})
    2320# ...
Back to Top