[Re #229] Add a new payload field on Data model
parent
16a6f8cbbb
commit
4403697fa8
|
@ -6,7 +6,7 @@ from network.base.models import Data, Station
|
|||
class DataSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = Data
|
||||
fields = ('id', 'start', 'end', 'observation', 'ground_station', 'payload')
|
||||
fields = ('id', 'start', 'end', 'observation', 'ground_station', 'payload', 'payload_demode')
|
||||
read_only_fields = ['id', 'start', 'end', 'observation', 'ground_station']
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.4 on 2016-04-06 12:07
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('base', '0006_auto_20160325_0126'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='data',
|
||||
name='payload_demode',
|
||||
field=models.FileField(blank=True, null=True, upload_to=b'data_payloads'),
|
||||
),
|
||||
]
|
|
@ -253,6 +253,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)
|
||||
payload_demode = models.FileField(upload_to='data_payloads', 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,
|
||||
|
|
Loading…
Reference in New Issue