Add release specific download URL

This commit is contained in:
rubenwardy
2018-07-28 18:33:36 +01:00
parent a3e82ad42f
commit 286207ffa2
3 changed files with 25 additions and 1 deletions

View File

@@ -608,6 +608,13 @@ class PackageRelease(db.Model):
name=self.package.name,
id=self.id)
def getDownloadURL(self):
return url_for("download_release_page",
author=self.package.author.username,
name=self.package.name,
id=self.id)
def __init__(self):
self.releaseDate = datetime.now()