Skip to content

Commit

Permalink
#51 modifying models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aanersc committed Sep 25, 2020
1 parent 27aaa5c commit 8e60bd7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions geospaas/catalog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class Dataset(models.Model):
entry_id : CharField
A unique dataset ID. Only alpanumeric characters are allowed.
entry_title : CharField
parameters: ManyToManyField to Parameter through DatasetParameter
parameters: ManyToManyField to Parameter
ISO_topic_category : ForeignKey to ISOTopicCategory
data_center : ForeignKey to DataCenter
summary : TextField
Expand Down Expand Up @@ -144,7 +144,7 @@ class Dataset(models.Model):
]
)
entry_title = models.CharField(max_length=220)
parameters = models.ManyToManyField(Parameter, through='DatasetParameter')
parameters = models.ManyToManyField(Parameter)
ISO_topic_category = models.ForeignKey(ISOTopicCategory, on_delete=models.CASCADE)
data_center = models.ForeignKey(DataCenter, on_delete=models.CASCADE)
summary = models.TextField()
Expand Down Expand Up @@ -174,12 +174,6 @@ def __str__(self):
# temporal_resolution = models.CharField(max_length=220)
# temporal_resolution_range = models.ForeignKey(TemporalDataResolution)

class DatasetParameter(models.Model):
dataset = models.ForeignKey(Dataset, on_delete=models.CASCADE)
parameter = models.ForeignKey(Parameter, on_delete=models.CASCADE)

def __str__(self):
return '%s:%s' %(self.dataset, self.parameter)

class DatasetURI(models.Model):

Expand Down

0 comments on commit 8e60bd7

Please sign in to comment.