This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add start/end dates to Occurrences and test timezone handling, re #4
NOTE: Only the `Timezones` tests pass after this change, further work is pending to update the rest of the system to account for the date/datetime changes to `Occurrences`.
- Loading branch information
Showing
3 changed files
with
259 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import datetime | ||
from django.utils.timezone import utc | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('icekit_events', '0005_auto_20161024_1742'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='occurrence', | ||
options={'ordering': ['start_date', 'start', 'event__title', 'pk']}, | ||
), | ||
migrations.AddField( | ||
model_name='occurrence', | ||
name='end_date', | ||
field=models.DateField(default=datetime.datetime(2016, 11, 1, 3, 19, 41, 815314, tzinfo=utc), db_index=True), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='occurrence', | ||
name='original_end_date', | ||
field=models.DateField(null=True, editable=False, blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='occurrence', | ||
name='original_start_date', | ||
field=models.DateField(null=True, editable=False, blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='occurrence', | ||
name='start_date', | ||
field=models.DateField(default=datetime.datetime(2016, 11, 1, 3, 19, 45, 647055, tzinfo=utc), db_index=True), | ||
preserve_default=False, | ||
), | ||
migrations.AlterField( | ||
model_name='occurrence', | ||
name='end', | ||
field=models.DateTimeField(db_index=True, null=True, blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='occurrence', | ||
name='start', | ||
field=models.DateTimeField(db_index=True, null=True, blank=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.