Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 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 5 years ago.
Adds app_label to spatial backend models.

Download all attachments as: .zip

Change History (15)

Changed 5 years ago by jbronn

Adds app_label to spatial backend models.

comment:1 Changed 5 years ago by jbronn

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 5 years ago by jbronn

  • Resolution set to fixed
  • Status changed from assigned to closed

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

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

  • Patch needs improvement set
  • Resolution fixed deleted
  • Status changed from closed to reopened

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

  • Cc dane.springmeyer@… added

comment:7 Changed 5 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:8 follow-up: Changed 5 years ago by jacob

  • Resolution set to fixed
  • Status changed from reopened to closed

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

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:11 Changed 5 years ago by jbronn

  • milestone set to 1.1

comment:12 Changed 5 years ago by Alex

  • Triage Stage changed from Unreviewed to Accepted

comment:13 Changed 5 years ago by jbronn

  • Resolution set to fixed
  • Status changed from reopened to closed

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

comment:14 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.