Skip to content

Commit

Permalink
Make compatible to django 5
Browse files Browse the repository at this point in the history
  • Loading branch information
monim67 committed Dec 9, 2023
1 parent d01e700 commit 05b1b20
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 30 deletions.
6 changes: 2 additions & 4 deletions dev/myapp/migrations/0002_insert_demo_event.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Generated by Django 2.1 on 2018-08-26 18:54

from datetime import datetime
from datetime import datetime, timezone

import pytz
from django.db import migrations


def insert_demo_event(apps, schema_editor): # type: ignore
event_datetime = datetime(2019, 2, 4, 0, 0, tzinfo=pytz.UTC)
event_datetime = datetime(2019, 2, 4, 0, 0, tzinfo=timezone.utc)

event = apps.get_model("myapp", "Event")()
event.name = "Event 01"
Expand All @@ -21,7 +20,6 @@ def insert_demo_event(apps, schema_editor): # type: ignore


class Migration(migrations.Migration):

dependencies = [
("myapp", "0001_initial"),
]
Expand Down
80 changes: 56 additions & 24 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ classifiers = [
"Framework :: Django :: 2.0",
"Framework :: Django :: 3.0",
"Framework :: Django :: 4.0",
"Framework :: Django :: 5.0",
]

[tool.poetry.dependencies]
python = "^3.8"
Django = ">=2,<5"
Django = ">=2,<6"
pydantic = "^2"
pydantic-settings = "*"
typing-extensions = "*"
Expand Down
3 changes: 2 additions & 1 deletion tests/pip-constraints.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
django==4.* ; python_version >= "3.10"
django==5.* ; python_version >= "3.11"
django==4.* ; python_version >= "3.10" and python_version < "3.11"
django==3.* ; python_version >= "3.9" and python_version < "3.10"
django==2.* ; python_version < "3.9"

0 comments on commit 05b1b20

Please sign in to comment.