mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-28 20:43:43 +03:00
Improv/documentation fixes (#895)
* Bump up the minimum support Django version. * Update documentation to mention support for Django 1.11. Co-authored-by: Akhil <akhil@healthifyme.com>
This commit is contained in:
parent
aeb04d5b5c
commit
13352216a4
|
@ -166,7 +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.9 and below:
|
For Django 1.11:
|
||||||
|
|
||||||
.. 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 2.X
|
* >= Django 1.11
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
@ -32,6 +32,20 @@ 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:
|
||||||
|
|
||||||
|
.. 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
|
||||||
|
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
|
@ -286,7 +286,7 @@ from the command line.
|
||||||
$ python ./manage.py runserver
|
$ python ./manage.py runserver
|
||||||
|
|
||||||
Performing system checks...
|
Performing system checks...
|
||||||
Django version 1.9, using settings 'cookbook.settings'
|
Django version 1.11, using settings 'cookbook.settings'
|
||||||
Starting development server at http://127.0.0.1:8000/
|
Starting development server at http://127.0.0.1:8000/
|
||||||
Quit the server with CONTROL-C.
|
Quit the server with CONTROL-C.
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,7 @@ from the command line.
|
||||||
$ python ./manage.py runserver
|
$ python ./manage.py runserver
|
||||||
|
|
||||||
Performing system checks...
|
Performing system checks...
|
||||||
Django version 1.9, using settings 'cookbook.settings'
|
Django version 1.11, using settings 'cookbook.settings'
|
||||||
Starting development server at http://127.0.0.1:8000/
|
Starting development server at http://127.0.0.1:8000/
|
||||||
Quit the server with CONTROL-C.
|
Quit the server with CONTROL-C.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user