Handle some deprecations
[redakcja.git] / src / documents / migrations / 0001_initial.py
index 451029b..a4d6fc2 100644 (file)
@@ -8,12 +8,12 @@ is made to remove previous `catalogue` migrations, this will need
 to be converted to a real database migration.
 """
 
-import datetime
 from django.conf import settings
 import django.contrib.auth.models
 import django.core.files.storage
 from django.db import migrations, models
 import django.db.models.deletion
+import django.utils.timezone
 import dvcs.models
 
 
@@ -98,7 +98,7 @@ class Migration(migrations.Migration):
                 ('author_email', models.CharField(blank=True, help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author email')),
                 ('revision', models.IntegerField(db_index=True, verbose_name='revision')),
                 ('description', models.TextField(blank=True, default='', verbose_name='description')),
-                ('created_at', models.DateTimeField(db_index=True, default=datetime.datetime.now, editable=False)),
+                ('created_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now, editable=False)),
                 ('publishable', models.BooleanField(default=False, verbose_name='publishable')),
                 ('data', models.FileField(storage=django.core.files.storage.FileSystemStorage(location=settings.CATALOGUE_REPO_PATH), upload_to=dvcs.models.data_upload_to, verbose_name='data')),
                 ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='author')),
@@ -158,7 +158,7 @@ class Migration(migrations.Migration):
                 ('author_email', models.CharField(blank=True, help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author email')),
                 ('revision', models.IntegerField(db_index=True, verbose_name='revision')),
                 ('description', models.TextField(blank=True, default='', verbose_name='description')),
-                ('created_at', models.DateTimeField(db_index=True, default=datetime.datetime.now, editable=False)),
+                ('created_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now, editable=False)),
                 ('publishable', models.BooleanField(default=False, verbose_name='publishable')),
                 ('data', models.FileField(storage=django.core.files.storage.FileSystemStorage(location=settings.CATALOGUE_IMAGE_REPO_PATH), upload_to=dvcs.models.data_upload_to, verbose_name='data')),
                 ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='author')),