Re: [Django] #9858: pg test database not created with postgis template, tests fail

2009-01-02 Thread Django
#9858: pg test database not created with postgis template, tests fail
+---
  Reporter:  Aryeh Leib Taurog   | Owner:  
jbronn 
Status:  new| Milestone:
 
 Component:  GIS|   Version:  
1.0
Resolution: |  Keywords:  
test template_postgis create_spatial_db
 Stage:  Accepted   | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  0  |  
+---
Changes (by stryderjzw):

 * cc: stryder...@gmail.com (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9858: pg test database not created with postgis template, tests fail

2008-12-15 Thread Django
#9858: pg test database not created with postgis template, tests fail
+---
  Reporter:  Aryeh Leib Taurog   | Owner:  
jbronn 
Status:  new| Milestone:
 
 Component:  GIS|   Version:  
1.0
Resolution: |  Keywords:  
test template_postgis create_spatial_db
 Stage:  Accepted   | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  0  |  
+---
Changes (by jbronn):

  * owner:  nobody => jbronn
  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I ran into the problem as well this weekend when I tested the updated
 !GeoDjango installer (with 1.0.2) on Windows -- so it's a confirmed new
 issue (thanks for creating a ticket).  I came up with a similar patch that
 just assumed the existence of a PostGIS template -- but I like the idea of
 the `POSTGIS_TEMPLATE` setting more, and it could reduce some of that
 crufty spatial db creation code from the PostGIS spatial backend.

 I'm still wondering, however, why it ceased to work as it used to in my
 previous Windows VM.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #9858: pg test database not created with postgis template, tests fail

2008-12-15 Thread Django
#9858: pg test database not created with postgis template, tests fail
-+--
 Reporter:  Aryeh Leib Taurog |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  GIS  | Version:  1.0   
 Keywords:  test template_postgis create_spatial_db  |   Stage:  Unreviewed
Has_patch:  1|  
-+--
 After setting up geodjango with PostgreSQL 8.3, PostGIS 1.3.3, and the
 win32 geodjango installer, an attempt to run the gis tests fails.

 I am using the django 1.0.2 release (and geodjango code included
 therewith) under Python 2.5 on Win XP Pro

 The source of the error seems to be that the addgeometrycolumn procedure
 does not exist in the test database.

 from settings.py:
 {{{
 #!python
 TEST_RUNNER = 'django.contrib.gis.tests.run_gis_tests'
 POSTGIS_SQL_PATH= 'D:/generic/PostgreSQL/8.3/share/contrib'
 }}}

 from test output:
 {{{
 Installing custom SQL for geoapp.Country model
 Failed to install custom SQL for geoapp.Country model: function
 addgeometrycolumn(unknown, unknown, integer, unknown, integer) does not
 exist
 LINE 1: SELECT AddGeometryColumn('geoapp_country', 'mpoly', 4326, 'M...
^
 HINT:  No function matches the given name and argument types. You might
 need to add explicit type casts.

 }}}

 complete log file attached.

 The geodjango docs state that a spacial database is created using the
 template template_postgis.  In tracing the error noted above, I discovered
 that the test database is created with no template.  This seems to account
 for the missing procedure.

 I patched
 
source:django/tags/releases/1.0.2/django/contrib/gis/db/backend/postgis/creation.py
 with a modified '''_create_with_cursor''', called by
 '''create_spatial_db''', using a new setting to specify the template name.
 It seems to me that '''get_cmd_options''' should similarly be modified.

 The tests are successful with my patch applied (log file attached)

 I'm perplexed to find no mention of this anywhere.  Is there something I'm
 missing?  Does the gis test work for everyone else without using the
 template?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---