specialunderwear / django-easymode

Quickly build backends for flash/flex websites with Django.
GNU General Public License v3.0
33 stars 20 forks source link

Django 1.3, 1.4 admin readonly fields problem #13

Open RoelWKramer opened 11 years ago

RoelWKramer commented 11 years ago

In Django 1.3 and 1.4 it's possible to have readonly fields in the admin. admin.ModelAdmin.readonly_fields = ('fields', )

Easymode, however, does not understand it. When submitting a form, it makes the form invalid. It should not validate the field at all. I created a test to demonstrate it. https://gist.github.com/4336937

Also the readonly field is displayed twice.

I used this easymode version: pip install git+https://github.com/specialunderwear/django-easymode.git@a978994c9410b7706c4a2935d596e172a9c8055a#egg=django_easymode-dev

The test which fails is: test_form_submit_submit_readonly. We suspect the L10N decorator to screw things up.

specialunderwear commented 11 years ago

Awesome bug report. Will look at it when I've got time.