mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-16 07:02:04 +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:
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
django: ["1.11", "2.2", "3.0"]
|
||||
django: ["2.2", "3.0"]
|
||||
python-version: ["3.6", "3.7", "3.8"]
|
||||
|
||||
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
|
||||
|
||||
```bash
|
||||
pip install "graphene-django>=2.0"
|
||||
pip install "graphene-django>=3"
|
||||
```
|
||||
|
||||
### Settings
|
||||
|
|
|
@ -23,7 +23,7 @@ For installing graphene, just run this command in your shell
|
|||
|
||||
.. code:: bash
|
||||
|
||||
pip install "graphene-django>=2.0"
|
||||
pip install "graphene-django>=3"
|
||||
|
||||
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``:
|
||||
|
||||
For Django 1.11:
|
||||
|
||||
.. code:: python
|
||||
|
||||
urlpatterns = [
|
||||
# some other urls
|
||||
url(r'^graphql$', PrivateGraphQLView.as_view(graphiql=True, schema=schema)),
|
||||
]
|
||||
|
||||
For Django 2.0 and above:
|
||||
For Django 2.2 and above:
|
||||
|
||||
.. code:: python
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ Requirements
|
|||
|
||||
Graphene-Django currently supports the following versions of Django:
|
||||
|
||||
* >= Django 1.11
|
||||
* >= Django 2.2
|
||||
|
||||
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:
|
||||
|
||||
For Django 1.11:
|
||||
|
||||
.. 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:
|
||||
For Django 2.2 and above:
|
||||
|
||||
.. code:: python
|
||||
|
||||
|
|
9
setup.py
9
setup.py
|
@ -1,7 +1,8 @@
|
|||
from setuptools import find_packages, setup
|
||||
import ast
|
||||
import re
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
_version_re = re.compile(r"__version__\s+=\s+(.*)")
|
||||
|
||||
with open("graphene_django/__init__.py", "rb") as f:
|
||||
|
@ -53,9 +54,9 @@ setup(
|
|||
keywords="api graphql protocol rest relay graphene",
|
||||
packages=find_packages(exclude=["tests"]),
|
||||
install_requires=[
|
||||
"graphene>=2.1.7,<3",
|
||||
"graphql-core>=2.1.0,<3",
|
||||
"Django>=1.11,!=2.0.*,!=2.1.*",
|
||||
"graphene>=3.0.0b1,<4",
|
||||
"graphql-core>=3.1.0,<4",
|
||||
"Django>=2.2",
|
||||
"promise>=2.1",
|
||||
],
|
||||
setup_requires=["pytest-runner"],
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -1,6 +1,6 @@
|
|||
[tox]
|
||||
envlist =
|
||||
py{36,37,38}-django{111,22,30,master},
|
||||
py{36,37,38}-django{22,30,master},
|
||||
black,flake8
|
||||
|
||||
[gh-actions]
|
||||
|
@ -11,7 +11,6 @@ python =
|
|||
|
||||
[gh-actions:env]
|
||||
DJANGO =
|
||||
1.11: django111
|
||||
2.2: django22
|
||||
3.0: django30
|
||||
master: djangomaster
|
||||
|
@ -24,7 +23,6 @@ setenv =
|
|||
deps =
|
||||
-e.[test]
|
||||
psycopg2-binary
|
||||
django111: Django>=1.11,<2.0
|
||||
django22: Django>=2.2,<3.0
|
||||
django30: Django>=3.0a1,<3.1
|
||||
djangomaster: https://github.com/django/django/archive/master.zip
|
||||
|
|
Loading…
Reference in New Issue
Block a user