Opened 7 years ago

Last modified 4 years ago

#12504 assigned Bug

django.contrib.gis.admin.GeoModelAdmin ignores ModelAdmin.readonly_fields

Reported by: friism Owned by: jbronn
Component: GIS Version: master
Severity: Normal Keywords: geodjango admin readonly_fields
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When using admin.GeoModelAdmin (or admin.OSMGeoAdmin), 'readonly_fields' (a feature currently only available in django svn) are not respected and the fields are rendered as editable (and can be changed). Strangely, using admin.GeoModelAdmin also makes non-geometry readonly fields editable. This, in spite of contrib/gis/admin/options.py clearly delegating field rendering of non-geometry fields to super (in this case ModelAdmin and then BaseModelAdmin).

Change History (8)

comment:1 Changed 7 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 6 years ago by jbronn

(In [12995]) Fixed #11810 -- Fixed typo and errors that prevented modifiable from working in the geographic admin. Thanks to Rob Coup for the bug report. Refs #12504.

comment:3 Changed 6 years ago by jbronn

Owner: changed from nobody to jbronn
Status: newassigned

comment:4 Changed 6 years ago by jbronn

milestone: 1.3

comment:5 Changed 6 years ago by jbronn

(In [12996]) [1.1.X] Fixed #11810 -- Fixed typo and errors that prevented modifiable from working in the geographic admin. Thanks to Rob Coup for the bug report. Refs #12504.

Backport of r12995 from trunk.

comment:6 Changed 6 years ago by Matt McClanahan

milestone: 1.3
Severity: Normal
Type: Bug

comment:7 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset
UI/UX: unset

#14643 was a duplicate.

comment:8 Changed 4 years ago by Aymeric Augustin

Triage Stage: Design decision neededAccepted

I'm not sure what design decision is needed here, this is a bug.

Note: See TracTickets for help on using tickets.
Back to Top