Django 1.9 Crispy forms 1.6: multiple forms issue
<p>I 'm writing an app in Django 1.9 and installed Crispy forms 1.6 (using bootstrap3 template pack).
In that app, I have a profile model, next to the standard User model.
Now, I want to allow the users to modify their profile, and I want to display both User fields and Profile fields on one page. The Profile model contains an avatar, which I want to display on to of the page, followed by some fields from the User model, and after that the rest of the Profile form's fields.
Something like:</p>

<pre><code>&gt; Avatar (Profile model)
&gt; First name (User model)
&gt; Last name (User model)
&gt; E-mail address (User model)
&gt; Street (Profile model)
&gt; ZIP (Profile model)
&gt; Country (Profile model)
&gt; Website (Profile model)
</code></pre>

<p>I've written 2 Forms:</p>

<pre><code>class UserForm(forms.ModelForm)
class ProfileForm(forms.ModelForm)
</code></pre>

<p>Both extended with the Crispy forms "FormHelper"</p>

<p>In my template, I render the forms as:
    <code>{% crispy pform %}</code> (profile form)
    <code>{% crispy uform %}</code> (user form)</p>

<p>But, of course, that does not display the fields as I described earlier.</p>

<p>Does anyone know how I can tackle this problem?</p>

<p>Kind regards!</p>

<p>Wim</p>

<p>Why you dont create a form as you desire and render fields one by one?</p>

<pre><code>&lt;form&gt;
    {{ pform.avatar|as_crispy_field }}
    {{ uform.first_name|as_crispy_field }}
    ...
&lt;/form&gt;
</code></pre>

<p>You may want to initialize forms with different prefixes.</p>

python django forms django-crispy-forms