Skip to content

Commit

Permalink
Adding dates on Program model
Browse files Browse the repository at this point in the history
  • Loading branch information
annagav committed Sep 21, 2024
1 parent 01a958a commit 6326481
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 4.2 on 2024-09-21 00:17

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('courses', '0055_rename_programrequirement_index'),
]

operations = [
migrations.AddField(
model_name='program',
name='end_date',
field=models.DateField(blank=True, db_index=True, null=True),
),
migrations.AddField(
model_name='program',
name='enrollment_end',
field=models.DateTimeField(blank=True, db_index=True, null=True),
),
migrations.AddField(
model_name='program',
name='enrollment_start',
field=models.DateTimeField(blank=True, db_index=True, null=True),
),
migrations.AddField(
model_name='program',
name='start_date',
field=models.DateField(blank=True, db_index=True, null=True),
),
]
4 changes: 4 additions & 0 deletions courses/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ class Meta:
availability = models.CharField(
choices=AVAILABILITY_CHOICES, default=AVAILABILITY_ANYTIME, max_length=255
)
enrollment_start = models.DateTimeField(null=True, blank=True, db_index=True)
enrollment_end = models.DateTimeField(null=True, blank=True, db_index=True)
start_date = models.DateField(null=True, blank=True, db_index=True)
end_date = models.DateField(null=True, blank=True, db_index=True)

@cached_property
def page(self):
Expand Down

0 comments on commit 6326481

Please sign in to comment.