Skip to content

Commit

Permalink
Merge pull request #27 from igorkramaric/django-5.0
Browse files Browse the repository at this point in the history
Django 5.0
  • Loading branch information
igorkramaric authored May 15, 2024
2 parents ad669f6 + 8af61ca commit 68aa1d1
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "jsonate"
version = "0.7.9"
version = "0.7.10"
authors = [
{name = "James Robert"},
{email = "[email protected]"}
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
psycopg[binary]==3.1.12
django==4.2.6
Pillow==9.0.1
Django==5.0.6
Pillow==10.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 5.0.6 on 2024-05-15 15:07

import datetime
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('test_app', '0008_alter_mymodel_null_field'),
]

operations = [
migrations.AlterField(
model_name='mymodel',
name='datetime_field',
field=models.DateTimeField(default=datetime.datetime(2011, 1, 11, 11, 11, 11, tzinfo=datetime.timezone.utc)),
),
]
4 changes: 2 additions & 2 deletions test_project/test_app/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import datetime, date
from datetime import datetime, date, timezone
from decimal import Decimal

from django.db import models
Expand All @@ -13,7 +13,7 @@ class MyModel(models.Model):

sensitive_field1 = models.CharField(max_length=25, default='sensitive')

datetime_field = models.DateTimeField(default=datetime(2011, 1, 11, 11, 11, 11))
datetime_field = models.DateTimeField(default=datetime(2011, 1, 11, 11, 11, 11, tzinfo=timezone.utc))
date_field = models.DateField(default=date(2011, 1, 11))

decimal_field = models.DecimalField(max_digits=10, decimal_places=2, default=Decimal('32.25'))
Expand Down
2 changes: 1 addition & 1 deletion test_project/test_app/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def test_basic_serialization(self):
"null_field": None,
"decimal_field": 32.25,
"foreign_key": 1,
"datetime_field": "2011-01-11T11:11:11",
"datetime_field": "2011-01-11T11:11:11+00:00",
"image_field": "images/image_file.wbm",
"date_field": "2011-01-11",
"id": 1,
Expand Down

0 comments on commit 68aa1d1

Please sign in to comment.