Skip to content

Commit

Permalink
start of external supplementary files
Browse files Browse the repository at this point in the history
Preprints - Links to external supplementary files openlibhums#1590
  • Loading branch information
tingletech committed Aug 3, 2020
1 parent 19036ec commit 8038901
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/repository/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ class Preprint(models.Model):
null=True,
on_delete=models.SET_NULL,
)
submission_supplementary_files = models.ManyToManyField(
'PreprintSupplementaryFile',
related_name='submission_supplementary_files',
blank=True,
null=True,
)
meta_image = models.ImageField(
blank=True,
null=True,
Expand Down Expand Up @@ -533,6 +539,11 @@ def download_url(self):
)


class PreprintSupplementaryFile(models.Model):
preprint = models.ForeignKey(Preprint)
url = models.URLField()


class PreprintAccess(models.Model):
preprint = models.ForeignKey(Preprint)
file = models.ForeignKey(PreprintFile, blank=True, null=True)
Expand Down

0 comments on commit 8038901

Please sign in to comment.