1 from django.db import models |
1 from django.db import models |
2 from django.core.management.validation import max_length |
2 |
|
3 |
|
4 class Timeline(models.Model): |
|
5 """Timeline of the program |
|
6 """ |
|
7 |
|
8 # Start of registration for the program |
|
9 registration_start = models.DateTimeField(blank=True) |
|
10 |
|
11 # End of registration for the program |
|
12 registration_end = models.DateTimeField(blank=True) |
|
13 |
|
14 # Start of Call for Papers |
|
15 cfp_start = models.DateTimeField(blank=True) |
|
16 |
|
17 # End of Call for Papers |
|
18 cfp_end = models.DateTimeField(blank=True) |
|
19 |
|
20 # Accepted papers announced |
|
21 accepted_papers_announced = models.DateTimeField(blank=True) |
|
22 |
|
23 # Deadline to submit proceedings paper |
|
24 proceedings_paper_deadline = models.DateTimeField(blank=True) |
|
25 |
|
26 # Start of the actual program |
|
27 event_start = models.DateTimeField(blank=True) |
|
28 |
|
29 # End of the actual program |
|
30 event_end = models.DateTimeField(blank=True) |
3 |
31 |
4 |
32 |
5 class Event(models.Model): |
33 class Event(models.Model): |
6 """Data model which holds the data related to the scope or the event. |
34 """Data model which holds the data related to the scope or the event. |
7 """ |
35 """ |
26 |
54 |
27 # Status of the program |
55 # Status of the program |
28 status = models.CharField(max_length=255, choices=STATUS_CHOICES) |
56 status = models.CharField(max_length=255, choices=STATUS_CHOICES) |
29 |
57 |
30 |
58 |
31 class Timeline(models.Model): |
|
32 """Timeline of the program |
|
33 """ |
|
34 |
|
35 # Start of registration for the program |
|
36 registration_start = models.DateTimeField() |
|
37 |
|
38 # End of registration for the program |
|
39 registration_end = models.DateTimeField() |
|
40 |
|
41 # Start of Call for Papers |
|
42 cfp_start = models.DateTimeField() |
|
43 |
|
44 # End of Call for Papers |
|
45 cfp_end = models.DateTimeField() |
|
46 |
|
47 # Accepted papers announced |
|
48 accepted_papers_announced = models.DateTimeField() |
|
49 |
|
50 # Deadline to submit proceedings paper |
|
51 proceedings_paper_deadline = models.DateTimeField() |
|
52 |
|
53 # Start of the actual program |
|
54 event_start = models.DateTimeField() |
|
55 |
|
56 # End of the actual program |
|
57 event_end = models.DateTimeField() |
|
58 |
|
59 |
|
60 class ScopedBase(models.Model): |
59 class ScopedBase(models.Model): |
61 """Base model which is in turn inherited by other models |
60 """Base model which is in turn inherited by other models |
62 which needs to be scoped. |
61 which needs to be scoped. |
63 """ |
62 """ |
64 |
63 |
65 # Scope of entity in which it is visible |
64 # Scope of entity in which it is visible |
66 scope = models.ForeignKey(Scope) |
65 scope = models.ForeignKey(Event) |
67 |
66 |
68 class Meta: |
67 class Meta: |
69 abstract = True |
68 abstract = True |