Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#9620 closed (fixed)

Spatial database tables don't work right with AppCache routines

Reported by: jbronn Owned by: jbronn
Component: GIS Version: dev
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: no UI/UX: no

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 16 years ago.
Adds app_label to spatial backend models.

Download all attachments as: .zip

Change History (15)

by jbronn, 16 years ago

Attachment: gis_app_labels.diff added

Adds app_label to spatial backend models.

comment:1 by jbronn, 16 years ago

Status: newassigned

comment:2 by jbronn, 16 years ago

Resolution: fixed
Status: assignedclosed

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

comment:3 by jbronn, 16 years ago

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

Backport of r9482 from trunk.

comment:4 by jbronn, 16 years ago

Patch needs improvement: set
Resolution: fixed
Status: closedreopened

comment:5 by springmeyer, 16 years ago

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 by springmeyer, 16 years ago

Cc: dane.springmeyer@… added

comment:7 by (none), 16 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:8 by Jacob, 16 years ago

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.

in reply to:  8 comment:9 by jbronn, 16 years ago

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

Resolution: fixed
Status: closedreopened

comment:11 by jbronn, 16 years ago

milestone: 1.1

comment:12 by Alex Gaynor, 16 years ago

Triage Stage: UnreviewedAccepted

comment:13 by jbronn, 16 years ago

Resolution: fixed
Status: reopenedclosed

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

comment:14 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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