Skip to content

Commit 5898110

Browse files
authored
Merge pull request #6 from eadwinCode/jan_20_django_ninja_upgrade
Jan 20 django ninja upgrade
2 parents 89f32ee + 07851bd commit 5898110

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

.github/workflows/test_full.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ['3.6', '3.7', '3.8', '3.9']
15-
django-version: ['<2.1', '<2.2', '<3.0', '<3.1', '<3.2', '<3.3']
14+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
15+
django-version: ['<2.1', '<2.2', '<3.0', '<3.1', '<3.2', '<3.3', '<4.1']
1616

1717
steps:
1818
- uses: actions/checkout@v2

ninja_extra/constants.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
POST = "POST"
2+
PUT = "PUT"
3+
PATCH = "PATCH"
4+
DELETE = "DELETE"
5+
GET = "GET"
6+
HEAD = "HEAD"
7+
OPTIONS = "OPTIONS"
8+
TRACE = "TRACE"
9+
ROUTE_METHODS = [POST, PUT, PATCH, DELETE, GET, HEAD, OPTIONS, TRACE]

ninja_extra/controllers/route/__init__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@
55
from ninja.signature import is_async
66
from ninja.types import TCallable
77

8+
from ninja_extra.constants import DELETE, GET, PATCH, POST, PUT, ROUTE_METHODS
89
from ninja_extra.controllers.response import ControllerResponse
910
from ninja_extra.permissions import BasePermission
1011
from ninja_extra.schemas import RouteParameter
1112

1213
from .route_functions import AsyncRouteFunction, RouteFunction
1314

14-
POST = "POST"
15-
PUT = "PUT"
16-
PATCH = "PATCH"
17-
DELETE = "DELETE"
18-
GET = "GET"
19-
ROUTE_METHODS = [POST, PUT, PATCH, DELETE, GET]
20-
2115

2216
class RouteInvalidParameterException(Exception):
2317
pass

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,23 @@ classifiers = [
2626
"Programming Language :: Python :: 3.7",
2727
"Programming Language :: Python :: 3.8",
2828
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
2930
"Programming Language :: Python :: 3 :: Only",
3031
"Framework :: Django",
3132
"Framework :: Django :: 2.1",
3233
"Framework :: Django :: 2.2",
3334
"Framework :: Django :: 3.0",
3435
"Framework :: Django :: 3.1",
3536
"Framework :: Django :: 3.2",
37+
"Framework :: Django :: 4.0",
3638
"Framework :: AsyncIO",
3739
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
3840
"Topic :: Internet :: WWW/HTTP",
3941
]
4042

4143
requires = [
42-
"Django >=2.1",
43-
"django-ninja >= 0.15.0",
44+
"Django >= 2.2",
45+
"django-ninja >= 0.16.2",
4446
"injector",
4547
"asgiref"
4648
]

0 commit comments

Comments
 (0)