1
처음으로 django-profiles과 작업 중이므로 기본 사항이 누락되었을 수 있습니다.장고 프로필, 지역 프로필이있는 사용자 프로필?
지리 정보 필드가 포함 된 UserProfile 모델을 만들고 싶습니다. 이 라인을 따라 구체적으로 뭔가 :
class UserProfile(models.Model):
user = models.OneToOneField(User)
phone = PhoneNumberField()
address = models.CharField(max_length=200)
distance = models.IntegerField()
zone = models.ForeignKey(Hood, null=True, blank=True)
location = models.PointField(srid=900913, null=True, blank=True)
objects = models.GeoManager()
나는 contrib.gis.db에서 모델을 가져, 또한 인증에서 일반 사용자 모델을 수입하고있다. 당신이 models.py이 줄을 추가해야하며, 그 이후 모델로 아무것도 가져 오지 않은
AttributeError: 'module' object has no attribute 'PointField'