#29682: Error in view permission with custom model form field
--------------------------------------+------------------------
               Reporter:  Jones       |          Owner:  nobody
                   Type:  Bug         |         Status:  new
              Component:  Forms       |        Version:  2.1
               Severity:  Normal      |       Keywords:
           Triage Stage:  Unreviewed  |      Has patch:  0
    Needs documentation:  0           |    Needs tests:  0
Patch needs improvement:  0           |  Easy pickings:  0
                  UI/UX:  0           |
--------------------------------------+------------------------
 - Set permission to user with only view to model
 - Create field in form class
 - Go to django admin view un object created

 {{{

 class ModelAForm(forms.ModelForm):

     class Meta:
         model = ModelA
         fields = '__all__'

     form_field = forms.BooleanField(
         label="Form Field",
         required=False,
         widget=forms.CheckboxInput()
     )


 class ModelA(models.Model):
     test = models.IntegerField(
         null=True,
         blank=True
     )

 @admin.register(ModelA)
 class ModelAAdmin(admin.ModelAdmin):

     form = TestForm

     fieldsets = (
         ('Test', {
             'fields': (
                 'test', 'form_field'
             )
         }),
     )
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29682>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/055.fc5bd00e0b3354e97a0540d06379cca2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to