aboutsummaryrefslogtreecommitdiffstats
path: root/src/booking
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-01-02 14:38:04 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-01-02 14:38:04 +0000
commit7bf4f3794ebbf7b819d7db9f4d4522b7279169f5 (patch)
treedad9e850989d1b4588576036a7416724847a210d /src/booking
parentf344654fd14e972b1b443194201dfd4c19288809 (diff)
parent21919476d791c24be54a447f9b7e32f74d3bd4b4 (diff)
Merge "Renders Pod Destriptor File earlier"
Diffstat (limited to 'src/booking')
-rw-r--r--src/booking/migrations/0002_booking_pdf.py18
-rw-r--r--src/booking/models.py1
-rw-r--r--src/booking/views.py2
3 files changed, 20 insertions, 1 deletions
diff --git a/src/booking/migrations/0002_booking_pdf.py b/src/booking/migrations/0002_booking_pdf.py
new file mode 100644
index 0000000..53232c9
--- /dev/null
+++ b/src/booking/migrations/0002_booking_pdf.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.1 on 2018-11-09 16:09
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('booking', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='booking',
+ name='pdf',
+ field=models.TextField(blank=True, default=''),
+ ),
+ ]
diff --git a/src/booking/models.py b/src/booking/models.py
index d0c77b4..74b766d 100644
--- a/src/booking/models.py
+++ b/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'
diff --git a/src/booking/views.py b/src/booking/views.py
index ab43519..29b53e2 100644
--- a/src/booking/views.py
+++ b/src/booking/views.py
@@ -112,7 +112,7 @@ def booking_detail_view(request, booking_id):
{
'title': 'Booking Details',
'booking': booking,
- 'pdf': ResourceManager().makePDF(booking.resource),
+ 'pdf': booking.pdf,
'user_id': user.id
})