gis: Modifications to Django management commands to support creation of spatial tables.
|Reported by:||jbronn||Owned by:||nobody|
|Severity:||Keywords:||gis syncdb sql|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
This patch contains the following changes that enable the Django management commands to construct spatial SQL for PostGIS:
- The addition of the
_post_create_sqlhook. If a custom field has this function it will be called and its output will precede any other SQL generated by
sql.custom_sql_for_model. This works well, but I'm of course open to changes in the function name and/or the possibility of a post_table_create signal or something (doing after
post_syncdbwill not work).
- Although not required for GeoDjango having
custom_sql_for_modeltake the style object as a parameter allows for colorizing the generated spatial SQL -- the
syncdbcommands are modified to pass in their style object to