mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-03 03:43:28 +03:00
Update dependencies to graph* 3.0
* Update mentions of django 1.11 and 2.0
This commit is contained in:
parent
77b9832606
commit
a62cee751f
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 4
|
max-parallel: 4
|
||||||
matrix:
|
matrix:
|
||||||
django: ["1.11", "2.2", "3.0"]
|
django: ["2.2", "3.0"]
|
||||||
python-version: ["3.6", "3.7", "3.8"]
|
python-version: ["3.6", "3.7", "3.8"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -28,7 +28,7 @@ A [Django](https://www.djangoproject.com/) integration for [Graphene](http://gra
|
||||||
For installing graphene, just run this command in your shell
|
For installing graphene, just run this command in your shell
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install "graphene-django>=2.0"
|
pip install "graphene-django>=3"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Settings
|
### Settings
|
||||||
|
|
|
@ -23,7 +23,7 @@ For installing graphene, just run this command in your shell
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
pip install "graphene-django>=2.0"
|
pip install "graphene-django>=3"
|
||||||
|
|
||||||
Settings
|
Settings
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
|
@ -166,16 +166,7 @@ To restrict users from accessing the GraphQL API page the standard Django LoginR
|
||||||
|
|
||||||
After this, you can use the new ``PrivateGraphQLView`` in the project's URL Configuration file ``url.py``:
|
After this, you can use the new ``PrivateGraphQLView`` in the project's URL Configuration file ``url.py``:
|
||||||
|
|
||||||
For Django 1.11:
|
For Django 2.2 and above:
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
urlpatterns = [
|
|
||||||
# some other urls
|
|
||||||
url(r'^graphql$', PrivateGraphQLView.as_view(graphiql=True, schema=schema)),
|
|
||||||
]
|
|
||||||
|
|
||||||
For Django 2.0 and above:
|
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ Requirements
|
||||||
|
|
||||||
Graphene-Django currently supports the following versions of Django:
|
Graphene-Django currently supports the following versions of Django:
|
||||||
|
|
||||||
* >= Django 1.11
|
* >= Django 2.2
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
@ -32,19 +32,7 @@ Add ``graphene_django`` to the ``INSTALLED_APPS`` in the ``settings.py`` file of
|
||||||
|
|
||||||
We need to add a ``graphql`` URL to the ``urls.py`` of your Django project:
|
We need to add a ``graphql`` URL to the ``urls.py`` of your Django project:
|
||||||
|
|
||||||
For Django 1.11:
|
For Django 2.2 and above:
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
from django.conf.urls import url
|
|
||||||
from graphene_django.views import GraphQLView
|
|
||||||
|
|
||||||
urlpatterns = [
|
|
||||||
# ...
|
|
||||||
url(r"graphql", GraphQLView.as_view(graphiql=True)),
|
|
||||||
]
|
|
||||||
|
|
||||||
For Django 2.0 and above:
|
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
|
|
9
setup.py
9
setup.py
|
@ -1,7 +1,8 @@
|
||||||
from setuptools import find_packages, setup
|
|
||||||
import ast
|
import ast
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
_version_re = re.compile(r"__version__\s+=\s+(.*)")
|
_version_re = re.compile(r"__version__\s+=\s+(.*)")
|
||||||
|
|
||||||
with open("graphene_django/__init__.py", "rb") as f:
|
with open("graphene_django/__init__.py", "rb") as f:
|
||||||
|
@ -53,9 +54,9 @@ setup(
|
||||||
keywords="api graphql protocol rest relay graphene",
|
keywords="api graphql protocol rest relay graphene",
|
||||||
packages=find_packages(exclude=["tests"]),
|
packages=find_packages(exclude=["tests"]),
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"graphene>=2.1.7,<3",
|
"graphene>=3.0.0b1,<4",
|
||||||
"graphql-core>=2.1.0,<3",
|
"graphql-core>=3.1.0,<4",
|
||||||
"Django>=1.11,!=2.0.*,!=2.1.*",
|
"Django>=2.2",
|
||||||
"promise>=2.1",
|
"promise>=2.1",
|
||||||
],
|
],
|
||||||
setup_requires=["pytest-runner"],
|
setup_requires=["pytest-runner"],
|
||||||
|
|
4
tox.ini
4
tox.ini
|
@ -1,6 +1,6 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
py{36,37,38}-django{111,22,30,master},
|
py{36,37,38}-django{22,30,master},
|
||||||
black,flake8
|
black,flake8
|
||||||
|
|
||||||
[gh-actions]
|
[gh-actions]
|
||||||
|
@ -11,7 +11,6 @@ python =
|
||||||
|
|
||||||
[gh-actions:env]
|
[gh-actions:env]
|
||||||
DJANGO =
|
DJANGO =
|
||||||
1.11: django111
|
|
||||||
2.2: django22
|
2.2: django22
|
||||||
3.0: django30
|
3.0: django30
|
||||||
master: djangomaster
|
master: djangomaster
|
||||||
|
@ -24,7 +23,6 @@ setenv =
|
||||||
deps =
|
deps =
|
||||||
-e.[test]
|
-e.[test]
|
||||||
psycopg2-binary
|
psycopg2-binary
|
||||||
django111: Django>=1.11,<2.0
|
|
||||||
django22: Django>=2.2,<3.0
|
django22: Django>=2.2,<3.0
|
||||||
django30: Django>=3.0a1,<3.1
|
django30: Django>=3.0a1,<3.1
|
||||||
djangomaster: https://github.com/django/django/archive/master.zip
|
djangomaster: https://github.com/django/django/archive/master.zip
|
||||||
|
|
Loading…
Reference in New Issue
Block a user