title: views.py for extended user model by onetoone to add profile information
body: <p>I am extending <code>User</code> model to add profile information using onetoone relation. The user should be able to change the basic user profile info.
  What should be the <code>views</code> to add such functionality? </p>
  
  <p>Here is my model</p>
  
  <p><strong>Models.py</strong> </p>
  
  <pre><code>class UserProfile(models.Model):
  user = models.OneToOneField(User, on_delete=models.CASCADE)
  description = models.CharField(max_length=100, default='No description field')
  city = models.CharField(max_length=100, default='Location not added')
  phone = models.CharField(max_length=10, default='',blank= True)
  image = models.ImageField(upload_to='products/profile/%Y%/%m/%d', blank=True)
  
  def __str__(self):
      return self.user.username
  </code></pre>
  
  <p>Here is my form</p>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class UserForm(forms.ModelForm):
  
  class Meta():
      model = UserProfile
      fields = ['description', 'city', 'phone', 'image']
  </code></pre>
  
  <p>What should I include in my views?</p>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>@login_required()
  def edit_profile(request):
  pass
  </code></pre>
  
  <p>I want to update the model the extended <strong>UserProfile</strong> instance in a way that the previous info gets overwritten and the new information is updated.</p>