Opened 15 years ago

Closed 8 years ago

#12504 closed Bug (fixed)

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

Reported by: friism Owned by: Krzysztof Żuraw
Component: GIS Version: dev
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 (10)

comment:1 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by jbronn, 15 years ago

(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 by jbronn, 15 years ago

Owner: changed from nobody to jbronn
Status: newassigned

comment:4 by jbronn, 15 years ago

milestone: 1.3

comment:5 by jbronn, 15 years ago

(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 by Matt McClanahan, 14 years ago

milestone: 1.3
Severity: Normal
Type: Bug

comment:7 by Aymeric Augustin, 13 years ago

Easy pickings: unset
UI/UX: unset

#14643 was a duplicate.

comment:8 by Aymeric Augustin, 12 years ago

Triage Stage: Design decision neededAccepted

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

comment:9 by Krzysztof Żuraw, 8 years ago

Owner: changed from jbronn to Krzysztof Żuraw

comment:10 by Krzysztof Żuraw, 8 years ago

Resolution: fixed
Status: assignedclosed

I couldn't reproduce it in django 1.10

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