Django

Code

Ticket #9620 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

Spatial database tables don't work right with AppCache routines

Reported by: jbronn Assigned to: jbronn
Milestone: 1.1 Component: GIS
Version: SVN Keywords: gis models appcache loading
Cc: dane.springmeyer@gmail.com Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 1

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

gis_app_labels.diff (1.3 kB) - added by jbronn on 11/17/08 12:01:42.
Adds app_label to spatial backend models.

Change History

11/17/08 12:01:42 changed by jbronn

  • attachment gis_app_labels.diff added.

Adds app_label to spatial backend models.

11/17/08 12:02:01 changed by jbronn

  • status changed from new to assigned.
  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

11/17/08 12:18:55 changed by jbronn

  • status changed from assigned to closed.
  • resolution set to fixed.

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

11/17/08 12:22:40 changed by jbronn

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

Backport of r9482 from trunk.

11/17/08 12:47:46 changed by jbronn

  • status changed from closed to reopened.
  • needs_better_patch set to 1.
  • resolution deleted.

11/24/08 14:53:18 changed 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...

01/05/09 12:42:53 changed by springmeyer

  • cc set to dane.springmeyer@gmail.com.

02/25/09 13:51:44 changed by

  • milestone deleted.

Milestone post-1.0 deleted

(follow-up: ↓ 9 ) 02/26/09 16:40:51 changed by jacob

  • status changed from reopened to closed.
  • resolution set to fixed.

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 ) 03/07/09 20:27:31 changed 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).

03/07/09 20:29:32 changed by jbronn

  • status changed from closed to reopened.
  • resolution deleted.

03/09/09 18:43:11 changed by jbronn

  • milestone set to 1.1.

03/14/09 13:38:09 changed by Alex

  • stage changed from Unreviewed to Accepted.

04/16/09 17:25:02 changed by jbronn

  • status changed from reopened to closed.
  • resolution set to fixed.

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


Add/Change #9620 (Spatial database tables don't work right with AppCache routines)




Change Properties
Action