Skip to content

Commit 86fad10

Browse files
committed
Each web framework has its own installation command
1 parent 3d705f0 commit 86fad10

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ Read our [docs here](https://identity-library.readthedocs.io/en/latest/)
118118
## Installation
119119

120120
This package is [available on PyPI](https://pypi.org/project/identity/).
121-
You can install it by `pip install identity`.
121+
Choose the package declaration that matches your web framework:
122+
123+
* Django: `pip install identity[django]`
124+
* Flask: `pip install identity[flask]`
122125

123126
## Versions
124127

docs/django.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ as a reference. What we need are basically these steps:
2222
def index(request):
2323
return HttpResponse("Hello, world. Everyone can read this line.")
2424

25-
Django configuration
26-
--------------------
25+
Identity-for-Django configuration
26+
---------------------------------
2727

28-
#. Firstly, create an instance of the :py:class:`identity.django.Auth` object,
28+
#. Install dependency by ``pip install identity[django]``
29+
30+
#. Create an instance of the :py:class:`identity.django.Auth` object,
2931
and assign it to a global variable inside your ``settings.py``::
3032

3133
import os

docs/flask.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ Create `a hello world web project in Flask <https://flask.palletsprojects.com/en
88
Here we assume the project's main file is named ``app.py``.
99

1010

11-
Flask configuration
12-
-------------------
11+
Identity-for-Flask configuration
12+
--------------------------------
13+
14+
#. Install dependency by ``pip install identity[flask]``
1315

1416
#. Add an ``app_config.py`` file containing the following::
1517

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ include_package_data = True
5555
flask =
5656
# If Flask-Session is not maintained in future, Flask-Session2 should work as well
5757
Flask-Session>=0.3.2,<0.6
58+
django =
59+
# Placeholder, in case we will introduce Django-relevant dependency in the future
5860
5961
[options.entry_points]
6062
# See also https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html

0 commit comments

Comments
 (0)