diff options
author | Madhusudan.C.S | 2010-07-20 03:20:02 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2010-07-20 03:20:02 +0530 |
commit | 9f0fa2b74dda6268c36d3788ae45b5caf39dd799 (patch) | |
tree | cee1621bba8cf21db49f8edb78e9b8b16b6da3ea | |
parent | 47f651144403becf9d4fa8a2f80330abdab4b6eb (diff) | |
download | scipycon-9f0fa2b74dda6268c36d3788ae45b5caf39dd799.tar.gz scipycon-9f0fa2b74dda6268c36d3788ae45b5caf39dd799.tar.bz2 scipycon-9f0fa2b74dda6268c36d3788ae45b5caf39dd799.zip |
Added timeline and event models and readjusted ScopedBase model.
-rw-r--r-- | project/scipycon/base/models.py | 62 |
1 files changed, 60 insertions, 2 deletions
diff --git a/project/scipycon/base/models.py b/project/scipycon/base/models.py index b3084d3..63970d2 100644 --- a/project/scipycon/base/models.py +++ b/project/scipycon/base/models.py @@ -1,11 +1,69 @@ from django.db import models +from django.core.management.validation import max_length -class ScopedBase(models.Model): - """Base model which is in turn inherited by other models. +class Event(models.Model): + """Data model which holds the data related to the scope or the event. """ + # Different states the Event can be in + STATUS_CHOICES = ( + ('active', 'Active'), + ('inactive', 'Inactive'), + ) + + # Scope of the program, used as a URL prefix scope = models.CharField(max_length=255) + # Name of the program + name = models.CharField(max_length=255) + + # Event specific i.e version of the event + turn = models.CharField(max_length=255) + + # Time associated with the program + timeline = models.OneToOneField(Timeline) + + # Status of the program + status = models.CharField(max_length=255, choices=STATUS_CHOICES) + + +class Timeline(models.Model): + """Timeline of the program + """ + + # Start of registration for the program + registration_start = models.DateTimeField() + + # End of registration for the program + registration_end = models.DateTimeField() + + # Start of Call for Papers + cfp_start = models.DateTimeField() + + # End of Call for Papers + cfp_end = models.DateTimeField() + + # Accepted papers announced + accepted_papers_announced = models.DateTimeField() + + # Deadline to submit proceedings paper + proceedings_paper_deadline = models.DateTimeField() + + # Start of the actual program + event_start = models.DateTimeField() + + # End of the actual program + event_end = models.DateTimeField() + + +class ScopedBase(models.Model): + """Base model which is in turn inherited by other models + which needs to be scoped. + """ + + # Scope of entity in which it is visible + scope = models.ForeignKey(Scope) + class Meta: abstract = True |