* chore: enforce USE_TZ setting expectations in migrations * chore: keep USE_TZ=False until changed manually
24 lines
583 B
Python
24 lines
583 B
Python
# Generated by Django 2.2.28 on 2022-08-29 10:16
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations
|
|
|
|
|
|
def forward(apps, schema_editor):
|
|
assert getattr(settings, 'USE_TZ', False), 'Please change USE_TZ to True before continuing.'
|
|
|
|
|
|
def reverse(apps, schema_editor):
|
|
assert not getattr(settings, 'USE_TZ', False), 'Please change USE_TZ to False before continuing.'
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('utils', '0002_convert_timestamps_to_utc'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(forward, reverse),
|
|
]
|