Hello everyone,

So I've decided for my GeoDjango application I want WGS84 along with a 
geography database column, rather than geometry.

I was reading here:

https://docs.djangoproject.com/en/1.4/ref/contrib/gis/model-api/#geography

GeometryField.geography<https://docs.djangoproject.com/en/1.4/ref/contrib/gis/model-api/#django.contrib.gis.db.models.GeometryField.geography>

If set to True, this option will create a database column of type 
geography, rather than geometry. Please refer to the geography 
type<https://docs.djangoproject.com/en/1.4/ref/contrib/gis/model-api/#geography-type>
 section 
below for more details.


that to set up a new column as geography I had to 
set GeometryField.geography = True.

I am unsure of the syntax of how to do this? There was no example given. Or 
where to properly place this line?

Here is the model.py file I am working on. If you could tell me where to 
fit this in that would be great?


from django.contrib.gis.db import models

class Artist(models.Model):
    name = models.CharField(max_length=30)
    genre = models.CharField(max_length=30)
    city = models.CharField(max_length=60)
    state = models.CharField(max_length=30)
    country = models.CharField(max_length=50)
    website = models.URLField()
    objects = models.GeoManager()

    def __unicode__(self):
       return self.name



Thanks so much,

JJ

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Sr6dFDSf5-MJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to