diff options
author | luxagraf <sng@luxagraf.net> | 2022-12-27 20:06:03 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2022-12-27 20:06:03 -0600 |
commit | d9a1c04b1f56eeb6ccdf494e20a449a0e3ec9546 (patch) | |
tree | 5c863455cc6b082388806abdebbd8c8f5f2568c5 /app/sightings | |
parent | fb8331ac64382d53fa16a252a38170e91fa95ad5 (diff) |
sight: added the concept of recording to an event, like a walk
Diffstat (limited to 'app/sightings')
-rw-r--r-- | app/sightings/migrations/0015_sighting_event.py | 20 | ||||
-rw-r--r-- | app/sightings/models.py | 3 |
2 files changed, 22 insertions, 1 deletions
diff --git a/app/sightings/migrations/0015_sighting_event.py b/app/sightings/migrations/0015_sighting_event.py new file mode 100644 index 0000000..8b35f6e --- /dev/null +++ b/app/sightings/migrations/0015_sighting_event.py @@ -0,0 +1,20 @@ +# Generated by Django 4.1.3 on 2022-12-27 21:05 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('locations', '0028_auto_20200308_1152'), + ('sightings', '0014_rename_image_ap_featured_image'), + ] + + operations = [ + migrations.AddField( + model_name='sighting', + name='event', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='locations.track'), + ), + ] diff --git a/app/sightings/models.py b/app/sightings/models.py index 93de8d8..dfcde2c 100644 --- a/app/sightings/models.py +++ b/app/sightings/models.py @@ -11,7 +11,7 @@ from django.conf import settings from bs4 import BeautifulSoup -from locations.models import Location +from locations.models import Location, Track from media.models import LuxImage, LuxImageSize from utils.next_prev import next_in_order, prev_in_order @@ -139,6 +139,7 @@ class Sighting(models.Model): country_slug = models.CharField(max_length=200, blank=True) region_name = models.CharField(max_length=200, blank=True) ap_common_name = models.CharField(max_length=200, blank=True) + event = models.ForeignKey(Track, on_delete=models.SET_NULL, blank=True, null=True) # seen_by = models.ManyToManyField(User) # images = models.ManyToManyField(LuxImage, blank=True) # audio = models.ManyToManyField(BirdAudio, blank=True) |