Opened 6 years ago

Last modified 2 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 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 5 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 5 years ago by jbronn

  • Owner changed from nobody to jbronn
  • Status changed from new to assigned

comment:4 Changed 5 years ago by jbronn

  • milestone set to 1.3

comment:5 Changed 5 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 4 years ago by mattmcc

  • milestone 1.3 deleted
  • Severity set to Normal
  • Type set to Bug

comment:7 Changed 4 years ago by aaugustin

  • Easy pickings unset
  • UI/UX unset

#14643 was a duplicate.

comment:8 Changed 2 years ago by aaugustin

  • Triage Stage changed from Design decision needed to Accepted

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