1
0
Fork 0

Add waterfall to observation data

merge-requests/283/head
Nikos Roussos 2017-01-26 19:29:13 +02:00
parent 8fc4f843d5
commit 1a7ca746bb
No known key found for this signature in database
GPG Key ID: BADFF1767BA7C8E1
3 changed files with 22 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class DataSerializer(serializers.ModelSerializer):
class Meta:
model = Data
fields = ('id', 'start', 'end', 'observation', 'ground_station', 'transmitter',
'norad_cat_id', 'payload', 'demoddata')
'norad_cat_id', 'payload', 'waterfall', 'demoddata')
read_only_fields = ['id', 'start', 'end', 'observation', 'ground_station',
'transmitter', 'norad_cat_id']

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-26 17:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0012_auto_20160508_1516'),
]
operations = [
migrations.AddField(
model_name='data',
name='waterfall',
field=models.ImageField(blank=True, null=True, upload_to=b'data_waterfalls'),
),
]

View File

@ -255,6 +255,7 @@ class Data(models.Model):
observation = models.ForeignKey(Observation)
ground_station = models.ForeignKey(Station)
payload = models.FileField(upload_to='data_payloads', blank=True, null=True)
waterfall = models.ImageField(upload_to='data_waterfalls', blank=True, null=True)
vetted_datetime = models.DateTimeField(null=True, blank=True)
vetted_user = models.ForeignKey(User, related_name="vetted_user_set", null=True, blank=True)
vetted_status = models.CharField(choices=OBSERVATION_STATUSES,