From 28a35133ff325aab59204df7372d7cc78ca5e64c Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Fri, 9 Nov 2018 11:10:03 -0500 Subject: Renders Pod Destriptor File earlier Currently, the PDF is rendered 'on-demand' every time you visit the booking detail page. This change renders the pdf once and saves it in the booking model. Advantages: - saves computation of re-rendering pdf constantly - fixes issue where pdf fails to render after booking expires Change-Id: I58d20fadce088d78ebd22f1d6f67cab371823542 Signed-off-by: Parker Berberian --- dashboard/src/booking/models.py | 1 + 1 file changed, 1 insertion(+) (limited to 'dashboard/src/booking/models.py') diff --git a/dashboard/src/booking/models.py b/dashboard/src/booking/models.py index d0c77b4..74b766d 100644 --- a/dashboard/src/booking/models.py +++ b/dashboard/src/booking/models.py @@ -57,6 +57,7 @@ class Booking(models.Model): config_bundle = models.ForeignKey(ConfigBundle, on_delete=models.SET_NULL, null=True) project = models.CharField(max_length=100, default="", blank=True, null=True) lab = models.ForeignKey(Lab, null=True, on_delete=models.SET_NULL) + pdf = models.TextField(blank=True, default="") class Meta: db_table = 'booking' -- cgit 1.2.3-korg