Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#9620 closed (fixed)

Spatial database tables don't work right with AppCache routines

Reported by: jbronn Owned by: jbronn
Component: GIS Version: master
Severity: Keywords: gis models appcache loading
Cc: dane.springmeyer@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: UI/UX:

Description

Here's an example that assumes django.contrib.gis is in INSTALLED_APPS:

>>> from django.db import models
>>> app = models.get_app('gis')
>>> models.get_models(app)
[]

However, both SpatialRefSys and GeometryColumns are models that should appear (at least when using PostGIS and/or Oracle).

The attached patch adds app_label='gis' to the spatial backend models so they'll play nicely with the AppCache routines.

Attachments (1)

gis_app_labels.diff (1.3 KB) - added by jbronn 8 years ago.
Adds app_label to spatial backend models.

Download all attachments as: .zip

Change History (15)

Changed 8 years ago by jbronn

Attachment: gis_app_labels.diff added

Adds app_label to spatial backend models.

comment:1 Changed 8 years ago by jbronn

Status: newassigned

comment:2 Changed 8 years ago by jbronn

Resolution: fixed
Status: assignedclosed

(In [9482]) Fixed #9620 -- spatial database tables now have app_label set correctly.

comment:3 Changed 8 years ago by jbronn

(In [9483]) [1.0.X] Fixed #9620 -- spatial database tables now have app_label set correctly.

Backport of r9482 from trunk.

comment:4 Changed 8 years ago by jbronn

Patch needs improvement: set
Resolution: fixed
Status: closedreopened

comment:5 Changed 8 years ago by springmeyer

Just noticed that if these models are added to the appcache then they'll automatically be noticed by django fixtures (and added to the content types table) among likely many other functional parts of django. So, just a reminder to test fixtures behavior with any future patch options...

comment:6 Changed 8 years ago by springmeyer

Cc: dane.springmeyer@… added

comment:7 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:8 Changed 8 years ago by Jacob

Resolution: fixed
Status: reopenedclosed

Please open a seperate ticket for related stuff; don't reopen tickets that are marked fixed unless they're really not.

comment:9 in reply to:  8 Changed 8 years ago by jbronn

Replying to jacob:

Please open a seperate ticket for related stuff; don't reopen tickets that are marked fixed unless they're really not.

It's really not fixed (reverted initial fix in r9484 but screwed up reference to this ticket).

comment:10 Changed 8 years ago by jbronn

Resolution: fixed
Status: closedreopened

comment:11 Changed 8 years ago by jbronn

milestone: 1.1

comment:12 Changed 8 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

comment:13 Changed 8 years ago by jbronn

Resolution: fixed
Status: reopenedclosed

(In [10579]) Fixed #9620 -- GeometryColumns and SpatialRefSys models now play nice with the AppCache routines.

comment:14 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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