summaryrefslogtreecommitdiff
path: root/workshop_app/models.py
diff options
context:
space:
mode:
authorAkshen2017-07-21 16:20:05 +0530
committerAkshen2017-07-21 16:20:05 +0530
commit56810c910b3ab85eed78785c3220adfad189f208 (patch)
tree3f82c382f9d14430d77fac74b4570a13525c7921 /workshop_app/models.py
parent0dfc64dfb0378bc8a853de52c301c35893d2ba83 (diff)
downloadworkshop_booking-56810c910b3ab85eed78785c3220adfad189f208.tar.gz
workshop_booking-56810c910b3ab85eed78785c3220adfad189f208.tar.bz2
workshop_booking-56810c910b3ab85eed78785c3220adfad189f208.zip
Adds class meta for Models
Diffstat (limited to 'workshop_app/models.py')
-rw-r--r--workshop_app/models.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/workshop_app/models.py b/workshop_app/models.py
index 5e7734c..41a249e 100644
--- a/workshop_app/models.py
+++ b/workshop_app/models.py
@@ -128,6 +128,12 @@ class RequestedWorkshop(models.Model):
on_delete=models.CASCADE
)
+ def __str__(self):
+ return u"{0} | {1} | {2}".format(
+ self.requested_workshop_date,
+ self.requested_workshop_title,
+ self.requested_workshop_coordinator,
+ )
class ProposeWorkshopDate(models.Model):
"""
@@ -160,6 +166,13 @@ class ProposeWorkshopDate(models.Model):
max_length=32, default="Pending"
)
+ def __str__(self):
+ return u"{0} | {1} | {2}".format(
+ self.proposed_workshop_date,
+ self.proposed_workshop_title,
+ self.proposed_workshop_coordinator,
+ )
+
class BookedWorkshop(models.Model):
"""
@@ -169,6 +182,13 @@ class BookedWorkshop(models.Model):
booked_workshop_requested = models.ForeignKey(RequestedWorkshop, null=True)
booked_workshop_proposed = models.ForeignKey(ProposeWorkshopDate, null=True)
+ def __str__(self):
+ return u"{0} | {1} |".format(
+ self.booked_workshop_requested,
+ self.booked_workshop_proposed,
+
+ )
+
class Testimonial(models.Model):
"""
Contains Testimonals of Workshops