Hi,
I'm currently trying to write a new app and I'm having the following issue:
When specifying a new field using DecimalField in models, and displaying it with SingleObjectDetailView in views, the field appears as editable - I have tried with the "Editable=False" option in models, but then Django crashes complaining when I try adding or show details for a item. I don't have any issues with CharField or TextField.
I suppose there's something that needs to be done in views to set the DecimalField as read-only, but I can't seem to be finding anything which works.
Thanks for your time.
Help needed when writing new app, DecimalField shows up as editable in SingleObjectDetailView
-
- Posts: 9
- Joined: Fri Jan 31, 2020 9:39 am
Re: Help needed when writing new app, DecimalField shows up as editable in SingleObjectDetailView
Hi,
Can you post a screenshot?
I added a temporary decimal number field and it shows as a read only form field.
Can you post a screenshot?
I added a temporary decimal number field and it shows as a read only form field.
Re: Help needed when writing new app, DecimalField shows up as editable in SingleObjectDetailView
I think I see what you meant. It should look like a plain value like the other fields.
Mayan EDMS doesn't use Decimal fields and the look in the template for decimal fields falls back to a standard read only field. If that is the case that can be added easy and we can push it to the bugfix version being worked on right now.
Mayan EDMS doesn't use Decimal fields and the look in the template for decimal fields falls back to a standard read only field. If that is the case that can be added easy and we can push it to the bugfix version being worked on right now.
-
- Posts: 9
- Joined: Fri Jan 31, 2020 9:39 am
Re: Help needed when writing new app, DecimalField shows up as editable in SingleObjectDetailView
Ok, thanks you for your support.
Re: Help needed when writing new app, DecimalField shows up as editable in SingleObjectDetailView
The update to support this was added in version 3.3.10. Sadly it also broke document previews.
Instead of removing it, we just fixed document previews and re-implemented the read only decimal field support.
This will be available in version 3.3.11 which should be ready in the next hours.
https://gitlab.com/mayan-edms/mayan-edm ... 289aac5a8e
Instead of removing it, we just fixed document previews and re-implemented the read only decimal field support.
This will be available in version 3.3.11 which should be ready in the next hours.
https://gitlab.com/mayan-edms/mayan-edm ... 289aac5a8e
-
- Posts: 9
- Joined: Fri Jan 31, 2020 9:39 am
Re: Help needed when writing new app, DecimalField shows up as editable in SingleObjectDetailView
Thank you for your help - much appreciated.