mirror of
https://github.com/lemeow125/Django-NotesApp.git
synced 2025-05-17 03:58:05 +08:00
Fixed timezone for date_created
This commit is contained in:
parent
ec74dbdaf5
commit
5c318d6dbb
6 changed files with 83 additions and 35 deletions
|
@ -0,0 +1,22 @@
|
|||
# Generated by Django 4.1.7 on 2023-03-04 13:42
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('notes', '0011_alter_note_owner'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='note',
|
||||
name='date_created',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='note',
|
||||
name='last_updated',
|
||||
field=models.DateTimeField(auto_now=True),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 4.1.7 on 2023-03-04 13:58
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.utils.timezone
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('notes', '0012_remove_note_date_created_note_last_updated'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='note',
|
||||
name='last_updated',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='note',
|
||||
name='date_created',
|
||||
field=models.DateTimeField(default=django.utils.timezone.now, editable=False),
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue