diff options
Diffstat (limited to 'app/birds/models.py')
-rw-r--r-- | app/birds/models.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/birds/models.py b/app/birds/models.py index 4f7ae51..3dd0add 100644 --- a/app/birds/models.py +++ b/app/birds/models.py @@ -1,6 +1,6 @@ import datetime from django.contrib.gis.db import models -from locations.models import BirdingLocation +from locations.models import Location def get_upload_path(self, filename): return "images/bird-images/%s/%s" %(datetime.datetime.today().strftime("%Y"), filename) @@ -37,7 +37,8 @@ class Bird(models.Model): class BirdSighting(models.Model): bird = models.ForeignKey(Bird) - location = models.ForeignKey(BirdingLocation) + point = models.PointField() + location = models.ForeignKey(Location) date = models.DateTimeField('Date') image = models.FileField(upload_to=get_upload_path, null=True,blank=True) |