title: Different form fields for add and change view in Django admin
body: <p>I want to display different form fields for add and change view in Django admin.</p>
  
  <p>If it is <code>add</code> then I am showing the form field <code>file_upload</code> and if it is <code>change</code> then I am showing model fields <code>cname</code> and <code>mname</code></p>
  
  <p>Code from admin.py</p>
  
  <pre><code>class couplingAdmin(admin.ModelAdmin):
      list_display = ('cname','mname')
      form = CouplingUploadForm #upload_file is here
  
      def get_form(self, request, obj=None, **kwargs):
          # Proper kwargs are form, fields, exclude, formfield_callback
          if obj: # obj is not None, so this is a change page
              kwargs['exclude'] = ['upload_file',]
          else: # obj is None, so this is an add page
              kwargs['exclude'] = ['cname','mname',]
          return super(couplingAdmin, self).get_form(request, obj, **kwargs)
  </code></pre>
  
  <p>If it is <code>add</code> then it's fine but if it is <code>change</code> view then I am getting all the fields ie cname,mname,upload_file.</p>
  
  <p>Please suggest how can I remove <code>upload_file</code> from change view in admin.</p>
  
  <p>Any help is highly appreciated. Thanks in advance.</p>