Django Form Not Displaying in Template
<p>I am trying to create an "edit profile" page/form and have followed the SimpleIsBetterThanComplex tutorial on how to extend the user model by way of the OneToOne Link. However, when i try to display the user profile form to allow the user to update their profile, the form doesn't display at all except for the Submit button... Any ideas where i might have gone wrong here?</p>

<p><strong>models.py</strong></p>

<pre><code>from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils import timezone

class Profile(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)

    #account types
    is_userA = models.BooleanField('User A', default=True)
    is_userB = models.BooleanField('User B', default=False)
    is_superuser = models.BooleanField('SuperUser', default=False)

    #other fields here
    avatar = models.ImageField('avatar', upload_to='static/media/images/avatars/', null=True, blank=True)
    phone = models.CharField('phone number', max_length=20, blank=True, default='')
    address = models.CharField('address', max_length=100, default='', blank=True)
    city = models.CharField('city', max_length=100, default='', blank=True)
    state = models.CharField('state', max_length=2, default='', blank=True)
    country = models.CharField('country', max_length=100, default='', blank=True)
    date_joined = models.DateTimeField(default=timezone.now)

    @receiver(post_save, sender=User)
    def create_user_profile(sender, instance, created, **kwargs):
        if created:
            Profile.objects.create(user=instance)

    @receiver(post_save, sender=User)
    def save_user_profile(sender, instance, **kwargs):
        instance.profile.save()
</code></pre>

<p><strong>forms.py</strong></p>

<pre><code>class UserForm(forms.ModelForm):
    class Meta:
        model = User
        fields = ('first_name', 'last_name', 'email')
</code></pre>

<p><strong>views.py</strong></p>

<pre><code>@login_required
@transaction.atomic
def update_profile(request):
    if request.method == 'POST':
        user_form = UserForm(request.POST, instance=request.user)
        if user_form.is_valid():
            user_form.save()
            messages.success(request, _('Your profile was successfully updated!'))
            return redirect('settings:profile')
        else:
            messages.error(request, _('Please correct the error below.'))
    else:
        user_form = UserForm(instance=request.user)
    return render(request, 'profiles/profile.html', {
        'user_form': user_form,
    })
</code></pre>

<p><strong>template</strong></p>

<pre><code>&lt;div class="col-md-12"&gt;
  &lt;div class="mb32"&gt;
    &lt;h5 class="uppercase"&gt;General Information&lt;/h5&gt;
  &lt;/div&gt;
  &lt;div class="row"&gt;
  &lt;form method="post"&gt;
    {% csrf_token %}
    {{ user_form.as_p }}
    &lt;button type="submit"&gt;Save changes&lt;/button&gt;
  &lt;/form&gt;
</code></pre>