title: Can a field be disabled in View.py of Django project?
body: <pre><code>def resume_edit(request, r_id):
  
      r = Resume.get.object(pk=r_id)
      resume = ResumeModelForm(instance=r)
  
      resume.fields['email'].widget.attrs['readonly'] = True 
  
      return render(request, 'resumes/resume.html', context)
  </code></pre>
  
  <p>I tried to do this but its not working, i know how to do it in Forms.py , but i want to know in views its possible or not? </p>
  
  <p>Im using Django 2.0</p>